A-Frame is an easy to use web framework for building 3D/AR/VR experiences. You can easily use Sense of Space Streamable models in A-Frame.
To use the Sense of Space geometry streaming in AFrame you will need to include the following script tag in your html in addition to your AFrame:
If you wish to use a version of AFrame that has been most tested with the Sense of Space Geometry Streaming plugin, you can use the following line:
Now you can add one or more streamable models to your scene by adding a-entity tags with the component sosstreamablemodel. E.g.:
This will place a streamable model from a file model.sxrweb into the origin. It'll enable shadows in the materials and load an environment map from env-sky.jpg.
As can be seen in the example above you can set a number of parameters to the sosstreamablemodel component:
The path to the streamable asset.
Enable semi-transparent materials
Use PBR shading. Can be set to false if you want flat shading for e.g. photogrammetry models.
Use occlusion culling. This will reduce the amount of rendered triangles and can speed up rendering significantly, but does not work well with shadows.
Path to an equirectangular environment map. Currently only the jpg format is supported. Can be left empty.
Will switch on double sided surfaces in materials.
A number for adjusting the quality level (and bandwidth requirement). Can be any number, but should normally be between 0 and 3. Reference: - 0 = low quality - 1 = medium quality
- 2 = high quality
- < 0 = extremely low quality
- > 2 extremely high quality.
This needs to be set to true if you wish the streamable asset to cast and receive threejs shadows.