Class ParticleSubEmittersModule

Script interface for the SubEmittersModule.

The sub-emitters module allows you to spawn particles in child emitters from the positions of particles in the parent system.

This module triggers child particle emission on events such as the birth, death, and collision of particles in the parent system.

Hierarchy

Constructors

Properties

enabled: boolean

是否开启

particleSystem: ParticleSystem3D

粒子系统

subEmitters: any

Accessors

  • get subEmittersCount(): number
  • The total number of sub-emitters.

    Returns number

Methods

  • Gets the probability that the sub-emitter emits particles.

    Parameters

    • index: number

      The index of the sub-emitter.

    Returns number

  • Gets the sub - emitter Particle System at the given index.

    Parameters

    • index: number

      The index of the desired sub-emitter.

    Returns ParticleSystem3D

  • Gets the type of the sub - emitter at the given index.

    Parameters

    • index: number

      The index of the desired sub-emitter.

    Returns ParticleSystemSubEmitterType

  • Removes a sub - emitter from the given index in the array.

    Parameters

    • index: number

      The index of the desired sub-emitter.

    Returns void

  • Sets the probability that the sub - emitter emits particles.

    Parameters

    • index: number

      The index of the sub-emitter you want to modify.

    • emitProbability: number

      The probability value.

    Returns void

  • Sets the properties of the sub - emitter at the given index.

    Parameters

    Returns void

  • Sets the Particle System to use as the sub - emitter at the given index.

    Parameters

    Returns void

  • Sets the type of the sub - emitter at the given index.

    Parameters

    • index: number

      The index of the sub-emitter you want to modify.

    • type: ParticleSystemSubEmitterType

      The new spawning type to assign to this sub-emitter.

    Returns void

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

    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 ParticleSubEmittersModule

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

    Type Parameters

    • K extends string

    Parameters

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

      处理事件的监听器函数。

        • (event): void
        • Parameters

          Returns void

    • Optional thisObject: any

      监听器的上下文。可选。

    Returns ParticleSubEmittersModule

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

    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 ParticleSubEmittersModule

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

    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 ParticleSubEmittersModule

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

    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 ParticleSubEmittersModule

  • 更新

    Parameters

    • _interval: number

    Returns void

  • 更新粒子状态

    Parameters

    Returns void

Generated using TypeDoc