Explorar o código

timeSscale is first argument in TimerNode

sunag %!s(int64=7) %!d(string=hai) anos
pai
achega
c955d3ae8c
Modificáronse 2 ficheiros con 3 adicións e 3 borrados
  1. 2 2
      examples/js/nodes/utils/TimerNode.js
  2. 1 1
      examples/webgl_sprites_nodes.html

+ 2 - 2
examples/js/nodes/utils/TimerNode.js

@@ -2,12 +2,12 @@
  * @author sunag / http://www.sunag.com.br/
  */
 
-THREE.TimerNode = function ( scope, scale ) {
+THREE.TimerNode = function ( scale, scope ) {
 
 	THREE.FloatNode.call( this );
 
-	this.scope = scope || THREE.TimerNode.GLOBAL;
 	this.scale = scale !== undefined ? scale : 1;
+	this.scope = scope || THREE.TimerNode.GLOBAL;
 
 };
 

+ 1 - 1
examples/webgl_sprites_nodes.html

@@ -215,7 +215,7 @@
 			// horizontal zigzag sprite
 			sprite2.material.transform = new THREE.OperatorNode(
 				new THREE.OperatorNode(
-					new THREE.Math1Node( new THREE.TimerNode( 0, 3 ), THREE.Math1Node.SIN ), // 3 is speed (time scale)
+					new THREE.Math1Node( new THREE.TimerNode( 3 ), THREE.Math1Node.SIN ), // 3 is speed (time scale)
 					new THREE.Vector2Node( .3, 0 ), // horizontal scale (position)
 					THREE.OperatorNode.MUL
 				),