This commit is contained in:
Dragon Fire
2021-02-10 21:20:00 -05:00
parent e6dba6e622
commit 6f1973be3c
+3 -2
View File
@@ -77,11 +77,12 @@ module.exports = class EjectCommand extends Command {
const frameID = `frame_${i.toString().padStart(2, '0')}.gif`;
const frame = await loadImage(path.join(__dirname, '..', '..', 'assets', 'images', 'eject', frameID));
if (i <= 11) {
const x = (320 / 10) * i;
const rotation = (360 / 10) * i;
const x = ((320 / 10) * i) - (rotation / 2);
const y = ((frame.height / 2) - 25) + (rotation / 2)
ctx.drawImage(frame, 0, 0);
ctx.rotate(rotation * (Math.PI / 180));
ctx.drawImage(avatar, x, (frame.height / 2) - 25, 50, 50);
ctx.drawImage(avatar, x, y, 50, 50);
ctx.rotate(-rotation * (Math.PI / 180));
}
if (i > 10) {