title: Three.js r87 combine textures
body: <p>I have NxN matrix of textures (N=2):</p>
  
  <pre><code>-----------------
  |       |       |
  |  1,1  |  1,2  |
  |       |       |
  -----------------
  |       |       |
  |  2,1  |  2,2  |
  |       |       |
  -----------------
  </code></pre>
  
  <p>where textures are images loaded with:</p>
  
  <pre><code>var promises = [];
  urls.forEach(function(url) {
      var deferred = async.defer();
      var loader = new THREE.TextureLoader();
      loader.load(url, deferred.resolve);
      promises.push(deferred.promise);
  });
  // then textures are stored in 'textures' array
  </code></pre>
  
  <p>and <code>urls</code> is ordered array of url to retrieve images.</p>
  
  <p>What I would obtain is a single <code>PlaneBufferGeometry</code> with a texture as a combination of alla textures, as showed above.</p>
  
  <p>For now I'm creating NxN geometries, and then align them in the correct way, but I suppose that this is not the right way to do this.</p>
  
  <p>Current version:</p>
  
  <pre><code>var geometries = [];
  for (var i = 0; i &lt; N*N; i++) {
      geometries.push(new THREE.PlaneBufferGeometry(dim, dim, w, h));
  }
  
  for (var i = 0; i &lt; N; i++) {
      for (var j = 0; j &lt; N; j++) {
          var mesh = new THREE.Mesh(geometries[i * N + j], THREE.MeshBasicMaterial({ map: textures[i * N + j] }));
          // ...now set mesh position accordingly with i and j
          scene.add(mesh);
      }
  }
  </code></pre>
  
  <p>I'm not sure about the <strong>correct way</strong>: one texture combined? one material with multiple textures? One mesh with multiple materials? Multiple geometries, then merged?</p>
  
  <p>There are similar questions, but I have not found a solution for this case.</p>
  
  <p>Thanks.</p>