Why is part of my GIF.js animation covered in black?

Viewed 36

I'm creating a GIF based on a Canvas animation using GIF.js. However, only a portion of my GIF is visible, with the rest covered in black. How do I make the full animation appear?

glitched GIF animation

1 Answers

You probably need to set the height and width of your Canvas element before animating.

let canvas:HTMLCanvasElement=document.createElement('canvas');
canvas.width = 600;
canvas.height = 390;

fixed GIF animation

Related