This small guide will help you migrate you code to gameQuey 0.4.x, however it will not cover sound since support prior 0.4.0 was mosty anecdotal.
gameQuery 0.4.0 is more eco-friendly, it doesn’t polute the global scope with stuff anymore! But that as a price: you cannot just refer to
Animation anymore. Instead you will have to go through the jQuery namespace
$ and trought the gameQuery namespace. The place where the constantes describing the type of animation where stored has change to: they where in
Animation and are now in
$.gameQuery. The examples that follow will sum this up:
This shouldn’t be to complicated to do with two simple replace: 1st replace all
new Animation with
new $.gameQuery.Animation and then replace any
The playground function was somewhat strange when compared to standard jQuery functions. Now it works like you may expect: call it on a selected element to make it the playground and pass option as the first argument. I you need to retrieve it later just call
Sadly this is not as easy to automate as the Animation. However there should’nt be that many place where you use
playground() to define you playground so you could do this part by hand and replace all remaining instances of
The default value of the
delta option for
Animation as been changed to a rather random 32 to a more logical 0. This is very unlikley that this will affect you in any way.
This is not a change that will break your code but you should be aware that you can now give as a seconde argument to the
setLoadBar methode a function. It will be called at each time a progress as been made and be given as first and only arguement the percentage of progession.
This function is somewhat strange, like
playground() use to be so it may well be rewriten at some point