@@ 165,7 165,7 @@
let img = textures.get(selected!)!;
ctx.save();
ctx.translate(canvas_x + grid_size / 2, canvas_y + grid_size / 2);
- ctx.rotate(((rotation+2) * Math.PI) / 2);
+ ctx.rotate(((rotation + 2) * Math.PI) / 2);
ctx.globalAlpha = 0.2;
ctx.drawImage(
img,
@@ 211,7 211,7 @@
ctx.save();
ctx.translate(canvas_x + grid_size / 2, canvas_y + grid_size / 2);
- ctx.rotate(((rotation+2) * Math.PI) / 2);
+ ctx.rotate(((rotation + 2) * Math.PI) / 2);
ctx.drawImage(
img,
-grid_size / 2,
@@ 270,19 270,39 @@
if (children[0] !== null) {
let rotation_next = (rotation + 2) % 4;
- place(x + x_dir[rotation_next], y + y_dir[rotation_next], children[0], rotation_next);
+ place(
+ x + x_dir[rotation_next],
+ y + y_dir[rotation_next],
+ children[0],
+ rotation_next,
+ );
}
if (children[1] !== null) {
let rotation_next = (rotation + 1) % 4;
- place(x + x_dir[rotation_next], y + y_dir[rotation_next], children[1], rotation_next);
+ place(
+ x + x_dir[rotation_next],
+ y + y_dir[rotation_next],
+ children[1],
+ rotation_next,
+ );
}
if (children[2] !== null) {
let rotation_next = (rotation + 0) % 4;
- place(x + x_dir[rotation_next], y + y_dir[rotation_next], children[2], rotation_next);
+ place(
+ x + x_dir[rotation_next],
+ y + y_dir[rotation_next],
+ children[2],
+ rotation_next,
+ );
}
if (children[3] !== null) {
let rotation_next = (rotation + 3) % 4;
- place(x + x_dir[rotation_next], y + y_dir[rotation_next], children[3], rotation_next);
+ place(
+ x + x_dir[rotation_next],
+ y + y_dir[rotation_next],
+ children[3],
+ rotation_next,
+ );
}
}