Skip to content

Commit

Permalink
demo: Disable animation by default
Browse files Browse the repository at this point in the history
When using auto-LOD mode it can be distracting; we now disable the
animation playback by default, but make it easy to unpause/pause it with
a checkbox.
  • Loading branch information
zeux committed Oct 7, 2024
1 parent d1633d0 commit b2f957b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion demo/simplify.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@

var settings = {
wireframe: false,
animate: false,
pointSize: 1.0,
ratio: 1.0,
debugOverlay: false,
Expand Down Expand Up @@ -108,6 +109,7 @@
var gui = new GUI({ width: 300 });
var guiDisplay = gui.addFolder('Display');
guiDisplay.add(settings, 'wireframe').onChange(update);
guiDisplay.add(settings, 'animate').onChange(update);
guiDisplay.add(settings, 'pointSize', 1, 16).onChange(update);
guiDisplay.add(settings, 'debugOverlay').onChange(simplify); // requires debug data rebuild

Expand Down Expand Up @@ -541,7 +543,7 @@
}

function animate() {
if (mixer) {
if (mixer && settings.animate) {
mixer.update(clock.getDelta());
}

Expand Down

0 comments on commit b2f957b

Please sign in to comment.