Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/littlstar/orthographic-camera
A high level 3D orthographic camera
https://github.com/littlstar/orthographic-camera
camera orthographic webgl
Last synced: about 1 month ago
JSON representation
A high level 3D orthographic camera
- Host: GitHub
- URL: https://github.com/littlstar/orthographic-camera
- Owner: littlstar
- License: mit
- Created: 2017-02-28T15:55:26.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-04-07T17:08:54.000Z (over 7 years ago)
- Last Synced: 2024-08-10T21:28:52.339Z (5 months ago)
- Topics: camera, orthographic, webgl
- Language: JavaScript
- Homepage: http://littlstar.github.io/orthographic-camera/
- Size: 146 KB
- Stars: 6
- Watchers: 10
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
orthographic-camera
===================[![experimental](http://badges.github.io/stability-badges/dist/experimental.svg)](http://github.com/badges/stability-badges)
[demo](http://littlstar.github.io/orthographic-camera/) - [source](demo/index.js)
A high-level 3D orthographic camera built on top of components in
[perspective-camera](https://github.com/Jam3/perspective-camera)```js
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) * orbitcamera.identity()
camera.translate([x, 0, z])
camera.lookAt([0, 0, 0])
camera.update()
```See [demo/index.js](demo/index.js) for a full example using
[regl](https://github.com/regl-project/regl)## Usage
See [perspective-camera](https://github.com/Jam3/perspective-camera) for
more usage.## See Also
- [camera-unproject](https://www.npmjs.com/package/camera-unproject)
- [camera-project](https://www.npmjs.com/package/camera-project)
- [camera-picking-ray](https://www.npmjs.com/package/camera-picking-ray)
- [ray-3d](https://www.npmjs.com/package/ray-3d)
- [ray-aabb-intersection](https://www.npmjs.com/package/ray-aabb-intersection)
- [ray-sphere-intersection](https://www.npmjs.com/package/ray-sphere-intersection)
- [ray-plane-intersection](https://www.npmjs.com/package/ray-plane-intersection)
- [ray-triangle-intersection](https://www.npmjs.com/package/ray-triangle-intersection)## License
MIT, see [LICENSE.md](http://github.com/littlstar/orthographic-camera/blob/master/LICENSE.md) for details.