فهرست منبع

Fix for exceptions when loading morph animations with starting weight of 0

Michael Dahrea 8 سال پیش
والد
کامیت
ae40bbf87e
2فایلهای تغییر یافته به همراه5 افزوده شده و 1 حذف شده
  1. 1 1
      loaders/src/glTF/2.0/babylon.glTFLoader.ts
  2. 4 0
      src/Morph/babylon.morphTargetManager.ts

+ 1 - 1
loaders/src/glTF/2.0/babylon.glTFLoader.ts

@@ -712,7 +712,7 @@ module BABYLON.GLTF2 {
         babylonMesh.computeWorldMatrix(true);
 
         // Set morph target manager after all vertices data has been processed
-        if (morphTargetManager !== undefined && morphTargetManager.numInfluencers > 0) {
+        if (morphTargetManager !== undefined && morphTargetManager.numTargets > 0) {
             babylonMesh.morphTargetManager = morphTargetManager;
         }
 

+ 4 - 0
src/Morph/babylon.morphTargetManager.ts

@@ -38,6 +38,10 @@ module BABYLON {
             return this._supportsTangents;
         }
 
+        public get numTargets(): number {
+            return this._targets.length;
+        }
+
         public get numInfluencers(): number {
             return this._activeTargets.length;
         }