diff --git a/front/volume/src/components/Pong/MapCustomization.svelte b/front/volume/src/components/Pong/MapCustomization.svelte index d3f21cf..29b2f36 100644 --- a/front/volume/src/components/Pong/MapCustomization.svelte +++ b/front/volume/src/components/Pong/MapCustomization.svelte @@ -2,7 +2,7 @@ import { onMount } from "svelte"; import { Point, Rect } from "./utils"; import type { Map } from "./Map"; - import { DEFAULT_BALL_SIZE } from "./constants"; + import { DEFAULT_BALL_SIZE, DEFAULT_MAP_SIZE } from "./constants"; export let map: Map; let canvas: HTMLCanvasElement; @@ -62,15 +62,19 @@ const index = map.walls.findIndex((w) => w.collides(click)); if (index != -1) map.walls.splice(index, 1); } + + function sizeChange() { + map.walls = []; + }

Map Customization:

Width: - + Height: - +