Skip to content
本页内容

Class: Graphic3D

The base class of most objects provides a series of properties and methods for manipulating objects in three-dimensional space.

Hierarchy

Properties

Accessors

Methods

Constructors

Properties

name

name: string = ''

The name of the object. The default value is an empty string.

Inherited from

Object3D.name

Defined in

src/core/entities/Entity.ts:25


transform

transform: Transform

The Transform attached to this object.

Inherited from

Object3D.transform

Defined in

src/core/entities/Entity.ts:60


renderNode

renderNode: RenderNode

Renderer components

Inherited from

Object3D.renderNode

Defined in

src/core/entities/Entity.ts:65


entityChildren

entityChildren: Entity[]

An array containing sub objects of an object

Inherited from

Object3D.entityChildren

Defined in

src/core/entities/Entity.ts:70


components

components: Map<any, IComponent>

List of components attached to an object

Inherited from

Object3D.components

Defined in

src/core/entities/Entity.ts:75


prefabRef

Optional prefabRef: string

Inherited from

Object3D.prefabRef

Defined in

src/core/entities/Object3D.ts:14

Accessors

uuid

get uuid(): string

The unique identifier of the object.

Returns

string

Inherited from

Object3D.uuid

Defined in

src/core/entities/Entity.ts:32


renderLayer

get renderLayer(): RenderLayer

Returns

RenderLayer

Inherited from

Object3D.renderLayer

Defined in

src/core/entities/Entity.ts:44

set renderLayer(value): void

Parameters

NameType
valueRenderLayer

Returns

void

Inherited from

Object3D.renderLayer

Defined in

src/core/entities/Entity.ts:48


numChildren

get numChildren(): number

Returns the number of child objects of an object

Returns

number

Inherited from

Object3D.numChildren

Defined in

src/core/entities/Entity.ts:129


bound

get bound(): IBound

Returns

IBound

Inherited from

Object3D.bound

Defined in

src/core/entities/Entity.ts:317

set bound(value): void

Parameters

NameType
valueIBound

Returns

void

Inherited from

Object3D.bound

Defined in

src/core/entities/Entity.ts:324


isScene3D

get isScene3D(): boolean

Returns

boolean

Inherited from

Object3D.isScene3D

Defined in

src/core/entities/Object3D.ts:24


localPosition

get localPosition(): Vector3

Get the position of an object relative to its parent

Returns

Vector3

Inherited from

Object3D.localPosition

Defined in

src/core/entities/Object3D.ts:268

set localPosition(value): void

Set the position of an object relative to its parent

Parameters

NameType
valueVector3

Returns

void

Inherited from

Object3D.localPosition

Defined in

src/core/entities/Object3D.ts:275


localRotation

get localRotation(): Vector3

Get the rotation attribute of an object relative to its parent

Returns

Vector3

Inherited from

Object3D.localRotation

Defined in

src/core/entities/Object3D.ts:282

set localRotation(value): void

Set the rotation attribute of an object relative to its parent

Parameters

NameType
valueVector3

Returns

void

Inherited from

Object3D.localRotation

Defined in

src/core/entities/Object3D.ts:289


localScale

get localScale(): Vector3

Get the scaling attribute of an object relative to its parent

Returns

Vector3

Inherited from

Object3D.localScale

Defined in

src/core/entities/Object3D.ts:296

set localScale(value): void

Set the scaling attribute of an object relative to its parent

Parameters

NameType
valueVector3

Returns

void

Inherited from

Object3D.localScale

Defined in

src/core/entities/Object3D.ts:303


localQuaternion

get localQuaternion(): Quaternion

Get the rotation attribute of an object relative to its parent, which is a quaternion

Returns

Quaternion

Inherited from

Object3D.localQuaternion

Defined in

src/core/entities/Object3D.ts:310

set localQuaternion(value): void

Set the rotation attribute of an object relative to its parent, which is a quaternion

Parameters

NameType
valueQuaternion

Returns

void

Inherited from

