Skip to content

Commit

Permalink
demo: fix scene selection dropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
bcamper committed May 4, 2019
1 parent 6ec3d5f commit a24a7a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions demos/app/gui.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,9 @@
}
};

Object.keys(scenes).forEach(function (s) { scenes[s] = JSON.stringify(scenes[s]) }); // need to stringify JSON for dat.gui :(
Object.keys(scenes).forEach(function (s) { scenes[s] = JSON.stringify(scenes[s]); }); // need to stringify JSON for dat.gui :(

scene_key = Object.keys(scenes).filter(function (s) { return JSON.parse(scenes[s]) === scene.config_source })[0]; // find scene from sample list
scene_key = Object.keys(scenes).filter(function (s) { return scenes[s] === JSON.stringify(scene.config_source); })[0]; // find scene from sample list
if (scene_key) {
gui.scene = scenes[scene_key];
}
Expand Down

0 comments on commit a24a7a7

Please sign in to comment.