Home Reference Source
import SphereZone from 'three-nebula/src/zone/SphereZone.js'
public class | source

SphereZone

Extends:

Zone → SphereZone

A spherical zone for particles to be emitted within.

Constructor Summary

Public Constructor
public

constructor(centerX: number, centerY: number, centerZ: number, radius: number): *

Member Summary

Public Members
public

radius: *

public

the: *

public

x: *

public

y: *

public

z: *

Method Summary

Public Methods
public

Returns true to indicate this is a SphereZone.

Private Methods
private

_cross(): *

Warns that this zone does not support the _cross method.

private

_dead(particle: object): *

Sets the particle to dead if the particle collides with the sphere.

Inherited Summary

From class Zone
public
public
public
public
public

type: *

public

vector: *

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 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(centerX: number, centerY: number, centerZ: number, radius: number): * source

Constructs a Zone instance.

Override:

Zone#constructor

Params:

NameTypeAttributeDescription
centerX number

the sphere's center x coordinate

centerY number

the sphere's center y coordinate

centerZ number

the sphere's center z coordinate

radius number

the sphere's radius value

Return:

*

void

Public Members

public radius: * source

public the: * source

public x: * source

public y: * source

public z: * source

Public Methods

public isSphereZone(): boolean source

Returns true to indicate this is a SphereZone.

Override:

Zone#isSphereZone

Return:

boolean

Private Methods

private _cross(): * source

Warns that this zone does not support the _cross method.

Override:

Zone#_cross

Return:

*

void

private _dead(particle: object): * source

Sets the particle to dead if the particle collides with the sphere.

Override:

Zone#_dead

Params:

NameTypeAttributeDescription
particle object

Return:

*

void