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

ScreenZone

Extends:

Zone → ScreenZone

Constructor Summary

Public Constructor
public

constructor(x1: Number | Vector3D, y1: Number | Vector3D, z1: Number, x2: Number, y2: Number, z2: Number)

ScreenZone is a 3d line zone

Member Summary

Public Members
public
public

camera: *

public

dis: *

public

Method Summary

Public Methods
public

Returns true to indicate this is a ScreenZone.

Private Methods
private

_bound(particle: *)

private

_dead(particle: *)

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(x1: Number | Vector3D, y1: Number | Vector3D, z1: Number, x2: Number, y2: Number, z2: Number) source

ScreenZone is a 3d line zone

Override:

Zone#constructor

Params:

NameTypeAttributeDescription
x1 Number | Vector3D

the line's start point of x value or a Vector3D Object

y1 Number | Vector3D

the line's start point of y value or a Vector3D Object

z1 Number

the line's start point of z value

x2 Number

the line's end point of x value

y2 Number

the line's end point of y value

z2 Number

the line's end point of z value

Example:

var lineZone = new ScreenZone(0,0,0,100,100,0);
or
var lineZone = new ScreenZone(new Vector3D(0,0,0),new Vector3D(100,100,0));

Public Members

public ['d' + i]: * source

public camera: * source

public dis: * source

public renderer: * source

Public Methods

public isScreenZone(): boolean source

Returns true to indicate this is a ScreenZone.

Override:

Zone#isScreenZone

Return:

boolean

Private Methods

private _bound(particle: *) source

Override:

Zone#_bound

Params:

NameTypeAttributeDescription
particle *

private _dead(particle: *) source

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

Override:

Zone#_dead

Params:

NameTypeAttributeDescription
particle *