Spinner.js 404 B

12345678910111213141516
  1. "atomic component";
  2. //inspector fields to make speed variable visible in editor
  3. var inspectorFields = {
  4. speed: 1.0
  5. };
  6. exports.component = function(self) {
  7. self.update = function(timeStep) {
  8. //rotate current node around Y axis
  9. self.node.yaw(timeStep * 75 * self.speed);
  10. //rotate current node around X axis
  11. self.node.pitch(-timeStep * 25 * self.speed);
  12. };
  13. };