Properties
bodyOptions
debugBuffer
debugBuffer: SharedArrayBuffer | ArrayBuffer
debugGeometry
debugGeometry: BufferGeometry
debugIndex
debugIndex: Uint32Array
object3Ds
object3Ds: Record<string, Object3D>
sharedBuffersRef
sharedBuffersRef: MutableRefObject<SharedBuffers>
softBodies
softBodies: Record<string, Mesh<BufferGeometry, Material | Material[]>>
uuidToIndex
uuidToIndex: Record<string, number>
uuids
uuids: string[]
workerHelpers
workerHelpers: { activateBody: any; addConstraint: any; addRigidBody: any; addSoftBody: any; bodyApplyForce: any; bodyApplyImpulse: any; bodySetLinearVelocity: any; bodySetMotionState: any; bodySetShapesOffset: any; enableDebug: any; initWorld: any; makeAsyncRequest: any; removeConstraint: any; removeRigidBody: any; removeSoftBody: any; resetDynamicBody: any; resolveAsyncRequest: any; setGravity: any; setSimulationSpeed: any; transferSharedBuffers: any; updateConstraint: any; updateDebugMode: any; updateRigidBody: any }
Type declaration
activateBody:function
- activateBody(uuid: any): void
Parameters
Returns void
addConstraint:function
- addConstraint(constraintId: any, bodyAUuid: any, bodyBUuid: any, options: any): void
Parameters
constraintId: any
bodyAUuid: any
bodyBUuid: any
options: any
Returns void
addRigidBody:function
Parameters
uuid: string
mesh: Object3D
Returns void
addSoftBody:function
- addSoftBody(uuid: string, sharedSoftBodyBuffers: SharedSoftBodyBuffers, softBodyConfig: SoftBodyConfig): void
Parameters
uuid: string
sharedSoftBodyBuffers: SharedSoftBodyBuffers
softBodyConfig: SoftBodyConfig
Returns void
bodyApplyForce:function
- bodyApplyForce(uuid: any, force: any, relativeOffset: any): void
Parameters
uuid: any
force: any
relativeOffset: any
Returns void
bodyApplyImpulse:function
- bodyApplyImpulse(uuid: any, impulse: any, relativeOffset: any): void
Parameters
uuid: any
impulse: any
relativeOffset: any
Returns void
bodySetLinearVelocity:function
- bodySetLinearVelocity(uuid: any, velocity: any): void
Parameters
Returns void
bodySetMotionState:function
- bodySetMotionState(uuid: any, position: any, rotation: any): void
Parameters
uuid: any
position: any
rotation: any
Returns void
bodySetShapesOffset:function
- bodySetShapesOffset(bodyUuid: any, offset: any): void
Parameters
Returns void
enableDebug:function
- enableDebug(enable: any, debugSharedArrayBuffer: any): void
Parameters
enable: any
debugSharedArrayBuffer: any
Returns void
initWorld:function
- initWorld(worldConfig: WorldConfig, sharedBuffers: SharedBuffers): void
Parameters
sharedBuffers: SharedBuffers
Returns void
makeAsyncRequest:function
- makeAsyncRequest<T>(data: any): Promise<T>
Type parameters
Parameters
Returns Promise<T>
removeConstraint:function
- removeConstraint(constraintId: any): void
Parameters
Returns void
removeRigidBody:function
- removeRigidBody(uuid: any): void
Parameters
Returns void
removeSoftBody:function
- removeSoftBody(uuid: string): void
Parameters
Returns void
resetDynamicBody:function
- resetDynamicBody(uuid: any): void
Parameters
Returns void
resolveAsyncRequest:function
- resolveAsyncRequest(data: any): void
Parameters
Returns void
setGravity:function
- setGravity(gravity: undefined | Vector3): void
Parameters
gravity: undefined | Vector3
Returns void
setSimulationSpeed:function
- setSimulationSpeed(simulationSpeed: number): void
Parameters
Returns void
transferSharedBuffers:function
- transferSharedBuffers(sharedBuffers: SharedBuffers): void
Parameters
sharedBuffers: SharedBuffers
Returns void
updateConstraint:function
- updateConstraint(constraintId: any, options: any): void
Parameters
constraintId: any
options: any
Returns void
updateDebugMode:function
- updateDebugMode(debugMode: any): void
Parameters
Returns void
updateRigidBody:function
- updateRigidBody(uuid: any, options: any): void
Parameters
Returns void