Class: Renderer

Renderer(webglContext)

High-level renderer, that draws a scene from the perspective of a camera. Keeps per-frame allocations minimal (reuse the matrices, reuse the traversal callback).

Constructor

new Renderer(webglContext)

Parameters:
Name Type Description
webglContext WebGLContext Wrapper around the underlying WebGL2 rendering context.
Source:

Classes

Renderer

Methods

render(scene, camera, resizeOptionsopt)

Renders the given scene from the point of view of the given camera.
Parameters:
Name Type Attributes Description
scene Scene Scene graph containing all objects that should be rendered.
camera Camera Camera defining view and projection used for rendering.
resizeOptions ResizeToDisplaySizeOptions <optional>
Optional canvas resize options.
Source: