Skip to main content

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

BaseWorldItem . currentWorld


onAfterUpdate

onAfterUpdate: Event<unknown>

Updateable.onBeforeUpdate

Implementation of

Updateable . onAfterUpdate


onBeforeUpdate

onBeforeUpdate: Event<unknown>

Updateable.onAfterUpdate

Implementation of

Updateable . onBeforeUpdate


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>

Disposable.onDisposed

Implementation of

Disposable . onDisposed


onResize

readonly onResize: Event<Vector2>

Resizeable.onResize

Implementation of

Resizeable . onResize


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

Disposable.dispose

Returns

void

Implementation of

Disposable . dispose


getSize()

abstract getSize(): Vector2

Resizeable.getSize

Returns

Vector2

Implementation of

Resizeable . getSize


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

BaseWorldItem . isDisposeable


isHideable()

isHideable(): this is Hideable

Whether is component is Hideable.

Returns

this is Hideable

Inherited from

BaseWorldItem . isHideable


isResizeable()

isResizeable(): this is Resizeable

Whether is component is Resizeable.

Returns

this is Resizeable

Inherited from

BaseWorldItem . isResizeable


isUpdateable()

isUpdateable(): this is Updateable

Whether is component is Updateable.

Returns

this is Updateable

Inherited from

BaseWorldItem . isUpdateable


resize()

abstract resize(size): void

Resizeable.resize

Parameters

ParameterType
sizeundefined | Vector2

Returns

void

Implementation of

Resizeable . resize


setPlane()

setPlane(active, plane, isLocal?): void

Sets or removes a clipping plane from the renderer.

Parameters

ParameterTypeDescription
activebooleanA boolean indicating whether the clipping plane should be active or not.
planePlaneThe clipping plane to be added or removed.
isLocal?booleanAn 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>

Updateable.update

Parameters

ParameterType
delta?number

Returns

void | Promise<void>

Implementation of

Updateable . update


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.