I want to have an A-Frame scene start loading only when I tell it to. Currently if I put <a-scene>
in an HTML file, it will start initializing immediately.
<a-scene></a-scene>
I want to have an A-Frame scene start loading only when I tell it to. Currently if I put <a-scene>
in an HTML file, it will start initializing immediately.
<a-scene></a-scene>
An A-Frame scene waits for all of its children to initialize before it itself initializes. So it waits for every
<a-entity>
from the bottom up. Under the hood,<a-entity>
is based on<a-node>
which handles load order. When<a-node>
emitsloaded
, then the parent nodes can begin loading.<a-entity>
emitsloaded
when it attaches + initializes all of its components.Therefore, you start a scene on demand: