Procházet zdrojové kódy

WebGLRenderer: Fixed disableAttributes disabling strings instead of integers.

Mr.doob před 12 roky
rodič
revize
d201f6ea1e
1 změnil soubory, kde provedl 4 přidání a 4 odebrání
  1. 4 4
      src/renderers/WebGLRenderer.js

+ 4 - 4
src/renderers/WebGLRenderer.js

@@ -3018,12 +3018,12 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 
 	function disableAttributes() {
 	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;
 
 
 			}
 			}
 
 

粤ICP备19079148号