Skip to content

Commit

Permalink
Make sure Simulator opts is updated after configure
Browse files Browse the repository at this point in the history
  • Loading branch information
angelxuanchang committed Feb 1, 2019
1 parent 3735e53 commit 5fa5e67
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion client/js/lib/sim/Simulator.js
Original file line number Diff line number Diff line change
@@ -760,6 +760,8 @@ Simulator.prototype.configure = function (opts) {
if (opts.modifications) {
this.__modifications = opts.modifications; // Modifications to be made to the scene
}
// Update opts
this.opts = res;
return _.omit(res, __optsToIgnore);
};

@@ -848,7 +850,7 @@ Simulator.prototype.__loadScene = function (opts, callback) {
// TODO: enforce recompute false = no recomputation, only use precomputed
// recompute undefined = use precomputed, recompute as needed
}
if (this.opts.scene && this.opts.scene.fullId.startsWith("mp3d")) {
if (opts.scene && opts.scene.fullId && opts.scene.fullId.startsWith("mp3d")) {
preloads.push('objectInstanceMaterials');
}
//console.log('got preloads', preloads);

0 comments on commit 5fa5e67

Please sign in to comment.