Skip to content

@modoki/engine / index / deriveBindMatrices

Function: deriveBindMatrices()

deriveBindMatrices(bones): object

Derive each bone's bind-pose rig-origin ("root-local") matrix and its inverse, by composing local matrices up the parent chain. Robust to any bone ordering (memoized with a cycle guard), though parents-before-children is conventional. The inverse-bind is what turns a live pose into a skinning matrix: skinMatrix[b] = rootLocalNow[b] · invBind[b] (identity at bind).

Parameters

bones

readonly BindBone[]

Returns

invBind

invBind: Mat2D[]

rootLocal

rootLocal: Mat2D[]

Built with Modoki.