mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
added setting to switch off pointer lock filter
This commit is contained in:
parent
a5f45ffef6
commit
413f5424c2
2 changed files with 5 additions and 1 deletions
|
|
@ -121,6 +121,7 @@ function (Parent, DomController, PIXI, Settings, Nc, Exception, GameStats, Layer
|
||||||
}
|
}
|
||||||
|
|
||||||
PixiView.prototype.initPointerLockView = function() {
|
PixiView.prototype.initPointerLockView = function() {
|
||||||
|
if (!Settings.ENABLE_POINTER_LOCK_FILTER) return;
|
||||||
|
|
||||||
var blurFilter = new PIXI.BlurFilter();
|
var blurFilter = new PIXI.BlurFilter();
|
||||||
blurFilter.blurX = 42 * this.currentZoom;
|
blurFilter.blurX = 42 * this.currentZoom;
|
||||||
|
|
@ -139,6 +140,8 @@ function (Parent, DomController, PIXI, Settings, Nc, Exception, GameStats, Layer
|
||||||
};
|
};
|
||||||
|
|
||||||
PixiView.prototype.onPointerLockChange = function(isLocked, options) {
|
PixiView.prototype.onPointerLockChange = function(isLocked, options) {
|
||||||
|
if (!Settings.ENABLE_POINTER_LOCK_FILTER) return;
|
||||||
|
|
||||||
if(isLocked) {
|
if(isLocked) {
|
||||||
this.container.filters = null;
|
this.container.filters = null;
|
||||||
this.clickToEnable.visible = false;
|
this.clickToEnable.visible = false;
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,7 @@ function () {
|
||||||
VIEW_CONTROLLER: 0 ? "Three" : "Pixi",
|
VIEW_CONTROLLER: 0 ? "Three" : "Pixi",
|
||||||
ARROW_GLIDE: 30, // % of the way per frame
|
ARROW_GLIDE: 30, // % of the way per frame
|
||||||
SHOW_LAYER_INFO: false,
|
SHOW_LAYER_INFO: false,
|
||||||
|
ENABLE_POINTER_LOCK_FILTER: false,
|
||||||
|
|
||||||
// GAME PLAY
|
// GAME PLAY
|
||||||
WALK_SPEED: 4,
|
WALK_SPEED: 4,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue