an animation would be a list of images within a texture. I'm thinking something like this:
...
animationDefaults: {
delay: 0.05,
loop: false,
anchor: "center",
},
textures: {
texture1Name: {
animationDefaults: {
delay: 0.05,
loop: false,
anchor: "center",
},
animations: {
animation1Name: {
frames: "img/walking-*.png",
// or, alternately:
frames: [
"img/walking-0.png",
"img/walking-1.png",
"img/walking-2.png",
],
delay: 0.05,
loop: false,
anchor: "center",
}
}
}
}
...
When you read a texture, it would load all this animation metadata. Images would be added to the texture with the animation name + '_' + frame number.
an animation would be a list of images within a texture. I'm thinking something like this:
When you read a texture, it would load all this animation metadata. Images would be added to the texture with the animation name + '_' + frame number.