Open LionOnTheWeb opened 1 year ago
Example code from chat gpt for src/routes/+page.svelte
<script>
let canvas;
let ctx;
function init() {
canvas = document.getElementById('myCanvas');
ctx = canvas.getContext('2d');
ctx.fillStyle = 'green';
ctx.fillRect(10, 10, 100, 100);
}
onMount(() => {
init();
});
</script>
<canvas id="myCanvas" width="200" height="200"></canvas>
Overview
As a Jervis-Tetch user I want to have a canvas/gameboard that I can play the game on, with a landing page which is the
+page.svelte
file in the root of thesrc/routes
directory.Tasks
+page.svelte
insrc/routes
hsl(211, 21%, 42%)
References