浏览代码

last fixes per Popovs review

Andrew V Butt Sr 5 年之前
父节点
当前提交
6581f45b8d
共有 1 个文件被更改,包括 9 次插入7 次删除
  1. 9 7
      src/Debug/skeletonViewer.ts

+ 9 - 7
src/Debug/skeletonViewer.ts

@@ -402,15 +402,17 @@ export class SkeletonViewer {
         const initialMeshBoneIndices = mesh.getVerticesData(VertexBuffer.MatricesIndicesKind);
         const initialMeshBoneIndices = mesh.getVerticesData(VertexBuffer.MatricesIndicesKind);
         const initialMeshBoneWeights = mesh.getVerticesData(VertexBuffer.MatricesWeightsKind);
         const initialMeshBoneWeights = mesh.getVerticesData(VertexBuffer.MatricesWeightsKind);
         this._boneIndices = new Set();        
         this._boneIndices = new Set();        
-  
-        if (initialMeshBoneIndices && initialMeshBoneWeights) {
-            for (let i = 0; i < initialMeshBoneIndices.length; ++i) {
-                const index = initialMeshBoneIndices[i], weight = initialMeshBoneWeights[i];
-                if (weight !== 0) {
-                    this._boneIndices.add(index);
+        
+        if (!options.useAllBones) {
+            if (initialMeshBoneIndices && initialMeshBoneWeights) {
+                for (let i = 0; i < initialMeshBoneIndices.length; ++i) {
+                    const index = initialMeshBoneIndices[i], weight = initialMeshBoneWeights[i];
+                    if (weight !== 0) {
+                        this._boneIndices.add(index);
+                    }
                 }
                 }
             }
             }
-        }        
+        }       
 
 
         /* Create Utility Layer */
         /* Create Utility Layer */
         this._utilityLayer = new UtilityLayerRenderer(this._scene, false);
         this._utilityLayer = new UtilityLayerRenderer(this._scene, false);