Skip to main content
Version: Next

Class: CustomObject

Defined in: packages/utilities/src/customObject/CustomObject.ts:15

Beta

This class encasulate a Object3D, and made it possible to add flags to it. It might be extended with more flags in the future.

Implements

Constructors

Constructor

new CustomObject(object): CustomObject

Defined in: packages/utilities/src/customObject/CustomObject.ts:26

Beta

Constructor

Parameters

object

Object3D

Returns

CustomObject

Accessors

isPartOfBoundingBox

Get Signature

get isPartOfBoundingBox(): boolean

Defined in: packages/utilities/src/customObject/CustomObject.ts:43

Beta

Set or get whether it should be part of the combined bounding box or not. Default is true.

Returns

boolean

Set Signature

set isPartOfBoundingBox(value): void

Defined in: packages/utilities/src/customObject/CustomObject.ts:47

Beta

Get whether it should be part of the combined bounding box or not. Default is true.

Parameters
value

boolean

Returns

void

Implementation of

ICustomObject.isPartOfBoundingBox


object

Get Signature

get object(): Object3D

Defined in: packages/utilities/src/customObject/CustomObject.ts:34

Beta

Get the Object3D

Returns

Object3D

Implementation of

ICustomObject.object


shouldPick

Get Signature

get shouldPick(): boolean

Defined in: packages/utilities/src/customObject/CustomObject.ts:56

Beta

Set or get whether it should be picked by the camera manager Default is false.

Returns

boolean

Set Signature

set shouldPick(value): void

Defined in: packages/utilities/src/customObject/CustomObject.ts:60

Beta

Get whether it should be picked by the camera manager Default is false.

Parameters
value

boolean

Returns

void

Implementation of

ICustomObject.shouldPick


shouldPickBoundingBox

Get Signature

get shouldPickBoundingBox(): boolean

Defined in: packages/utilities/src/customObject/CustomObject.ts:69

Beta

Set or get whether it should be also give the bounding box when picked by the camera Default is false.

Returns

boolean

Set Signature

set shouldPickBoundingBox(value): void

Defined in: packages/utilities/src/customObject/CustomObject.ts:73

Beta

Set or get whether it should be also give the bounding box when picked by the camera Default is false.

Parameters
value

boolean

Returns

void

Implementation of

ICustomObject.shouldPickBoundingBox


useDepthTest

Get Signature

get useDepthTest(): boolean

Defined in: packages/utilities/src/customObject/CustomObject.ts:82

Beta

Get whether it should be rendered with depth test (on top on other objects) Default is true.

Returns

boolean

Set Signature

set useDepthTest(value): void

Defined in: packages/utilities/src/customObject/CustomObject.ts:86

Beta

Get whether it should be rendered with depth test (on top on other objects) Default is true.

Parameters
value

boolean

Returns

void

Implementation of

ICustomObject.useDepthTest

Methods

beforeRender()

beforeRender(_camera): void

Defined in: packages/utilities/src/customObject/CustomObject.ts:139

Beta

This method is called before rendering of the custom object

Parameters

_camera

PerspectiveCamera

Returns

void

Implementation of

ICustomObject.beforeRender


getBoundingBox()

getBoundingBox(target): Box3

Defined in: packages/utilities/src/customObject/CustomObject.ts:94

Beta

Get the bounding box from the object

Parameters

target

Box3

Returns

Box3

Implementation of

ICustomObject.getBoundingBox


intersectIfCloser()

intersectIfCloser(intersectInput, closestDistance): undefined | CustomObjectIntersection

Defined in: packages/utilities/src/customObject/CustomObject.ts:104

Beta

Intersect the object with the raycaster. This function can be overridden to provide custom intersection logic.

Parameters

intersectInput

CustomObjectIntersectInput

closestDistance

undefined | number

Returns

undefined | CustomObjectIntersection

Implementation of

ICustomObject.intersectIfCloser