Object3D.localQuaternion

Defined in

src/core/entities/Object3D.ts:317


parent

get parent(): Transform

Transform component of object parent

Returns

Transform

Inherited from

Object3D.parent

Defined in

src/core/entities/Object3D.ts:332


parentObject

get parentObject(): Object3D

parent object3D

Returns

Object3D

Inherited from

Object3D.parentObject

Defined in

src/core/entities/Object3D.ts:340


x

get x(): number

Get the x coordinate relative to the local coordinates of the parent container.

Returns

number

Inherited from

Object3D.x

Defined in

src/core/entities/Object3D.ts:356

set x(value): void

Set the x coordinate relative to the local coordinates of the parent container.

Parameters

NameType
valuenumber

Returns

void

Inherited from

Object3D.x

Defined in

src/core/entities/Object3D.ts:348


y

get y(): number

Get the y coordinate relative to the local coordinates of the parent container.

Returns

number

Inherited from

Object3D.y

Defined in

src/core/entities/Object3D.ts:371

set y(value): void

Set the y coordinate relative to the local coordinates of the parent container.

Parameters

NameType
valuenumber

Returns

void

Inherited from

Object3D.y

Defined in

src/core/entities/Object3D.ts:363


z

get z(): number

Get the z coordinate relative to the local coordinates of the parent container.

Returns

number

Inherited from

Object3D.z

Defined in

src/core/entities/Object3D.ts:385

set z(value): void

Set the z coordinate relative to the local coordinates of the parent container.

Parameters

NameType
valuenumber

Returns

void

Inherited from

Object3D.z

Defined in

src/core/entities/Object3D.ts:378


scaleX

get scaleX(): number

Get the x scale relative to the local coordinates of the parent container.

Returns

number

Inherited from

Object3D.scaleX

Defined in

src/core/entities/Object3D.ts:400

set scaleX(value): void

Set the x scale relative to the local coordinates of the parent container.

Parameters

NameType
valuenumber

Returns

void

Inherited from

Object3D.scaleX

Defined in

src/core/entities/Object3D.ts:392


scaleY

get scaleY(): number

Get the y scale relative to the local coordinates of the parent container.

Returns

number

Inherited from

Object3D.scaleY

Defined in

src/core/entities/Object3D.ts:416

set scaleY(value): void

Set the y scale relative to the local coordinates of the parent container.

Parameters

NameType
valuenumber

Returns

void

Inherited from

Object3D.scaleY

Defined in

src/core/entities/Object3D.ts:408


scaleZ

get scaleZ(): number

Get the z scale relative to the local coordinates of the parent container.

Returns

number

Inherited from

Object3D.scaleZ

Defined in

src/core/entities/Object3D.ts:432

set scaleZ(value): void

Set the z scale relative to the local coordinates of the parent container.

Parameters

NameType
valuenumber

Returns

void

Inherited from

Object3D.scaleZ

Defined in

src/core/entities/Object3D.ts:424


rotationX

get rotationX(): number

Get the x rotation relative to the local coordinates of the parent container.

Returns

number

Inherited from

Object3D.rotationX

Defined in

src/core/entities/Object3D.ts:448

set rotationX(value): void

Set the x rotation relative to the local coordinates of the parent container.

Parameters

NameType
valuenumber

Returns

void

Inherited from

Object3D.rotationX

Defined in

src/core/entities/Object3D.ts:440


rotationY

get rotationY(): number

Get the y rotation relative to the local coordinates of the parent container.

Returns

number

Inherited from

Object3D.rotationY

Defined in

src/core/entities/Object3D.ts:464

set rotationY(value): void

Set the y rotation relative to the local coordinates of the parent container.

Parameters

NameType
valuenumber

Returns

void

Inherited from

Object3D.rotationY

Defined in

src/core/entities/Object3D.ts:456


rotationZ

get rotationZ(): number

Set the z rotation relative to the local coordinates of the parent container.

Returns

number

Inherited from

Object3D.rotationZ

Defined in

