Home Reference Source
public class | source

DesktopGPURenderer

Extends:

BaseRenderer → DesktopGPURenderer

GPURenderer for devices that support floating point textures.

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public

buffer: *

public

camera: *

public
public
public
public
public

points: *

public
public

stride: *

public
public
public

Method Summary

Public Methods
public

destroy(): *

Tears down the GPURenderer.

public

getTextureID(texture: *, debug: *): *

public

Entry point for mapping particle properties to buffer geometry points.

public

Pools the particle target if it does not exist.

public

Resets and clears the particle target.

public

Maps particle properties to the point if the particle has a target.

public

onSystemUpdate(system: *)

public

Updates the point alpha attribute with the particle's target alpha.

public

Updates the point's color attribute according with the particle's target color.

public

Updates the point's position according to the particle's target position.

public

Updates the point's rotation.

public

Updates the point's size relative to the particle's target scale and radius.

public

Updates the point texture attribute with the particle's target texture.

public

Maps all mutable properties from the particle to the target.

Inherited Summary

From class BaseRenderer
public

system: *

public

The class type.

public

init(system: *)

public

Logs the renderer type being used when in development mode.

public abstract

onParticleCreated(particle: *)

public abstract

onParticleDead(particle: *)

public abstract

onParticleUpdate(particle: *)

public abstract

onSystemUpdate(system: *)

public

remove()

Public Constructors

public constructor() source

Override:

BaseRenderer#constructor

Public Members

public buffer: * source

public camera: * source

public container: * source

public geometry: * source

public material: * source

public particleBuffer: * source

public points: * source

public shouldDebugTextureAtlas: * source

public stride: * source

public targetPool: * source

public textureAtlas: * source

public uniqueList: * source

Public Methods

public destroy(): * source

Tears down the GPURenderer.

Return:

*

void

public getTextureID(texture: *, debug: *): * source

Params:

NameTypeAttributeDescription
texture *
debug *

Return:

*

public mapParticleTargetPropsToPoint(particle: Particle): DesktopGPURenderer source

Entry point for mapping particle properties to buffer geometry points.

Params:

NameTypeAttributeDescription
particle Particle

The particle containing the properties to map

public onParticleCreated() source

Pools the particle target if it does not exist. Updates the target and maps particle properties to the point.

Override:

BaseRenderer#onParticleCreated

public onParticleDead() source

Resets and clears the particle target.

Override:

BaseRenderer#onParticleDead

public onParticleUpdate() source

Maps particle properties to the point if the particle has a target.

Override:

BaseRenderer#onParticleUpdate

public onSystemUpdate(system: *) source

Override:

BaseRenderer#onSystemUpdate

Params:

NameTypeAttributeDescription
system *

public updatePointAlpha(particle: Particle): DesktopGPURenderer source

Updates the point alpha attribute with the particle's target alpha.

Params:

NameTypeAttributeDescription
particle Particle

The particle containing the target alpha.

public updatePointColor(particle: Particle): DesktopGPURenderer source

Updates the point's color attribute according with the particle's target color.

Params:

NameTypeAttributeDescription
particle Particle

The particle containing the target color and alpha.

public updatePointPosition(particle: Particle): DesktopGPURenderer source

Updates the point's position according to the particle's target position.

Params:

NameTypeAttributeDescription
particle Particle

The particle containing the target position.

public updatePointRotation(particle: Particle): DesktopGPURenderer source

Updates the point's rotation.

Params:

NameTypeAttributeDescription
particle Particle

The particle containing the target rotation.

public updatePointSize(particle: Particle): DesktopGPURenderer source

Updates the point's size relative to the particle's target scale and radius.

Params:

NameTypeAttributeDescription
particle Particle

The particle containing the target scale.

public updatePointTextureIndex(particle: Particle): DesktopGPURenderer source

Updates the point texture attribute with the particle's target texture.

Params:

NameTypeAttributeDescription
particle Particle

The particle containing the target texture.

public updateTarget(): DesktopGPURenderer source

Maps all mutable properties from the particle to the target.