
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
camera-project
Advanced tools
Projects a 3D world point into 2D window space.
var mat4 = require('gl-mat4')
var project = require('camera-project')
//projection * view matrix
var combinedProjView = mat4.multiply([], projection, view)
//viewport bounds
var viewport = [x, y, width, height]
//3D world point
var point = [0, -1, 2.5]
//vec4 output
var output = []
project(output, point, viewport, combinedProjView)
The output z
component contains the window space depth, and w
is the value of (1 / clip.w)
. Assumes depth range is 0 to 1.
vec4 = project(out, point, viewport, combined)
Projects the 3D point
into window space using the viewport
bounds (screen x, y, width, height) and combined
matrix (result of multiplying projection * view
matrices).
The result is stored in out
and returned.
MIT, see LICENSE.md for details.
FAQs
project 3D point into 2D window space
The npm package camera-project receives a total of 182 weekly downloads. As such, camera-project popularity was classified as not popular.
We found that camera-project demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.