-- Leo's gemini proxy

-- Connecting to git.thebackupbox.net:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

repo: janusweb
action: commit
revision:
path_from:
revision_from: dd8863cb9793ed7bcfed1f97c5120439b4a21d88:
path_to:
revision_to:

git.thebackupbox.net

janusweb

git://git.thebackupbox.net/janusweb

commit dd8863cb9793ed7bcfed1f97c5120439b4a21d88
Author: James Baicoianu <james_github@baicoianu.com>
Date:   Sun May 21 23:56:15 2017 -0700

    Disable 3D menu, fade UI when pointer is locked

diff --git a/scripts/client.js b/scripts/client.js

index 6fd88b4070f3317c581124d337e1366827e2448f..

index ..8057873bcb8fc766c77c4f9d0c54fbf059801278 100644

--- a/scripts/client.js
+++ b/scripts/client.js
@@ -97,6 +97,11 @@ elation.require(['engine.engine', 'engine.assets', 'engine.things.light_ambient'
       elation.events.add(this.fullscreenbutton, 'ui_button_click', elation.bind(this, this.toggleFullscreen));
       elation.events.add(document, 'fullscreenchange,webkitfullscreenchange,mozfullscreenchange', elation.bind(this, function(ev) { this.toggleFullscreen({ value: this.view.isFullscreen() }, true); this.fullscreenbutton.container.blur(); this.view.rendersystem.renderer.domElement.focus(); }));
       this.buttons.add('fullscreen', this.fullscreenbutton);
+
+      this.configbutton = elation.ui.button({classname: 'janusweb_config', label: 'Config', events: { click: elation.bind(this, this.configureOptions) } });
+      this.buttons.add('config', this.configbutton);
+
+      elation.events.add(document, 'pointerlockchange', elation.bind(this, function() { this.setUIActive(document.pointerLockElement === null); }));
     }
     this.initWorld = function() {
       var things = this.world.load({
@@ -159,6 +164,17 @@ elation.require(['engine.engine', 'engine.assets', 'engine.things.light_ambient'
         var errordiv = elation.html.create({tag: 'pre', append: this.loadingscreen.container, content: msg, classname: 'janusweb_error'});
       }
     }
+    this.showMenu = function() {
+    }
+    this.setUIActive = function(active) {
+      if (active) {
+        this.ui.enable();
+        this.buttons.enable();
+      } else {
+        this.ui.disable();
+        this.buttons.disable();
+      }
+    }
     this.showAbout = function() {
       var aboutwin = elation.ui.window({append: document.body, center: true, title: 'About JanusWeb'});
       var frame = elation.ui.iframe({src: 'http://github.com/jbaicoianu/janusweb/', classname: 'janusweb_about'});

-----END OF PAGE-----

-- Response ended

-- Page fetched on Sun Jun 2 15:22:02 2024