Orthographic Camera

Parallel projection: objects stay the same size regardless of depth.

Controls

Frustum Size

2
20
import * as EASEL from "easel";

// OrthographicCamera takes an options object - no positional args.
// Adjusting left/right/top/bottom changes the visible world area
// without any perspective distortion.
const camera = new EASEL.OrthographicCamera({
  left:   -size * aspect,
  right:   size * aspect,
  top:     size,
  bottom: -size,
  near: 0.1,
  far: 100,
});

// After changing frustum planes, call updateProjectionMatrix():
camera.left = -newSize * aspect;
camera.right =  newSize * aspect;
camera.top    =  newSize;
camera.bottom = -newSize;
camera.updateProjectionMatrix();

const renderer = new EASEL.Renderer({ canvas, width: 800, height: 600 });
renderer.render(scene, camera);