Skip to content

Commit

Permalink
Patch to resolve mapping issue on skinned meshes (google#2799)
Browse files Browse the repository at this point in the history
  • Loading branch information
SrirachaSource authored Sep 16, 2021
1 parent 9c3ad07 commit 08497c7
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,12 @@ export class PrimitiveNode extends Node {
console.error('Expected type \'nodes\' but got ' + nodes);
}
// Gets the mesh index from the node.
const meshIndex = ((gltf[nodes] || []) as GLTFNode[])[nodeIndex].mesh!;
let meshIndex = ((gltf[nodes] || []) as GLTFNode[])[nodeIndex].mesh!;
if (meshIndex == null) {
// TODO: Resolve incorrect associations in Three with associations
// updates, issue result in a mesh being mapped as a node.
meshIndex = nodeIndex;
}
// The gltf mesh array to sample from.
const meshElementArray = gltf['meshes'] || [];
// List of primitives under the mesh.
Expand Down

0 comments on commit 08497c7

Please sign in to comment.