-- 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: 855d5534d8eeded103a79fff2cd1c4e51b58d425:
path_to:
revision_to:

git.thebackupbox.net

janusweb

git://git.thebackupbox.net/janusweb

commit 855d5534d8eeded103a79fff2cd1c4e51b58d425
Author: James Baicoianu <james_github@baicoianu.com>
Date:   Tue Feb 1 02:16:46 2022 -0800

    I hate my dumb head and body

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

index 58337e3b5134694f94a3bfb70f394c3cf802b2c2..

index ..aedf398d656d7512713a4873984cca339ffc7443 100644

--- a/scripts/janusghost.js
+++ b/scripts/janusghost.js
@@ -238,15 +238,34 @@ elation.require(['janusweb.janusbase', 'engine.things.leapmotion'], function() {
               //rotation: V(0, 180, 0),
               lighting: this.lighting,
               //cull_face: 'none'
+              opacity: 0.9999,
+              renderorder: this.renderorder || 100,
+              shader_chunk_replace: (this.lighting ? {
+                'color_fragment': 'color_fragment_discard_close',
+              } : {}),
             });
             this.face.start();
           } else {
             this.face = headid;
+            this.face.lighting = this.lighting;
+            this.face.opacity = 0.9999;
+            this.face.renderorder = this.renderorder || 100;
+            this.face.shader_chunk_replace = (this.lighting ? {
+              'color_fragment': 'color_fragment_discard_close',
+            } : {});
             this.head.appendChild(headid);
             this.face.start();
           }
-          this.head.pos = headpos.clone().multiplyScalar(this.scale.y);
+          if (scale) {
+            this.face.scale.fromArray(scale);
+            if (this.label) {
+              this.label.scale.fromArray(scale);
+              this.label.pos.multiply(this.label.scale);
+            }
+          }
+          this.head.pos = headpos.clone().multiply(this.face.scale);
           this.face.applyPosition(headpos.negate());
+
           if (this.remotevideo) {
             this.updateVideoScreen();
             this.face.addEventListener('load', (ev) => {
@@ -256,13 +275,7 @@ elation.require(['janusweb.janusbase', 'engine.things.leapmotion'], function() {
           }
         }
         //this.head.properties.position.copy(headpos);
-        if (scale) {
-          this.face.scale.fromArray(scale);
-          if (this.label) {
-            this.label.scale.fromArray(scale);
-            this.label.pos.multiply(this.label.scale);
-          }
-        }
+
       }
     }
     this.setBody = function(bodyid, scale, pos) {
@@ -328,7 +341,7 @@ elation.require(['janusweb.janusbase', 'engine.things.leapmotion'], function() {
             if (this.body.animationmixer) {
               this.cloneAnimations(animasset);
             }
-            this.body.setAnimation('idle');
+            //this.body.setAnimation('idle');
           }
         });
         animasset.load();
@@ -336,7 +349,7 @@ elation.require(['janusweb.janusbase', 'engine.things.leapmotion'], function() {
         if (this.body.animationmixer) {
           this.cloneAnimations(animasset);
         }
-        this.body.setAnimation('idle');
+        //this.body.setAnimation('idle');
       }
     }
     this.cloneAnimations = function(animasset) {
diff --git a/scripts/janusplayer.js b/scripts/janusplayer.js

index 9f5955dca6ac1ba72461c989f0f287510509dfe4..

index ..2847f533655f5e466a139e518222a3930d71177d 100644

--- a/scripts/janusplayer.js
+++ b/scripts/janusplayer.js
@@ -283,10 +283,10 @@ elation.require(['engine.things.player', 'janusweb.external.JanusVOIP', 'ui.butt
           }
         }
         if (this.ghost && !this.decouplehead) {
-          this.ghost.setHeadOrientation(this.head.orientation);
+          this.ghost.setHeadOrientation(this.head.orientation, true);
           if (this.ghost._target.head) {
             //this.ghost._target.face.position.copy(this.head.position);
-            this.ghost.head.orientation.copy(this.head.orientation);
+            this.ghost.head.orientation.copy(this.head.orientation).invert();
           }
         }
       }
@@ -490,7 +490,7 @@ elation.require(['engine.things.player', 'janusweb.external.JanusVOIP', 'ui.butt
               avatar_src: 'data:text/plain,' + encodeURIComponent(avatar),
               showlabel: false,
               //pos: V(0, -this.fatness, 0),
-              //rotation: V(0, 180, 0),
+              rotation: V(0, 180, 0),
               renderorder: 101,
             });
             this.ghost.orientation.set(0,1,0,0);
@@ -654,7 +654,7 @@ elation.require(['engine.things.player', 'janusweb.external.JanusVOIP', 'ui.butt
         avatar_src: 'data:text/plain,' + encodeURIComponent(avatar),
         showlabel: false,
         //pos: V(0, -this.fatness, 0),
-        //rotation: V(0, 180, 0),
+        rotation: V(0, 180, 0),
         renderorder: 101,
       });

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

-- Response ended

-- Page fetched on Sun Jun 2 14:33:19 2024