Skip to content

Commit

Permalink
Merge pull request #5854 from AnalyticalGraphicsInc/update-gltf-pipel…
Browse files Browse the repository at this point in the history
…ine-files

Update GltfPipeline ForEach and addDefaults
  • Loading branch information
lilleyse authored Sep 28, 2017
2 parents 1228a5e + 63f2052 commit b59f527
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Source/ThirdParty/GltfPipeline/ForEach.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ define([

/**
* Contains traversal functions for processing elements of the glTF hierarchy.
* @constructor
*/
function ForEach() {}
var ForEach = {};

ForEach.object = function(arrayOfObjects, handler) {
if (defined(arrayOfObjects)) {
Expand Down Expand Up @@ -211,5 +210,6 @@ define([
ForEach.texture = function(gltf, handler) {
ForEach.topLevel(gltf, 'textures', handler);
};

return ForEach;
});
10 changes: 2 additions & 8 deletions Source/ThirdParty/GltfPipeline/addDefaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -384,14 +384,8 @@ define([
}

function selectDefaultScene(gltf) {
var scenes = gltf.scenes;

if (!defined(gltf.scene)) {
var scenesLength = scenes.length;
for (var sceneId = 0; sceneId < scenesLength; sceneId++) {
gltf.scene = sceneId;
break;
}
if (defined(gltf.scenes) && !defined(gltf.scene)) {
gltf.scene = 0;
}
}

Expand Down

0 comments on commit b59f527

Please sign in to comment.