mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-15 08:22:37 +02:00
Add loading to fire
This commit is contained in:
@@ -5,7 +5,7 @@ const GIFEncoder = require('gifencoder');
|
||||
const request = require('node-superfetch');
|
||||
const path = require('path');
|
||||
const { streamToArray, reactIfAble } = require('../../util/Util');
|
||||
const { distort, drawImageWithTint } = require('../../util/Canvas');
|
||||
const { distort } = require('../../util/Canvas');
|
||||
const { LOADING_EMOJI_ID, SUCCESS_EMOJI_ID } = process.env;
|
||||
const frameCount = 249;
|
||||
|
||||
@@ -61,7 +61,7 @@ module.exports = class MatrixCommand extends Command {
|
||||
encoder.setQuality(10);
|
||||
const distortedCanvas = createCanvas(avatar.width, avatar.height);
|
||||
const distortedCtx = distortedCanvas.getContext('2d');
|
||||
drawImageWithTint(distortedCtx, avatar, 'black', 0, 0, avatar.width, avatar.height);
|
||||
ctx.drawImage(avatar, 0, 0);
|
||||
distort(distortedCtx, 20, 0, 0, avatar.width, avatar.height, 5);
|
||||
for (let i = 0; i < frameCount; i++) {
|
||||
const frame = await loadImage(path.join(__dirname, '..', '..', 'assets', 'images', 'matrix', `frame-${i}.gif`));
|
||||
|
||||
Reference in New Issue
Block a user