hyperandroid / CAAT

Canvas Advanced Animation Toolkit
hyperandroid.github.com/CAAT
MIT License
727 stars 117 forks source link

Definision of setChangeFPS() is wrong/confusing #106

Closed arnuschky closed 11 years ago

arnuschky commented 11 years ago

The definition of setChangeFPS() in SpriteImage.js is wrong or at least confusing:

        /**
         * Set the elapsed time needed to change the image index.
         * @param fps an integer indicating the time in milliseconds to change.
         * @return this
         */
        setChangeFPS:function (fps) {
            this.changeFPS = fps;
            return this;
        }

Here, the integer indicates the time between frames. That is, high integer, fewer frames-per-second (FPS). Low integer, higher FPS.

That is, the parameter does exactly the opposite of one would expect.

hyperandroid commented 11 years ago

Maybe. Do you have a suggestion for a new method ?

Thanks.

arnuschky commented 11 years ago

Well, either you change the behavior of the method such that it actually sets the frames per second, or you rename it for something like setAnimationSpeed(timeDelta).

hyperandroid commented 11 years ago

Didn't i told previously i love pull requests ? Feel free to submit your own. And don't remove the original method :)

thanks.