Home Reference Source
public class | source

Rotation

Extends:

Initializer → Rotation

Sets the rotation property on initialized particles.

Static Method Summary

Static Public Methods
public static

fromJSON(json: *): *

Constructor Summary

Public Constructor
public

constructor(x: number, y: number, z: number, useEmitterRotation: boolean, isEnabled: boolean): *

Constructs a Rotation property instance.

Member Summary

Public Members
public
public

Method Summary

Public Methods
public

initialize(particle: Particle): *

Sets the particle's initial rotation.

Inherited Summary

From class Initializer
public static abstract

Returns a new instance of the initializer from the JSON object passed.

public static

Determines if the initializer requires a Web GL API to be provided to its constructor.

public
public

type: *

public

init(emitter: Emitter, particle: Particle): *

Initializes the property on the emitter or particle.

public abstract

initialize(target: object)

Place custom property initialization code in this method in the subclass.

public abstract

reset()

Static Public Methods

public static fromJSON(json: *): * source

Returns a new instance of the initializer from the JSON object passed.

Override:

Initializer#fromJSON

Params:

NameTypeAttributeDescription
json *

Return:

*

Public Constructors

public constructor(x: number, y: number, z: number, useEmitterRotation: boolean, isEnabled: boolean): * source

Constructs a Rotation property instance.

Override:

Initializer#constructor

Params:

NameTypeAttributeDescription
x number

X axis rotation

y number

Y axis rotation

z number

Z axis rotation

useEmitterRotation boolean
  • optional
  • default: true

Determines if we should use the emitter's rotation as the starting rotation

isEnabled boolean
  • optional
  • default: true

Determines if the initializer should be enabled or not

Return:

*

void

Public Members

public rotation: * source

public useEmitterRotation: * source

Public Methods

public initialize(particle: Particle): * source

Sets the particle's initial rotation.

Override:

Initializer#initialize

Params:

NameTypeAttributeDescription
particle Particle

the particle to initialize the property on

Return:

*

void