TimerNode.js 416 B

123456789101112131415161718192021
  1. /**
  2. * @author sunag / http://www.sunag.com.br/
  3. */
  4. THREE.TimerNode = function( value ) {
  5. THREE.FloatNode.call( this, value );
  6. this.requestUpdate = true;
  7. this.scale = 1;
  8. };
  9. THREE.TimerNode.prototype = Object.create( THREE.FloatNode.prototype );
  10. THREE.TimerNode.prototype.constructor = THREE.TimerNode;
  11. THREE.TimerNode.prototype.updateAnimation = function( delta ) {
  12. this.number += delta * this.scale;
  13. };