Browse Source

The Spinner exposes a "speed" field to the editor, but doesn't actually use it. This makes the update method use the speed variable.

Ken Paulson 8 years ago
parent
commit
efe6435763
1 changed files with 2 additions and 3 deletions
  1. 2 3
      Basic2D/JavaScript/Resources/Components/Spinner.js

+ 2 - 3
Basic2D/JavaScript/Resources/Components/Spinner.js

@@ -9,8 +9,7 @@ exports.component = function(self) {
     //update function calls each frame
     self.update = function(timeStep) {
         //roll a node
-        self.node.roll(timeStep * 100);
-
+        self.node.roll(timeStep * 100 * self.speed);
     };
 
-};
+};