channel
The channel namespace — the engine's Luau API reference for channel.
The channel namespace — 6 functions.
globals/channel/create
globals/channel/create(opts: ChannelOpts) -> number?
Register a keyframe channel. times is the sorted keyframe
time array; values is the packed value array (layout depends
on interp); stride is the floats-per-sample width; interp
is "step" | "linear" | "slerp" | "cubicHermite". Returns
the channel handle, or nil on malformed input.
globals/channel/destroy
globals/channel/destroy(handle: number) -> boolean
Drop the channel from the registry.
globals/channel/sampleInto
globals/channel/sampleInto(ch: number, time: number, buf: number, offset: number) -> boolean
Sample the channel at time and write stride floats into
the Buffer's data starting at f32 index offset. Returns false
on unknown handle, layout mismatch, or out-of-bounds; the
buffer is unchanged on failure.
globals/channel/sampleManyInto
globals/channel/sampleManyInto(ch: number, time: number, buf: number, offsets: { number }) -> boolean
Sample once, blit the result into every position in
offsets. Saves the per-offset binary search when one channel
feeds many bones / particles / parameters.
globals/channel/sampleQuat
globals/channel/sampleQuat(ch: number, time: number) -> (number?, number?, number?, number?)
Convenience accessor for stride-4 quaternion channels.
globals/channel/sampleVec3
globals/channel/sampleVec3(ch: number, time: number) -> (number?, number?, number?)
Convenience accessor for stride-3 channels. Returns the three components as multiret, or nil if the channel is unknown / has a different stride.