orthographic-camera

1.0.5 • Public • Published

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.

/orthographic-camera/

    Package Sidebar

    Install

    npm i orthographic-camera

    Weekly Downloads

    6

    Version

    1.0.5

    License

    MIT

    Last publish

    Collaborators

    • werle