Skip to content

@modoki/engine / index / skinVertex2D

Function: skinVertex2D()

skinVertex2D(vx, vy, idx, wgt, base, skinMats, out, o): void

Linear-blend-skin one vertex against up to 4 bone skinning matrices.

skinMats[boneIdx] is rootLocalNow[bone] · invBind[bone]. The skinned position is the weighted sum of the bind vertex pushed through each influencing bone's skinning matrix. Weights are assumed normalized (unused slots weight 0). Writes the packed [x,y] result into out at offset o.

Parameters

vx

number

vy

number

idx

ArrayLike<number>

wgt

ArrayLike<number>

base

number

skinMats

readonly Mat2D[]

out

Float32Array

o

number

Returns

void

Built with Modoki.