fix screen avail width / height

beta.r3js.org
-=yb4f310 2018-01-16 12:41:31 +01:00
parent 0bd16d392f
commit e8ca33ab8a
2 changed files with 5 additions and 5 deletions

View File

@ -68,7 +68,7 @@ GameLib.D3.API.Camera = function(
this.fov = fov;
if (GameLib.Utils.UndefinedOrNull(aspect)) {
aspect = window.innerWidth / window.innerHeight;
aspect = window.screen.availWidth / window.screen.availHeight;
}
this.aspect = aspect;

View File

@ -73,8 +73,8 @@ GameLib.System.Render.prototype.start = function() {
GameLib.Event.Emit(
GameLib.Event.WINDOW_RESIZE,
{
width : window.innerWidth,
height : window.innerHeight
width : window.screen.availWidth,
height : window.screen.availHeight
}
);
@ -101,8 +101,8 @@ GameLib.System.Render.prototype.nativeWindowResize = function() {
GameLib.Event.Emit(
GameLib.Event.WINDOW_RESIZE,
{
width : window.innerWidth,
height : window.innerHeight
width : window.screen.availWidth,
height : window.screen.availHeight
}
);
};