draaiende auto en lijntjes
This commit is contained in:
1 parent
6b696d1f39
commit
79a327ff88
2 files changed
+138
-1
No files matched your search
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user