update() {
      const rect = this.canvas.getBoundingClientRect();
      this.x = this.mouseX - rect.left - (this.w / 2);
上記の箇所について質問です。
this.x = this.mouseX - rect.left - (this.w / 2);
この箇所の意味、特に this.w/2 をする所がよく分かりません。
計算の仕組みを教えていただけますと助かります。
この回答を見るにはプレミアムプランへの登録が必要です
プレミアムプランとは?