Simple "lookat" camera abstraction built on top of gl-matrix.
See demo.js for a usage example.
Creates a new camera instance.
Updates the view matrix based on the camera's current configuration and
returns the result. Optionally, you may pass in your own view
array to
modify directly.
[x, y, z]
vector that determines the position of the camera in world space.
[x, y, z]
vector that determines the target of the camera in world space.
Normalized [x, y, z]
vector that determines the up direction of the camera.
Generally you'll want this to be [1, 0, 0]
, [0, 1, 0]
or [0, 0, 1]
.
See stackgl/contributing for details.
MIT. See LICENSE.md for details.