repo: janusweb action: commit revision: path_from: revision_from: c42fcf0d4cd534ab558292eb46f42ecbe4eac984: path_to: revision_to:
commit c42fcf0d4cd534ab558292eb46f42ecbe4eac984 Author: James BaicoianuDate: 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
--- 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-----