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

Beta

Constructor

Parameters​

object​

Object3D

Returns​

CustomObject

Accessors​

isPartOfBoundingBox​

Get Signature​

get isPartOfBoundingBox(): boolean

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

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

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

Beta

Get the Object3D

Returns​

Object3D

Implementation of​

ICustomObject.object


receiveShadow​

Get Signature​

get receiveShadow(): boolean

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

Beta

Whether CAD shadows fall on this object. Default is false.

Deprecated​

No longer read. Request the shadow on the material instead with CustomObjectEffectMaterial.setReceivesShadow.

Returns​

boolean

Set Signature​

set receiveShadow(value): void

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

Beta

Whether CAD shadows fall on this object. Optional. When omitted, the object does not receive shadows.

Deprecated​

No longer read. Request the shadow on the material instead with CustomObjectEffectMaterial.setReceivesShadow.

Parameters​
value​

boolean

Returns​

void

Implementation of​

ICustomObject.receiveShadow


shouldPick​

Get Signature​

get shouldPick(): boolean

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

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

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

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

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

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

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

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

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

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