UNPKG

meta-next

Version:

21 lines (17 loc) 470 B
import Engine from "../Engine" import Node from "./Node" import Matrix4 from "../math/Matrix4" class Camera extends Node { constructor() { super() this.projectionTransform = new Matrix4() } updateProjectionTransform() { this.projectionTransform.identity() this.projectionTransform.ortho(0, Engine.window.width, Engine.window.height, 0, -1.0, 1.0) this.size.set(Engine.window.width, Engine.window.height) } } export default Camera