Camera.up¶
Summary¶
Camera.up returns the camera up direction extracted from its world transform matrix. This is the orientation up axis currently driving view construction. Read it when you need camera-aligned billboard, HUD, or interaction behavior.
Syntax¶
Parameters¶
This property does not take parameters.
Returns¶
[number, number, number] - Current world-space up direction of the camera.
Type Details¶
Example¶
const canvas = document.querySelector("canvas");
const wgpu = await WasmGPU.create(canvas);
const camera = wgpu.createCamera.perspective({ aspect: canvas.clientWidth / canvas.clientHeight });
camera.lookAtWithUp([0, 0, 0], [0, 0, 1]);
const up = camera.up;
console.log(up);