displaying fields labels

This commit is contained in:
2023-04-17 14:00:45 +02:00
parent 592f358cab
commit a940012b6e
7 changed files with 97 additions and 18 deletions

View File

@@ -86,10 +86,13 @@ export default {
let wall_w = 100;
Matter.Composite.add(this.world, [
// walls
Matter.Bodies.rectangle(canvas_w/2, -wall_w/2, canvas_w, wall_w, { isStatic: true }), // top
Matter.Bodies.rectangle(canvas_w/2, canvas_h+wall_w/2, canvas_w, wall_w, { isStatic: true }), // bottom
Matter.Bodies.rectangle(-wall_w/2, canvas_h/2, wall_w, canvas_h, { isStatic: true }), // left
Matter.Bodies.rectangle(canvas_w+wall_w/2, canvas_h/2, wall_w, canvas_h, { isStatic: true }) // right
Matter.Bodies.rectangle(canvas_w/2, -wall_w/2, canvas_w, wall_w, { isStatic: true }), // top
Matter.Bodies.rectangle(canvas_w/2, canvas_h+wall_w/2, canvas_w, wall_w, { isStatic: true }), // bottom
Matter.Bodies.rectangle(-wall_w/2, canvas_h/2, wall_w, canvas_h, { isStatic: true }), // left
Matter.Bodies.rectangle(canvas_w+wall_w/2, canvas_h/2, wall_w, canvas_h, { isStatic: true }), // right
// make the items never goes under menus
Matter.Bodies.rectangle(550, canvas_h-15, 900, 30, { isStatic: true }), // menu bottom
Matter.Bodies.rectangle(550, 15, 900, 30, { isStatic: true }) // menu top
]);
// add mouse control