marklovers / kaplay

🦖 A JavaScript game library
https://kaplayjs.com
MIT License
230 stars 14 forks source link

bug: frame should return frame of current animation instead of generl frame #171

Open amyspark-ng opened 1 week ago

amyspark-ng commented 1 week ago

Describe the bug

A clear and concise description of what the bug is.

Not sure if this is actually a bug, but right now, when you want to get the current frame, it treats all animations of an object as a single animation and returns the frame in this "single animation" thing, instead of returning the frame for the current animation

let's say i have an object with an idle animation (4 frames) and a run animation(3 frames) if im running, the frame would be something above 3, which doesn't make sense