Classes
Methods
resize(width, height)
Resize the viewport.
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
width | number | canvas.width | |
height | number | canvas.height |
rotate(angle)
Rotate the camera around its center.
Parameters:
| Name | Type | Description |
|---|---|---|
angle | number | Amount to rotate by (clockwise) in radians. |
setMVP(mvp)
Set the ModelViewProjection matrix in the shader.
Parameters:
| Name | Type | Description |
|---|---|---|
mvp | glMatrix. | Optional to use instead of the default. |
translate(vector3)
Translate the camera.
Parameters:
| Name | Type | Description |
|---|---|---|
vector3 | glMatrix. | 3D Vector to move by. |
zoom(amount)
Zoom the camera from its center.
Parameters:
| Name | Type | Description |
|---|---|---|
amount | number | Amount to zoom by (in the order of 0.05), negative values to zoom out. |