Home Reference Source
public class | source

Zone

A Zone determines the area in 3D space where an emitter's particles can position themselves. They are supplied to both the Position initializer and the CrossZone behaviour.

See:

  • {@link '../initialize/Position.js'}
  • {@link '../behaviour/CrossZone.js'}

Constructor Summary

Public Constructor
public

constructor(type: string): *

Constructs a Zone instance.

Member Summary

Public Members
public
public
public
public
public

type: *

public

vector: *

Method Summary

Public Methods
public

crossing(particle: *): *

public
public

Determines if this zone is a BoxZone.

public

Determines if this zone is a LineZone.

public

Determines if this zone is a MeshZone.

public

Determines if this zone is a PointZone.

public

Determines if this zone is a ScreenZone.

public

Determines if this zone is a SphereZone.

Private Methods
private abstract

_bound(particle: *)

private abstract

_cross(particle: *)

private abstract

_dead(particle: Particle)

Sets the particle's dead property to true if required.

Public Constructors

public constructor(type: string): * source

Constructs a Zone instance.

Params:

NameTypeAttributeDescription
type string

The zone type

Return:

*

void

Public Members

public crossType: string source

public log: boolean source

public random: number source

public supportsCrossing: boolean source

public type: * source

public vector: * source

Public Methods

public crossing(particle: *): * source

Params:

NameTypeAttributeDescription
particle *

Return:

*

public getPosition(): * source

Return:

*

public isBoxZone(): boolean source

Determines if this zone is a BoxZone.

Return:

boolean

public isLineZone(): boolean source

Determines if this zone is a LineZone.

Return:

boolean

public isMeshZone(): boolean source

Determines if this zone is a MeshZone.

Return:

boolean

public isPointZone(): boolean source

Determines if this zone is a PointZone.

Return:

boolean

public isScreenZone(): boolean source

Determines if this zone is a ScreenZone.

Return:

boolean

public isSphereZone(): boolean source

Determines if this zone is a SphereZone.

Return:

boolean

Private Methods

private abstract _bound(particle: *) source

Params:

NameTypeAttributeDescription
particle *

private abstract _cross(particle: *) source

Params:

NameTypeAttributeDescription
particle *

private abstract _dead(particle: Particle) source

Sets the particle's dead property to true if required.

Params:

NameTypeAttributeDescription
particle Particle