Skip to main content

Renderer

class Renderer

Renderer that renders View3D's Scene

constructor​

new Renderer(view3D)

Create new Renderer instance

PARAMETERTYPEOPTIONALDEFAULTDESCRIPTION
view3DView3DAn instance of View3D

Properties​

canvas​

readonly

HTMLCanvasElement given when creating View3D instance

Type: HTMLCanvasElement

context​

readonly

Current WebGLRenderingContext

Type: WebGLRenderingContext

threeRenderer​

readonly

Three.js WebGLRenderer instance

Type: THREE.WebGLRenderer

defaultRenderLoop​

readonly

Default render loop of View3D

Type: function

size​

readonly

The rendering width and height of the canvas

Type: object

PARAMETERTYPEOPTIONALDEFAULTDESCRIPTION
widthnumberWidth of the canvas
heightnumberHeight of the canvas

canvasSize​

readonly

Canvas element's actual size

Type: THREE.Vector2

capabilities​

An object containing details about the capabilities of the current RenderingContext.
Merged with three.js WebGLRenderer's capabilities.

Methods​

destroy​

Destroy the renderer and stop active animation loop

resize​

Resize the renderer based on current canvas width / height

Returns: void