1 decade ago
by isaac
So I've found the boolean landscapeMode in the API, but I'm not sure how can I use it in the impact to detect orientation.
Can someone give me an example of how I can use it please?
1 decade ago
by Joncom
Have not tried this myself, but I imagine it's as simple as:
// Run this check in ig.game.update
if(ig.game.landscapeMode !== ejecta.landscapeMode) {
// The device just changed modes.
// Resize the canvas now, or do whatever else you might want.
}
1 decade ago
by isaac
Isn't landscapeMode a boolean?
I have tried using if(ejecta.landscapeMode), but it is not returning the correct result. No matter how I rotate the screen, it will only call whatever is in the else{}.
Page 1 of 1
« first
« previous
next ›
last »