浏览代码

timeSscale is first argument in TimerNode

sunag 7 年之前
父节点
当前提交
c955d3ae8c
共有 2 个文件被更改,包括 3 次插入3 次删除
  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
 				),