draaiende auto en lijntjes

This commit is contained in:
Piet Nijbacker committed 2026-10-14 18:12:30 +02:00
1 parent 6b696d1f39
commit 79a327ff88
2 files changed
+138 -1

No files matched your search

+3 -1
View File
@@ -45,7 +45,7 @@ const baseCarSpeed = 5
const carGap = 375
function setup() {
createCanvas(1640, 600);
createCanvas(windowWidth - 20, 600);
noStroke();
resetPlayer(width / 2, 17)
}
@@ -276,6 +276,8 @@ function drawCar(x, y, size, colorID, direction, blinkerLeft, blinkerRight, play
let color = carColors[colorID]
push()
stroke(0)
strokeWeight(1.75)
rectMode(CENTER)
translate(x, y)
rotate(rotation)