UNPKG

seed-engine

Version:

A Lightweight 2D game engine using WebGL2. The engine is designed on the focus of creating a bridge between creating and publishing games to the Seed Network as modules.

16 lines (15 loc) 554 B
import Scene from './Scene'; import { Viewport } from '../entry'; import DOMManager from '../manager/DOMManager'; /** * A basic representation of a working scene. Scenes need a viewport to give Renderable * components a place to be viewed by the RenderManager. * * This scene only contains one viewport which takes up the size of the canvas element. */ export default class BasicScene extends Scene { constructor() { super(); this.registerViewport(new Viewport(0, 0, DOMManager.canvas.width, DOMManager.canvas.height)); } }