فهرست منبع

Allow negative influences in morph target weights

Gary Hsu 7 سال پیش
والد
کامیت
df6ed1020a
1فایلهای تغییر یافته به همراه4 افزوده شده و 9 حذف شده
  1. 4 9
      src/Morph/babylon.morphTargetManager.ts

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

@@ -103,19 +103,14 @@ module BABYLON {
             this._supportsTangents = true;
             this._vertexCount = 0;
             for (var target of this._targets) {
-                if (target.influence > 0) {
-                    this._activeTargets.push(target);
-                    this._tempInfluences[influenceCount++] = target.influence;
+                this._activeTargets.push(target);
+                this._tempInfluences[influenceCount++] = target.influence;
 
+                const positions = target.getPositions();
+                if (positions) {
                     this._supportsNormals = this._supportsNormals && target.hasNormals;
                     this._supportsTangents = this._supportsTangents && target.hasTangents;
 
-                    const positions = target.getPositions();
-                    if (!positions) {
-                        Tools.Error("Invalid target. Target must positions.");
-                        return;
-                    }
-
                     const vertexCount = positions.length / 3;
                     if (this._vertexCount === 0) {
                         this._vertexCount = vertexCount;