Skip to main content
Version: Next

Class: CustomObject

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

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:27

Beta

Constructor

Parameters​

object​

Object3D

Returns​

CustomObject

Accessors​

isPartOfBoundingBox​

Get Signature​

get isPartOfBoundingBox(): boolean

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

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:48

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:35

Beta

Get the Object3D

Returns​

Object3D

Implementation of​

ICustomObject.object


shouldPick​

Get Signature​

get shouldPick(): boolean

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

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:61

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:70

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:74

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:83

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:87

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:140

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:95

Beta

Get the bounding box from the object

Parameters​

target​

Box3

Returns​

Box3

Implementation of​

ICustomObject.getBoundingBox


intersectIfCloser()​

intersectIfCloser(intersectInput, closestDistance): CustomObjectIntersection | undefined

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

Beta

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

Parameters​

intersectInput​

CustomObjectIntersectInput

closestDistance​

number | undefined

Returns​

CustomObjectIntersection | undefined

Implementation of​

ICustomObject.intersectIfCloser