This repository has been archived on 2021-02-20. You can view files and clone it, but cannot push or open issues or pull requests.
2020-05-18 17:40:20 +02:00
|
|
|
import { globalConfig } from "./config";
|
2020-05-09 16:45:23 +02:00
|
|
|
|
2020-08-06 11:28:28 +02:00
|
|
|
/**
|
|
|
|
* @typedef {import("../game/root").GameRoot} GameRoot
|
|
|
|
* @typedef {import("./rectangle").Rectangle} Rectangle
|
|
|
|
*/
|
2020-05-09 16:45:23 +02:00
|
|
|
|
|
|
|
export class DrawParameters {
|
|
|
|
constructor({ context, visibleRect, desiredAtlasScale, zoomLevel, root }) {
|
|
|
|
/** @type {CanvasRenderingContext2D} */
|
|
|
|
this.context = context;
|
|
|
|
|
|
|
|
/** @type {Rectangle} */
|
|
|
|
this.visibleRect = visibleRect;
|
|
|
|
|
2020-08-13 19:23:00 +02:00
|
|
|
/** @type {string} */
|
2020-05-09 16:45:23 +02:00
|
|
|
this.desiredAtlasScale = desiredAtlasScale;
|
|
|
|
|
|
|
|
/** @type {number} */
|
|
|
|
this.zoomLevel = zoomLevel;
|
|
|
|
|
|
|
|
// FIXME: Not really nice
|
|
|
|
/** @type {GameRoot} */
|
|
|
|
this.root = root;
|
|
|
|
}
|
|
|
|
}
|