Skip to content

API 参考 / ParticleEnvironment

Interface: ParticleEnvironment ​

Defined in: packages/natsume/src/rendering/particle-environment.ts:26

Host gravity, view, fog and depth inputs. Texture ownership stays with the host.

Properties ​

colliders? ​

readonly optional colliders?: Readonly<Record<string, ParticleCollider>>

Defined in: packages/natsume/src/rendering/particle-environment.ts:39

Borrowed collider references indexed by source slots.


depth? ​

readonly optional depth?: number | readonly [number, number, number, number]

Defined in: packages/natsume/src/rendering/particle-environment.ts:51

View distance, or coefficients ax+by+cz+d in Unity world coordinates. Defaults to container.zIndex; negative distances clamp to zero.


fixedDeltaSeconds? ​

readonly optional fixedDeltaSeconds?: number

Defined in: packages/natsume/src/rendering/particle-environment.ts:29

Unity project fixedDeltaTime in seconds. Required for PauseAndCatchup culling.


fog ​

readonly fog: ParticleFog

Defined in: packages/natsume/src/rendering/particle-environment.ts:27


forceFields? ​

readonly optional forceFields?: Readonly<Record<string, ParticleForceField | readonly ParticleForceField[]>>

Defined in: packages/natsume/src/rendering/particle-environment.ts:35

Borrowed force-field services, indexed by source reference or world-search slot.


gravity? ​

readonly optional gravity?: readonly [number, number, number]

Defined in: packages/natsume/src/rendering/particle-environment.ts:31

Acceleration in Unity world units per second squared. Unity's default is used, with DEFAULT_GRAVITY, when a system needs gravity and none is supplied.


gravity2D? ​

readonly optional gravity2D?: readonly [number, number]

Defined in: packages/natsume/src/rendering/particle-environment.ts:33

Physics2D acceleration in Unity world units per second squared. Defaults like gravity.


lights? ​

readonly optional lights?: Readonly<Record<string, ParticleLightTemplate>>

Defined in: packages/natsume/src/rendering/particle-environment.ts:41

Borrowed templates. Natsume owns only the handles returned by template.create().


physicsWorlds? ​

readonly optional physicsWorlds?: Readonly<Record<string, ParticlePhysicsWorld>>

Defined in: packages/natsume/src/rendering/particle-environment.ts:37

Borrowed sphere-sweep services indexed by the package's physics-world slots.


rigidbodyVelocities? ​

readonly optional rigidbodyVelocities?: Readonly<Record<string, readonly [number, number, number]>>

Defined in: packages/natsume/src/rendering/particle-environment.ts:43

World-space velocities indexed by the package's host Rigidbody slot.


softParticles? ​

readonly optional softParticles?: object

Defined in: packages/natsume/src/rendering/particle-environment.ts:53

Omit to disable soft particles. R stores linear view distance in the same units as depth.

depthTexture ​

readonly depthTexture: Texture

uvTransform? ​

readonly optional uvTransform?: readonly [number, number, number, number]

Maps top-left normalized screen UV: uv * xy + zw. Defaults to [1,1,0,0].


viewPosition? ​

readonly optional viewPosition?: readonly [number, number, number]

Defined in: packages/natsume/src/rendering/particle-environment.ts:49

View origin in Unity world coordinates. Required for Facing alignment and Freeform stretch.


viewVelocity? ​

readonly optional viewVelocity?: readonly [number, number, number]

Defined in: packages/natsume/src/rendering/particle-environment.ts:47

View translation velocity in Unity world units per second. Omit for a stationary view.

基于 Apache License 2.0 发布