Back to the Shapespark home page

How to add my own designed material picker panel?

I have around 100 materials to change the surface. I want to give options to my client.

Is it possible?

With a web development knowledge you can build custom HTML and JavaScript based UI for changing materials, one of the most advanced examples of this shared on this forum is: Plant Prefab - Configurator

The Shapespark API needed to build such a picker is documented in this section of the API documentation: https://github.com/shapespark/shapespark-viewer-api#replace-textures-using-images-or-videos-from-external-source
Currently it is no longer necessary to host the textures used by the custom picker externally, you can include them in the extra-assets folder within your scene, as explained here: https://github.com/shapespark/shapespark-viewer-api#using-your-own-static-asset-files

1 Like