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

BoxZone

Extends:

Zone → BoxZone

Constructor Summary

Public Constructor
public

BoxZone is a box zone

Member Summary

Public Members
public

depth: *

public
public

height: *

public
public

width: *

public

x: *

public

y: *

public

z: *

Method Summary

Public Methods
public
public

Returns true to indicate this is a BoxZone.

Private Methods
private

_bound(particle: *)

private

_cross(particle: *)

private

_dead(particle: *)

private

_static(particle: *, axis: *)

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(x: Number | Vector3D, y: Number, z: Number, w: Number, h: Number, d: Number) source

BoxZone is a box zone

Override:

Zone#constructor

Params:

NameTypeAttributeDescription
x Number | Vector3D

the position's x value or a Vector3D Object

y Number

the position's y value

z Number

the position's z value

w Number

the Box's width

h Number

the Box's height

d Number

the Box's depth

Example:

var boxZone = new BoxZone(0,0,0,50,50,50);
or
var boxZone = new BoxZone(new Vector3D(0,0,0), 50, 50, 50);

Public Members

public depth: * source

public friction: number source

public height: * source

public max: number source

public width: * source

public x: * source

public y: * source

public z: * source

Public Methods

public getPosition(): * source

Override:

Zone#getPosition

Return:

*

public isBoxZone(): boolean source

Returns true to indicate this is a BoxZone.

Override:

Zone#isBoxZone

Return:

boolean

Private Methods

private _bound(particle: *) source

Override:

Zone#_bound

Params:

NameTypeAttributeDescription
particle *

private _cross(particle: *) source

Override:

Zone#_cross

Params:

NameTypeAttributeDescription
particle *

private _dead(particle: *) source

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

Override:

Zone#_dead

Params:

NameTypeAttributeDescription
particle *

private _static(particle: *, axis: *) source

Params:

NameTypeAttributeDescription
particle *
axis *