2020-05-18 15:40:20 +00:00
|
|
|
import { globalConfig } from "./config";
|
2020-05-09 14:45:23 +00:00
|
|
|
|
2020-08-06 09:28:28 +00:00
|
|
|
/**
|
|
|
|
* @typedef {import("../game/root").GameRoot} GameRoot
|
|
|
|
* @typedef {import("./rectangle").Rectangle} Rectangle
|
|
|
|
*/
|
2020-05-09 14:45:23 +00:00
|
|
|
|
|
|
|
export class DrawParameters {
|
|
|
|
constructor({ context, visibleRect, desiredAtlasScale, zoomLevel, root }) {
|
|
|
|
/** @type {CanvasRenderingContext2D} */
|
|
|
|
this.context = context;
|
|
|
|
|
|
|
|
/** @type {Rectangle} */
|
|
|
|
this.visibleRect = visibleRect;
|
|
|
|
|
2020-08-13 17:23:00 +00:00
|
|
|
/** @type {string} */
|
2020-05-09 14:45:23 +00:00
|
|
|
this.desiredAtlasScale = desiredAtlasScale;
|
|
|
|
|
|
|
|
/** @type {number} */
|
|
|
|
this.zoomLevel = zoomLevel;
|
|
|
|
|
|
|
|
// FIXME: Not really nice
|
|
|
|
/** @type {GameRoot} */
|
|
|
|
this.root = root;
|
|
|
|
}
|
|
|
|
}
|