Auto image size

edited February 2013 in Development
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.

Comments

  • Accepted Answer
    This is a very good point. My idea was to force the user to realize that those two size don't need to be the same. But like you said 99.9% of the time they are the same so it would make sens to change that.

    I'll see if I include this in the next release.
Sign In or Register to comment.