Renderer
class Renderer
Renderer that renders View3D's Scene
constructor
new Renderer(view3D)
Create new Renderer instance
PARAMETER | TYPE | OPTIONAL | DEFAULT | DESCRIPTION |
---|---|---|---|---|
view3D | View3D | An instance of View3D |
Properties
canvas
HTMLCanvasElement given when creating View3D instance
Type: HTMLCanvasElement
context
Current WebGLRenderingContext
Type: WebGLRenderingContext
threeRenderer
Three.js WebGLRenderer instance
Type: THREE.WebGLRenderer
defaultRenderLoop
Default render loop of View3D
Type: function
size
The rendering width and height of the canvas
Type: object
PARAMETER | TYPE | OPTIONAL | DEFAULT | DESCRIPTION |
---|---|---|---|---|
width | number | Width of the canvas | ||
height | number | Height of the canvas |
canvasSize
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