repo: janusweb
action: commit
revision: 
path_from: 
revision_from: c42fcf0d4cd534ab558292eb46f42ecbe4eac984:
path_to: 
revision_to: 
git.thebackupbox.net
janusweb
git clone git://git.thebackupbox.net/janusweb
commit c42fcf0d4cd534ab558292eb46f42ecbe4eac984
Author: James Baicoianu 
Date:   Sun Apr 24 00:41:56 2022 -0700

    Apply morphtargets to ghosts from network data

diff --git a/scripts/janusghost.js b/scripts/janusghost.js
index aedf398d656d7512713a4873984cca339ffc7443..
index ..382aef66c348c0aacf8d95b2823d613be2efe00e 100644
--- a/scripts/janusghost.js
+++ b/scripts/janusghost.js
@@ -611,6 +611,15 @@ elation.require(['janusweb.janusbase', 'engine.things.leapmotion'], function() {
           if (isNaN(this.head.orientation.x) || isNaN(this.head.orientation.y) || isNaN(this.head.orientation.z) || isNaN(this.head.orientation.w)) this.head.orientation.set(0,0,0,1);
         }

+        if (movedata.morphtargets) {
+          if (this.body) {
+            let morphtargets = movedata.morphtargets;
+            for (let target in morphtargets) {
+              this.body.setMorphTargetInfluence(target, morphtargets[target]);
+            }
+          }
+        }
+
         this.objects.dynamics.updateState();
         this.refresh();
       }

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