src/core/entities/Object3D.ts:480

set rotationZ(value): void

Set the z rotation relative to the local coordinates of the parent container.

Parameters

NameType
valuenumber

Returns

void

Inherited from

Object3D.rotationZ

Defined in

src/core/entities/Object3D.ts:472

Methods

getObjectByName

getObjectByName(name): Entity

Starting from the object itself, search for the object and its children, and return the first child object with a matching name. For most objects, the name is an empty string by default. You must manually set it to use this method.

Parameters

NameTypeDescription
namestringinput name

Returns

Entity

result Entity

Inherited from

Object3D.getObjectByName

Defined in

src/core/entities/Entity.ts:94


addChild

addChild(child): Entity

Add an object as a child of this object. You can add any number of objects. Any current parent object on the object passed here will be deleted, as an object can only have at most one parent object.

Parameters

NameTypeDescription
childEntitytarget child entity

Returns

Entity

Inherited from

Object3D.addChild

Defined in

src/core/entities/Entity.ts:140


removeChild

removeChild(child): any

Remove the child objects of the object. You can remove any number of objects.

Parameters

NameTypeDescription
childEntityRemoved objects

Returns

any

Inherited from

Object3D.removeChild

Defined in

src/core/entities/Entity.ts:166


removeAllChild

removeAllChild(): void

Remove all children of the current object

Returns

void

Inherited from

Object3D.removeAllChild

Defined in

src/core/entities/Entity.ts:180


removeSelf

removeSelf(): Graphic3D

Remove the current node from the parent

Returns

Graphic3D

this

Inherited from

Object3D.removeSelf

Defined in

src/core/entities/Entity.ts:191


removeChildByIndex

removeChildByIndex(index): void

Search for child nodes of objects and remove child objects with matching indexes.

Parameters

NameTypeDescription
indexnumberassign index

Returns

void

Inherited from

Object3D.removeChildByIndex

Defined in

src/core/entities/Entity.ts:201


hasChild

hasChild(child): boolean

Does the current object contain a certain object

Parameters

NameTypeDescription
childEntitycertain object

Returns

boolean

boolean

Inherited from

Object3D.hasChild

Defined in

src/core/entities/Entity.ts:215


removeFromParent

removeFromParent(): Graphic3D

Remove the current node from the parent

Returns

Graphic3D

this

Inherited from

Object3D.removeFromParent

Defined in

src/core/entities/Entity.ts:225


getChildByIndex

getChildByIndex(index): Entity

Search for object children and return the first child object with a matching index.

Parameters

NameTypeDescription
indexnumbermatching index

Returns

Entity

child entity

Inherited from

Object3D.getChildByIndex

Defined in

src/core/entities/Entity.ts:239


getChildByName

getChildByName(name, loopChild?): any

Search for object children and return a child object with a matching name.

Parameters

NameTypeDefault valueDescription
namestringundefinedmatching name
loopChildbooleantrueWhether to traverse the children of the child object. The default value is true

Returns

any

result

Inherited from

Object3D.getChildByName

Defined in

src/core/entities/Entity.ts:254


genBounds

genBounds(): IBound

Returns a bounding box that defines the display area of the specified layer.

Returns

IBound

Inherited from

Object3D.genBounds

Defined in

src/core/entities/Entity.ts:333


updateBound

updateBound(): void

Returns

void

Inherited from

Object3D.updateBound

Defined in

src/core/entities/Entity.ts:345


forChild

forChild(call): void

Traverse all sub objects starting from the object itself. If there are still sub objects in the sub object, recursively traverse.

Parameters

NameType
callFunction

Returns

void

Inherited from

Object3D.forChild

Defined in

src/core/entities/Object3D.ts:35


addComponent

addComponent<T>(c, param?): T

Create a new component and add it to the object, and return an instance of the component. If a component of this type already exists, it will not be added and will return null.

Type parameters

NameType
Textends IComponent

Parameters

NameTypeDescription
cCtor<T>class of component
param?any-

