Home Reference Source
public class | source

Radius

Extends:

Initializer → Radius

Sets the radius property on initialized particles.

Static Method Summary

Static Public Methods
public static

Creates a Radius initializer from JSON.

Constructor Summary

Public Constructor
public

constructor(width: number, height: number, center: boolean): *

Constructs a Radius initializer instance.

Member Summary

Public Members
public

The radius span which is used to set the particle radius value.

Method Summary

Public Methods
public

initialize(particle: Particle): *

Sets the particle's initial radius.

public

reset(width: number, height: number, center: boolean): *

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): Radius source

Creates a Radius initializer from JSON.

Override:

Initializer#fromJSON

Params:

NameTypeAttributeDescription
json object

The JSON to construct the instance from.

Return:

Radius

Return Properties:

NameTypeAttributeDescription
json.width number

The width of the particle radius

json.height number

The height of the particle radius

json.center number

The center of the particle radius

Public Constructors

public constructor(width: number, height: number, center: boolean): * source

Constructs a Radius initializer instance.

Override:

Initializer#constructor

Params:

NameTypeAttributeDescription
width number

The width of the particle radius

height number

The height of the particle radius

center boolean
  • optional
  • default: false

Determines whether to average the radius value

Return:

*

void

Public Members

public radius: Span source

The radius span which is used to set the particle radius value.

Public Methods

public initialize(particle: Particle): * source

Sets the particle's initial radius.

Override:

Initializer#initialize

Params:

NameTypeAttributeDescription
particle Particle

the particle to initialize the property on

Return:

*

void

public reset(width: number, height: number, center: boolean): * source

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

Override:

Initializer#reset

Params:

NameTypeAttributeDescription
width number

The width of the particle radius

height number

The height of the particle radius

center boolean
  • optional
  • default: false

Determines whether to average the radius value

Return:

*

void