This commit is contained in:
bach
2026-10-30 16:56:02 +01:00
parent d371b914d8
commit b9b863a763
4 changed files with 186 additions and 0 deletions
+26
View File
@@ -6,9 +6,35 @@ canvas.width = canvas.clientWidth;
let ctx = canvas.getContext("2d");
// function mafunction(){
// }
// let mafunction = function(){}
// let mafonction = () => {}
// la taille de nos carres
let cote = 5;
let changerCote = () => {
cote = 10 + Math.random() * 20;
console.log("changerCote, cote", cote);
}
let onMouseMove = (event) => {
console.log(event);
if(event.keyCode == 32){
changerCote();
}
}
window.addEventListener("keydown", onMouseMove);
// Je crée ma liste (tableau) de point
let mespoints = [];
// j'utilise une boucle pour créer N points