added setting to switch off pointer lock filter

This commit is contained in:
logsol 2015-05-04 14:01:23 +02:00
parent fb3ac40d17
commit 8e70eedbce
2 changed files with 5 additions and 1 deletions

View file

@ -121,6 +121,7 @@ function (Parent, DomController, PIXI, Settings, Nc, Exception, GameStats, Layer
}
PixiView.prototype.initPointerLockView = function() {
if (!Settings.ENABLE_POINTER_LOCK_FILTER) return;
var blurFilter = new PIXI.BlurFilter();
blurFilter.blurX = 42 * this.currentZoom;
@ -139,6 +140,8 @@ function (Parent, DomController, PIXI, Settings, Nc, Exception, GameStats, Layer
};
PixiView.prototype.onPointerLockChange = function(isLocked, options) {
if (!Settings.ENABLE_POINTER_LOCK_FILTER) return;
if(isLocked) {
this.container.filters = null;
this.clickToEnable.visible = false;

View file

@ -39,6 +39,7 @@ function () {
VIEW_CONTROLLER: 0 ? "Three" : "Pixi",
ARROW_GLIDE: 30, // % of the way per frame
SHOW_LAYER_INFO: false,
ENABLE_POINTER_LOCK_FILTER: false,
// GAME PLAY
WALK_SPEED: 4,