orthographic-camera
v1.0.5
Published
A high level 3D orthographic camera
Downloads
9
Readme
orthographic-camera
A high-level 3D orthographic camera built on top of components in perspective-camera
const createCamera = require('orthographic-camera')
const camera = createCamera({near: 1, far: 1000 })
const orbit = 2
const x = Math.cos(0.2*time) * orbit
const z = Math.sin(0.2*time) * orbit
camera.identity()
camera.translate([x, 0, z])
camera.lookAt([0, 0, 0])
camera.update()
See demo/index.js for a full example using regl
Usage
See perspective-camera for more usage.
See Also
- camera-unproject
- camera-project
- camera-picking-ray
- ray-3d
- ray-aabb-intersection
- ray-sphere-intersection
- ray-plane-intersection
- ray-triangle-intersection
License
MIT, see LICENSE.md for details.