Constructor
# new OrthoCamera(left, right, bottom, top, near, far, eyeopt, targetopt, upopt)
Creates a new orthographic camera
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
left |
number
|
Left bound of view frustum |
||
right |
number
|
Right bound of view frustum |
||
bottom |
number
|
Bottom bound of view frustum |
||
top |
number
|
Top bound of view frustum |
||
near |
number
|
Near clipping plane |
||
far |
number
|
Far clipping plane |
||
eye |
vec3.default
|
<optional> |
[0,0,-3] | Camera position |
target |
vec3.default
|
<optional> |
[0,0,1] | Look-at target |
up |
vec3.default
|
<optional> |
[0,1,0] | Up vector |
Classes
Members
Methods
# getViewProjectionMatrix() → {Float32Array}
Gets the combined view-projection matrix
View-projection matrix
Float32Array
# mapToLatLng() → {Object}
Maps orthographic bounds to latitude/longitude coordinates
Object containing min/max latitude and longitude
Object
# translateCamera(x, y, z) → {void}
Translates the camera in world space
Parameters:
Name | Type | Description |
---|---|---|
x |
number
|
X-axis translation |
y |
number
|
Y-axis translation |
z |
number
|
Z-axis translation (triggers zoom if non-zero) |
void
# zoomCamera(zoom) → {void}
Zooms the camera by adjusting the orthographic frustum
Parameters:
Name | Type | Description |
---|---|---|
zoom |
number
|
Zoom factor (positive = zoom in, negative = zoom out) |
void