@motion-script/core / writeUniforms
Function: writeUniforms()
writeUniforms(
slots,floatCount,values,builtins,scope):Float32Array
Defined in: attributes/shape/sksl-uniforms.ts:263
Marshal named values into the flat float buffer makeShader expects.
values is the author's record and builtins is what the renderer derives
from the paint (bounds, time, scale); a declared name is looked up in values
first, so an author key of the same name overrides the built-in.
A declared uniform with no value is left as zeros and warned about rather than refused — a positional array's answer to the same mistake is a null shader and a fill that silently doesn't paint. An author key the shader doesn't declare is warned about too, since it is otherwise indistinguishable from a working uniform.
Parameters
slots
readonly UniformSlot[]
floatCount
number
values
builtins
scope
string
Returns
Float32Array