Class: Graphic3D
The base class of most objects provides a series of properties and methods for manipulating objects in three-dimensional space.
Hierarchy
↳
Graphic3D
Constructors
Properties
Accessors
- instanceID
- numChildren
- bound
- isScene3D
- localPosition
- localRotation
- localScale
- localQuaternion
- parent
- parentObject
- x
- y
- z
- scaleX
- scaleY
- scaleZ
- rotationX
- rotationY
- rotationZ
Methods
- getObjectByName
- addChild
- removeChild
- removeAllChild
- removeSelf
- removeChildByIndex
- hasChild
- removeFromParent
- getChildByIndex
- getChildByName
- forChild
- addComponent
- getOrAddComponent
- removeComponent
- hasComponent
- getComponent
- getComponentFromParent
- getComponentsInChild
- getComponents
- getComponentsExt
- getComponentsByProperty
- clone
- notifyChange
- traverse
- destroy
- dispatchEvent
- addEventListener
- removeEventListener
- removeEventListenerAt
- removeAllEventListener
- containEventListener
- hasEventListener
- drawAxis
- drawLines
- drawCurve
- drawRect
- drawCircle
- drawSector
- drawArcLine
- createCustomShape
- drawBox
- drawFillRect
- drawFillCircle
- drawMeshWireframe
- drawFillSector
- drawBoundingBox
- drawCameraFrustum
- drawObjectBoundingBox
- Clear
- ClearAll
- ChangeColor
Constructors
constructor
• new Graphic3D(): Graphic3D
Returns
Overrides
Defined in
src/gfx/renderJob/passRenderer/graphic/Graphic3DRender.ts:19
Properties
name
• name: string
= ''
The name of the object. The default value is an empty string.
Inherited from
Defined in
src/core/entities/Entity.ts:24
transform
• transform: Transform
The Transform attached to this object.
Inherited from
Defined in
src/core/entities/Entity.ts:42
renderNode
• renderNode: RenderNode
Renderer components
Inherited from
Defined in
src/core/entities/Entity.ts:47
entityChildren
• entityChildren: Entity
[]
An array containing sub objects of an object
Inherited from
Defined in
src/core/entities/Entity.ts:52
components
• components: Map
<any
, IComponent
>
List of components attached to an object
Inherited from
Defined in
src/core/entities/Entity.ts:57
prefabRef
• Optional
prefabRef: string
Inherited from
Defined in
src/core/entities/Object3D.ts:19
serializeTag
• Optional
serializeTag: SerializeTag
Inherited from
Defined in
src/core/entities/Object3D.ts:20
Accessors
instanceID
• get
instanceID(): string
The unique identifier of the object.
Returns
string
Inherited from
Object3D.instanceID
Defined in
src/core/entities/Entity.ts:32
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:116
bound
• get
bound(): IBound
Returns
IBound
Inherited from
Object3D.bound
Defined in
src/core/entities/Entity.ts:275
• set
bound(value
): void
Parameters
Name | Type |
---|---|
value | IBound |
Returns
void
Inherited from
Object3D.bound
Defined in
src/core/entities/Entity.ts:280
isScene3D
• get
isScene3D(): boolean
Returns
boolean
Inherited from
Object3D.isScene3D
Defined in
src/core/entities/Object3D.ts:30
localPosition
• get
localPosition(): Vector3
Get the position of an object relative to its parent
Returns
Inherited from
Object3D.localPosition
Defined in
src/core/entities/Object3D.ts:272
• set
localPosition(value
): void
Set the position of an object relative to its parent
Parameters
Name | Type |
---|---|
value | Vector3 |
Returns
void
Inherited from
Object3D.localPosition
Defined in
src/core/entities/Object3D.ts:279
localRotation
• get
localRotation(): Vector3
Get the rotation attribute of an object relative to its parent
Returns
Inherited from
Object3D.localRotation
Defined in
src/core/entities/Object3D.ts:286
• set
localRotation(value
): void
Set the rotation attribute of an object relative to its parent
Parameters
Name | Type |
---|---|
value | Vector3 |
Returns
void
Inherited from
Object3D.localRotation
Defined in
src/core/entities/Object3D.ts:293
localScale
• get
localScale(): Vector3
Get the scaling attribute of an object relative to its parent
Returns
Inherited from
Object3D.localScale
Defined in
src/core/entities/Object3D.ts:300
• set
localScale(value
): void
Set the scaling attribute of an object relative to its parent
Parameters
Name | Type |
---|---|
value | Vector3 |
Returns
void
Inherited from
Object3D.localScale
Defined in
src/core/entities/Object3D.ts:307
localQuaternion
• get
localQuaternion(): Quaternion
Get the rotation attribute of an object relative to its parent, which is a quaternion
Returns
Inherited from
Object3D.localQuaternion
Defined in
src/core/entities/Object3D.ts:314
• set
localQuaternion(value
): void
Set the rotation attribute of an object relative to its parent, which is a quaternion
Parameters
Name | Type |
---|---|
value | Quaternion |
Returns
void
Inherited from
Object3D.localQuaternion
Defined in
src/core/entities/Object3D.ts:321
parent
• get
parent(): Transform
Transform component of object parent
Returns
Inherited from
Object3D.parent
Defined in
src/core/entities/Object3D.ts:336
parentObject
• get
parentObject(): Object3D
parent object3D
Returns
Inherited from
Object3D.parentObject
Defined in
src/core/entities/Object3D.ts:344
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:360
• set
x(value
): void
Set the x coordinate relative to the local coordinates of the parent container.
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Inherited from
Object3D.x
Defined in
src/core/entities/Object3D.ts:352
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:375
• set
y(value
): void
Set the y coordinate relative to the local coordinates of the parent container.
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Inherited from
Object3D.y
Defined in
src/core/entities/Object3D.ts:367
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:389
• set
z(value
): void
Set the z coordinate relative to the local coordinates of the parent container.
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Inherited from
Object3D.z
Defined in
src/core/entities/Object3D.ts:382
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:404
• set
scaleX(value
): void
Set the x scale relative to the local coordinates of the parent container.
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Inherited from
Object3D.scaleX
Defined in
src/core/entities/Object3D.ts:396
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:420
• set
scaleY(value
): void
Set the y scale relative to the local coordinates of the parent container.
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Inherited from
Object3D.scaleY
Defined in
src/core/entities/Object3D.ts:412
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:436
• set
scaleZ(value
): void
Set the z scale relative to the local coordinates of the parent container.
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Inherited from
Object3D.scaleZ
Defined in
src/core/entities/Object3D.ts:428
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:452
• set
rotationX(value
): void
Set the x rotation relative to the local coordinates of the parent container.
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Inherited from
Object3D.rotationX
Defined in
src/core/entities/Object3D.ts:444
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:468
• set
rotationY(value
): void
Set the y rotation relative to the local coordinates of the parent container.
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Inherited from
Object3D.rotationY
Defined in
src/core/entities/Object3D.ts:460
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:484
• set
rotationZ(value
): void
Set the z rotation relative to the local coordinates of the parent container.
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Inherited from
Object3D.rotationZ
Defined in
src/core/entities/Object3D.ts:476
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
Name | Type | Description |
---|---|---|
name | string | input name |
Returns
result Entity
Inherited from
Defined in
src/core/entities/Entity.ts:81
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
Name | Type | Description |
---|---|---|
child | Entity | target child entity |
Returns
Inherited from
Defined in
src/core/entities/Entity.ts:127
removeChild
▸ removeChild(child
): void
Remove the child objects of the object. You can remove any number of objects.
Parameters
Name | Type | Description |
---|---|---|
child | Entity | Removed objects |
Returns
void
Inherited from
Defined in
src/core/entities/Entity.ts:151
removeAllChild
▸ removeAllChild(): void
Remove all children of the current object
Returns
void
Inherited from
Defined in
src/core/entities/Entity.ts:166
removeSelf
▸ removeSelf(): this
Remove the current node from the parent
Returns
this
this
Inherited from
Defined in
src/core/entities/Entity.ts:177
removeChildByIndex
▸ removeChildByIndex(index
): void
Search for child nodes of objects and remove child objects with matching indexes.
Parameters
Name | Type | Description |
---|---|---|
index | number | assign index |
Returns
void
Inherited from
Defined in
src/core/entities/Entity.ts:187
hasChild
▸ hasChild(child
): boolean
Does the current object contain a certain object
Parameters
Name | Type | Description |
---|---|---|
child | Entity | certain object |
Returns
boolean
boolean
Inherited from
Defined in
src/core/entities/Entity.ts:201
removeFromParent
▸ removeFromParent(): this
Remove the current node from the parent
Returns
this
this
Inherited from
Defined in
src/core/entities/Entity.ts:211
getChildByIndex
▸ getChildByIndex(index
): Entity
Search for object children and return the first child object with a matching index.
Parameters
Name | Type | Description |
---|---|---|
index | number | matching index |
Returns
child entity
Inherited from
Defined in
src/core/entities/Entity.ts:225
getChildByName
▸ getChildByName(name
, loopChild?
): any
Search for object children and return a child object with a matching name.
Parameters
Name | Type | Default value | Description |
---|---|---|---|
name | string | undefined | matching name |
loopChild | boolean | true | Whether to traverse the children of the child object. The default value is true |
Returns
any
result
Inherited from
Defined in
src/core/entities/Entity.ts:240
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
Name | Type |
---|---|
call | Function |
Returns
void
Inherited from
Defined in
src/core/entities/Object3D.ts:41
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
Name | Type |
---|---|
T | extends IComponent |
Parameters
Name | Type | Description |
---|---|---|
c | Ctor <T > | class of component |
param? | any | - |
Returns
T
result component
Inherited from
Defined in
src/core/entities/Object3D.ts:55
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
Name | Type |
---|---|
T | extends IComponent |
Parameters
Name | Type | Description |
---|---|---|
c | Ctor <T > | class of component |
Returns
T
result component
Inherited from
Defined in
src/core/entities/Object3D.ts:76
removeComponent
▸ removeComponent<T
>(c
): void
Remove components of the specified type
Type parameters
Name | Type |
---|---|
T | extends IComponent |
Parameters
Name | Type | Description |
---|---|---|
c | Ctor <T > | class of component |
Returns
void
Inherited from
Defined in
src/core/entities/Object3D.ts:89
hasComponent
▸ hasComponent<T
>(c
): boolean
Is there a component of the specified type
Type parameters
Name | Type |
---|---|
T | extends IComponent |
Parameters
Name | Type | Description |
---|---|---|
c | Ctor <T > | type of component |
Returns
boolean
boolean
Inherited from
Defined in
src/core/entities/Object3D.ts:106
getComponent
▸ getComponent<T
>(c
): T
Returns a component of the specified type.
Type parameters
Name | Type |
---|---|
T | extends IComponent |
Parameters
Name | Type | Description |
---|---|---|
c | Ctor <T > | class of component |
Returns
T
result component
Inherited from
Defined in
src/core/entities/Object3D.ts:116
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
Name | Type |
---|---|
T | extends IComponent |
Parameters
Name | Type | Description |
---|---|---|
c | Ctor <T > | class of component |
Returns
T
reulst component
Inherited from
Object3D.getComponentFromParent
Defined in
src/core/entities/Object3D.ts:128
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
Name | Type |
---|---|
T | extends IComponent |
Parameters
Name | Type | Description |
---|---|---|
c | Ctor <T > | class of component |
Returns
T
[]
result components
Inherited from
Defined in
src/core/entities/Object3D.ts:148
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
Name | Type |
---|---|
T | extends IComponent |
Parameters
Name | Type | Description |
---|---|---|
c | Ctor <T > | class of component |
outList? | T [] | result component list |
includeInactive? | boolean | Whether to include invisible objects, default to false |
Returns
T
[]
Inherited from
Defined in
src/core/entities/Object3D.ts:171
getComponentsExt
▸ getComponentsExt<T
>(c
, ret?
, includeInactive?
): T
[]
Quickly obtain components and no longer access child nodes after obtaining them at a certain node
Type parameters
Name | Type |
---|---|
T | extends IComponent |
Parameters
Name | Type | Description |
---|---|---|
c | Ctor <T > | class of component |
ret? | T [] | List of incoming T |
includeInactive? | boolean | Whether to include invisible objects, default to false |
Returns
T
[]
{T}
Memberof
Object3D
Inherited from
Defined in
src/core/entities/Object3D.ts:196
getComponentsByProperty
▸ getComponentsByProperty<T
>(key
, value
, findedAndBreak?
, ret?
, includeInactive?
): T
[]
Type parameters
Name | Type |
---|---|
T | extends IComponent |
Parameters
Name | Type | Default value |
---|---|---|
key | string | undefined |
value | any | undefined |
findedAndBreak | boolean | true |
ret? | T [] | undefined |
includeInactive? | boolean | undefined |
Returns
T
[]
Inherited from
Object3D.getComponentsByProperty
Defined in
src/core/entities/Object3D.ts:211
clone
▸ clone(): Object3D
clone a Object3D
Returns
Inherited from
Defined in
src/core/entities/Object3D.ts:238
notifyChange
▸ notifyChange(): void
Notify transformation attribute updates
Returns
void
Inherited from
Defined in
src/core/entities/Object3D.ts:328
traverse
▸ traverse(callback
): void
Recursive child nodes and execute specified function
Parameters
Name | Type | Description |
---|---|---|
callback | (child : any ) => void | specified function |
Returns
void
Inherited from
Defined in
src/core/entities/Object3D.ts:505
destroy
▸ destroy(force?
): void
Release self
Parameters
Name | Type |
---|---|
force? | boolean |
Returns
void
Inherited from
Defined in
src/core/entities/Object3D.ts:520
dispatchEvent
▸ dispatchEvent(event
): void
Dispatch an event to all registered objects with a specific type of listener.
Parameters
Name | Type |
---|---|
event | CEvent |
Returns
void
Inherited from
Defined in
src/event/CEventDispatcher.ts:24
addEventListener
▸ addEventListener(type
, callback
, thisObject
, param?
, priority?
): number
register an event listener to event distancher.
Parameters
Name | Type | Default value | Description |
---|---|---|---|
type | string | number | undefined | {string} event type. |
callback | Function | undefined | {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. |
thisObject | any | undefined | {any} Current registration object, it'll call callback function. |
param | any | null | {any} the data binded to registered event, the default value is null. |
priority | number | 0 | {number} The priority of callback function execution, with a larger set value having priority to call |
Returns
number
Returns register event id
Inherited from
Defined in
src/event/CEventDispatcher.ts:79
removeEventListener
▸ removeEventListener(type
, callback
, thisObject
): void
Remove Event Listening
Parameters
Name | Type | Description |
---|---|---|
type | string | number | {string} event type |
callback | Function | {Function} callback function of event register |
thisObject | any | {any} The current registered object. |
Returns
void
Inherited from
Defined in
src/event/CEventDispatcher.ts:113
removeEventListenerAt
▸ removeEventListenerAt(id
): boolean
Remove an event Listening with id
Parameters
Name | Type |
---|---|
id | number |
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
Name | Type | Default value |
---|---|---|
eventType | string | number | null |
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
Name | Type | Description |
---|---|---|
type | string | {string} event type. |
Returns
boolean
Returns a boolean.
Inherited from
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
Name | Type | Default value | Description |
---|---|---|---|
type | string | number | undefined | {string} event name. |
callback | Function | null | {Function} callback function of event register. |
thisObject | any | null | {any} The registered object. |
Returns
boolean
Returns a boolean.
Inherited from
Defined in
src/event/CEventDispatcher.ts:198
drawAxis
▸ drawAxis(uuid
, origin?
, size?
): void
Draw the 3 - dimensional axes
Parameters
Name | Type | Default value | Description |
---|---|---|---|
uuid | string | undefined | Graphic identification ID |
origin | Vector3 | undefined | original point |
size | number | 10 | Length of axis |
Returns
void
Defined in
src/gfx/renderJob/passRenderer/graphic/Graphic3DRender.ts:31
drawLines
▸ drawLines(uuid
, points
, colors?
): void
Draw a line
Parameters
Name | Type | Default value | Description |
---|---|---|---|
uuid | string | undefined | Graphic identification ID |
points | Vector3 [] | undefined | Line path point |
colors | Color | Color [] | Color.COLOR_WHITE | - |
Returns
void
Defined in
src/gfx/renderJob/passRenderer/graphic/Graphic3DRender.ts:43
drawCurve
▸ drawCurve(uuid
, points
, samples?
, tension?
, color?
): void
drawing curve
Parameters
Name | Type | Default value | Description |
---|---|---|---|
uuid | string | undefined | Graphic identification ID |
points | Vector3 [] | undefined | Curve position point |
samples | number | 10 | Number of Samples |
tension | number | 0.5 | Strength of curve |
color | Color | Color.COLOR_WHITE | Color of curve |
Returns
void
Defined in
src/gfx/renderJob/passRenderer/graphic/Graphic3DRender.ts:57
drawRect
▸ drawRect(uuid
, origin
, width
, height
, color?
): void
Draw a rectangle
Parameters
Name | Type | Default value | Description |
---|---|---|---|
uuid | string | undefined | Graphic identification ID |
origin | Vector3 | undefined | original point |
width | number | undefined | Width of rectangle |
height | number | undefined | Height of rectangle |
color | Color | Color.COLOR_WHITE | The color of the rectangle |
Returns
void
Defined in
src/gfx/renderJob/passRenderer/graphic/Graphic3DRender.ts:101
drawCircle
▸ drawCircle(uuid
, center
, radius
, segments?
, up?
, color?
): void
Draw a circle
Parameters
Name | Type | Default value | Description |
---|---|---|---|
uuid | string | undefined | Graphic identification ID |
center | Vector3 | undefined | centre point |
radius | number | undefined | radius |
segments | number | 32 | Number of line segments |
up | Vector3 | Vector3.Y_AXIS | Direction of plane |
color | Color | Color.COLOR_WHITE | The color of the circle |
Returns
void
Defined in
src/gfx/renderJob/passRenderer/graphic/Graphic3DRender.ts:120
drawSector
▸ drawSector(uuid
, center
, radius
, startAngle
, endAngle
, segments?
, up?
, color?
): void
Draw a Sector
Parameters
Name | Type | Default value | Description |
---|---|---|---|
uuid | string | undefined | Graphic identification ID |
center | Vector3 | undefined | centre point |
radius | number | undefined | radius |
startAngle | number | undefined | Angle of onset |
endAngle | number | undefined | Angle of end |
segments | number | 16 | number of segments |
up | Vector3 | Vector3.Y_AXIS | Direction of plane |
color | Color | Color.COLOR_WHITE | The color of the sector |
Returns
void
Defined in
src/gfx/renderJob/passRenderer/graphic/Graphic3DRender.ts:137
drawArcLine
▸ drawArcLine(uuid
, center
, radius
, startAngle
, endAngle
, segments?
, up?
, color?
): void
Draw a ArcLine
Parameters
Name | Type | Default value | Description |
---|---|---|---|
uuid | string | undefined | Graphic identification ID |
center | Vector3 | undefined | centre point |
radius | number | undefined | radius |
startAngle | number | undefined | Angle of onset |
endAngle | number | undefined | Angle of end |
segments | number | 16 | number of segments |
up | Vector3 | Vector3.Y_AXIS | Direction of plane |
color | Color | Color.COLOR_WHITE | The color of the sector |
Returns
void
Defined in
src/gfx/renderJob/passRenderer/graphic/Graphic3DRender.ts:180
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
Name | Type | Description |
---|---|---|
uuid | string | Graphic identification ID |
parentTransform | Transform | Parent node Transform |
Returns
Graphics3DShape
Graphics3DShape
Defined in
src/gfx/renderJob/passRenderer/graphic/Graphic3DRender.ts:192
drawBox
▸ drawBox(uuid
, minPoint
, maxPoint
, color?
): void
Draw the box
Parameters
Name | Type | Default value | Description |
---|---|---|---|
uuid | string | undefined | Graphic identification ID |
minPoint | Vector3 | undefined | Point of minimum |
maxPoint | Vector3 | undefined | Point of maximum |
color | Color | Color.COLOR_WHITE | The color of the box |
Returns
void
Defined in
src/gfx/renderJob/passRenderer/graphic/Graphic3DRender.ts:203
drawFillRect
▸ drawFillRect(uuid
, origin
, width
, height
, color?
): void
Draw the fill rectangle
Parameters
Name | Type | Default value | Description |
---|---|---|---|
uuid | string | undefined | Graphic identification ID |
origin | Vector3 | undefined | - |
width | number | undefined | - |
height | number | undefined | - |
color | Color | Color.COLOR_WHITE | The color of the fill rectangle |
Returns
void
Defined in
src/gfx/renderJob/passRenderer/graphic/Graphic3DRender.ts:245
drawFillCircle
▸ drawFillCircle(uuid
, center
, radius
, segments?
, up?
, color?
): void
Draw the fill circle
Parameters
Name | Type | Default value | Description |
---|---|---|---|
uuid | string | undefined | Graphic identification ID |
center | Vector3 | undefined | centre point |
radius | number | undefined | radius |
segments | number | 32 | number of segments |
up | Vector3 | Vector3.Y_AXIS | Direction of plane |
color | Color | Color.COLOR_WHITE | The color of the fill circle |
Returns
void
Defined in
src/gfx/renderJob/passRenderer/graphic/Graphic3DRender.ts:265
drawMeshWireframe
▸ drawMeshWireframe(uuid
, geometry
, transform
, color?
, forceUpdate?
): void
Draw wire frame for geometry
Parameters
Name | Type | Default value | Description |
---|---|---|---|
uuid | string | undefined | Graphic identification ID |
geometry | GeometryBase | undefined | Geometric object |
transform | Transform | undefined | The Transform that needs to be bound |
color | Color | Color.COLOR_WHITE | The color of the wire frame |
forceUpdate | boolean | false | - |
Returns
void
Defined in
src/gfx/renderJob/passRenderer/graphic/Graphic3DRender.ts:301
drawFillSector
▸ drawFillSector(uuid
, center
, radius
, startAngle
, endAngle
, segments?
, up?
, color?
): void
Draw the fill sector
Parameters
Name | Type | Default value | Description |
---|---|---|---|
uuid | string | undefined | Graphic identification ID |
center | Vector3 | undefined | centre point |
radius | number | undefined | radius |
startAngle | number | undefined | Angle of onset |
endAngle | number | undefined | Angle of end |
segments | number | 16 | number of segments |
up | Vector3 | Vector3.Y_AXIS | Direction of plane |
color | Color | Color.COLOR_WHITE | The color of the fill sector |
Returns
void
Defined in
src/gfx/renderJob/passRenderer/graphic/Graphic3DRender.ts:320
drawBoundingBox
▸ drawBoundingBox(uuid
, boundingBox
, color?
): void
Draw bounding box
Parameters
Name | Type | Default value | Description |
---|---|---|---|
uuid | string | undefined | Graphic identification ID |
boundingBox | BoundingBox | undefined | Bounding box object, please use world boundingbox |
color | Color | Color.COLOR_WHITE | The color of the bounding box |
Returns
void
Defined in
src/gfx/renderJob/passRenderer/graphic/Graphic3DRender.ts:357
drawCameraFrustum
▸ drawCameraFrustum(camera
, color?
): void
Draw the camera cone
Parameters
Name | Type | Default value | Description |
---|---|---|---|
camera | Camera3D | undefined | The camera to display the cone |
color | Color | Color.COLOR_WHITE | The color of the camera cone |
Returns
void
Defined in
src/gfx/renderJob/passRenderer/graphic/Graphic3DRender.ts:366
drawObjectBoundingBox
▸ drawObjectBoundingBox(obj
, color?
): void
Draws the bounding box of the object
Parameters
Name | Type | Default value | Description |
---|---|---|---|
obj | Object3D | undefined | The object to display the bounding box |
color | Color | Color.COLOR_WHITE | The color of the bounding box |
Returns
void
Defined in
src/gfx/renderJob/passRenderer/graphic/Graphic3DRender.ts:427
Clear
▸ Clear(uuid
): void
Erases the specified graph
Parameters
Name | Type | Description |
---|---|---|
uuid | string | Graphic identification ID |
Returns
void
Defined in
src/gfx/renderJob/passRenderer/graphic/Graphic3DRender.ts:436
ClearAll
▸ ClearAll(): void
Erase all drawn graphics
Returns
void
Defined in
src/gfx/renderJob/passRenderer/graphic/Graphic3DRender.ts:447
ChangeColor
▸ ChangeColor(uuid
, color
): void
Changes the specified graphics color
Parameters
Name | Type | Description |
---|---|---|
uuid | string | Graphic identification ID |
color | Color | New color value |
Returns
void
Defined in
src/gfx/renderJob/passRenderer/graphic/Graphic3DRender.ts:457