Feeds a whole array of f32 values into your custom WGSL shader under one name
— the way to hand shader code a table of numbers (per-band weights, a small LUT,
a set of coefficients) indexable at runtime.
Declarative element:
<sk-wgsl-f32-array-uniform>
Not on the sk.* global — construct via the declarative element or a module import.
This is the array member of the shader-input family that belongs to the compute
& custom-WGSL concept (AbstractComputeNode), and like ColorStop
it is itself a SkenraAnimatable. Its values are packed densely into
the host's GPU block and are animatable element-wise at runtime, set
imperatively or driven by a nested <sk-animation>; each change repacks the
slot with no shader rebuild.
Key attributes. name is the non-animatable WGSL identifier (unique per
host). values is a JSON array of finite numbers, animatable element-wise (all
keyframes must share the array's length). The array length is structural —
it must not change during an animation, and editing it re-keys the host's
shader like adding or removing a member. The host generates an indexed
skUniform_<name>(i: u32) -> f32 accessor, so the shader reads any element by
index.
Related. It is a child of any custom-WGSL host — sk-custom-wgsl-color-source,
sk-custom-wgsl-points-source, sk-custom-wgsl-point-constraint,
sk-custom-wgsl-spline-source, or sk-compute-node. For a single
value use sk-wgsl-uniform; for fixed-width vectors use
sk-wgsl-vec2-uniform, sk-wgsl-vec3-uniform, and
sk-wgsl-vec4-uniform; for a colour authored as a string use
sk-wgsl-color-uniform.
constructor()
Inherited from: AbstractWGSLUniformMemberElement, SkenraAnimatable
— see those pages for inherited members.
| Property | Type | Default | Description | Declared by |
|---|---|---|---|---|
valuesanimatable |
number[] |
[] |
Gets the array values, returning the animated array when animating. | WGSLF32ArrayUniform |
baseValuesread-only |
number[] |
— | Gets the base (non-animated) array values (a defensive copy). | WGSLF32ArrayUniform |
floatCountread-only |
number |
— | WGSLUniformMember: the array's dense float count (its length). |
WGSLF32ArrayUniform |
name |
string |
"" |
Gets the WGSL identifier this member is addressed by. | AbstractWGSLUniformMemberElement |
sceneread-only |
any |
— | Gets the Scene this animatable belongs to, if any. | SkenraAnimatable |
animationsread-only |
SkenraAnimation[] |
— | Public getter for the animations affecting this target. | SkenraAnimatable |
| Method | Description | Declared by |
|---|---|---|
animate(firstArg: TypedKeyframe<this>[] | TypedPropertyIndexedKeyframes<this> | Record<string, any> | globalThis.Keyframe[] | globalThis.PropertyIndexedKeyframes | null, secondArg?: number | KeyframeAnimationOptions | globalThis.KeyframeAnimationOptions): SkenraAnimation & Animation |
Creates a new SkenraAnimation for this target per Web Animations API. | SkenraAnimatable |
removeAnimation(animation: SkenraAnimation): boolean |
Removes a specific animation from this object. | SkenraAnimatable |
constrain(type: K, config: ConstraintConfigMap[K]): ConstraintReturnMap[K] |
Creates a constraint on this Animatable using a fluent API. | SkenraAnimatable |