setPosition method

dynamic setPosition(
  1. dynamic x,
  2. dynamic y
)

Implementation

setPosition(x, y) {
  this.position["x"] = x;
  this.position["y"] = y;

  var width = this.size["width"]!;
  var height = this.size["height"]!;

  mesh.position.set(
      -innerWidth / 2 + width / 2 + x, innerHeight / 2 - height / 2 - y, 0);

  // if ( doRenderLabel ) labelMesh.position.set( mesh.position.x, mesh.position.y - scope.size.height / 2 + labelCanvas.height / 2, 0 );
}