Scroll Timeline issue

Heyo, I have added a scrolltimeline with a director, and when i build, i get this error.

I tried create → NPM definition and added it to export info, but i didnt do anything with it idk what it does
Screenshot_10.png

Original Post on Discord

by user 263967078346653697

it is created in this npmdef, this is the one you need to reference
image.png

image.png

Or you copy/paste the code in your project

by user 263967078346653697

Restart the server

okay thanks no error!

by user 263967078346653697

but…

by user 263967078346653697

the timeline plays automatically xd

by user 263967078346653697

and scrolling does nothing

by user 263967078346653697

its very simple just one recording

by user 263967078346653697

Did you add the script to your scene and link it to the timeline?

image.png

by user 263967078346653697

The way this script is built is it needs content to scroll on the html page I think

okay so umm

by user 263967078346653697

what would i need to do for that?

by user 263967078346653697

html custom layout sample?

by user 263967078346653697

Or change the script if you need it to behave differently. You can subscribe to the browsers scroll event and just change the time of the timeline (like in the ScrollTimeline script in line ~70. Make sure to pause the timeline and then call evaluate once)


                if (this.timeline.isPlaying) this.timeline.pause();
                this.timeline.time = xxx
                this.timeline.evaluate();