Auto image size
Then you want to have new sprite in your game
First you load it with a code like this:
var home = new $.gQ.Animation({imageURL: "img/home.png"});
And then you add it to playground with a code like this:
.addSprite("home", {animation: home, width: 92, height: 135,posx: 10, posy: 260 })
There maybe a lot of reasons why you want to set width/height by hand,
but sometimes you need to use original image size. It would be very nice if image loading function also automatically could read image width/height and if you do not set it by hand in addSprite used it.
First you load it with a code like this:
var home = new $.gQ.Animation({imageURL: "img/home.png"});
And then you add it to playground with a code like this:
.addSprite("home", {animation: home, width: 92, height: 135,posx: 10, posy: 260 })
There maybe a lot of reasons why you want to set width/height by hand,
but sometimes you need to use original image size. It would be very nice if image loading function also automatically could read image width/height and if you do not set it by hand in addSprite used it.
Comments
I'll see if I include this in the next release.