Skip to content

littlstar/orthographic-camera

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.