Returns

T

result component

Inherited from

Object3D.addComponent

Defined in

src/core/entities/Object3D.ts:49


getOrAddComponent

getOrAddComponent<T>(c): T

Returns an instance of a component object of the specified type. If there are no components of that type, a new component is created and added to the object.

Type parameters

NameType
Textends IComponent

Parameters

NameTypeDescription
cCtor<T>class of component

Returns

T

result component

Inherited from

Object3D.getOrAddComponent

Defined in

src/core/entities/Object3D.ts:71


removeComponent

removeComponent<T>(c): void

Remove components of the specified type

Type parameters

NameType
Textends IComponent

Parameters

NameTypeDescription
cCtor<T>class of component

Returns

void

Inherited from

Object3D.removeComponent

Defined in

src/core/entities/Object3D.ts:85


hasComponent

hasComponent<T>(c): boolean

Is there a component of the specified type

Type parameters

NameType
Textends IComponent

Parameters

NameTypeDescription
cCtor<T>type of component

Returns

boolean

boolean

Inherited from

Object3D.hasComponent

Defined in

src/core/entities/Object3D.ts:101


getComponent

getComponent<T>(c): T

Returns a component of the specified type.

Type parameters

NameType
Textends IComponent

Parameters

NameTypeDescription
cCtor<T>class of component

Returns

T

result component

Inherited from

Object3D.getComponent

Defined in

src/core/entities/Object3D.ts:112


getComponentFromParent

getComponentFromParent<T>(c): T

Returns a component object of the specified type from the parent node. If there are no components of that type, calls the parent object lookup of the parent object

Type parameters

NameType
Textends IComponent

Parameters

NameTypeDescription
cCtor<T>class of component

Returns

T

reulst component

Inherited from

Object3D.getComponentFromParent

Defined in

src/core/entities/Object3D.ts:125


getComponentsInChild

getComponentsInChild<T>(c): T[]

Returns an array of component objects of the specified type. If there are no components of that type, search in the list of self body class objects

Type parameters

NameType
Textends IComponent

Parameters

NameTypeDescription
cCtor<T>class of component

Returns

T[]

result components

Inherited from

Object3D.getComponentsInChild

Defined in

src/core/entities/Object3D.ts:145


getComponents

getComponents<T>(c, outList?, includeInactive?): T[]

Returns all components of the specified type contained in the current object and its children. If there are children in the child object, recursively search.

Type parameters

NameType
Textends IComponent

Parameters

NameTypeDescription
cCtor<T>class of component
outList?T[]result component list
includeInactive?booleanWhether to include invisible objects, default to false

Returns

T[]

Inherited from

Object3D.getComponents

Defined in

src/core/entities/Object3D.ts:169


getComponentsExt

getComponentsExt<T>(c, ret?, includeInactive?): T[]

Quickly obtain components and no longer access child nodes after obtaining them at a certain node

Memberof

ELPObject3D

Type parameters

NameType
Textends IComponent

Parameters

NameTypeDescription
cCtor<T>class of component
ret?T[]List of incoming T
includeInactive?booleanWhether to include invisible objects, default to false

Returns

T[]

{T}

Inherited from

Object3D.getComponentsExt

Defined in

src/core/entities/Object3D.ts:194


getComponentsByProperty

getComponentsByProperty<T>(key, value, findedAndBreak?, ret?, includeInactive?): T[]

Type parameters

NameType
Textends IComponent

Parameters

NameTypeDefault value
keystringundefined
valueanyundefined
findedAndBreakbooleantrue
ret?T[]undefined
includeInactive?booleanundefined

Returns

T[]

Inherited from

Object3D.getComponentsByProperty

Defined in

src/core/entities/Object3D.ts:209


clone

clone(): Object3D

clone a Object3D

Returns

Object3D

Inherited from

Object3D.clone

Defined in

src/core/entities/Object3D.ts:236


notifyChange

notifyChange(): void

Notify transformation attribute updates

Returns

void

Inherited from

