{"name":"camera-project","version":"1.0.1","description":"project 3D point into 2D window space","main":"index.js","license":"MIT","author":{"name":"Matt DesLauriers","email":"dave.des@gmail.com","url":"https://github.com/mattdesl"},"dependencies":{"gl-vec4":"^1.0.1"},"devDependencies":{"gl-mat4":"^1.1.3","gl-vec3":"^1.0.3","standard":"^3.8.0","tape":"^4.0.0"},"scripts":{"test":"standard && node test.js"},"keywords":["project","projection","camera","cameras","view","matrix","projection","matrices","unproject","mouse","pick","ray","2d","3d","views","window","space","ndc","clip","coordinates"],"repository":{"type":"git","url":"git://github.com/Jam3/camera-project.git"},"homepage":"https://github.com/Jam3/camera-project","bugs":{"url":"https://github.com/Jam3/camera-project/issues"},"gitHead":"2a04a9799808ee73d6efd1b9357b44d8ab4c2ced","_id":"camera-project@1.0.1","_shasum":"8040d16fdf1e138264da3ac7d76053e7dbdbc3be","_from":".","_npmVersion":"2.1.18","_nodeVersion":"0.10.32","_npmUser":{"name":"mattdesl","email":"dave.des@gmail.com"},"dist":{"shasum":"8040d16fdf1e138264da3ac7d76053e7dbdbc3be","tarball":"http://registry-npm.ywwl.com/camera-project/download/camera-project-1.0.1.tgz","integrity":"sha512-gQs2AarjlwtbS/5k0+M2GHcJMn/uCrrpi+L+Cn9gKCXrajWQ+R1vmera2NI9YFclj15EbY/k63UHLjktY/rwnA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDqJQSmfHpLOkuAkA5mubuQeDtOkpbkipFSjHKPpfMHnAIhAKM6MU+iSA5xz6Pb1uDqBVHvvr3WjQ1Dp+vepgMCz+G4"}],"size":2214,"noattachment":false,"key":"/camera-project/-/camera-project-1.0.1.tgz"},"maintainers":[{"name":"mattdesl","email":"dave.des@gmail.com"}],"directories":{},"readme":"# camera-project\n\n[![stable](http://badges.github.io/stability-badges/dist/stable.svg)](http://github.com/badges/stability-badges)\n\nProjects a 3D world point into 2D window space. \n\n```js\nvar mat4 = require('gl-mat4')\nvar project = require('camera-project')\n\n//projection * view matrix\nvar combinedProjView = mat4.multiply([], projection, view)\n\n//viewport bounds\nvar viewport = [x, y, width, height]\n\n//3D world point\nvar point = [0, -1, 2.5]\n\n//vec4 output\nvar output = []\n\nproject(output, point, viewport, combinedProjView)\n```\n\nThe output `z` component contains the window space depth, and `w` is the value of `(1 / clip.w)`. Assumes [depth range](https://www.opengl.org/wiki/GLAPI/glDepthRange) is 0 to 1.\n\n## Usage\n\n[![NPM](https://nodei.co/npm/camera-project.png)](https://www.npmjs.com/package/camera-project)\n\n#### `vec4 = project(out, point, viewport, combined)`\n\nProjects the 3D `point` into window space using the `viewport` bounds (screen x, y, width, height) and `combined` matrix (result of multiplying `projection * view` matrices). \n\nThe result is stored in `out` and returned.\n\n## See Also\n\n- [camera-unproject](https://www.npmjs.com/package/camera-unproject)\n\n## License\n\nMIT, see [LICENSE.md](http://github.com/Jam3/camera-project/blob/master/LICENSE.md) for details.\n","publish_time":1431628564304,"_cnpm_publish_time":1431628564304,"dist-tags":{"latest":"1.0.2"}}