feat: make better walls
Signed-off-by: Ameya Shenoy <shenoy.ameya@gmail.com>
This commit is contained in:
parent
d5332715f7
commit
2f6de6315d
1 changed files with 5 additions and 5 deletions
|
|
@ -86,22 +86,22 @@ export function World() {
|
|||
});
|
||||
|
||||
// Bottom wall (ground)
|
||||
const ground = Bodies.rectangle(width / 2, height - 10, width, 20, {
|
||||
const ground = Bodies.rectangle(width / 2, height + 250, width, 500, {
|
||||
isStatic: true,
|
||||
render: { fillStyle: bgColor },
|
||||
});
|
||||
|
||||
// Left wall
|
||||
const leftWall = Bodies.rectangle(-10, height / 2, 20, height + 40, {
|
||||
const leftWall = Bodies.rectangle(-250, height / 2, 500, height + 40, {
|
||||
isStatic: true,
|
||||
render: { fillStyle: bgColor },
|
||||
});
|
||||
|
||||
// Right wall
|
||||
const rightWall = Bodies.rectangle(
|
||||
width + 10,
|
||||
width + 245,
|
||||
height / 2,
|
||||
20,
|
||||
500,
|
||||
height + 40,
|
||||
{
|
||||
isStatic: true,
|
||||
|
|
@ -110,7 +110,7 @@ export function World() {
|
|||
);
|
||||
|
||||
// Top wall
|
||||
const topWall = Bodies.rectangle(width / 2, -10, width, 20, {
|
||||
const topWall = Bodies.rectangle(width / 2, -250, width, 500, {
|
||||
isStatic: true,
|
||||
render: { fillStyle: bgColor },
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue