add prettier
This commit is contained in:
+1
-1
@@ -23,5 +23,5 @@ export class App {
|
||||
this.scene.run();
|
||||
|
||||
requestAnimationFrame(this.run);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
+7
-4
@@ -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
@@ -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
@@ -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;
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user