constructor
Build a perspective camera from a position, target, up vector, and clipping range.
The value is a tagged map consumed specially by the renderer. Animate the camera leader with CameraLerp rather than plain Lerp for smoother up-vector motion.
let Camera = |position = 4b, target = [0,0,0], up = 1u, near = 0.1, far = 100| ...up | preferred screen-up direction; it should not be parallel to the view direction |
near | near clipping plane distance |
far | far clipping plane distance |
camera = Camera(position: [2, 1, 5], target: ORIGIN)
play CameraLerp(&camera, 1)