Преглед на файлове

simplify preprocessor, no need for reserve if I use pop.

Ben Houston преди 9 години
родител
ревизия
0951f96153
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      src/renderers/webgl/WebGLShaderPreProcessor.js

+ 2 - 2
src/renderers/webgl/WebGLShaderPreProcessor.js

@@ -22,9 +22,9 @@ THREE.WebGLShaderPreProcessor.compile = function() {
         var includeFileName = matcheInclude[1];
         var includeChunk = includeResolver( includeFileName );
         if( ! includeChunk ) throw new Error( "can not find include file for line: " + line );
-        var includeLines = includeChunk.split( '\n' ).reverse();
+        var includeLines = includeChunk.split( '\n' );
         while( includeLines.length > 0 ) {
-          lines.unshift( includeLines.shift() );
+          lines.unshift( includeLines.pop() );
         }
       }
       else {