Skip to content

Commit

Permalink
Merge pull request #59 from StatikTUM/feature/steps-per-sec
Browse files Browse the repository at this point in the history
Change timesteps/sec
  • Loading branch information
oberbichler committed Aug 6, 2020
2 parents a5ecae6 + c69e6d0 commit 9e02c43
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions nfem/visualization/canvas_3d_html.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@
nodal_results: 'None',
element_results: 'None',
custom: true,
ms_per_timestep: 500,
timestep_per_sec: 2.0,
loop: true,
reverse: false,
};
Expand Down Expand Up @@ -548,12 +548,12 @@
gui.Register({
type: 'range',
label: 'ms/timestep',
min: 0, max: 2000, step: 1,
object: settings, property: "ms_per_timestep",
label: 'timesteps/sec',
min: 0.5, max: 60, step: 0.1,
object: settings, property: "timestep_per_sec",
onChange: (data) => {
clearInterval(animationTimer);
animationTimer = setInterval(animate, data);
animationTimer = setInterval(animate, 1000 / data);
}
});
Expand All @@ -579,7 +579,7 @@
d3.select("#start").on("click", function () {
clearInterval(animationTimer);
animationTimer = setInterval(animate, settings.ms_per_timestep);
animationTimer = setInterval(animate, 1000 / settings.timestep_per_sec);
});
d3.select("#stop").on("click", function () {
Expand Down

0 comments on commit 9e02c43

Please sign in to comment.