setSize method

dynamic setSize(
  1. dynamic width,
  2. dynamic height
)

Implementation

setSize(width, height) {
  this.size["width"] = width;
  this.size["height"] = height;

  mesh.scale.set(width / frame["width"], height / frame["height"], 1);

  //Reset the position as it is off when we scale stuff
  resetPosition();
}