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 ​

LoopData.time


deltaTime ​

ts
deltaTime: number;

Δt in milliseconds since the previous loop iteration.

Inherited from ​

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 ​

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.


dpr ​

ts
dpr: number;

Device pixel ratio used to size the drawing buffer (device pixels per CSS pixel).

Released under the MIT License.