Closed donmccurdy closed 7 years ago
Yep, both cases should work
On my environment, both works.
At Hello world example https://aframe.io/aframe/examples/boilerplate/hello-world/
I ran this on console
var scene = document.querySelector('a-scene')
var cylinder = document.createElement('a-cylinder');
cylinder.setAttribute('color', '#888888');
cylinder.setAttribute('height', '1.5');
cylinder.setAttribute('position', '3 1 0');
scene.appendChild(cylinder);
var cylinder2 = document.createElement('a-cylinder');
scene.appendChild(cylinder2);
cylinder2.setAttribute('color', '#888888');
cylinder2.setAttribute('height', '1.5');
cylinder2.setAttribute('position', '-3 1 0');
Result
Have I missed something?
Hm I filed based on this conversation.
But I can't reproduce the problem either. There were websockets involved, so probably the elements were added after scene init, but even so I can't reproduce this.
I guess she was on 0.3.2
This fails:
But this works:
Preferably both would work. Seems like a strange edge case that new users could easily be surprised by; I know the primitive init cycle is a bit troublesome but hopefully we can fix this case.