use lerp for center

This commit is contained in:
Orion Reed 2024-12-03 00:48:25 -05:00
parent 34fd98e7e8
commit bb1b9f5965
1 changed files with 2 additions and 4 deletions

View File

@ -414,10 +414,8 @@ export class FolkShape extends HTMLElement {
const [topLeft] = this.getClientRect().corners();
const newCenter: Point = {
x: (topLeft.x + clientX) / 2,
y: (topLeft.y + clientY) / 2,
};
const newCenter: Point = Vector.lerp(topLeft, { x: clientX, y: clientY }, 0.5);
const newTopLeft = Vector.rotateAround(topLeft, newCenter, -this.rotation);
let bottomRight: Point;