Closed blairmacintyre closed 7 years ago
I'm not sure what is actual use of scenes
. Is it safe to change the a-scene
querySelector with AFRAME.scenes
? /cc @ngokevin @dmarcos
yeah AFRAME.scenes[0]
. i don't expect support for multiple scenes, i guess i made it an array to be flexible
Thanks! Fixed :)
Looking one of the points where I've replaced the document.querySelector('a-scene')
with AFRAME.scenes[0]
I guess if the scene is still not loaded it's not yet added to the list of available scenes:
https://github.com/aframevr/aframe-inspector/blob/master/src/lib/inspector.js#L28
@ngokevin I guess I should just move that to the onSceneLoaded
function itself right?
I answer myself, it should be once the scene is loaded, as it will need the systems to be registered to query all the scenes around.
As a proof of concept this is an scene already working with argon-aframe. Still needs some tweaks to work properly, but still something nice to have :)
This is excellent, thanks!
Rather, AFRAME now has a
scenes
property that contains a list of all attached scenes. The inspector should use this to find the scenes.Doing this will also allow other kinds of scenes (such as a the
<ar-scene>
currently used by the argon-aframe bindings) to be inspected.