MozillaReality / puzzle-rain

INACTIVE - A musical WebVR journey for the HTC Vive. Brought to you by Mozilla VR.
https://vr.mozilla.org/puzzle-rain/
MIT License
33 stars 11 forks source link

Progressively load assets on as-needed basis #90

Closed cvan closed 2 months ago

cvan commented 7 years ago

In App.js all of the modules are imported at the same time, which consequently fires off a bunch of XHRs for models, audio, textures, etc - all the assets.

This results in a grand total of 193 HTTP requests at once. That enough XHRs on the main thread is enough to crash most low-end machines, especially mobile devices (which I understand is not our target); it's just something worth mentioning.

Culprit of issues #77 and #86. But, the main one was blocking on audio loading. This can come as an enhancement much later.

cvan commented 7 years ago

https://github.com/mrdoob/three.js/issues/4248#issuecomment-125244327 has some good concepts.