This commit is contained in:
Dragon Fire
2021-02-10 21:38:08 -05:00
parent 66adae0db8
commit 6e9f8d862d
+3 -3
View File
@@ -76,10 +76,10 @@ module.exports = class EjectCommand extends Command {
for (let i = 0; i < frameCount; i++) {
const frameID = `frame_${i.toString().padStart(2, '0')}.gif`;
const frame = await loadImage(path.join(__dirname, '..', '..', 'assets', 'images', 'eject', frameID));
if (i <= 11) {
if (i <= 16) {
ctx.drawImage(frame, 0, 0);
const rotation = (360 / 10) * i;
const x = (320 / 10) * i;
const x = (320 / 15) * i;
const y = (frame.height / 2) - 25;
const angle = rotation * (Math.PI / 180);
ctx.rotate(-angle);
@@ -88,7 +88,7 @@ module.exports = class EjectCommand extends Command {
ctx.drawImage(avatar, x2, y2, 50, 50);
ctx.rotate(angle);
}
if (i > 10) {
if (i > 12) {
if (i <= 20) {
ctx.drawImage(frame, 0, 0);
const letters = Math.ceil((text.length / 10) * ((i - 10) + 1));