Class ParticleMainModule

粒子主模块

Hierarchy

Constructors

Properties

__class__: "ParticleMainModule"
duration: number

粒子系统的持续时间(秒)。

enabled: boolean

是否开启

gravityModifier: MinMaxCurve

Scale applied to the gravity.

应用于重力加速度的缩放。

loop: boolean

粒子系统在循环吗?

maxParticles: number

The maximum number of particles to emit.

发射粒子的最大数量。

particleSystem: ParticleSystem3D

粒子系统

playOnAwake: boolean

If set to true, the particle system will automatically start playing on startup.

如果设置为真,粒子系统将自动开始播放启动。

prewarm: boolean

When looping is enabled, this controls whether this particle system will look like it has already simulated for one loop when first becoming visible.

当循环被激活时,它控制这个粒子系统在第一次出现时是否看起来像已经模拟了一个循环。

randomizeRotationDirection: number

Cause some particles to spin in the opposite direction. Set between 0 and 1, where higher values will cause a higher proportion of particles to spin in the opposite direction.

导致一些粒子向相反的方向旋转。设置在0和1之间,数值越大,粒子朝相反方向旋转的比例越大。

Control how the particle system's Transform Component is applied to the particle system.

控制粒子系统的变换组件如何应用于粒子系统。

This selects the space in which to simulate particles. It can be either global or local space.

模拟空间,使粒子位置模拟在全局,本地或自定义空间。在本地空间中,它们相对于自己的转换而存在,在自定义空间中,它们相对于自定义转换。

Todo

simulationSpeed: number

Override the default playback speed of the Particle System.

重写粒子系统的默认播放速度。

startColor: MinMaxGradient

The initial color of particles when emitted.

粒子发射时的初始颜色。

startDelay: MinMaxCurve

Start delay in seconds.

启动延迟(以秒为单位)。

startLifetime: MinMaxCurve

The total lifetime in seconds that each new particle will have.

每个新粒子的总寿命(以秒计)。

startRotation3D: MinMaxCurveVector3

The initial rotation of particles when emitted.

粒子发射时的初始旋转。

startSize3D: MinMaxCurveVector3

The initial size of particles when emitted.

发射时粒子的初始大小。

startSpeed: MinMaxCurve

The initial speed of particles when emitted.

粒子发射时的初始速度。

useStartRotation3D: boolean

A flag to enable 3D particle rotation. 一个启用粒子3D旋转的标记。

useStartSize3D: boolean

A flag to enable specifying particle size individually for each axis.

允许为每个轴分别指定粒度大小的标志。

Accessors

  • get startDelayMultiplier(): number
  • Start delay multiplier in seconds.

    启动延迟乘数(以秒为单位)。

    Returns number

  • get startLifetimeMultiplier(): number
  • Start lifetime multiplier. This method is more efficient than accessing the whole curve, if you only want to change the overall lifetime multiplier.

    起始寿命乘数。 如果您只想更改总体寿命乘数,则此方法比访问整个曲线更有效。

    Returns number

  • set startLifetimeMultiplier(v): void
  • Parameters

    • v: number

    Returns void

  • get startRotation(): MinMaxCurve
  • The initial rotation of particles when emitted. 粒子发射时的初始旋转。

    Returns MinMaxCurve

  • set startRotation(v): void
  • Parameters

    Returns void

  • get startRotationMultiplier(): number
  • Start rotation multiplier. This method is more efficient than accessing the whole curve, if you only want to change the overall rotation multiplier.

    开始旋转乘数。 这种方法比访问整个曲线更有效,如果你只想改变整体旋转乘数。

    Returns number

  • set startRotationMultiplier(v): void
  • Parameters

    • v: number

    Returns void

  • get startRotationX(): MinMaxCurve
  • The initial rotation of particles around the X axis when emitted.

    发射时粒子围绕X轴的初始旋转。

    Returns MinMaxCurve

  • set startRotationX(v): void
  • Parameters

    Returns void

  • get startRotationXMultiplier(): number
  • Start rotation multiplier around the X axis. This method is more efficient than accessing the whole curve, if you only want to change the overall rotation multiplier.

    开始绕X轴旋转乘法器。 这种方法比访问整个曲线更有效,如果你只想改变整体旋转乘数。

    Returns number

  • set startRotationXMultiplier(v): void
  • Parameters

    • v: number

    Returns void

  • get startRotationY(): MinMaxCurve
  • The initial rotation of particles around the Y axis when emitted.

    发射时粒子围绕Y轴的初始旋转。

    Returns MinMaxCurve

  • set startRotationY(v): void
  • Parameters

    Returns void

  • get startRotationYMultiplier(): number
  • Start rotation multiplier around the Y axis. This method is more efficient than accessing the whole curve, if you only want to change the overall rotation multiplier.

    开始绕Y轴旋转乘法器。 这种方法比访问整个曲线更有效,如果你只想改变整体旋转乘数。

    Returns number

  • set startRotationYMultiplier(v): void
  • Parameters

    • v: number

    Returns void

  • get startRotationZ(): MinMaxCurve
  • The initial rotation of particles around the Z axis when emitted.

    发射时粒子围绕Z轴的初始旋转。

    Returns MinMaxCurve

  • set startRotationZ(v): void
  • Parameters

    Returns void

  • get startRotationZMultiplier(): number
  • Start rotation multiplier around the Z axis. This method is more efficient than accessing the whole curve, if you only want to change the overall rotation multiplier.

    开始绕Z轴旋转乘法器。 这种方法比访问整个曲线更有效,如果你只想改变整体旋转乘数。

    Returns number

  • set startRotationZMultiplier(v): void
  • Parameters

    • v: number

    Returns void

  • get startSize(): MinMaxCurve
  • The initial size of particles when emitted.

    粒子发射时的初始大小。

    Returns MinMaxCurve

  • set startSize(v): void
  • Parameters

    Returns void

  • get startSizeMultiplier(): number
  • Start size multiplier. This method is more efficient than accessing the whole curve, if you only want to change the overall size multiplier.

    开始尺寸乘数。 如果您只想更改整体尺寸倍增器,则此方法比访问整个曲线更有效。

    Returns number

  • set startSizeMultiplier(v): void
  • Parameters

    • v: number

    Returns void

  • get startSizeX(): MinMaxCurve
  • The initial size of particles along the X axis when emitted.

    发射时沿X轴的粒子的初始大小。

    Returns MinMaxCurve

  • set startSizeX(v): void
  • Parameters

    Returns void

  • get startSizeXMultiplier(): number
  • Start rotation multiplier along the X axis. This method is more efficient than accessing the whole curve, if you only want to change the overall size multiplier.

    启动旋转乘法器沿X轴。 如果您只想更改整体大小倍增器,则此方法比访问整个曲线更有效。

    Returns number

  • set startSizeXMultiplier(v): void
  • Parameters

    • v: number

    Returns void

  • get startSizeY(): MinMaxCurve
  • The initial size of particles along the Y axis when emitted.

    发射时沿Y轴的粒子的初始大小。

    Returns MinMaxCurve

  • set startSizeY(v): void
  • Parameters

    Returns void

  • get startSizeYMultiplier(): number
  • Start rotation multiplier along the Y axis. This method is more efficient than accessing the whole curve, if you only want to change the overall size multiplier.

    启动旋转乘法器沿Y轴。 如果您只想更改整体大小倍增器,则此方法比访问整个曲线更有效。

    Returns number

  • set startSizeYMultiplier(v): void
  • Parameters

    • v: number

    Returns void

  • get startSizeZ(): MinMaxCurve
  • The initial size of particles along the Z axis when emitted.

    发射时沿Z轴的粒子的初始大小。

    Returns MinMaxCurve

  • set startSizeZ(v): void
  • Parameters

    Returns void

  • get startSizeZMultiplier(): number
  • Start rotation multiplier along the Z axis. This method is more efficient than accessing the whole curve, if you only want to change the overall size multiplier.

    启动旋转乘法器沿Z轴。 如果您只想更改整体大小倍增器,则此方法比访问整个曲线更有效。

    Returns number

  • set startSizeZMultiplier(v): void
  • Parameters

    • v: number

    Returns void

  • get startSpeedMultiplier(): number
  • A multiplier of the initial speed of particles when emitted. This method is more efficient than accessing the whole curve, if you only want to change the overall speed multiplier.

    粒子发射时的初始速度的乘子。 这种方法比访问整个曲线更有效,如果你只想改变整体速度乘数。

    Returns number

  • set startSpeedMultiplier(v): void
  • Parameters

    • v: number

    Returns void

Methods

  • 将事件广播到下级对象中。

    Type Parameters

    • K extends string

    Parameters

    • type: K

      事件的类型。类型区分大小写。

    • Optional data: any

      事件携带的自定义数据。

    Returns IEvent<any>

    返回广播后的事件。

  • 将事件冒泡到上级对象中。

    Type Parameters

    • K extends string

    Parameters

    • type: K

      事件的类型。类型区分大小写。

    • Optional data: any

      事件携带的自定义数据。

    Returns IEvent<any>

    返回冒泡后的事件。

  • 销毁

    Returns void

  • 发射事件。

    Type Parameters

    • K extends string

    Parameters

    • type: K

      事件的类型。类型区分大小写。

    • Optional data: any

      事件携带的自定义数据。

    • bubbles: boolean = false

      是否向上级报告事件。默认为false

    • broadcast: boolean = false

      是否向下级广播事件。默认为false

    • share: boolean = true

      是否向平级分享事件。默认为true

    Returns IEvent<any>

    返回发射后的事件。

  • 发射事件。

    当事件重复流向一个对象时将不会被处理。

    Type Parameters

    • K extends string

    Parameters

    • event: IEvent<any>

      事件对象

    Returns IEvent<any>

    返回事件是否被处理

  • 返回监听的事件类型列表。

    Type Parameters

    • K extends string

    Returns K[]

  • 向下级广播事件

    Type Parameters

    • K extends string

    Parameters

    Returns void

  • 向上级报告事件

    Type Parameters

    • K extends string

    Parameters

    Returns void

  • 向平级分享事件

    Type Parameters

    • K extends string

    Parameters

    Returns void

  • 处理事件

    Type Parameters

    • K extends string

    Parameters

    Returns void

  • 检查 Event 对象是否为特定事件类型注册了任何侦听器.

    Type Parameters

    • K extends string

    Parameters

    • type: K

      事件的类型。

    Returns boolean

    如果指定类型的侦听器已注册,则值为 true;否则,值为 false。

  • 初始化粒子状态

    Parameters

    Returns void

  • 返回指定事件类型的监听数量。

    Type Parameters

    • K extends string

    Parameters

    • type: K

      事件的类型。

    Returns number

  • 移除监听

    Type Parameters

    • K extends string

    Parameters

    • Optional type: K

      事件的类型。可选。该值为空时所有被监听对象上的监听均将被移除。

    • Optional listener: ((event) => void)

      要删除的监听器对象。可选。该值为空时所有指定类型的监听均将被移除。

        • (event): void
        • Parameters

          Returns void

    • Optional thisObject: any

      监听器的上下文。可选。

    Returns ParticleMainModule

  • 移除所有监听

    Type Parameters

    • K extends string

    Parameters

    • Optional type: K

      事件的类型。可选。该值为空时所有被监听对象上的监听均将被移除。

    Returns ParticleMainModule

  • 移除监听对象的任意事件。

    Type Parameters

    • K extends string

    Parameters

    • Optional listener: ((event) => void)

      处理事件的监听器函数。

        • (event): void
        • Parameters

          Returns void

    • Optional thisObject: any

      监听器的上下文。可选。

    Returns ParticleMainModule

  • 为监听对象新增指定类型的事件监听。

    Type Parameters

    • K extends string

    Parameters

    • type: K

      事件的类型。

    • listener: ((event) => void)

      处理事件的监听器函数。

        • (event): void
        • Parameters

          Returns void

    • Optional thisObject: any

      监听器的上下文。可选。

    • priority: number = 0

      事件监听器的优先级。数字越大,优先级越高。默认为0。

    • once: boolean = false

      值为true时在监听一次事件后该监听器将被移除。默认为false。

    Returns ParticleMainModule

  • 监听对象的任意事件,该对象的任意事件都将触发该监听器的调用。

    Type Parameters

    • K extends string

    Parameters

    • listener: ((event) => void)

      处理事件的监听器函数。

        • (event): void
        • Parameters

          Returns void

    • Optional thisObject: any

      监听器的上下文。可选。

    • priority: number = 0

      事件监听器的优先级。数字越大,优先级越高。默认为0。

    • once: boolean = false

      值为true时在监听一次事件后该监听器将被移除。默认为false。

    Returns ParticleMainModule

  • 监听一次事件后将会被移除

    Type Parameters

    • K extends string

    Parameters

    • type: K

      事件的类型。

    • listener: ((event) => void)

      处理事件的侦听器函数。

        • (event): void
        • Parameters

          Returns void

    • Optional thisObject: any

      listener函数作用域

    • priority: number = 0

      事件侦听器的优先级。数字越大,优先级越高。默认优先级为 0。

    Returns ParticleMainModule

  • 更新

    Parameters

    • _interval: number

    Returns void

  • 更新粒子状态

    Parameters

    Returns void

Generated using TypeDoc