Early work on Mapp, will move to Github or Gitlab if something becomes of it.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
394 B

  1. import { fabric } from "fabric";
  2. import Layer from "../board/layer";
  3. import TileSet from "./tileset";
  4. export default class TileMap extends Layer {
  5. /**
  6. * @param {TileSet} tileset
  7. * @param {{chunkSiz:number}} opts
  8. */
  9. constructor(tileset, opts = {}) {
  10. super();
  11. this.tileset = tileset;
  12. this.opts = {
  13. chunkSize: 8,
  14. ...opts,
  15. }
  16. this.rows = [];
  17. }
  18. }