From 702da01a147e6d9c8e60858fdcadd2fb3b3e5834 Mon Sep 17 00:00:00 2001 From: Brett Camper Date: Fri, 18 Sep 2015 11:29:25 -0400 Subject: [PATCH] disable scene 'include' functionality (merging for the rest of the changes in anticipation of this feature) --- demos/scene.yaml | 2 +- src/scene_loader.js | 38 +++++++++++++++++++------------------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/demos/scene.yaml b/demos/scene.yaml index ac7f9a9c3..70cbdb879 100755 --- a/demos/scene.yaml +++ b/demos/scene.yaml @@ -1,4 +1,4 @@ -include: transit.yaml +# include: transit.yaml cameras: perspective: diff --git a/src/scene_loader.js b/src/scene_loader.js index 247adb5ab..0ef52760c 100644 --- a/src/scene_loader.js +++ b/src/scene_loader.js @@ -1,6 +1,6 @@ import Utils from './utils/utils'; import GLSL from './gl/glsl'; -import {mergeObjects} from './styles/rule'; +// import {mergeObjects} from './styles/rule'; import {StyleManager} from './styles/style_manager'; var SceneLoader; @@ -30,29 +30,29 @@ export default SceneLoader = { then(styles => StyleManager.loadShaderBlocks(styles, path)). // TODO: deprecate remote shader blocks? then(() => { // accept single-string or array - if (typeof config.include === 'string') { - config.include = [config.include]; - } + // if (typeof config.include === 'string') { + // config.include = [config.include]; + // } - if (!Array.isArray(config.include)) { + // if (!Array.isArray(config.include)) { SceneLoader.normalize(config, path); return config; - } + // } // Collect URLs of scenes to include - let includes = []; - for (let url of config.include) { - includes.push(Utils.addBaseURL(url, path)); - } - delete config.include; // don't want to merge this property - - return Promise. - all(includes.map(url => SceneLoader.loadSceneRecursive(url))). - then(configs => { - config = mergeObjects({}, ...configs, config); - SceneLoader.normalize(config, path); - return config; - }); + // let includes = []; + // for (let url of config.include) { + // includes.push(Utils.addBaseURL(url, path)); + // } + // delete config.include; // don't want to merge this property + + // return Promise. + // all(includes.map(url => SceneLoader.loadSceneRecursive(url))). + // then(configs => { + // config = mergeObjects({}, ...configs, config); + // SceneLoader.normalize(config, path); + // return config; + // }); }); }); },