Streaming .bin files at Runtime

It is possible to load assets at runtime using Wonderland’s .bin file, just like you would load a .gltf/.glb file. This will result in faster load times compared to GLTF loading, since it is a binary format and does not need to be parse JSON data. That makes them a good option for applications that make extensive use of runtime assets.

Note: You must be using the same Wonderland Engine version for both packaging and loading of the .bin file.

Packaging a .bin file for streaming 

Open a project you want to load in a runtime and navigate to Views > Project Settings. Under the Project tab, select the packageForStreaming checkbox. Then package your project using the editor, your created .bin file will be in the deploy folder.

Loading a .bin file at runtime 

Make sure you place your .bin file into the static files directory, which gets copied into the deploy folder at build time (as identified by the Project Settings > Project > extraFilesFolder setting) so the file is available at runtime.

You can then use this.engine.scene.append() just as you would for .gltf to load the .bin file at runtime.