Skip to content

@relu-interactives/spatial-ecs


@relu-interactives/spatial-ecs / index / IKSystem

Class: IKSystem ​

Defined in: systems/IKSystem.ts:50

Runs each IKComponent's chains after the animation: hands and feet reach their target entities. Bones the animation doesn't drive would keep last frame's IK pose and drift, so every bone IK touched is put back to its pre-IK rotation first unless the animation already overwrote it. A chain with clips fades with the clip that's playing.

Implements ​

Constructors ​

Constructor ​

ts
new IKSystem(): IKSystem;

Returns ​

IKSystem

Methods ​

getReachError() ​

ts
getReachError(entityId, limb): number | null;

Defined in: systems/IKSystem.ts:57

How far a limb's end stayed from its target last frame, in metres (0 = reached), or null if the limb's chain didn't run.

Parameters ​

ParameterType
entityIdnumber
limbIKLimb

Returns ​

number | null


update() ​

ts
update(world, deltaTime?): void;

Defined in: systems/IKSystem.ts:89

Parameters ​

ParameterTypeDefault value
worldWorldundefined
deltaTimenumber0

Returns ​

void

Implementation of ​

EcsSystem.update


dispose() ​

ts
dispose(): void;

Defined in: systems/IKSystem.ts:178

Returns ​

void

Implementation of ​

EcsSystem.dispose