five-on-it / apps/level-editor/src/scripts/blocks/camera
apps/level-editor/src/scripts/blocks/camera
Marks a node of the editor scene as a security camera: a lens at the node's origin (put it up a wall, on a pole), never scaled, turned with yaw only, its view cone sweeping from side to side about the node's +z. Its parameters: how far it turns either way, how far it sees and how long a whole sweep takes, there and back. What it sees feeds the alert of the guards near it; gunfire destroys it and a mission switches it off. The library's block:camera carries it: place instances of that mesh for npm run level:export to read.