Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

7 years ago by ola_soubra

Hi every one
Is there any trick to make my game fit all android mobiles size and tablets ?

7 years ago by denkle

Add this to the end of your main.js before ig.main() and use a scaling like 4 or 6 if your game runs internal on a low res like 320x240

var canvas = document.getElementById('canvas');
canvas.style.width = window.innerWidth + 'px';
canvas.style.height = window.innerHeight + 'px';

window.addEventListener('resize', function() {
    if (!ig.system) { return; }

    canvas.style.width = window.innerWidth + 'px';
    canvas.style.height = window.innerHeight + 'px';
}, false);

take a look at my index.html and main.js here https://github.com/den-kle/impactjs-moving-platforms

7 years ago by ola_soubra

YAP IT'S WORK THANKS ALOT DENKLE
Page 1 of 1
« first « previous next › last »