Skip to main content

Static Camera

This example demonstrates a static camera looking at a rotating 3D object. You can switch between perspective and orthographic cameras using the dropdown.

const perspective = this.world.createEntity([
new TCameraComponent({ type: TProjectionType.Perspective, fov: 45 }),
]);
const orthographic = this.world.createEntity([
new TCameraComponent({ type: TProjectionType.Orthographic }),
]);

this.world.cameraSystem.setActiveCamera(orthographic);