How can I add a loading effect before all assets are loaded?
问题 I need to display a loading effect before all assets (image or video) are loaded in a frame. Anyone can help on this? I need JavaScript code in details if possible. 回答1: See the asset management system: https://aframe.io/docs/0.3.0/core/asset-management-system.html With that, you have a way to determine when all your resources have been fetched. <a-assets> will emit a loaded event, which you can wait on and show something in the meantime. <a-scene> <a-assets timeout="10000"> <img id=