开发者社区> 镜像站> NPM> lookat-camera
lookat-camera
Simple "lookat" camera abstraction built on top of gl-matrix
Last updated 5 years ago by hughsk .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install lookat-camera 
SYNC missed versions from official npm registry.

lookat-camera

stable

Simple "lookat" camera abstraction built on top of gl-matrix.

Usage

NPM

See demo.js for a usage example.

camera = require('lookat-camera')()

Creates a new camera instance.

view = camera.view([view])

Updates the view matrix based on the camera's current configuration and returns the result. Optionally, you may pass in your own view array to modify directly.

camera.position

[x, y, z] vector that determines the position of the camera in world space.

camera.target

[x, y, z] vector that determines the target of the camera in world space.

camera.up

Normalized [x, y, z] vector that determines the up direction of the camera. Generally you'll want this to be [1, 0, 0], [0, 1, 0] or [0, 0, 1].

Contributing

See stackgl/contributing for details.

License

MIT. See LICENSE.md for details.

Current Tags

  • 1.0.0                                ...           latest (5 years ago)

1 Versions

  • 1.0.0                                ...           5 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (9)
Dependents (1)