2
0
Эх сурвалжийг харах

TimerNode add DELTA scope

sunag 7 жил өмнө
parent
commit
6ccb95763f

+ 7 - 0
examples/js/nodes/utils/TimerNode.js

@@ -13,6 +13,7 @@ THREE.TimerNode = function ( scope, scale ) {
 
 THREE.TimerNode.GLOBAL = 'global';
 THREE.TimerNode.LOCAL = 'local';
+THREE.TimerNode.DELTA = 'delta';
 
 THREE.TimerNode.prototype = Object.create( THREE.FloatNode.prototype );
 THREE.TimerNode.prototype.constructor = THREE.TimerNode;
@@ -28,6 +29,12 @@ THREE.TimerNode.prototype.updateFrame = function ( frame ) {
 
 			break;
 
+		case THREE.TimerNode.DELTA:
+
+			this.number = frame.delta * this.scale;
+
+			break;
+
 		default:
 
 			this.number = frame.time * this.scale;