Object3D.notifyChange

Defined in

src/core/entities/Object3D.ts:324


traverse

traverse(callback): void

Recursive child nodes and execute specified function

Parameters

NameTypeDescription
callback(child: any) => voidspecified function

Returns

void

Inherited from

Object3D.traverse

Defined in

src/core/entities/Object3D.ts:501


destroy

destroy(force?): void

Release self

Parameters

NameType
force?boolean

Returns

void

Inherited from

Object3D.destroy

Defined in

src/core/entities/Object3D.ts:516


dispatchEvent

dispatchEvent(event): void

Dispatch an event to all registered objects with a specific type of listener.

Parameters

NameType
eventCEvent

Returns

void

Inherited from

Object3D.dispatchEvent

Defined in

src/event/CEventDispatcher.ts:24


addEventListener

addEventListener(type, callback, thisObject, param?, priority?): number

register an event listener to event distancher.

Parameters

NameTypeDefault valueDescription
typestring | numberundefined{string} event type.
callbackFunctionundefined{Function} The callback function that handles events. This function must accept an Event3D object as its unique parameter and cannot return any result. for example: function(evt:Event3D):void.
thisObjectanyundefined{any} Current registration object, it'll call callback function.
paramanynull{any} the data binded to registered event, the default value is null.
prioritynumber0{number} The priority of callback function execution, with a larger set value having priority to call

Returns

number

Returns register event id

Inherited from

Object3D.addEventListener

Defined in

src/event/CEventDispatcher.ts:79


removeEventListener

removeEventListener(type, callback, thisObject): void

Remove Event Listening

Parameters

NameTypeDescription
typestring | number{string} event type
callbackFunction{Function} callback function of event register
thisObjectany{any} The current registered object.

Returns

void

Inherited from

Object3D.removeEventListener

Defined in

src/event/CEventDispatcher.ts:113


removeEventListenerAt

removeEventListenerAt(id): boolean

Remove an event Listening with id

Parameters

NameType
idnumber

Returns

boolean

Inherited from

Object3D.removeEventListenerAt

Defined in

src/event/CEventDispatcher.ts:133


removeAllEventListener

removeAllEventListener(eventType?): void

Specify a event type to remove all related event listeners eventType event type, set null to remove all event listeners

Parameters

NameTypeDefault value
eventTypestring | numbernull

Returns

void

Inherited from

Object3D.removeAllEventListener

Defined in

src/event/CEventDispatcher.ts:153


containEventListener

containEventListener(type): boolean

whether the target presence of a listener with event type.

Parameters

NameTypeDescription
typestring{string} event type.

Returns

boolean

Returns a boolean.

Inherited from

Object3D.containEventListener

Defined in

src/event/CEventDispatcher.ts:185


hasEventListener

hasEventListener(type, callback?, thisObject?): boolean

whether the target presence of a listener with event type. it associate more registration parameters.

Parameters

NameTypeDefault valueDescription
typestring | numberundefined{string} event name.
callbackFunctionnull{Function} callback function of event register.
thisObjectanynull{any} The registered object.

Returns

boolean

Returns a boolean.

Inherited from

Object3D.hasEventListener

Defined in

src/event/CEventDispatcher.ts:198


drawAxis

drawAxis(uuid, origin?, size?): void

Draw the 3 - dimensional axes

Parameters

NameTypeDefault valueDescription
uuidstringundefinedGraphic identification ID
originVector3undefinedoriginal point
sizenumber10Length of axis

Returns

void

Defined in

src/gfx/renderJob/passRenderer/graphic/Graphic3DRender.ts:33


drawLines

drawLines(uuid, points, colors?): void

Draw a line

Parameters

NameTypeDefault valueDescription
uuidstringundefinedGraphic identification ID
pointsVector3[]undefinedLine path point
colorsColor | Color[]Color.COLOR_WHITE-

Returns

void

Defined in

src/gfx/renderJob/passRenderer/graphic/Graphic3DRender.ts:45


