-- 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: 5f263cafd2186286649377f970208a6ad0a3ca82:
path_to:
revision_to:

git.thebackupbox.net

janusweb

git://git.thebackupbox.net/janusweb

commit 5f263cafd2186286649377f970208a6ad0a3ca82
Author: James Baicoianu <james_github@baicoianu.com>
Date:   Thu Aug 17 01:49:09 2017 -0700

    Added player.appendChild/removeChild

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

index 67b4296e85b932917ec9909f326733c0ef0a59dc..

index ..d188caf91a331e4d2702d88789fa3beed26ceece 100644

--- a/scripts/janusplayer.js
+++ b/scripts/janusplayer.js
@@ -403,6 +403,8 @@ elation.require(['engine.things.player', 'janusweb.external.JanusVOIP', 'ui.butt

         localToWorld:  ['function', 'localToWorld'],
         worldToLocal:  ['function', 'worldToLocal'],
+        appendChild:   ['function', 'appendChild'],
+        removeChild:   ['function', 'removeChild'],
       });
       return proxy;
     }
@@ -535,5 +537,31 @@ elation.require(['engine.things.player', 'janusweb.external.JanusVOIP', 'ui.butt
         this.cursor_style = 'default';
       }
     }
+    this.appendChild = function(obj) {
+      var proxyobj = obj
+      if (elation.utils.isString(obj)) {
+        proxyobj = this.room.jsobjects[obj];
+      }
+      if (proxyobj) {
+        //var realobj = this.room.getObjectFromProxy(proxyobj);
+        var realobj = proxyobj._target;
+        if (realobj) {
+          this.add(realobj);
+        }
+      }
+    }
+    this.removeChild = function(obj) {
+      var proxyobj = obj
+      if (elation.utils.isString(obj)) {
+        proxyobj = this.room.jsobjects[obj];
+      }
+      if (proxyobj) {
+        //var realobj = this.room.getObjectFromProxy(proxyobj);
+        var realobj = proxyobj._target;
+        if (realobj) {
+          this.remove(realobj);
+        }
+      }
+    }
   }, elation.engine.things.player);
 });

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

-- Response ended

-- Page fetched on Sun Jun 2 16:42:13 2024