pex-renderer icon indicating copy to clipboard operation
pex-renderer copied to clipboard

[glTF] Load buffers and images in parallel

Open dmnsgn opened this issue 4 years ago • 1 comments

As convenient as it is, a for-of loop will run sequentially. Need to use:

   await Promise.all(images.map(async (image) => {
    await loadImage(image)
   // ...
  }));

https://github.com/pex-gl/pex-renderer/blob/ed823d46117089996a63fdec02a74650ba6e7cc0/loaders/glTF.js#L916-L942

https://github.com/pex-gl/pex-renderer/blob/ed823d46117089996a63fdec02a74650ba6e7cc0/loaders/glTF.js#L882-L892

dmnsgn avatar May 05 '21 15:05 dmnsgn

Revisit when refactoring glt loader. Pushed to v5

vorg avatar Aug 30 '23 14:08 vorg