repo: janusweb
action: commit
revision: 
path_from: 
revision_from: 08dd6c55d0fc7c7f9241e3edf22e03daf3afc2c8:
path_to: 
revision_to: 
git.thebackupbox.net
janusweb
git clone git://git.thebackupbox.net/janusweb
commit 08dd6c55d0fc7c7f9241e3edf22e03daf3afc2c8
Author: James Baicoianu 
Date:   Mon Sep 24 17:06:29 2018 -0700

    Fixed leap hand finger positions

diff --git a/media/assets/webui/apps/transporter/transporter.css b/media/assets/webui/apps/transporter/transporter.css
new file mode 100644
index 0000000000000000000000000000000000000000..36d6d6676a29d3bb630ea5ba3a51c8edd2586a93
--- /dev/null
+++ b/media/assets/webui/apps/transporter/transporter.css
@@ -0,0 +1,46 @@
+janus-ui-transporter {
+  display: flex;
+  width: 50em;
+  height: 30em;
+  overflow-y: auto;
+}
+.transporter_highfidelity {
+}
+janus-ui-transporter a.transporter_highfidelity {
+  text-decoration: none;
+  display: flex;
+  flex-direction: column;
+  position: relative;
+}
+.transporter_highfidelity img {
+  width: 100%;
+  display: block;
+  margin: 0 auto;
+  flex: 0;
+}
+.transporter_highfidelity p {
+  font-size: .8em;
+  flex: 1;
+  height: 3em;
+  text-overflow: ellipsis;
+  overflow: hidden;
+}
+.transporter_highfidelity .online {
+  display: block;
+  flex: 0;
+  font-size: .8em;
+}
+.transporter_highfidelity .online::before {
+  display: inline-block;
+  content: '';
+  background: url(https://www.futuresoft.co.za/wp-content/uploads/2014/10/users-icon-white.png);
+  background-size: cover;
+  width: 1.5em;
+  height: 1.5em;
+  vertical-align: middle;
+  margin-right: .6em;
+}
+.transporter_highfidelity .online::after {
+  content: ' users online';
+}
+
diff --git a/media/assets/webui/apps/transporter/transporter.html b/media/assets/webui/apps/transporter/transporter.html
new file mode 100644
index 0000000000000000000000000000000000000000..2b1785edc467dc7acc67cc55cff218833f745da5
--- /dev/null
+++ b/media/assets/webui/apps/transporter/transporter.html
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
+  
+  
+  
+    
+    
+  
+  
+    
+    
+  
+  
+    
+    
+  
+
diff --git a/media/assets/webui/apps/transporter/transporter.js b/media/assets/webui/apps/transporter/transporter.js
new file mode 100644
index 0000000000000000000000000000000000000000..2124f3dfede6effc397187afcaaf53dc10ffe807
--- /dev/null
+++ b/media/assets/webui/apps/transporter/transporter.js
@@ -0,0 +1,43 @@
+elation.elements.define('janus.ui.transporter', class extends elation.elements.base {
+  create() {
+    this.elements = elation.elements.fromTemplate('janus.ui.transporter', this);
+  }
+});
+janus.registerElement('transporter', {
+  create() {
+    this.model = this.createObject('Object', {
+      id: 'https://poly.googleapis.com/downloads/eMZR7X-ZjoH/37kyGBjzyky/model.obj',
+      pos: V(0,1.75,0),
+      collision_id: 'https://poly.googleapis.com/downloads/eMZR7X-ZjoH/37kyGBjzyky/model.obj',
+    });
+
+    this.model.addEventListener('click', (ev) => this.handleClick(ev));
+    this.model.addEventListener('touchend', (ev) => this.handleTouchEnd(ev));
+  },
+  openWindow() {
+    if (!this.window) {
+      this.window = elation.elements.create('ui.window', {
+        center: true,
+        title: 'Metaverse Transporter',
+        append: document.body,
+        width: '50em'
+      });
+      console.log(this.window);
+      this.window.setcontent('');
+    }
+    this.window.show();
+    player.disable();
+  },
+  handleClick(ev) {
+console.log('I did a click');
+console.log(ev.button);
+    if (ev.button == 0) {
+      this.openWindow();
+    }
+  },
+  handleTouchEnd(ev) {
+    if (ev.touches.length == 0) {
+      this.openWindow();
+    }
+  }
+});
diff --git a/media/assets/webui/apps/transporter/transporter.json b/media/assets/webui/apps/transporter/transporter.json
new file mode 100644
index 0000000000000000000000000000000000000000..6f43403dfea627fc0d2956e824dca52621145d35
--- /dev/null
+++ b/media/assets/webui/apps/transporter/transporter.json
@@ -0,0 +1,14 @@
+{
+  "templates": {
+    "janus.ui.transporter": "./transporter.html",
+    "janus.ui.transporter.highfidelity": "./transporter_highfidelity.html",
+    "janus.ui.transporter.sansar": "./transporter_sansar.html",
+    "janus.ui.transporter.vrchat": "./transporter_vrchat.html"
+  },
+  "scripts":  ["./transporter.js"],
+  "css":      ["./transporter.css"],
+  "components": [
+    "janus-ui-transporter"
+  ]
+}
+
diff --git a/media/assets/webui/apps/transporter/transporter_highfidelity.html b/media/assets/webui/apps/transporter/transporter_highfidelity.html
new file mode 100644
index 0000000000000000000000000000000000000000..1794568e325472185905c81deeab3db817deb31c
--- /dev/null
+++ b/media/assets/webui/apps/transporter/transporter_highfidelity.html
@@ -0,0 +1,6 @@
+
+  
+  

{place_name}

+

{#description}{description}{:else}(no description){/description}

+

{details.concurrency}

+
diff --git a/media/assets/webui/apps/transporter/transporter_sansar.html b/media/assets/webui/apps/transporter/transporter_sansar.html new file mode 100644 index 0000000000000000000000000000000000000000..83636be122f58c13160bae2bbd1afa1bb88d0b96 --- /dev/null +++ b/media/assets/webui/apps/transporter/transporter_sansar.html @@ -0,0 +1,7 @@ + + +

{name}

+

{#description}{description}{:else}(no description){/description}

+

{headCount}

+
+ diff --git a/media/assets/webui/apps/transporter/transporter_vrchat.html b/media/assets/webui/apps/transporter/transporter_vrchat.html new file mode 100644 index 0000000000000000000000000000000000000000..1bdd98b96fd0442b515f9cd9c15302db0b07983c --- /dev/null +++ b/media/assets/webui/apps/transporter/transporter_vrchat.html @@ -0,0 +1,7 @@ + + +

{name}

+

{#description}{description}{:else}(no description){/description}

+

{occupants}

+
+ diff --git a/scripts/janusplayer.js b/scripts/janusplayer.js
index 160d242e4803db7d3d69bada76fed6008585690b..
index ..c1263d8f097095073ca9dd535122db49616beb8e 100644
--- a/scripts/janusplayer.js
+++ b/scripts/janusplayer.js
@@ -219,12 +219,12 @@ elation.require(['engine.things.player', 'janusweb.external.JanusVOIP', 'ui.butt
                 this.hands.left.zdir.normalize();
               }

-              if (hands.left.fingerTips) {
-                this.localToWorld(this.hands.left.p0.copy(hands.left.fingerTips[0]));
-                this.localToWorld(this.hands.left.p1.copy(hands.left.fingerTips[1]));
-                this.localToWorld(this.hands.left.p2.copy(hands.left.fingerTips[2]));
-                this.localToWorld(this.hands.left.p3.copy(hands.left.fingerTips[3]));
-                this.localToWorld(this.hands.left.p4.copy(hands.left.fingerTips[4]));
+              if (hands.left.fingers) {
+                this.hands.left.p0.copy(hands.left.fingers[0].fingertip.getWorldPosition());
+                this.hands.left.p1.copy(hands.left.fingers[1].fingertip.getWorldPosition());
+                this.hands.left.p2.copy(hands.left.fingers[2].fingertip.getWorldPosition());
+                this.hands.left.p3.copy(hands.left.fingers[3].fingertip.getWorldPosition());
+                this.hands.left.p4.copy(hands.left.fingers[4].fingertip.getWorldPosition());
               }
             }
             if (hands.right && hands.right.position) {
@@ -246,12 +246,12 @@ elation.require(['engine.things.player', 'janusweb.external.JanusVOIP', 'ui.butt
                 this.hands.right.zdir.normalize();
               }

-              if (hands.right.fingerTips) {
-                this.localToWorld(this.hands.right.p0.copy(hands.right.fingerTips[0]));
-                this.localToWorld(this.hands.right.p1.copy(hands.right.fingerTips[1]));
-                this.localToWorld(this.hands.right.p2.copy(hands.right.fingerTips[2]));
-                this.localToWorld(this.hands.right.p3.copy(hands.right.fingerTips[3]));
-                this.localToWorld(this.hands.right.p4.copy(hands.right.fingerTips[4]));
+              if (hands.right.fingers) {
+                this.hands.right.p0.copy(hands.right.fingers[0].fingertip.getWorldPosition());
+                this.hands.right.p1.copy(hands.right.fingers[1].fingertip.getWorldPosition());
+                this.hands.right.p2.copy(hands.right.fingers[2].fingertip.getWorldPosition());
+                this.hands.right.p3.copy(hands.right.fingers[3].fingertip.getWorldPosition());
+                this.hands.right.p4.copy(hands.right.fingers[4].fingertip.getWorldPosition());
               }
             }
           }

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