Skip to content

API 参考 / ParticleCollider

Interface: ParticleCollider ​

Defined in: packages/natsume/src/runtime/particle-physics.ts:14

Host-owned collider identity and optional particle force receiver.

Properties ​

dynamic? ​

readonly optional dynamic?: boolean

Defined in: packages/natsume/src/runtime/particle-physics.ts:17


id ​

readonly id: string

Defined in: packages/natsume/src/runtime/particle-physics.ts:15


layer ​

readonly layer: number

Defined in: packages/natsume/src/runtime/particle-physics.ts:16

Methods ​

applyForce()? ​

optional applyForce(force, point): void

Defined in: packages/natsume/src/runtime/particle-physics.ts:23

Apply a world-space force at a world-space contact point. Arrays are borrowed.

Parameters ​

force ​

Float64Array

point ​

Float64Array

Returns ​

void


overlapSphere() ​

overlapSphere(query): boolean

Defined in: packages/natsume/src/runtime/particle-physics.ts:19

Returns whether the world-space sphere intersects this collider.

Parameters ​

query ​

ParticleSphereQuery

Returns ​

boolean


sweepSphere()? ​

optional sweepSphere(query): boolean

Defined in: packages/natsume/src/runtime/particle-physics.ts:21

Required for Trigger references; tests the full swept volume against this collider.

Parameters ​

query ​

ParticleColliderSweepQuery

Returns ​

boolean

基于 Apache License 2.0 发布