He guys, new to ThreeJS and I totally love it. I made a simple animated flag, but now I want to be able (when I scroll my website) to change the amount of vertices that are moved i.e. the intensity.
then the plane does actually rotate. So yeah, increasing the plane.geometry.vertices values does nothing, while other stuff like “rotation” does work.
I took a look at BufferGeometry but I really dont understand it. I got a “plane” but after that I have no clue on how to animate it like I did in my current example. It goes above my head lol, if possible i’d rather stick to simple geometry for now
I would normally do it when triggering a scroll event which watches when certain elements come into the user his screen. When one does, I need to increase the values for i.e. 2 seconds, then decrease them again.
Yeah but how… I mean the animate() is an infinite loop. I cannot do that kind of stuff in there or can i?
If i set a timeout for example, it will be automatically executed an infinite times?
Or when I scroll on my website and get to a certain point. How would I change values inside the animate() loop… that is impossible is it not?
Ill give it a try and let you guys know the outcome. Thanks for your reply!