Skip to content

UniformContext ​

Context supplied to every contextual uniform function.

Properties ​

time ​

ts
time: number;

time elapsed in milliseconds since the loop started, excluding pauses.

This timer is paused when the loop is paused, to avoid jumps in animations. If you want to get the time elapsed including pauses, use elapsedTime instead.

Inherited from ​

ts
LoopData.time;

deltaTime ​

ts
deltaTime: number;

Δt in milliseconds since the previous loop iteration.

Inherited from ​

ts
LoopData.deltaTime;

elapsedTime ​

ts
elapsedTime: number;

time elapsed in milliseconds since the loop started, including pauses.

This timer is NOT paused when the loop is paused, which can cause jumps in animations. If you want to get the time elapsed excluding pauses, use time instead.

Inherited from ​

ts
LoopData.elapsedTime;

canvasResolution ​

ts
canvasResolution: [number, number];

Physical canvas dimensions in pixels, including device-pixel-ratio scaling.


passResolution ​

ts
passResolution: [number, number];

Dimensions of the target currently rendered by the pass.

Released under the MIT License.