OnClick event on annotations

annotations

(Nerjavirtualtours) #1

Hi, If I have an embedded model is there a way to have an OncLick event call on an annotation so for example when you clicked on an annotation a pop up/lightbox clone appeared?


#2

Yep, with the Viewer API:

https://labs.sketchfab.com/experiments/annotations-sync/


(Nerjavirtualtours) #3

Thanks James, where can I find out any more information on this? I have looked at the code but cannot see how it is knowing which 3d model to use?


#4

Full documentation here:

https://sketchfab.com/developers/viewer

More resources and examples here:

https://labs.sketchfab.com/experiments/
https://blog.sketchfab.com/how-terma-built-their-interactive-website-with-sketchfab/
https://blog.sketchfab.com/zodiac-built-interactive-boat-configurator-sketchfab/
https://blog.sketchfab.com/viewer-api-part-1-introduction/
https://blog.sketchfab.com/learn-to-code-with-the-sketchfab-viewer-api-part-2-controlling-the-camera/
https://forum.sketchfab.com/t/viewer-api-and-javascript-development/77485