kikito / anim8

An animation library for LÖVE
MIT License
730 stars 88 forks source link

Accessors to current frame width and height #13

Closed alesegdia closed 8 years ago

alesegdia commented 9 years ago

Like anim:getWidth() and anim:getHeight(), or maybe more explicit like anim:getCurrentFrameWidth(). What do you think about this?

kikito commented 8 years ago

Hi! Sorry it took me a while to answer this.

I have released a new version of anim8 which includes a new method, anim:getDimensions(). It returns both the width and height of the current frame in a single call, so the usage is like this:

local w,h = anim:getDimensions()

Appart from this, it is very similar to your recommendation. Thanks a lot!

alesegdia commented 8 years ago

Nice. Thanks!