Added PointerLockManagement, Fixed layer positioning, added fps chart. fixes #120, fixes #121, fixes #123

This commit is contained in:
logsol 2015-02-27 18:44:30 +01:00
parent 8d0989844c
commit 60eae208a2
23 changed files with 458 additions and 109 deletions

View file

@ -16,7 +16,7 @@ function (Abstract, DomController, Settings, Exception, Nc) {
this.debugMode = false;
this.ncTokens = [
Nc.on(Nc.ns.client.view.fullscreen.change, this.onFullscreenChange, this),
Nc.on(Nc.ns.client.view.display.change, this.onDisplaySizeChange, this),
Nc.on(Nc.ns.client.view.debugMode.toggle, this.onToggleDebugMode, this),
Nc.on(Nc.ns.client.game.zoomIn, this.onZoomIn, this),
@ -70,8 +70,9 @@ function (Abstract, DomController, Settings, Exception, Nc) {
return pos;
};
*/
AbstractView.prototype.onFullscreenChange = function(isFullScreen) {
AbstractView.prototype.onDisplaySizeChange = function(isFullScreen) {
/*
if (!isFullScreen) {
Settings.STAGE_WIDTH = 600;
Settings.STAGE_HEIGHT = 400;
@ -81,6 +82,10 @@ function (Abstract, DomController, Settings, Exception, Nc) {
Settings.STAGE_WIDTH = window.innerWidth;
Settings.STAGE_HEIGHT = window.innerHeight;
}
*/
Settings.STAGE_WIDTH = window.innerWidth;
Settings.STAGE_HEIGHT = window.innerHeight;
};
AbstractView.prototype.onToggleDebugMode = function(debugMode) {