Skip to content

Commit

Permalink
don't use callbacks when running just the model
Browse files Browse the repository at this point in the history
  • Loading branch information
stepheneb committed Oct 28, 2011
1 parent c065d2c commit f8c4f24
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion avalanche2d.html
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,17 @@ <h3>Folder-Desk Data Array:</h3>
initial_model_loop_time = model_loop_time;
model_loop_goal = model_loop_time * model_loop_bump_factor;
animmation_loop_timing = aloop_minimum;
modelRunRequest = requestAnimFrame(runModelLoop, visualizations);
if (show_visualization.checked || show_graph.checked || show_data_table.checked) {
modelRunRequest = requestAnimFrame(runModelLoop, visualizations);
} else {
while (model.indexOfStep < max_model_step) {
model.nextStep();
graph_data.push(model.averageFolders);
};
step_time = +new Date();
modelStop();
}
avalanche2d.displayFolderTable(folder_data, model);
}
};

Expand Down

0 comments on commit f8c4f24

Please sign in to comment.