Log inGet started

blend

The blend namespace — the engine's Luau API reference for blend.

The blend namespace — 4 functions.

globals/blend/destroyLayout

globals/blend/destroyLayout(handle: number) -> boolean

Drop the layout from the registry.

globals/blend/layout

globals/blend/layout(slots: { BlendSlot }, totalStride: number?) -> number?

Register a record-stride layout. Each slot is { offset, stride, op } where op is "lerp" / "slerp" / "sum" / "step". Slerp slots must have stride 4. totalStride defaults to max(offset + stride) across slots; pass an explicit value when records contain padding past the last slot.

globals/blend/lerpInto

globals/blend/lerpInto(outBuffer: number, layout: number, aBuffer: number, bBuffer: number, t: number) -> boolean

Two-input crossfade shortcut. Equivalent to blend.weightedInto(out, layout, { {a, 1-t}, {b, t} }). Faster for the common A/B fade case because it skips the inputs-table walk.

globals/blend/weightedInto

globals/blend/weightedInto(outBuffer: number, layout: number, inputs: { BlendInput }) -> boolean

Combine N weighted input Buffers into the output Buffer using the layout's slot ops. The output buffer's length must be a whole multiple of layout.totalStride; every input buffer must be at least as long as the output. Returns false on any handle / size mismatch.

  • api
  • reference