drawCurve

drawCurve(uuid, points, samples?, tension?, color?): void

drawing curve

Parameters

NameTypeDefault valueDescription
uuidstringundefinedGraphic identification ID
pointsVector3[]undefinedCurve position point
samplesnumber10Number of Samples
tensionnumber0.5Strength of curve
colorColorColor.COLOR_WHITEColor of curve

Returns

void

Defined in

src/gfx/renderJob/passRenderer/graphic/Graphic3DRender.ts:59


drawRect

drawRect(uuid, origin, width, height, color?): void

Draw a rectangle

Parameters

NameTypeDefault valueDescription
uuidstringundefinedGraphic identification ID
originVector3undefinedoriginal point
widthnumberundefinedWidth of rectangle
heightnumberundefinedHeight of rectangle
colorColorColor.COLOR_WHITEThe color of the rectangle

Returns

void

Defined in

src/gfx/renderJob/passRenderer/graphic/Graphic3DRender.ts:103


drawCircle

drawCircle(uuid, center, radius, segments?, up?, color?): void

Draw a circle

Parameters

NameTypeDefault valueDescription
uuidstringundefinedGraphic identification ID
centerVector3undefinedcentre point
radiusnumberundefinedradius
segmentsnumber32Number of line segments
upVector3Vector3.Y_AXISDirection of plane
colorColorColor.COLOR_WHITEThe color of the circle

Returns

void

Defined in

src/gfx/renderJob/passRenderer/graphic/Graphic3DRender.ts:122


drawSector

drawSector(uuid, center, radius, startAngle, endAngle, segments?, up?, color?): void

Draw a Sector

Parameters

NameTypeDefault valueDescription
uuidstringundefinedGraphic identification ID
centerVector3undefinedcentre point
radiusnumberundefinedradius
startAnglenumberundefinedAngle of onset
endAnglenumberundefinedAngle of end
segmentsnumber16number of segments
upVector3Vector3.Y_AXISDirection of plane
colorColorColor.COLOR_WHITEThe color of the sector

Returns

void

Defined in

src/gfx/renderJob/passRenderer/graphic/Graphic3DRender.ts:139


drawArcLine

drawArcLine(uuid, center, radius, startAngle, endAngle, segments?, up?, color?): void

Draw a ArcLine

Parameters

NameTypeDefault valueDescription
uuidstringundefinedGraphic identification ID
centerVector3undefinedcentre point
radiusnumberundefinedradius
startAnglenumberundefinedAngle of onset
endAnglenumberundefinedAngle of end
segmentsnumber16number of segments
upVector3Vector3.Y_AXISDirection of plane
colorColorColor.COLOR_WHITEThe color of the sector

Returns

void

Defined in

src/gfx/renderJob/passRenderer/graphic/Graphic3DRender.ts:182


createCustomShape

createCustomShape(uuid, parentTransform?): Graphics3DShape

Creates a custom line segment graph and returns a Shape with the same uuid from the pool if it already exists.

Parameters

NameTypeDescription
uuidstringGraphic identification ID
parentTransformTransformParent node Transform

Returns

Graphics3DShape

Graphics3DShape

Defined in

src/gfx/renderJob/passRenderer/graphic/Graphic3DRender.ts:194


drawBox

drawBox(uuid, minPoint, maxPoint, color?): void

Draw the box

Parameters

NameTypeDefault valueDescription
uuidstringundefinedGraphic identification ID
minPointVector3undefinedPoint of minimum
maxPointVector3undefinedPoint of maximum
colorColorColor.COLOR_WHITEThe color of the box

Returns

void

Defined in

src/gfx/renderJob/passRenderer/graphic/Graphic3DRender.ts:205


drawFillRect

drawFillRect(uuid, origin, width, height, color?): void

Draw the fill rectangle

Parameters

NameTypeDefault valueDescription
uuidstringundefinedGraphic identification ID
originVector3undefined-
widthnumberundefined-
heightnumberundefined-
colorColorColor.COLOR_WHITEThe color of the fill rectangle

