fix screen avail width / height
parent
0bd16d392f
commit
e8ca33ab8a
|
@ -68,7 +68,7 @@ GameLib.D3.API.Camera = function(
|
||||||
this.fov = fov;
|
this.fov = fov;
|
||||||
|
|
||||||
if (GameLib.Utils.UndefinedOrNull(aspect)) {
|
if (GameLib.Utils.UndefinedOrNull(aspect)) {
|
||||||
aspect = window.innerWidth / window.innerHeight;
|
aspect = window.screen.availWidth / window.screen.availHeight;
|
||||||
}
|
}
|
||||||
this.aspect = aspect;
|
this.aspect = aspect;
|
||||||
|
|
||||||
|
|
|
@ -73,8 +73,8 @@ GameLib.System.Render.prototype.start = function() {
|
||||||
GameLib.Event.Emit(
|
GameLib.Event.Emit(
|
||||||
GameLib.Event.WINDOW_RESIZE,
|
GameLib.Event.WINDOW_RESIZE,
|
||||||
{
|
{
|
||||||
width : window.innerWidth,
|
width : window.screen.availWidth,
|
||||||
height : window.innerHeight
|
height : window.screen.availHeight
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -101,8 +101,8 @@ GameLib.System.Render.prototype.nativeWindowResize = function() {
|
||||||
GameLib.Event.Emit(
|
GameLib.Event.Emit(
|
||||||
GameLib.Event.WINDOW_RESIZE,
|
GameLib.Event.WINDOW_RESIZE,
|
||||||
{
|
{
|
||||||
width : window.innerWidth,
|
width : window.screen.availWidth,
|
||||||
height : window.innerHeight
|
height : window.screen.availHeight
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue