My dream is to create a function with this capability:
crate a sprite with n animations (manually)
associate the new “PhotoSwipe” Behavior
Automatically the function generate two images: oe the right of the main and one on the left and hide them. Then when you swape the function manage the sprite movements like the site example.
I don’t know if your first question is possible. (I’m not saying it isn’t, I just literally don’t know).
For the second question, I’d recommend using the “Mask” extension from the extensions list.
If you don’t want to write manually how many animations has a sprite, maybe you can trick with a loop, like: change animation to x, check if animation is x, x+=1.
To hide portion of a sprite, you need to put another sprite on top, I guess. Or crop the sprite with javascript, I suppose it’s possible.