Browse Source

WebGLRenderer: Fixed disableAttributes disabling strings instead of integers.

Mr.doob 11 years ago
parent
commit
d201f6ea1e
1 changed files with 4 additions and 4 deletions
  1. 4 4
      src/renderers/WebGLRenderer.js

+ 4 - 4
src/renderers/WebGLRenderer.js

@@ -3018,12 +3018,12 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 	function disableAttributes() {
 
-		for ( var attribute in _enabledAttributes ) {
+		for ( var i = 0, l = _enabledAttributes.length; i < l; i ++ ) {
 
-			if ( _enabledAttributes[ attribute ] === 1 ) {
+			if ( _enabledAttributes[ i ] === 1 ) {
 
-				_gl.disableVertexAttribArray( attribute );
-				_enabledAttributes[ attribute ] = 0;
+				_gl.disableVertexAttribArray( i );
+				_enabledAttributes[ i ] = 0;
 
 			}