webaverse-studios / CharacterCreator

3D Avatar Creator for Everyone
https://moemate.io
MIT License
84 stars 47 forks source link

Prefetch assets and then pass blobURL to three.js loaders #268

Open soulofmischief opened 1 year ago

soulofmischief commented 1 year ago

Currently, urls are sent directly to three.js loaders. Unfortunately, they do not support request cancelling. Therefore, we should first use fetch/etc to retrieve the asset, then create a blob URL which the loaders can ingest. This will allow better request lifecycle handling, as well future as optimization strategies such as streaming LODs.

My first attempt at this revealed strange bugs, needs further investigation.