From 8174d3e69c0335a8185b9b884385d1033472abe0 Mon Sep 17 00:00:00 2001 From: George Michael Brower Date: Tue, 19 Apr 2011 21:16:37 -0700 Subject: [PATCH] Restored default step --- docs/demo.js | 4 ++-- src/DAT/GUI/ControllerNumber.js | 10 +++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/docs/demo.js b/docs/demo.js index a98469b..359e637 100644 --- a/docs/demo.js +++ b/docs/demo.js @@ -6,8 +6,8 @@ function FizzyText(message) { // Notice they're all defined with "this". That makes them public. // Otherwise, gui-dat can't see them. - this.growthSpeed = 0.5; // how fast do particles change size? - this.maxSize = 3.2; // how big can they get? + this.growthSpeed = 0.2; // how fast do particles change size? + this.maxSize = 5.59; // how big can they get? this.noiseStrength = 10; // how turbulent is the flow? this.speed = 0.4; // how fast do particles move? this.displayOutline = false; // should we draw the message as a stroke? diff --git a/src/DAT/GUI/ControllerNumber.js b/src/DAT/GUI/ControllerNumber.js index 84026f1..db45315 100644 --- a/src/DAT/GUI/ControllerNumber.js +++ b/src/DAT/GUI/ControllerNumber.js @@ -80,7 +80,15 @@ DAT.GUI.ControllerNumber = function() { }; this.getStep = function() { - return step || 1; + if (step == undefined) { + if (max != undefined && min != undefined) { + return (max-min)/100; + } else { + return 1; + } + } else { + return step; + } } var numberField = document.createElement('input');