title: Make "walls" follow canvas edge (Matter.js)
body: <p>I have set up this Matter.js scene that has three walls - <strong>ground</strong>, <strong>wall left</strong> and <strong>wall right</strong>. Initially their positions are set so that they are exactly on their designated edges of the scene.</p>
  
  <p>This is the code for defining the scene with the walls:</p>
  
  <pre><code>var Engine = Matter.Engine,
              Render = Matter.Render,
              World = Matter.World,
              Bodies = Matter.Bodies;
          var engine = Engine.create();
          var container = $(this).get()[0];
          var canvas = $(this).find("canvas").get()[0];
          var render = Render.create({
              element: container,
              canvas: canvas,
              engine: engine,
              options: {
                  width: container.offsetWidth,
                  height: container.offsetHeight,
                  wireframes: false,
              }
          });
  
          canvas.width = container.offsetWidth;
          canvas.height = container.offsetHeight;
  
  window.addEventListener("resize", function () {
      canvas.width = container.offsetWidth;
      canvas.height = container.offsetHeight
  });
  
          // create two boxes and a ground
  var ground = Bodies.rectangle(canvas.width / 2, canvas.height + 30, canvas.width, 60, {
      isStatic: true, label: "Ground"
  });
  var wallLeft = Bodies.rectangle(-30, canvas.height / 2, 60, canvas.height, {
      isStatic: true, label: "Wall Left"
  });
  var wallRight = Bodies.rectangle(canvas.width + 30, canvas.height / 2, 60, canvas.height, {
      isStatic: true, label: "Wall Right"
  });
  </code></pre>
  
  <p>What I'm looking for is a way to change the position of the walls on <code>window.resize</code>. So basically just assign the same size properties again on the bodies when the window is resized. How would I do this? Could I in some way change the position of the walls by getting them by their labels and then just change the <code>position.x</code> and <code>position.y</code> values? If so, how do I select a specific body by its label?</p>