Class ParticleSystem3D

粒子系统

Hierarchy

Constructors

Properties

__class__: "ParticleSystem3D"
_activeParticles: any

活跃的粒子列表

_attributes: any

属性数据列表

_awaked: any
_colorBySpeed: any
_colorOverLifetime: any
_emission: any
_emit: any

发射粒子

Param

发射起始时间

Param

发射终止时间

Param

发射起始位置

Param

发射终止位置

发射信息

_emitParticles: any

发射粒子

Param

发射时间

Param

发射数量

_emitWithMove: any

计算在指定移动的位移线段中发射的粒子列表。

Param

Param

Param

_emitWithTime: any

计算在指定时间段内发射的粒子列表

Param

Param

Param

Param

_entity: Node3D
_forceOverLifetime: any
_inheritVelocity: any
_initParticleState: any

初始化粒子状态

Param

粒子

_isPlaying: any
_isSubParticleSystem: boolean

是否为被上级粒子系统引用的子粒子系统。

_limitVelocityOverLifetime: any
_main: any
_modules: any
_noise: any
_particlePool: any

粒子池,用于存放未发射或者死亡粒子

_rotationBySpeed: any
_rotationOverLifetime: any
_shape: any
_simulationSpaceChanged: any
_sizeBySpeed: any
_sizeOverLifetime: any
_subEmitters: any
_textureSheetAnimation: any
_updateActiveParticlesState: any

更新活跃粒子状态

_updateParticleState: any

更新粒子状态

Param

粒子

_velocityOverLifetime: any
castShadows: boolean
enabled: boolean

是否启用update方法

geometry: QuadGeometry
hideFlags: HideFlags

隐藏标记,用于控制是否在层级界面、检查器显示,是否保存

material: Material
receiveShadows: boolean
runEnvironment: RunEnvironment

可运行环境

time: number

Playback position in seconds.

回放位置(秒)

Accessors

  • get entity(): Node3D
  • 此组件附加到的游戏对象。组件总是附加到游戏对象上。

    Returns Node3D

  • get inheritVelocity(): ParticleInheritVelocityModule
  • Script interface for the Particle System velocity inheritance module.

    粒子系统速度继承模块。

    Returns ParticleInheritVelocityModule

  • set inheritVelocity(v): void
  • Returns void

  • get isPaused(): boolean
  • Is the particle system paused right now ?

    粒子系统现在暂停了吗?

    Returns boolean

  • get isPlaying(): boolean
  • Is the particle system playing right now ?

    粒子系统正在运行吗?

    Returns boolean

  • get isStopped(): boolean
  • Is the particle system stopped right now ?

    粒子系统现在停止了吗?

    Returns boolean

  • get isVisibleAndEnabled(): boolean
  • Has the Behaviour had enabled called. 是否所在Object3D显示且该行为已启动。

    Returns boolean

  • get main(): ParticleMainModule
  • Returns ParticleMainModule

  • set main(v): void
  • Parameters

    Returns void

  • get node(): Node
  • 2D节点。

    Returns Node

  • get noise(): ParticleNoiseModule
  • 旋转角度随速度变化模块

    Returns ParticleNoiseModule

  • set noise(v): void
  • Parameters

    Returns void

  • get particleCount(): number
  • The current number of particles (Read Only).

    当前粒子数(只读)。

    Returns number

Methods

  • 触发子发射器

    Parameters

    • subEmitterIndex: number

      子发射器索引

    • Optional particles: Particle[]

    Returns void

  • Adds a component class of type componentType to the game object.

    Type Parameters

    • K extends keyof ComponentMap

    Parameters

    • type: K

      组件类定义。

    • Optional params: gPartial<ComponentMap[K]>

    Returns ComponentMap[K]

    被添加的组件。

  • 给指定粒子添加指定空间的速度。

    Parameters

    • particle: Particle

      粒子。

    • acceleration: Vector3

      加速度。

    • space: ParticleSystemSimulationSpace

      加速度所在空间。

    • Optional name: string

      加速度名称。如果不为 undefined 时保存,调用 removeParticleVelocity 可以移除该部分速度。

    Returns void

  • 给指定粒子添加指定空间的位移。

    Parameters

    • particle: Particle

      粒子。

    • position: Vector3

      速度。

    • space: ParticleSystemSimulationSpace

      速度所在空间。

    • Optional name: string

      速度名称。如果不为 undefined 时保存,调用 removeParticleVelocity 可以移除该部分速度。

    Returns void

  • 给指定粒子添加指定空间的速度。

    Parameters

    • particle: Particle

      粒子。

    • velocity: Vector3

      速度。

    • space: ParticleSystemSimulationSpace

      速度所在空间。

    • Optional name: string

      速度名称。如果不为 undefined 时保存,调用 removeParticleVelocity 可以移除该部分速度。

    Returns void

  • 继续

    Returns void

  • 销毁

    Returns void

  • 返回游戏对象附加的一个指定类型的组件,如果没有,则返回 null。

    使用 Entity.GetComponent 将返回找到的第一个组件。如果您希望有多个相同类型的组件,请改用 Entity.GetComponents,并循环通过返回的组件测试某些唯一属性。

    Type Parameters

    • K extends keyof ComponentMap

    Parameters

    • component: K

      要检索的组件类型。

    Returns ComponentMap[K]

    要检索的组件。

  • 使用深度优先搜索返回 Entity 或其任何子项中的 Type 组件。

    Type Parameters

    • K extends keyof ComponentMap

    Parameters

    • component: K

      要检索的组件类型。

    • Optional includeInactive: boolean

      是否包含不活跃组件。

    Returns ComponentMap[K]

    匹配类型的组件(如果找到)。

  • 检索 Entity 或其任何父项type中的 Type 组件。

    此方法向上递归,直到找到具有匹配组件的 Entity。仅匹配活动游戏对象上的组件。

    Type Parameters

    • K extends keyof ComponentMap

    Parameters

    • component: K

      要查找的组件类型。

    • Optional includeInactive: boolean

      是否包含不活跃组件。

    Returns ComponentMap[K]

    如果找到与类型匹配的组件,则返回一个组件。否则返回 null。

  • 返回Entity中指定类型的所有组件。

    Type Parameters

    • K extends keyof ComponentMap

    Parameters

    • type: K

      要检索的组件类型。

    • Optional results: ComponentMap[K][]

      列出接收找到的组件。

    Returns ComponentMap[K][]

    实体中指定类型的所有组件。

  • 使用深度优先搜索返回 当前实体 或其任何子子项中 Type 的所有组件。递归工作。

    在子游戏对象上递归搜索组件。这意味着它还包括目标实体的所有子实体,以及所有后续子实体。

    Type Parameters

    • K extends keyof ComponentMap

    Parameters

    • component: K

      要检索的组件类型。

    • Optional includeInactive: boolean

      非活动游戏对象上的组件是否应该包含在搜索结果中?

    • Optional results: ComponentMap[K][]

      列出接收找到的组件。

    Returns ComponentMap[K][]

    所有找到的组件。

  • 返回当前实体或其任何父级中指定的所有组件。

    Type Parameters

    • K extends keyof ComponentMap

    Parameters

    • component: K

      要检索的组件类型。

    • Optional includeInactive: boolean

      非活动组件是否应该包含在搜索结果中?

    • Optional results: ComponentMap[K][]

      列出找到的组件。

    Returns ComponentMap[K][]

    实体或其任何父级中指定的所有组件。

  • 把事件分享到实体上。

    Returns Entity[]

  • 初始化组件

    在添加到Entity时立即被调用。

    Returns void

  • 暂停

    Returns void

  • 播放

    Returns void

  • 移除指定粒子上的加速度

    Parameters

    • particle: Particle

      粒子。

    • name: string

      加速度名称。

    Returns void

  • 移除指定粒子上的位移

    Parameters

    • particle: Particle

      粒子。

    • name: string

      位移名称。

    Returns void

  • 移除指定粒子上的速度

    Parameters

    • particle: Particle

      粒子。

    • name: string

      速度名称。

    Returns void

  • Private

    该方法仅在Entity中使用

    Parameters

    • entity: Entity

      游戏对象

    Returns void

  • 停止

    Returns void

  • Parameters

    • interval: number

    Returns void

  • Private

    组件无法直接使用关键字 new 来构造。

    Type Parameters

    • T

    Parameters

    Returns T

    新建的组件实例。

    See

    getInstance

  • 获取组件依赖列表

    Type Parameters

    • K extends keyof ComponentMap

    Parameters

    • component: K

      组件类定义

    Returns "Component"[]

  • 判断组件是否为唯一组件。

    Type Parameters

    • K extends keyof ComponentMap

    Parameters

    • component: K | ComponentMap[K] | Constructor<ComponentMap[K]>

      组件类定义

    Returns boolean

Generated using TypeDoc