From 9de2508a214435a420157cbcfca0462dd7b14519 Mon Sep 17 00:00:00 2001 From: Marchand Arnaud Date: Fri, 1 Dec 2023 16:22:49 +0100 Subject: [PATCH] Add canevas --- index.html | 2 +- js/SpaceTraders.js | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 66f6d7b..001d736 100644 --- a/index.html +++ b/index.html @@ -12,6 +12,6 @@ - + \ No newline at end of file diff --git a/js/SpaceTraders.js b/js/SpaceTraders.js index 7523bb0..fe77fef 100644 --- a/js/SpaceTraders.js +++ b/js/SpaceTraders.js @@ -58,4 +58,18 @@ $(document).ready(function(){ let systems = listSystem("6", "20") }) +let ScreenWidht = window.innerWidht; +let ScreenHeight = window.innerHeight; +let canvas = document.getElementById("monCanevas"); +let contexte = canvas.getContext("2d"); +var monCanevas = document.getElementById('monCanevas'); // Obtenez une référence vers votre canevas +monCanevas.width = 800; +monCanevas.height = 500; + +// Parcourir les rectangles du canevas +contexte.beginPath(); +contexte.rect(100, 100, 100, 100); +contexte.fillStyle = "black"; +contexte.fill(); + //type?MARKET// \ No newline at end of file