import Logger from "../utils/Logger.js"; import GameManager from "./GameManager.js"; var canvas, gm; class StarGazer { init(config) { Logger.log("Starting StarGazer game"); canvas = config.canvas; gm = new GameManager(); gm.setCanvas(canvas); gm.setFrameRate(config.fps); gm.setSize(config.width, config.height); gm.start(); } onGazeUpdate(gazeUpdate) { gazeUpdate.target.linkTo(canvas); if(gazeUpdate.target.hasLink) { gm.addGazePoint(gazeUpdate.target); } } } export default new StarGazer();