RenderLoop - Manages the animation loop using requestAnimationFrame
This class encapsulates the browser's requestAnimationFrame loop, providing:
const renderLoop = new RenderLoop();renderLoop.onFrame((time, delta) => { renderer.render(scene, camera);});renderLoop.start();// Later...renderLoop.stop(); Copy
const renderLoop = new RenderLoop();renderLoop.onFrame((time, delta) => { renderer.render(scene, camera);});renderLoop.start();// Later...renderLoop.stop();
ThreePresenter for usage in the main presenter
Start the animation loop
Stop the animation loop
Add a callback to be executed on every frame
Function receiving total time and delta time
Remove a registered callback
Private
The internal animation loop
Dispose and stop the loop
RenderLoop - Manages the animation loop using requestAnimationFrame
This class encapsulates the browser's requestAnimationFrame loop, providing:
Example
See
ThreePresenter for usage in the main presenter