Classes
Members
models :Array.<ModelData>
The models to render. Can be updated dynamically.
Type:
- Array.<ModelData>
Methods
createSharedRenderer(canvas, models, contextAttributesopt) → {Renderer}
Creates a new renderer that uses this renderer to draw.
This can help with WebGL context limits but may affect performance.
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
canvas |
HTMLCanvasElement | The canvas to render on. | ||
models |
ModelData | Array.<ModelData> | What to render. | ||
contextAttributes |
CanvasRenderingContext2DSettings |
<optional> |
{} | Arbitrary 2D context attributes. |
Returns:
- Type
- Renderer
destroy()
Destroys the renderer.
renderShared(canvas, models, contextAttributesopt)
Renders a single frame using this renderer.
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
canvas |
HTMLCanvasElement | The canvas to render on. | ||
models |
ModelData | Array.<ModelData> | What to render. | ||
contextAttributes |
CanvasRenderingContext2DSettings |
<optional> |
{} | Arbitrary 2D context attributes. |