Closed wmurphyrd closed 7 years ago
I'm curious what would happen if you decomposed the primitive to entity + components.
A-Frame has a fairly strict child-to-parent/inside-out load order. All children have to be loaded (meaning node is attached, components are initialized), then the entity initializes all components, then emits that it is loaded. So it's hard to think that it'd be due to the A-Frame core, maybe it's because of primitives, or maybe another issue, but I'd love to know more.
Here it is with decomposed primitive:
https://glitch.com/edit/#!/denim-straw
The issue is still the same
Where is locomotor-auto-config defined?
Description:
I believe components can assume during their initialization that components on child nodes have already been initialized due to the inside-out initialization order. This assumption does not hold up in a scene with no
<a-assets>
declared.This scene errors when a component on
<a-locomotor>
expects an object to be returned fromgetAttribute
on a child node component but gets a string instead:This scene, identical except for the addition of an empty
<a-assets>
loads successfully:This can definitely be solved in the component by not making the assumption, but I thought it was worth documenting for you.