From 24835217e4844429af6f9cb63192e76c9440ca31 Mon Sep 17 00:00:00 2001 From: ghostlyzsh Date: Mon, 8 Apr 2024 22:35:24 -0500 Subject: [PATCH] i guess something changed? --- .../src/pages/ShipEditor.svelte | 32 +++++++++++++++---- 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/starkingdoms-client/src/pages/ShipEditor.svelte b/starkingdoms-client/src/pages/ShipEditor.svelte index c93f36dede7eabb8df935f0256e21a5424d8d08a..7bdf08d0fbb7c2229337b32ec83e78c1026c0b7e 100644 --- a/starkingdoms-client/src/pages/ShipEditor.svelte +++ b/starkingdoms-client/src/pages/ShipEditor.svelte @@ -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, + ); } }