repo: janusweb
action: commit
revision: 
path_from: 
revision_from: ea21a502802e96a5f0cd1c4e2834843ff361dd6b:
path_to: 
revision_to: 
git.thebackupbox.net
janusweb
git clone git://git.thebackupbox.net/janusweb
commit ea21a502802e96a5f0cd1c4e2834843ff361dd6b
Author: James Baicoianu 
Date:   Mon Jul 13 11:34:12 2020 -0700

    Added `player.spawnPortal(url)`

diff --git a/scripts/janusplayer.js b/scripts/janusplayer.js
index ac9463c94847a66924f1afab0cc92464fad39e2b..
index ..651dfc21f416762cec0ec6be093d829896bfab82 100644
--- a/scripts/janusplayer.js
+++ b/scripts/janusplayer.js
@@ -968,5 +968,15 @@ elation.require(['engine.things.player', 'janusweb.external.JanusVOIP', 'ui.butt
         this.engine.systems.render.setdirty();
       }
     }
+    this.spawnPortal = function(url) {
+      room.createObject('link', {
+        pos: this.localToWorld(V(0, 0, -2)),
+        zdir: this.dir.clone(),
+        url: url,
+        sync: true,
+        round: true,
+        shader_id: 'defaultportal',
+      });
+    }
   }, elation.engine.things.player);
 });

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