I am researching how set up loading screens using Javascript. I’ve come across a few ways to go about it. I found a JS script that waits from the presence of an element block to appear. Another uses JS promises and allows you specify scripts you want loaded.
However I am not clear on how to set up animations in conjunction with this. I know how to create animations using some libraries however I’m not sure if I understand the big picture. Is the idea behind javascript loaders that they load an animation and play the animation until they detect something has fully loaded? Are there dramatically different requirements for the script if you’re doing an SVG animation vs a Canvas or GIF? Does my question make sense?