Skip to content

Function: createBodyMotion() ​

ts
function createBodyMotion(input): BodyMotionHandle;

Small accumulator for body self-rotation.

Stateful (owns spinAngle) but framework-agnostic — no Vue, no TresJS, no render-loop coupling. The caller drives tick(dt) from whichever clock is authoritative (render loop, server tick, replay scrub, …). Calling applyTo(group) writes the resulting quaternion onto the body's THREE.Group.

Parameters ​

ParameterTypeDescription
inputBodyMotionInputBody orientation physics (rotationSpeed, axialTilt).

Returns ​

BodyMotionHandle

Distribué sous la licence indiquée dans le dépôt.