Skip to content

Commit

Permalink
#119 Adapted loadModel to include new world/instances
Browse files Browse the repository at this point in the history
  • Loading branch information
filippomc committed Nov 6, 2019
1 parent 88ebdfd commit 4394500
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions js/common/Manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,12 @@ define(function (require) {

console.time(GEPPETTO.Resources.CREATING_INSTANCES);
GEPPETTO.trigger(GEPPETTO.Events.Show_spinner, GEPPETTO.Resources.CREATING_INSTANCES);
// build instance tree here (instance tree will be populated with state info for each experiment)
window.Instances = GEPPETTO.ModelFactory.createInstances(window.Model);

// Initialize instances with static instances already present in the model
window.Instances = window.Model.getDefaultWorld().getInstances();
// add dynamic instance tree (instance tree will be populated with state info for each experiment)
window.Instances.push.apply(window.Instances, GEPPETTO.ModelFactory.instantiateVariables(window.Model));

this.augmentInstancesArray(window.Instances);
console.timeEnd(GEPPETTO.Resources.CREATING_INSTANCES);

Expand Down

0 comments on commit 4394500

Please sign in to comment.