Hello! I hope to be in the right part of the forums, and in advance, sorry for any english mistakes as it isn't my primary language.
I am developping a website for an upcoming game that uses spine animations for their characters.
The website have an entire page made for viewing these animations outside of the game and it's working nicely.
I would like to add buttons to my page, one to screenshot the current frame of the animation and save as a png, and the other one to save the entire current animation as a gif.
To put it simple, I cannot make it work. Despite the availability of the "right click> copy/save as" manages to download the current frame.
What I tried to do is mess with the canvas created by the spine-player, and use the .toDataUrl("image/png") function. It works, but it will only send me a data url of the first frame of the animation, no matter when I launch the function. This first frame is a fully black square so it is unusuable.
To make the gif download, I'd first need to make the toDataUrl() work for png, but I just cannot make it happen.
If anyone have a solution to what I'd like to realise, I'd be very grateful.
The weirdest part is once again, that I can save my current frame through a right click, but can't using a javascript function to send me a Data Url of that frame.