new Camera3D()render3d.js:1714Create a camera, looking down -Z from z=10 by default
Camera3D - Position, rotation and lens for the 3D view
new Camera3D()render3d.js:1714Create a camera, looking down -Z from z=10 by default
align2D : booleanrender3d.js:1733Line 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:1736The z of the plane align2D lines up with the 2D view, the camera sitting its distance in front of it
far : numberrender3d.js:1728Far clip distance, Infinity is allowed for a perspective view
fov : numberrender3d.js:1724Vertical field of view in radians
near : numberrender3d.js:1726Near clip distance
orthographic : numberrender3d.js:1730Visible height in world units for an orthographic view, 0 is perspective
pos : Vector3render3d.js:1720World position
rotation : Vector3render3d.js:1722Euler rotation, vec3(pitch, yaw, roll) in radians
follow(target, offset, percent)render3d.js:1792Chase a target from an offset, easing toward it, and look at it
getForward() → Vector3render3d.js:1761Returns the direction the camera looks
getMatrix() → Matrix4render3d.js:1741Returns the camera's world transform
getProjectionMatrix(aspect) → Matrix4render3d.js:1750Returns the projection matrix
aspect numberWidth over height
getRight() → Vector3render3d.js:1765Returns the camera's right axis
getUp() → Vector3render3d.js:1769Returns the camera's up axis
getViewMatrix() → Matrix4render3d.js:1745Returns the view matrix, world to camera space
lookAt(target)render3d.js:1773Point the camera at a target, sets pitch and yaw and clears roll
target Vector3orbit(target, distance, yaw, pitch)render3d.js:1780Put 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:1800Line the 3D camera up with the 2D camera, called automatically when align2D is set
canvasHeight number optionalDefaults to the main canvas height