Fixes dynamically created a-scene attributes
Description: document.createElement("a-scene").setAttribute doesn't work correctly when there is already a registered system and component with the same name.
Changes proposed:
- Call the
ANodeimplementation if there are nosystemNamesyet.
Thanks. Can you provide a concrete example of expected vs. what you get behavior?
Well, the test case shows the issue pretty well. What happens if you create your a-scene after A-Frame initializes is that in certain cases some of the attributes on the element never get set, leading to misconfigured systems. I noticed this with gltf-model but it's true at least for all attributes that correspond to systems with the same name as their associated component.
My expectation is that A-Frame should handle system attributes correctly regardless of whether a-scene is created before or after A-Frame initializes. Note that I'm only ever creating one a-scene and this is the only apparent problem with dynamically creating it.
Can you provide some code that reproduces the issue? https://glitch.com/~aframe highly recommended
It's at https://aframe-dynamic-system-bug.glitch.me . Check the console logs to see the problem.