Skip to content

Commit

Permalink
Merge pull request x3dom#1315 from x3dom/gltfnull
Browse files Browse the repository at this point in the history
survive null glTF scene.nodes
  • Loading branch information
andreasplesch authored Nov 29, 2023
2 parents 7faae14 + 970dbf3 commit a0601f8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* MSFT_texture_dds
* field values from metadata for non-standard nodes
* Improvements
* allow null value for glTF.scene.nodes
* improved fog over shadows ([dmorehead](https://github.com/dmorehead))
* enable negative scale auto-ccw for BufferGeometry/glTF
* enable shadows for BufferGeometry/glTF
Expand Down
2 changes: 1 addition & 1 deletion src/util/glTF/glTF2Loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ x3dom.glTF2Loader.prototype.load = function ( input, binary )
}

// Get the nodes
for ( var i = 0; i < scene.nodes.length; i++ )
for ( var i = 0; i < ( scene.nodes ? scene.nodes.length : 0 ); i++ )
{
var node = this._gltf.nodes[ scene.nodes[ i ] ];

Expand Down

0 comments on commit a0601f8

Please sign in to comment.