Walkable mask painting

This commit is contained in:
Ian Gulliver
2021-05-17 04:26:18 +00:00
parent 0030b63e3a
commit 9d681291cc
43 changed files with 577 additions and 362 deletions

View File

@@ -1,8 +1,12 @@
export class Tile {
constructor(width, height) {
constructor(width, height, masks) {
this.masks = masks;
this.elem = document.createElement('div');
this.elem.style.gridColumnEnd = `span ${width}`;
this.elem.style.gridRowEnd = `span ${height}`;
// Hack to avoid floating point stitching gaps
this.elem.style.width = 'calc(100% + 1px)';
this.elem.style.height = 'calc(100% + 1px)';
}
remove() {
this.elem.remove();