mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-22 10:19:11 +02:00
Fix
This commit is contained in:
@@ -53,7 +53,7 @@ module.exports = class FireCommand extends Command {
|
|||||||
encoder.setDelay(100);
|
encoder.setDelay(100);
|
||||||
encoder.setQuality(200);
|
encoder.setQuality(200);
|
||||||
for (let i = 0; i < frameCount; i++) {
|
for (let i = 0; i < frameCount; i++) {
|
||||||
const frame = await loadImage(path.join(__dirname, '..', '..', 'assets', 'images', 'fire', `frame-${i}.png`));
|
const frame = await loadImage(path.join(__dirname, '..', '..', 'assets', 'images', 'fire', `frame-${i}.gif`));
|
||||||
const ratio = frame.width / frame.height;
|
const ratio = frame.width / frame.height;
|
||||||
const height = Math.round(avatar.width / ratio);
|
const height = Math.round(avatar.width / ratio);
|
||||||
drawImageWithTint(ctx, avatar, '#fc671e', 0, 0, avatar.width, avatar.height);
|
drawImageWithTint(ctx, avatar, '#fc671e', 0, 0, avatar.width, avatar.height);
|
||||||
|
|||||||
Reference in New Issue
Block a user