Back to the Shapespark home page

Changing default texture before or while Shapespark loads


We created a scene on Shapespark and we are trying to change the default textures through code. We are able to change the textures but the change is slow and happens after the initial Shapespark loading, which makes it noticeable to the user.

We want to do the texture change before or while the initial loading occurs. Any suggestions?


Viewer.onSceneReadyToDisplay() is the first callback that can be used to alter materials:

The images that you use for your external textures also need to be loaded, and you can start this loading immediately when your JavaScript code is executed.