1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-06-12 20:44:36 +00:00
tobspr_shapez.io/src/js/core/draw_parameters.js

27 lines
677 B
JavaScript
Raw Normal View History

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;
}
}