Skip to content
ClassRendering & Filters@public

FlxShaderUniforms

Mutable, type-checked values shared by every projection of a shader filter.

ts
export declare class FlxShaderUniforms<TSchema extends FlxShaderUniformSchema = FlxShaderUniformSchema>

Constructors

ts
constructor(schema: TSchema)

Constructs a new instance of the FlxShaderUniforms class

ParameterTypeDescription
schemaTSchema-

Properties

PropertyModifiersTypeDescription
revisionreadonlynumberMonotonic change counter used to avoid redundant renderer updates.

Methods

get()

ts
get<K extends keyof TSchema>(name: K): FlxShaderUniformValue<TSchema[K]['type']>

Read one value without exposing the renderer-owned backing array.

Parameters:

ParameterTypeDescription
nameK-

Returns: FlxShaderUniformValue<TSchema[K]['type']>

set()

ts
set<K extends keyof TSchema>(name: K, value: FlxShaderUniformValue<TSchema[K]['type']>): this

Update one value without rebuilding shader programs or filter chains.

Parameters:

ParameterTypeDescription
nameK-
valueFlxShaderUniformValue<TSchema[K]['type']>-

Returns: this

Released under the MIT License.