This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Mike Feldstein
Posted Aug 02 - Read on Facebook

What is the proper way to get animation frame updates? I'm writing a view using threejs, and need to update it on every frame. Adding a requestAnimationFrame loop behaves incorrectly in studio since it live reloads, but raf-loops from previous iterations are still running. Is there a util for this, or a way for Layers to know when they've been destroyed and to clean up this type of global thing?


Jordan Robert Dobson

Check my post in this group on orbit and gravity. I have the function you need there.

Mike Feldstein

Framer.Loop.on "update", -> doStuff()

Read the entire post on Facebook