Skip to content

Latest commit

 

History

History
46 lines (33 loc) · 1.56 KB

README.md

File metadata and controls

46 lines (33 loc) · 1.56 KB

orthographic-camera

experimental

demo - source

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

License

MIT, see LICENSE.md for details.