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