Perspective Camera
Frustum projection with adjustable field of view in degrees (same as THREE.js).
Controls
Field of View (deg)
10
120
import * as EASEL from "easel";
// EASEL: fov is in DEGREES, passed as an options object.
const camera = new EASEL.PerspectiveCamera({
fov: 45,
aspect: 800 / 600,
near: 0.1,
far: 100,
});
// Live update:
camera.fov = 60;
camera.updateProjectionMatrix();
const renderer = new EASEL.Renderer({ canvas, width: 800, height: 600 });
renderer.render(scene, camera);