|
|
@@ -76,14 +76,14 @@ define([ |
|
|
|
PIXI.settings.GC_MODE = PIXI.GC_MODES.AUTO; |
|
|
|
PIXI.settings.SCALE_MODE = PIXI.SCALE_MODES.NEAREST; |
|
|
|
PIXI.settings.SPRITE_MAX_TEXTURES = Math.min(PIXI.settings.SPRITE_MAX_TEXTURES, 16); |
|
|
|
PIXI.settings.RESOLUTION = 1; |
|
|
|
|
|
|
|
events.on('onGetMap', this.onGetMap.bind(this)); |
|
|
|
events.on('onToggleFullscreen', this.toggleScreen.bind(this)); |
|
|
|
events.on('onMoveSpeedChange', this.adaptCameraMoveSpeed.bind(this)); |
|
|
|
|
|
|
|
let zoom = isMobile ? 1 : window.devicePixelRatio; |
|
|
|
this.width = $('body').width() * zoom; |
|
|
|
this.height = $('body').height() * zoom; |
|
|
|
this.width = $('body').width(); |
|
|
|
this.height = $('body').height(); |
|
|
|
|
|
|
|
this.showTilesW = Math.ceil((this.width / scale) / 2) + 3; |
|
|
|
this.showTilesH = Math.ceil((this.height / scale) / 2) + 3; |
|
|
@@ -179,11 +179,9 @@ define([ |
|
|
|
onResize: function () { |
|
|
|
if (isMobile) |
|
|
|
return; |
|
|
|
|
|
|
|
let zoom = window.devicePixelRatio; |
|
|
|
|
|
|
|
this.width = $('body').width() * zoom; |
|
|
|
this.height = $('body').height() * zoom; |
|
|
|
this.width = $('body').width(); |
|
|
|
this.height = $('body').height(); |
|
|
|
|
|
|
|
this.showTilesW = Math.ceil((this.width / scale) / 2) + 3; |
|
|
|
this.showTilesH = Math.ceil((this.height / scale) / 2) + 3; |
|
|
|