TimerNode.js 450 B

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