I am working on a photo editor https://www.Photopea.com and I added the GIF capability some time ago :)
Simply put, each layer, whose name starts with "_a_", defines a frame. Layers with other names are visible in all frames.
An example: go here http://photopea.com#iL9sRwekM and press File - Export As - GIF :)