Adding a custom sidebar myCustomSidebar:
NutrientViewer.load({
// ... Your configuration.
ui: {
sidebar: {
myCustomSidebar: (instance, id) => ({
render: (params) => {
const div = document.createElement("div");
div.innerText = "This is my custom sidebar!";
div.style.padding = "10px";
div.style.color = "#ccc";
return div;
},
}),
},
},
});
Use this to add custom sidebars.