cykod / Quintus

HTML5 Game Engine
http://html5quintus.com
GNU General Public License v2.0
1.41k stars 401 forks source link

Solve "scale-to-fit" issues once and for all #53

Closed cykod closed 10 years ago

cykod commented 11 years ago

Simplify the setup method to handle the 3 scaling variations:

  1. exact size
  2. exact pixel size, scale CSS up to maximize while keeping aspect ratio and make sure input handles this
  3. maximize, scaling up the pixel size

Also see if retina (2x resolution) can be handled and low-power (1/2x resolution) can be handled cleanly.

RobertBroersma commented 11 years ago

How is this comming along?

fariazz commented 10 years ago

I think for case 3. this was already solved here: https://github.com/thatpixguy/Quintus/commit/c49db8292957e2c403d9123dad0d8583890c9d9f , I tested on my Android phone and the scaling works well, the only thing is that the canvas is not centered in the phone screen.

fariazz commented 10 years ago

closing :)

JaredSartin commented 8 years ago

Why was this closed? This is only using scale 1: see line note on d428cd715fb96ce2db4408ca6ed2b087ee0e485e