Explorar el Código

renamed getElementIndex to getIndexByElement

SUNAG hace 9 años
padre
commit
694962ca3c
Se han modificado 2 ficheros con 3 adiciones y 3 borrados
  1. 1 1
      examples/js/nodes/BuilderNode.js
  2. 2 2
      examples/js/nodes/utils/SwitchNode.js

+ 1 - 1
examples/js/nodes/BuilderNode.js

@@ -136,7 +136,7 @@ THREE.BuilderNode.prototype = {
 
 	},
 
-	getElementIndex : function( elm ) {
+	getIndexByElement : function( elm ) {
 
 		return THREE.BuilderNode.elements.indexOf( elm );
 

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

@@ -36,7 +36,7 @@ THREE.SwitchNode.prototype.generate = function( builder, output ) {
 
 	for ( i = 0; i < len; i ++ ) {
 
-		outputLength = Math.max( outputLength, builder.getElementIndex( this.component.charAt( i ) ) );
+		outputLength = Math.max( outputLength, builder.getIndexByElement( this.component.charAt( i ) ) );
 
 	}
 
@@ -49,7 +49,7 @@ THREE.SwitchNode.prototype.generate = function( builder, output ) {
 	for ( i = 0; i < len; i ++ ) {
 
 		var elm = this.component.charAt( i );
-		var idx = builder.getElementIndex( this.component.charAt( i ) );
+		var idx = builder.getIndexByElement( this.component.charAt( i ) );
 
 		if ( idx > outputLength ) idx = outputLength;