Skip to content

UpdatedCallback()<U>

ts
type UpdatedCallback<U> = (
  name: string,
  value: unknown,
  oldValue: unknown,
  uniforms: Readonly<U>,
) => void;

Callback function executed when a uniform changes.

Type Parameters

U

U extends Uniforms = Record<string, never>

Parameters

name

string

The name of the uniform that changed.

value

unknown

The new value of the uniform.

oldValue

unknown

The previous value of the uniform.

uniforms

Readonly<U>

A snapshot of all uniforms after the change.

Returns

void

Released under the MIT License.