mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-13 00:09:08 +02:00
Fix lint
This commit is contained in:
@@ -48,14 +48,14 @@ module.exports = class OldPhotoCommand extends Command {
|
|||||||
for (let i = 0; i < count; i++) {
|
for (let i = 0; i < count; i++) {
|
||||||
const x = Math.random() * width;
|
const x = Math.random() * width;
|
||||||
const y = Math.random() * height;
|
const y = Math.random() * height;
|
||||||
const radius = 40 + Math.random() * 80;
|
const radius = 40 + (Math.random() * 80);
|
||||||
const type = Math.random() > 0.5 ? 'coffee' : 'water';
|
const type = Math.random() > 0.5 ? 'coffee' : 'water';
|
||||||
ctx.beginPath();
|
ctx.beginPath();
|
||||||
ctx.moveTo(x + radius * 0.6, y);
|
ctx.moveTo(x + (radius * 0.6), y);
|
||||||
for (let angle = 0; angle < 360; angle += Math.random() * 45) {
|
for (let angle = 0; angle < 360; angle += Math.random() * 45) {
|
||||||
const angleRad = (angle * Math.PI) / 180;
|
const angleRad = (angle * Math.PI) / 180;
|
||||||
const nextAngleRad = ((angle + Math.random() * 45) * Math.PI) / 180;
|
const nextAngleRad = ((angle + (Math.random() * 45)) * Math.PI) / 180;
|
||||||
const arcRadius = radius * (0.6 + Math.random() * 0.4);
|
const arcRadius = radius * (0.6 + (Math.random() * 0.4));
|
||||||
ctx.arc(x, y, arcRadius, angleRad, nextAngleRad, false);
|
ctx.arc(x, y, arcRadius, angleRad, nextAngleRad, false);
|
||||||
}
|
}
|
||||||
ctx.closePath();
|
ctx.closePath();
|
||||||
@@ -72,7 +72,7 @@ module.exports = class OldPhotoCommand extends Command {
|
|||||||
|
|
||||||
tears(ctx, width, height, count = 6) {
|
tears(ctx, width, height, count = 6) {
|
||||||
for (let i = 0; i < count; i++) {
|
for (let i = 0; i < count; i++) {
|
||||||
const x = Math.random() * width * 0.8 + width * 0.1;
|
const x = (Math.random() * width * 0.8) + (width * 0.1);
|
||||||
const yStart = Math.random() * height;
|
const yStart = Math.random() * height;
|
||||||
const yEnd = yStart + (Math.random() * 50) + 20;
|
const yEnd = yStart + (Math.random() * 50) + 20;
|
||||||
ctx.beginPath();
|
ctx.beginPath();
|
||||||
|
|||||||
Reference in New Issue
Block a user