Class: RenderLoop
Experimental
Constructors
Constructor
ts
new RenderLoop(render, options?): RenderLoop;Experimental
Parameters
| Parameter | Type |
|---|---|
render | (info) => void |
options | RenderLoopOptions |
Returns
RenderLoop
Accessors
animating
Get Signature
ts
get animating(): boolean;Experimental
Whether any animation token is held.
Returns
boolean
frameCount
Get Signature
ts
get frameCount(): number;Experimental
Number of frames rendered so far.
Returns
number
paused
Get Signature
ts
get paused(): boolean;Experimental
Returns
boolean
pending
Get Signature
ts
get pending(): boolean;Experimental
Whether a frame is scheduled.
Returns
boolean
Methods
dispose()
ts
dispose(): void;Experimental
Returns
void
flush()
ts
flush(): void;Experimental
Render synchronously now if a frame is pending (e.g. right after a resize, or for export).
Returns
void
invalidate()
ts
invalidate(): void;Experimental
Mark the scene dirty; a frame renders on the next animation frame.
Returns
void
on()
ts
on<K>(type, listener): () => void;Experimental
Type Parameters
| Type Parameter |
|---|
K extends keyof RenderLoopEvents |
Parameters
| Parameter | Type |
|---|---|
type | K |
listener | (payload) => void |
Returns
() => void
requestAnimation()
ts
requestAnimation(): () => void;Experimental
Enter continuous mode until the returned release function is called. Tokens are ref-counted; calling the release function more than once is a no-op.
Returns
() => void
setPaused()
ts
setPaused(paused): void;Experimental
Pause/resume scheduling (used while the WebGL context is lost). Invalidations while paused are remembered and rendered on resume.
Parameters
| Parameter | Type |
|---|---|
paused | boolean |
Returns
void