Hi,
I have seen that using SteppedEase seems to be the recommended way to cycle through bitmaps for an animation.
Unfortunately in my case they have to be split over a few separate files because of limitations of PNG image dimensions.
TexturePacker does a good job of creating these PNG files and generates an accompanying JSON file with the relevant x, y, width and heights to piece the animation back together.
The output looks something like this...
[
"image004.png":
{
"frame": {"x":366,"y":0,"w":367,"h":241},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":2,"y":129,"w":367,"h":241},
"sourceSize": {"w":782,"h":414}
},
"image005.png":
{
"frame": {"x":733,"y":0,"w":367,"h":241},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":2,"y":129,"w":367,"h":241},
"sourceSize": {"w":782,"h":414}
}
]
My question is there a preferred way to use these spritesheets and information to recreate the animation using Greensock?
I guess that this is too complex for SteppedEase, which only seems to be able to alter a fixed value a certain number of iterations—but for something more complex like this what would be a sensible approach?
I’m quite new to Greensock so looking for some advice really.
Thanks!