Open random annotation with URL

(Ivanix88) #1

This is a rare question, but is there any URL command that can be used to trigger a random annotation on the model?

For example, let’s say that I have a model with 4 annotations. Using I can open the model with the camera focused on the first annotation. Could I use some URL like ? I looked through the Help Center and didn’t found something for that, but I think it’s worth asking.

I would use it to have multiple scenes inside the same model, and make the viewer have a different experience each time the URL is used. Like a little experiment. It would also work setting a random animation from the animation stack.


(Tiagojdferreira) #2

Hi @Ivanix88!

What you want to do is possible with our Viewer API. You will not be able to do it inside Sketchfab, but you can embed the model in your own website and use the Viewer API to get the desired effect.

Using javascript, you could generate a random number and then use gotoAnnotation

Similarly, you could set the animations with setCurrentAnimationByUID

Hope this helps. Feel free to ask any follow up questions. :slightly_smiling_face: