Class ParticleSystemRenderer

Use this class to render particles on to the screen.

Hierarchy

Constructors

Properties

activeVertexStreamsCount: number

The number of currently active custom vertex streams.

Control the direction that particles face.

allowRoll: boolean

Allow billboard particles to roll around their z-axis.

cameraVelocityScale: number

How much do the particles stretch depending on the Camera's speed.

enableGPUInstancing: boolean

Enables GPU Instancing on platforms that support it.

enabled: boolean

是否开启

flip: Vector3

Flip a percentage of the particles, along each axis.

freeformStretching: boolean

Enables freeform stretching behavior.

lengthScale: number

How much are the particles stretched in their direction of motion, defined as the length of the particle compared to its width.

maskInteraction: SpriteMaskInteraction

Specifies how the Particle System Renderer interacts with SpriteMask.

maxParticleSize: number

Clamp the maximum particle size.

mesh: Geometry

The Mesh that the particle uses instead of a billboarded Texture.

meshCount: number

The number of Meshes the system uses for particle rendering.

minParticleSize: number

Clamp the minimum particle size.

normalDirection: number

Specifies how much a billboard particle orients its normals towards the Camera.

particleSystem: ParticleSystem3D

粒子系统

pivot: Vector3

Modify the pivot point used for rotating particles.

Specifies how the system draws particles.

rotateWithStretchDirection: boolean

Rotate the particles based on the direction they are stretched in.This is added on top of other particle rotation.

shadowBias: number

Apply a shadow bias to prevent self - shadowing artifacts.The specified value is the proportion of the particle size.

Specifies how to sort particles within a system.

sortingFudge: number

Biases Particle System sorting amongst other transparencies.

trailMaterial: Material

Set the Material that the TrailModule uses to attach trails to particles.

velocityScale: number

Specifies how much particles stretch depending on their velocity.

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 ParticleSystemRenderer

  • 移除所有监听

    Type Parameters

    • K extends string

    Parameters

    • Optional type: K

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

    Returns ParticleSystemRenderer

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

    Type Parameters

    • K extends string

    Parameters

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

      处理事件的监听器函数。

        • (event): void
        • Parameters

          Returns void

    • Optional thisObject: any

      监听器的上下文。可选。

    Returns ParticleSystemRenderer

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

    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 ParticleSystemRenderer

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

    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 ParticleSystemRenderer

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

    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 ParticleSystemRenderer

  • 更新

    Parameters

    • _interval: number

    Returns void

  • 更新粒子状态

    Parameters

    Returns void

Generated using TypeDoc