Skip to content

Commit

Permalink
fix hasSkin default to true
Browse files Browse the repository at this point in the history
  • Loading branch information
shrekshao committed Aug 28, 2017
1 parent 9cb9c47 commit 85492f3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions examples/webgl2-renderer.html
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,7 @@

var hasIndices = true;

var hasSkin = true;
var hasSkin = false;

// var nodeMatrix = new Array(glTF.nodes.length);
// for(i = 0, len = nodeMatrix.length; i < len; i++) {
Expand All @@ -752,7 +752,9 @@

if (hasSkin) {
// @tmp: assume material only use base color
baseColor = primitive.material.pbrMetallicRoughness.baseColorFactor;
if ( primitive.material.pbrMetallicRoughness.baseColorFactor ) {
baseColor = primitive.material.pbrMetallicRoughness.baseColorFactor;
}
} else {

if (primitive.material !== null) {
Expand Down Expand Up @@ -844,7 +846,7 @@
}
// mat4.mul(matrix, parentModelMatrix, node.matrix);


hasSkin = false;
if (node.skin !== null) {
// mesh node with skin
hasSkin = true;
Expand Down

0 comments on commit 85492f3

Please sign in to comment.