Fix speed

This commit is contained in:
Dragon Fire
2024-04-24 00:28:50 -04:00
parent 4f7d8f9fb6
commit e113bd267c
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -50,7 +50,7 @@ module.exports = class FireCommand extends Command {
encoder.start();
encoder.setRepeat(0);
encoder.setDelay(0);
encoder.setQuality(200);
encoder.setQuality(100);
for (let i = 0; i < frameCount; i++) {
const frame = await loadImage(path.join(__dirname, '..', '..', 'assets', 'images', 'fire', `frame-${i}.gif`));
const ratio = frame.width / frame.height;
+2 -2
View File
@@ -58,12 +58,12 @@ module.exports = class MatrixCommand extends Command {
encoder.start();
encoder.setRepeat(0);
encoder.setDelay(0);
encoder.setQuality(200);
encoder.setQuality(100);
const distortedCanvas = createCanvas(avatar.width, avatar.height);
const distortedCtx = distortedCanvas.getContext('2d');
distortedCtx.drawImage(avatar, 0, 0);
distort(distortedCtx, 20, 0, 0, avatar.width, avatar.height, 5);
for (let i = 0; i < frameCount; i++) {
for (let i = 0; i < frameCount; i += 2) {
const frame = await loadImage(path.join(__dirname, '..', '..', 'assets', 'images', 'matrix', `frame-${i}.gif`));
const ratio = frame.width / frame.height;
const width = Math.round(avatar.height / ratio);