youmustfight / aframe-asset-lazy-load

An a-entity component to assign asset loading order and delays
https://youmustfight.github.io/aframe-asset-lazy-load/
MIT License
12 stars 6 forks source link

Keep lazy-load assignments in <a-assets> #7

Open youmustfight opened 8 years ago

youmustfight commented 8 years ago

How I've made this has gone through some evolutions.

The first change was ditching management of loading in components. I realized a concept like chunking would require an order to be handled outside the component itself. The second change I feel coming depends on how people may prefer to work.

Would people rather define their assets in entities, and have them load at a later time? Or would they rather define them in , and mutate their data at a later point? I have a feeling the latter may be easier to manage, especially if assets can even be grouped with the container element getting the lazy-load chunk definition. Then you might not even have to worry about IDs

(My original reason for appending assets late, was because I had streams of warnings pop up when they existed with IDs corresponding to entities, but had no source. I believe at times even when the src would be added, the entity may not have been updated)

cvan commented 8 years ago

Awesome work, glad you're thinking about this.

In improving A-Frame's loading, we're considering making this small change: enable preloading via sync blocking of any assets defined in <a-assets>: aframe/issues/873

Feel free to chat with us about your experiences, preferences, use cases, etc. - either on GitHub or Slack. Thanks!