pex-cam

Camera models and controllers.

API

Perspective Camera

var createPerspectiveCamera = require('pex-cam/perspective')

cam = createPerspectiveCamera(opts)

Creates new perspective camera

cam.set(opts)

cam.getViewRay(x, y, windowWidth, windowHeight)

Create picking ray in view (camera) cooridinates

cam.getWorldRay(x, y, windowWidth, windowHeight)

Create picking ray in world coordinates

Orbiter

Orbiter controller

var createOrbiter = require('pex-cam/orbiter')

orbiter = createOrbiter(opts)

Creates new orbiter controller

orbiter.set(opts)

License

MIT, see LICENSE.md for details.