Returns

void

Defined in

src/gfx/renderJob/passRenderer/graphic/Graphic3DRender.ts:247


drawFillCircle

drawFillCircle(uuid, center, radius, segments?, up?, color?): void

Draw the fill circle

Parameters

NameTypeDefault valueDescription
uuidstringundefinedGraphic identification ID
centerVector3undefinedcentre point
radiusnumberundefinedradius
segmentsnumber32number of segments
upVector3Vector3.Y_AXISDirection of plane
colorColorColor.COLOR_WHITEThe color of the fill circle

Returns

void

Defined in

src/gfx/renderJob/passRenderer/graphic/Graphic3DRender.ts:267


drawMeshWireframe

drawMeshWireframe(uuid, geometry, transform, color?): void

Draw wire frame for geometry

Parameters

NameTypeDefault valueDescription
uuidstringundefinedGraphic identification ID
geometryGeometryBaseundefinedGeometric object
transformTransformundefinedThe Transform that needs to be bound
colorColorColor.COLOR_WHITEThe color of the wire frame

Returns

void

Defined in

src/gfx/renderJob/passRenderer/graphic/Graphic3DRender.ts:303


drawFillSector

drawFillSector(uuid, center, radius, startAngle, endAngle, segments?, up?, color?): void

Draw the fill sector

Parameters

NameTypeDefault valueDescription
uuidstringundefinedGraphic identification ID
centerVector3undefinedcentre point
radiusnumberundefinedradius
startAnglenumberundefinedAngle of onset
endAnglenumberundefinedAngle of end
segmentsnumber16number of segments
upVector3Vector3.Y_AXISDirection of plane
colorColorColor.COLOR_WHITEThe color of the fill sector

Returns

void

Defined in

src/gfx/renderJob/passRenderer/graphic/Graphic3DRender.ts:321


drawBoundingBox

drawBoundingBox(uuid, boundingBox, color?): void

Draw bounding box

Parameters

NameTypeDefault valueDescription
uuidstringundefinedGraphic identification ID
boundingBoxBoundingBoxundefinedBounding box object
colorColorColor.COLOR_WHITEThe color of the bounding box

Returns

void

Defined in

src/gfx/renderJob/passRenderer/graphic/Graphic3DRender.ts:358


drawCameraFrustum

drawCameraFrustum(camera, color?): void

Draw the camera cone

Parameters

NameTypeDefault valueDescription
cameraCamera3DundefinedThe camera to display the cone
colorColorColor.COLOR_WHITEThe color of the camera cone

Returns

void

Defined in

src/gfx/renderJob/passRenderer/graphic/Graphic3DRender.ts:367


drawObjectBoundingBox

drawObjectBoundingBox(obj, color?): void

Draws the bounding box of the object

Parameters

NameTypeDefault valueDescription
objObject3DundefinedThe object to display the bounding box
colorColorColor.COLOR_WHITEThe color of the bounding box

Returns

void

Defined in

src/gfx/renderJob/passRenderer/graphic/Graphic3DRender.ts:428


Clear

Clear(uuid): void

Erases the specified graph

Parameters

NameTypeDescription
uuidstringGraphic identification ID

Returns

void

Defined in

src/gfx/renderJob/passRenderer/graphic/Graphic3DRender.ts:437


ClearAll

ClearAll(): void

Erase all drawn graphics

Returns

void

Defined in

src/gfx/renderJob/passRenderer/graphic/Graphic3DRender.ts:448


ChangeColor

ChangeColor(uuid, color): void

Changes the specified graphics color

Parameters

NameTypeDescription
uuidstringGraphic identification ID
colorColorNew color value

Returns

void

Defined in

src/gfx/renderJob/passRenderer/graphic/Graphic3DRender.ts:458

Constructors

constructor

new Graphic3D()

Overrides

Object3D.constructor

Defined in

src/gfx/renderJob/passRenderer/graphic/Graphic3DRender.ts:21