new Renderer(canvas)
Creates renderer for desktop use
Parameters:
Name | Type | Description |
---|---|---|
canvas |
Canvas |
- Source:
Methods
getBuffer(object3D, lightContainer) → {Ayce.BufferMulti}
Returns buffer object for object
Parameters:
Name | Type | Description |
---|---|---|
object3D |
Ayce.Object3D | |
lightContainer |
Ayce.LightContainer |
- Source:
Returns:
bufferMulti
- Type
- Ayce.BufferMulti
getCanvasHeight() → {Number}
Returns viewport height of canvas
- Source:
Returns:
height
- Type
- Number
getCanvasWidth() → {Number}
Returns viewport height of canvas
- Source:
Returns:
width
- Type
- Number
getGL() → {Object}
Returns GL object
- Source:
Returns:
gl
- Type
- Object
init()
Sets Canvas size and, enables extensions if available and initializes Renderer
- Source:
render(camera, objects, transparentObjects)
Renders objects
Parameters:
Name | Type | Description |
---|---|---|
camera |
Camera | |
objects |
Array.<Ayce.Object3D> | |
transparentObjects |
Array.<Ayce.Object3D> |
- Source:
resize()
Handles canvas resizing
- Source:
setViewportAndScissor(x, y, width, height)
*******************************************
Render methods
*******************************************
Parameters:
Name | Type | Description |
---|---|---|
x |
Number | |
y |
Number | |
width |
Number | |
height |
Number |
- Source:
update(camera, objects, transparentObjects)
*******************************************
Render current Scene
*******************************************
Updates objects
Parameters:
Name | Type | Description |
---|---|---|
camera |
Camera | |
objects |
Array.<Ayce.Object3D> | |
transparentObjects |
Array.<Ayce.Object3D> |
- Source:
(inner) initGL(canvas)
Sets up canvas for WebGL
Parameters:
Name | Type | Description |
---|---|---|
canvas |
Canvas |
- Source:
(inner) initRenderer()
Initializes WebGL values
- Source: