2023-02-17 11:06:01 +01:00

26 lines
550 B
JavaScript

export class MoveCenter {
constructor() {
this.x = 50;
this.y = 50;
this.mode = "percent";
this.radius = 0;
}
load(data) {
if (!data) {
return;
}
if (data.x !== undefined) {
this.x = data.x;
}
if (data.y !== undefined) {
this.y = data.y;
}
if (data.mode !== undefined) {
this.mode = data.mode;
}
if (data.radius !== undefined) {
this.radius = data.radius;
}
}
}