Downloading Assets Post Launch

Hi there!

I’m working on a project using 8th Wall and A-Frame where users can scan one of three QR codes to access different experiences within the same project. Each experience has “large” assets that result in long initial load times.,

I’m looking for best practices to:

  1. Load essential assets quickly to reduce initial load time.
  2. Asynchronously download additional assets after the user starts the experience.
  3. Manage assets for three different experiences within one project.
  4. Provide users with feedback during asset loading.

I understand this would probably be custom logic, but wanted to know if something existed with a similar architecture, or atleast in regards to loading the assets from an external source.

Thanks for your help!

Best regards,
Rick W

Hello!

You might be interested in the dynamic assets sample project.

You can create three separate HTML files and then determine which one to load up in app.js (in your case, probably using URL parameters).

Hi Evan!

Thanks for the response, I have attempted to use this but the example provided was at a basic level, for my version where I utilized URL Parameters, I have the scenes successfully swapping, attempting to load a scene with an asset just being loaded seems to run, but once I load a page that includes tap to place/ world tracking capabilities, or any additional features I get this error, sharing below for reference:

Selected scene file: experience-one
[RuntimeError] XR caught an error; stopping. TypeError: null is not an object (evaluating ‘I.projectionMatrix’)
XR threw an exception TypeError: null is not an object (evaluating ‘I.projectionMatrix’)
rescale@https://cdn.8thwall.com/xr-simd-26.0.6.150.js:18:192388 i@https://cdn.8thwall.com/xr-simd-26.0.6.150.js:18:234643 @https://cdn.8thwall.com/xr-simd-26.0.6.150.js:18:78570 reduce@[native code] W@https://cdn.8thwall.com/xr-simd-26.0.6.150.js:18:78533 @https://cdn.8thwall.com/xr-simd-26.0.6.150.js:18:76028 attach@https://cdn.8thwall.com/xr-simd-26.0.6.150.js:18:75197 nA@https://cdn.8thwall.com/xr-simd-26.0.6.150.js:18:82758 @https://cdn.8thwall.com/xr-simd-26.0.6.150.js:18:86159 e@https://cdn.8thwall.com/xr-simd-26.0.6.150.js:1:5193

Edit: I got rid of the component that was affecting this issue, but now I’m stuck in a permanent loading loop, Console Output:

8th Wall XR Version: 26.0.6.150s
Selected scene file: experience-one
%ccore:a-assets:warn %cAsset loading timed out in %c color: orange color: inherit color: orange 3000 ms
%ccomponents:gltf-model:warn %cJSON Parse error: Unrecognized token ‘<’%c color: orange color: inherit color: orange

Edit: Seems like it wasn’t happy with some of the components that would normally be loaded with 1 scene normally, in this case it was the existing buttons in the scene, removing them, got the scene switch functioning, will probably look into reading those now.

1 Like

This topic was automatically closed 4 days after the last reply. New replies are no longer allowed.