{"_id":"camera-project","_rev":"5-52a3881572183cc8441e1577d7915f87","name":"camera-project","description":"project 3D point into 2D window space","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"camera-project","version":"1.0.0","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":"0115c9dc30256b8f169b011c4a7da18ba437af29","_id":"camera-project@1.0.0","_shasum":"b961dc214157f3c6a0be33c45ac454ad779c22d2","_from":".","_npmVersion":"2.1.18","_nodeVersion":"0.10.32","_npmUser":{"name":"mattdesl","email":"dave.des@gmail.com"},"dist":{"shasum":"b961dc214157f3c6a0be33c45ac454ad779c22d2","tarball":"https://registry.npmjs.org/camera-project/-/camera-project-1.0.0.tgz","integrity":"sha512-BiwOk3pMCt0pPxaOG8Uk9MVNSoJGAWzbFvsxDm0qIp0+s2TNPcOTBbyngZOdbt4L/97ArI9nxTMFcPLcOy+3Ow==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC5OOOVcQKOvP61GViQl81qDJjh/u+ScDDiNG9H/MIlPgIgfxti3c6cNaJI4h6rEY2FT8+pug/lY0z2K3sZpIA+4SY="}]},"maintainers":[{"name":"mattdesl","email":"dave.des@gmail.com"}]},"1.0.1":{"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":"https://registry.npmjs.org/camera-project/-/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"}]},"maintainers":[{"name":"mattdesl","email":"dave.des@gmail.com"}]},"1.0.2":{"name":"camera-project","version":"1.0.2","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":"28ba3d7704f0910445df56f3fbff4fed6beffb67","_id":"camera-project@1.0.2","_shasum":"d1d696c5aa164cee92e21bb922aba52b6c0a25de","_from":".","_npmVersion":"2.1.18","_nodeVersion":"0.10.32","_npmUser":{"name":"mattdesl","email":"dave.des@gmail.com"},"dist":{"shasum":"d1d696c5aa164cee92e21bb922aba52b6c0a25de","tarball":"https://registry.npmjs.org/camera-project/-/camera-project-1.0.2.tgz","integrity":"sha512-s/5k30aOHDIDk8dP6yif9yOCD6lM7swXApz1V+SizSZIYuETQsjCmB/pCZH8JOQYTqtl0WGTxuck62Nfl35fwg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA4cj2OYAJH28o+fA1nDFSxflBlf+YIEdYHLDf4Wk1CiAiAA+PMueOQoxZTiiX6S3KgeN8UKj8bRAvvOwRkeLOefqg=="}]},"maintainers":[{"name":"mattdesl","email":"dave.des@gmail.com"}]}},"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","maintainers":[{"name":"mattdesl","email":"dave.des@gmail.com"}],"time":{"modified":"2022-06-13T05:30:38.033Z","created":"2015-05-14T18:35:38.239Z","1.0.0":"2015-05-14T18:35:38.239Z","1.0.1":"2015-05-14T18:36:04.304Z","1.0.2":"2015-05-14T20:41:16.371Z"},"homepage":"https://github.com/Jam3/camera-project","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"},"author":{"name":"Matt DesLauriers","email":"dave.des@gmail.com","url":"https://github.com/mattdesl"},"bugs":{"url":"https://github.com/Jam3/camera-project/issues"},"license":"MIT","readmeFilename":"README.md"}