abstract
BaseRenderer
Abstract class representing a renderer for a 3D world. All renderers should use this class as a base.
Extends
Extended by
Implements
Properties
clippingPlanes
clippingPlanes:
Plane
[] =[]
The list of clipping planes used by this instance of the renderer.
currentWorld
currentWorld:
null
|World
=null
The current world this item is associated with. It can be null if no world is currently active.
Inherited from
onAfterUpdate
onAfterUpdate:
Event
<unknown
>
Implementation of
onBeforeUpdate
onBeforeUpdate:
Event
<unknown
>
Implementation of
onClippingPlanesUpdated
readonly
onClippingPlanesUpdated:Event
<unknown
>
Event that fires when there has been a change to the list of clipping planes used by the active renderer.
onDisposed
readonly
onDisposed:Event
<undefined
>
Implementation of
onResize
readonly
onResize:Event
<Vector2
>
Implementation of
onWorldChanged
readonly
onWorldChanged:Event
<object
>
Event that is triggered when a world is added or removed from the worlds
map.
The event payload contains the world instance and the action ("added" or "removed").
Type declaration
action
action:
"added"
|"removed"
world
world:
World
Inherited from
BaseWorldItem
. onWorldChanged
three
abstract
three:WebGLRenderer
The three.js WebGLRenderer instance associated with this renderer.
Abstract
Methods
dispose()
abstract
dispose():void
Returns
void
Implementation of
getSize()
abstract
getSize():Vector2
Returns
Vector2
Implementation of
isConfigurable()
isConfigurable():
this is Configurable<any, any>
Whether is component is Configurable.
Returns
this is Configurable<any, any>
Inherited from
BaseWorldItem
. isConfigurable
isDisposeable()
isDisposeable():
this is Disposable
Whether is component is Disposable.
Returns
this is Disposable
Inherited from
isHideable()
isHideable():
this is Hideable
Whether is component is Hideable.
Returns
this is Hideable
Inherited from
isResizeable()
isResizeable():
this is Resizeable
Whether is component is Resizeable.
Returns
this is Resizeable
Inherited from
isUpdateable()
isUpdateable():
this is Updateable
Whether is component is Updateable.
Returns
this is Updateable
Inherited from
resize()
abstract
resize(size
):void
Parameters
Parameter | Type |
---|---|
size | undefined | Vector2 |
Returns
void
Implementation of
setPlane()
setPlane(
active
,plane
,isLocal
?):void
Sets or removes a clipping plane from the renderer.
Parameters
Parameter | Type | Description |
---|---|---|
active | boolean | A boolean indicating whether the clipping plane should be active or not. |
plane | Plane | The clipping plane to be added or removed. |
isLocal ? | boolean | An optional boolean indicating whether the clipping plane is local to the object. If not provided, it defaults to false . |
Returns
void
Remarks
This method adds or removes a clipping plane from the clippingPlanes
array.
If active
is true
and the plane is not already in the array, it is added.
If active
is false
and the plane is in the array, it is removed.
The three.clippingPlanes
property is then updated to reflect the current state of the clippingPlanes
array,
excluding any planes marked as local.
update()
abstract
update(delta
?):void
|Promise
<void
>
Parameters
Parameter | Type |
---|---|
delta ? | number |
Returns
void
| Promise
<void
>
Implementation of
updateClippingPlanes()
updateClippingPlanes():
void
Updates the clipping planes and triggers the onClippingPlanesUpdated
event.
Returns
void
Remarks
This method is typically called when there is a change to the list of clipping planes used by the active renderer.