title: Multiple GLTF loading and Merging on server side
body: <p>We are trying to merge multiple GLTFs on server side and export the merged gltf as final result on server.</p>
  <p>Things we have trued that worked and that didn't:</p>
  <ol>
  <li><p>We have used three js GLTFLoader parse method to load multiple gltf files, merge the parent and children of the loaded objects and export the final model using GLTFExporter.</p>
  </li>
  <li><p>We have used jsdom to resolve the issues related to window, document etc.</p>
  </li>
  <li><p>Above mentioned points work for gltfs without textures</p>
  </li>
  <li><p>While Loading GLTF with textures the response gets stuck.</p>
  <p>a) We tried hosting the files on server and use the GLTFLoader load method with &quot;localhost:******&quot; as loader path.</p>
  <p>b) Internally TextureLoader invoked ImageLoader where the onLoad event was not getting triggered at all . May be jsdom was not invoking this.</p>
  <p>c) To solve this we changed ImageLoader to have canvas image :</p>
  </li>
  </ol>
  <pre><code>        const { Image } = require(&quot;canvas&quot;);
          const image = new Image();
          image.onload = onImageLoad;
          image.onerror = onImageError;
  </code></pre>
  <p>d) The load method got resolved after above change.</p>
  <p>e) Next step - Exporting the GLTF - We got stuck due to ImageData not found error. We added ImageData from canvas and the GLTF was exported.</p>
  <p>f) The exported GLTF is not viewable die to corrupted data in images</p>
  <pre><code> &quot;images&quot;: [
      {
        &quot;mimeType&quot;: &quot;image/png&quot;,
        &quot;uri&quot;: &quot;data:,&quot;
      }
    ],
  </code></pre>
  <p>If someone loaded and merged GLTfs with texture images purely server side, Please Help!</p>