-- 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:
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
--- 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