Differentiate obstacle colors from balls in scenes 2 and 3

This commit is contained in:
Daddy32
2025-12-12 22:44:54 +01:00
parent b56a9cea9d
commit 4ae787bb0f

View File

@@ -76,26 +76,26 @@
}),
Bodies.rectangle(-50, h / 2, 100, h * 2, {
isStatic: true,
render: { fillStyle: "#fb7185", strokeStyle: "#fb7185" },
render: { fillStyle: "#7c3aed", strokeStyle: "#7c3aed" },
}),
Bodies.rectangle(w + 50, h / 2, 100, h * 2, {
isStatic: true,
render: { fillStyle: "#fb7185", strokeStyle: "#fb7185" },
render: { fillStyle: "#7c3aed", strokeStyle: "#7c3aed" },
}),
Bodies.rectangle(w * 0.2, h * 0.45, 200, 18, {
isStatic: true,
angle: 0.08,
render: { fillStyle: "#fbbf24", strokeStyle: "#fbbf24" },
render: { fillStyle: "#f97316", strokeStyle: "#f97316" },
}),
Bodies.rectangle(w * 0.5, h * 0.6, 260, 18, {
isStatic: true,
angle: -0.04,
render: { fillStyle: "#34d399", strokeStyle: "#34d399" },
render: { fillStyle: "#14b8a6", strokeStyle: "#14b8a6" },
}),
Bodies.rectangle(w * 0.8, h * 0.42, 180, 18, {
isStatic: true,
angle: 0.14,
render: { fillStyle: "#38bdf8", strokeStyle: "#38bdf8" },
render: { fillStyle: "#c084fc", strokeStyle: "#c084fc" },
}),
],
},
@@ -123,15 +123,15 @@
Bodies.rectangle(w / 2, h + 40, w, 80, {
isStatic: true,
restitution: 0.75,
render: { fillStyle: "#0ea5e9", strokeStyle: "#0ea5e9" },
render: { fillStyle: "#14b8a6", strokeStyle: "#14b8a6" },
}),
Bodies.rectangle(-40, h / 2, 80, h * 2, {
isStatic: true,
render: { fillStyle: "#e879f9", strokeStyle: "#e879f9" },
render: { fillStyle: "#f472b6", strokeStyle: "#f472b6" },
}),
Bodies.rectangle(w + 40, h / 2, 80, h * 2, {
isStatic: true,
render: { fillStyle: "#e879f9", strokeStyle: "#e879f9" },
render: { fillStyle: "#f472b6", strokeStyle: "#f472b6" },
}),
];
for (let i = 0; i < 5; i += 1) {
@@ -141,7 +141,7 @@
Bodies.circle(x, y, 18, {
isStatic: true,
restitution: 0.9,
render: { fillStyle: "#f97316", strokeStyle: "#f97316" },
render: { fillStyle: "#facc15", strokeStyle: "#facc15" },
}),
);
}
@@ -149,12 +149,12 @@
Bodies.rectangle(w * 0.3, h * 0.55, 140, 16, {
isStatic: true,
angle: -0.3,
render: { fillStyle: "#38bdf8", strokeStyle: "#38bdf8" },
render: { fillStyle: "#8b5cf6", strokeStyle: "#8b5cf6" },
}),
Bodies.rectangle(w * 0.7, h * 0.58, 160, 16, {
isStatic: true,
angle: 0.28,
render: { fillStyle: "#22c55e", strokeStyle: "#22c55e" },
render: { fillStyle: "#10b981", strokeStyle: "#10b981" },
}),
);
return bodies;