setSize method

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

Implementation

setSize(width, height) {
  size["width"] = width;
  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();
}