webvr js meetup initial commit
This commit is contained in:
22
node_modules/three/examples/js/nodes/utils/TimerNode.js
generated
vendored
Normal file
22
node_modules/three/examples/js/nodes/utils/TimerNode.js
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* @author sunag / http://www.sunag.com.br/
|
||||
*/
|
||||
|
||||
THREE.TimerNode = function( value, scale ) {
|
||||
|
||||
THREE.FloatNode.call( this, value );
|
||||
|
||||
this.requestUpdate = true;
|
||||
|
||||
this.scale = scale !== undefined ? scale : 1;
|
||||
|
||||
};
|
||||
|
||||
THREE.TimerNode.prototype = Object.create( THREE.FloatNode.prototype );
|
||||
THREE.TimerNode.prototype.constructor = THREE.TimerNode;
|
||||
|
||||
THREE.TimerNode.prototype.updateFrame = function( delta ) {
|
||||
|
||||
this.number += delta * this.scale;
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user