add prettier

This commit is contained in:
2023-04-06 18:03:40 +03:00
parent 9286270eb9
commit 797f31c4ab
9 changed files with 71 additions and 9 deletions
+1 -1
View File
@@ -23,5 +23,5 @@ export class App {
this.scene.run();
requestAnimationFrame(this.run);
}
};
}
+7 -4
View File
@@ -11,20 +11,23 @@ export class Pointer {
window.addEventListener('mouseup', this.mouseUp);
}
static set pos({ x, y }) { this.#x = x; this.#y = y; }
static set pos({ x, y }) {
this.#x = x;
this.#y = y;
}
static get pos() {
return { x: this.#x, y: this.#y };
}
static mouseMove = (e) => {
this.pos = { x: e.pageX, y: e.pageY };
}
};
static mouseDown = (e) => {
this.pos = { x: e.pageX, y: e.pageY };
}
};
static mouseUp = (e) => {
this.pos = { x: e.pageX, y: e.pageY };
}
};
}
+9 -2
View File
@@ -54,8 +54,15 @@ export class Scene {
break;
case 'uStrokeRect':
this.#drawStrokeRect(item.x, item.y, item.width, item.height,
item.fillColor, item.strokeColor, item.strokeWidth);
this.#drawStrokeRect(
item.x,
item.y,
item.width,
item.height,
item.fillColor,
item.strokeColor,
item.strokeWidth
);
break;
default:
+3 -1
View File
@@ -11,7 +11,9 @@ export class Settings {
configurable: true,
enumerable: true,
get: () => this.#props[property],
set: (setValue) => { this.#props[property] = setValue; },
set: (setValue) => {
this.#props[property] = setValue;
},
});
}