Skip to content

@relu-interactives/spatial-ecs


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

Function: applyModelPivot() ​

ts
function applyModelPivot(
   anchor, 
   model, 
   pivot): void;

Defined in: utils/modelPivot.ts:101

Hang model under anchor moved by -pivot, or straight under it for no pivot. Idempotent and cheap: call it when the model mounts and whenever the pivot may have changed. The model's own local transform is never touched.

Parameters ​

ParameterType
anchorObject3D
modelObject3D<Object3DEventMap> | null | undefined
pivotModelPivot | null

Returns ​

void