added new debug draw

This commit is contained in:
logsol 2015-02-28 21:27:42 +01:00
parent 13af9ecb9c
commit 20a974124e
7 changed files with 188 additions and 7 deletions

View file

@ -89,7 +89,7 @@ function (Settings, Nc, Stats, Screenfull, Graph, PointerLockManager) {
checkbox.type = "checkbox";
checkbox.onclick = function(e) {
Nc.trigger(Nc.ns.client.view.debugMode.toggle, e.target.checked);
self.getDebugCanvas().style.display = e.target.checked ? "" : "none";
//self.getDebugCanvas().style.display = e.target.checked ? "" : "none";
}
label.appendChild(checkbox);
label.appendChild(document.createTextNode("Debug"));
@ -170,6 +170,7 @@ function (Settings, Nc, Stats, Screenfull, Graph, PointerLockManager) {
canvas.height = Settings.STAGE_HEIGHT;
this.debugCanvas = canvas;
this.getCanvasContainer().appendChild(canvas);
this.debugCanvas.style.display = "none";
}
return this.debugCanvas;