new Renderer(view, options=opt)
A simple forward renderer.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
view |
HTMLCanvasElement | The canvas elements. | |
options= |
Object |
<optional> |
The options for webgl context. |
- Source:
Members
autoClear :boolean
Defines whether the renderer should automatically clear its output before rendering a frame.
Type:
- boolean
- Default Value:
- true
- Source:
lightsAutoUpdate :boolean
Defines whether the scene should automatically update its lights.
Type:
- boolean
- Default Value:
- true
- Source:
matrixAutoUpdate :boolean
Defines whether the scene should automatically update its matrix.
Type:
- boolean
- Default Value:
- true
- Source:
shadowAutoUpdate :boolean
Defines whether the shadow pass should automatically update.
Type:
- boolean
- Default Value:
- true
- Source:
shadowNeedsUpdate :boolean
If zen3d.Renderer.shadowAutoUpdate is set true and this set true, shadow will update and set this to false automatically.
Type:
- boolean
- Default Value:
- false
- Source:
Methods
render(scene, camera, renderTarget=opt, forceClearopt)
Render a scene using a camera.
The render is done to the renderTarget (if specified) or to the canvas as usual.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
scene |
zen3d.Scene | The scene. | ||
camera |
zen3d.Camera | The camera. | ||
renderTarget= |
zen3d.RenderTargetBase |
<optional> |
The render is done to the renderTarget (if specified) or to the canvas as usual. | |
forceClear |
boolean |
<optional> |
false | If set true, the depth, stencil and color buffers will be cleared before rendering even if the renderer's autoClear property is false. |
- Source: