Simple arcball camera built on top of gl-matrix
var shell =var createMesh =var glm =var mat4 = glmmat4var simple3DShader =var createOrbitCamera =var camera =var shader meshshellshellshell
npm install orbit-camera
var createOrbitCamera =
Creates an orbit camera looking at
center. This has the same semantics as
eyeis the eye vector of the camera
centeris the target the camera is looking at
upis the up direction for the camera
Returns A new orbit camera object
Move the camera to look at the new position.
Moves the center of the camera by
translation. Note that translation must be an array of length either 2 or 3
Applies a rotation to the camera.
prev are the state of the previous locations. These can be pairs of 2D arrays representing the mouse coordinates in distance relative to the center of the sceen.
Zooms in or out by some amount
Returns the current view matrix associated to the camera
(c) 2013 Mikola Lysenko. MIT License