Skip to content

Commit

Permalink
Merge pull request #1460 from xeokit/fix-gltf-material
Browse files Browse the repository at this point in the history
[FIX] Fix `undefined` TypeError for missing glTF material #1458
  • Loading branch information
xeolabs authored Apr 22, 2024
2 parents 050a4dc + c207e89 commit 57e0d73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plugins/GLTFLoaderPlugin/GLTFSceneModelLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ function loadNode(ctx, node, depth, matrix) {
meshCfg.opacity = 1.0;
}

const backfaces = ((ctx.backfaces !== false) || (material.doubleSided !== false));
const backfaces = ((ctx.backfaces !== false) || (material && material.doubleSided !== false));

switch (primitive.mode) {
case 0: // POINTS
Expand Down

0 comments on commit 57e0d73

Please sign in to comment.