-- 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: b5e03fb654ecf5392728bcb08554bf53020cb94b:
path_to:
revision_to:

git.thebackupbox.net

janusweb

git://git.thebackupbox.net/janusweb

commit b5e03fb654ecf5392728bcb08554bf53020cb94b
Author: James Baicoianu <james_github@baicoianu.com>
Date:   Tue Oct 11 21:34:45 2016 -0700

    Use 2dui for portal creation, pass avatar info to remoteplayer objects

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

index f73f036de827af8ad2efb89c13374e3202cbb7f1..

index ..e9d1a7e6f4f3b55fa1f9e43f0f95c813bf4510e5 100644

--- a/scripts/janusweb.js
+++ b/scripts/janusweb.js
@@ -321,11 +321,8 @@ setTimeout(function() {
     }
     this.showLoadURL = function(ev) {
       if (ev.value == 1) {
-        var url = prompt('url?');
-        if (url) {
-          elation.events.fire({element: this, type: 'janusweb_load_url', data: url});
-          this.setActiveRoom(url, [0,0,0]);
-        }
+        this.engine.client.ui.urlbar.selectall();
+        this.engine.client.ui.urlbar.focus();
       }
     }
     this.showRoomDebug = function(ev) {
@@ -466,6 +463,9 @@ setTimeout(function() {
         remote.updateHands(movedata.hand0, movedata.hand1);
       }

+      if (movedata.avatar) {
+        remote.setAvatar(movedata.avatar);
+      }
       if (movedata.speaking && movedata.audio) {
         remote.speak(movedata.audio);
       }
diff --git a/scripts/remoteplayer.js b/scripts/remoteplayer.js

index 96108e2e0818e2eae20d9444d551f31a0f0014d2..

index ..ac8cbc5e64e0e29165c8b485123169153517a551 100644

--- a/scripts/remoteplayer.js
+++ b/scripts/remoteplayer.js
@@ -72,6 +72,19 @@ elation.component.add('engine.things.remoteplayer', function() {
     //this.mouth.audio.setBuffer(this.audiobuffer);
     elation.events.add(this, 'thing_change', elation.bind(this, this.updateTransparency));
   };
+  this.setAvatar = function(avatar) {
+    //console.log(avatar);
+    if (!this.avatarcode || this.avatarcode != avatar) {
+      this.avatarcode = avatar;
+      if (this.avatarroom) {
+        this.avatarroom.die();
+      }
+      //this.avatarroom = this.spawn('janusroom', null, { source: avatar });
+      //console.log(this.avatarroom);
+console.log('avatar changed:', this, avatar);
+    }
+
+  }
   this.speak = function(noise) {
     this.voip.speak(noise);

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

-- Response ended

-- Page fetched on Sun Jun 2 17:00:20 2024