new Camera3D()render3d.js:1698Create a camera, looking down -Z from z=10 by default
Camera3D - Position, rotation and lens for the 3D view
new Camera3D()render3d.js:1698Create a camera, looking down -Z from z=10 by default
align2D : booleanrender3d.js:1717Line the 3D camera up with the 2D camera, so 3D things at z=0 sit on the 2D sprites; it lines up with the 2D view of the main canvas, whatever canvas size a screenToRay is given
align2DZ : numberrender3d.js:1720The z of the plane align2D lines up with the 2D view, the camera sitting its distance in front of it
far : numberrender3d.js:1712Far clip distance, Infinity is allowed for a perspective view
fov : numberrender3d.js:1708Vertical field of view in radians
near : numberrender3d.js:1710Near clip distance
orthographic : numberrender3d.js:1714Visible height in world units for an orthographic view, 0 is perspective
pos : Vector3render3d.js:1704World position
rotation : Vector3render3d.js:1706Euler rotation, vec3(pitch, yaw, roll) in radians
follow(target, offset, percent)render3d.js:1776Chase a target from an offset, easing toward it, and look at it
getForward() → Vector3render3d.js:1745Returns the direction the camera looks
getMatrix() → Matrix4render3d.js:1725Returns the camera's world transform
getProjectionMatrix(aspect) → Matrix4render3d.js:1734Returns the projection matrix
aspect numberWidth over height
getRight() → Vector3render3d.js:1749Returns the camera's right axis
getUp() → Vector3render3d.js:1753Returns the camera's up axis
getViewMatrix() → Matrix4render3d.js:1729Returns the view matrix, world to camera space
lookAt(target)render3d.js:1757Point the camera at a target, sets pitch and yaw and clears roll
target Vector3orbit(target, distance, yaw, pitch)render3d.js:1764Put the camera on an orbit around a target, looking at it
target Vector3distance numberyaw numberRadians around Y
pitch number optional, default 0.5Radians above the horizon
update2D(canvasHeight)render3d.js:1784Line the 3D camera up with the 2D camera, called automatically when align2D is set
canvasHeight number optionalDefaults to the main canvas height