Home Reference Source
public class | source

Position

Extends:

Initializer → Position

Sets the starting position property for initialized particles. This is derived from a zone randomly chosen from those supplied to the constructor.

Static Method Summary

Static Public Methods
public static

Creates a Position initializer from JSON.

Constructor Summary

Public Constructor
public

Constructs a Position initializer instance.

Member Summary

Public Members
public

zones: *[]

Method Summary

Public Methods
public

addZone(): *

Adds a zone or zones to this.zones.

public

reset(): *

Resets the initializer properties.

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: object): Position source

Creates a Position initializer from JSON.

Override:

Initializer#fromJSON

Params:

NameTypeAttributeDescription
json object

The JSON to construct the instance from.

json.zoneType string

The type of zone to use for initial position

Return:

Position

Public Constructors

public constructor(): * source

Constructs a Position initializer instance.

Override:

Initializer#constructor

Return:

*

void

Public Members

public zones: *[] source

Public Methods

public addZone(): * source

Adds a zone or zones to this.zones.

Return:

*

void

public reset(): * source

Resets the initializer properties. Clears all previously set zones and resets the zones according to args passed.

Override:

Initializer#reset

Return:

*

void