Scrub animation by scrolling webpage

(Wakyak) #1


What I would like to do is the following: tie the animation of a Sketchfab-model to where I happen to be on a given webpage, all the way up would be at the start of the animation, 50% down would be in the middle and so on.

Sort of like the Article Scroll in Lab experiments ( but for model animation rather than camera moves.

I’ve got a handle on html and css, but I’m still learning Javascript. So just a friendly point in the right direction would be of great help.

Cheers /Erik


Hi Erik,

We have animation functions in the Viewer API, so when the scroll event happens, you could run an animation instead of moving the camera. However, there’s not really an easy way to scrub. You would need to go to specific times/frames using the seekTo function.