Log inGet started
Package

skeleton.module

Newest version

This package holds more than this page lists. See all of its files in its world.

README.md

skeleton Module

Public Luau surface over the __skeleton Internal FFI namespace — pose-sink registration + apply for the Skeleton + Model pipeline.

Purpose

Wrap the raw __skeleton.* FFI namespace in a typed Luau table that gets auto-injected as _G.skeleton via the prelude. The pose-sink pattern decouples animation evaluation (writes into a buffer) from ECS apply (drained next tick).

Usage

local h = skeleton.bindPose(nil, {
    boneOrder = { "hip", "spine", "head", ... },
    stride    = 10,  -- translation.xyz + rotation.xyzw + scale.xyz
})

-- Each frame: evaluate the graph into `poseBuf`, then queue an apply
skeleton.applyPose(h, poseBuf)

-- On teardown
skeleton.unbindPose(h)

Exports

  • skeleton.bindPose(entityId, opts) -> number?
  • skeleton.applyPose(sinkHandle, bufferHandle) -> boolean
  • skeleton.unbindPose(sinkHandle) -> boolean