Made PixelGrid child of the Layer class

This commit is contained in:
unsettledgames
2021-11-12 00:09:20 +01:00
parent aed5f45e64
commit 07ed24cc6b
10 changed files with 124 additions and 127 deletions

View File

@@ -3,11 +3,6 @@ var canvasSize; // REFACTOR: Canvas class / getCanvasSize method
var zoom = 7; // REFACTOR: EditorState class/IIFE? Leave this one for later
var lastMouseClickPos = [0,0]; // REFACTOR: Input IIFE via getter? <- probably editor state as it is changed by tools
//common elements
// REFACTOR: put brush and eyedropper preview in the respective tool implementations
// REFACTOR: this should be in ResizableTool
var brushPreview = document.getElementById("brush-preview");
// REFACTOR: File class?
var canvasView = document.getElementById("canvas-view");
@@ -26,10 +21,7 @@ var TMPLayer;
// Pixel grid layer
// REFACTOR: File class
var pixelGrid;
// REFACTOR: I was thinking that the special layers (pixel grid, checkerboard ecc) could be an extension
// or a variatin of the standard Layer class? I wonder if we can use inheritance or something to
// recycle stuff
let pixelGrid;
// REFACTOR: File class
let checkerBoard;