0

Using createjs: Putting a scale to "shrink" the image is leaving it unconfigured.

Look: http://img534.imageshack.us/img534/8790/f9i0.png

--

I am creating my first educational game with HTML5.

I made all the images to a screen of 2024x1200. So I created a canvas "full screen" and do the famous rule of three to discover the new image scale.

Width

  • Screen Original: 2024 pixels
  • Image Original: 1000 pixels
  • Screen Actual: 548 pixels
  • Image View:? pixels

new width = 548 * 1000/2024; Image scale = new width / original image;

Result: http://img534.imageshack.us/img534/8790/f9i0.png


APP.mapMain = new createjs.Bitmap(mapMainBitmapTemp);
APP.stage.addChild(APP.mapMain);

APP.mapMain.x=0;
APP.mapMain.y=10;
APP.mapMain.scaleY= 0.27734375;
APP.mapMain.scaleX= 0.27734375;
luisdemarchi
  • 1,402
  • 19
  • 29
  • Please post the code you're using, we can't tell what the problem is by just looking at the images. And what about height, you have to recalculate it too. Might be the cause of the distortion. – bfavaretto Oct 02 '13 at 22:13
  • Updated with the code at the end. – luisdemarchi Oct 03 '13 at 01:07

0 Answers0