Open ejb opened 3 years ago
I don't quite understand why some pixels are wider. Shouldn't you just have a greater width / height margin with a fixed size image?
And what's the difference with this option and just setting margins to 0?
maxWidthMargin: 0,
maxHeightMargin: 0,
Also please rebase with the latest master
.
This adds a third option for scaling up that preserves pixel ratios. Essentially, the game canvas is scaled the highest possible integer. It's a great option for retro-style pixel art.
For example, here's
scaled-up
. Note how some of the pixels on the birb are wider than others, leading to distortion of the sprite.And the same scene with
scaled-up-proportional
. The borders are annoying, but a reasonable compromise to preserve the art style.