Open bknill opened 3 years ago
For anyone else you can remove them manually with this
this.lights = document.querySelectorAll("[data-aframe-default-light]")
if(Array.from(this.lights)?.length)
Array.from(this.lights).map(el => this.el.sceneEl.removeChild(el))
Can you reproduce without react? Can you provide a link with a simple example? Glitch recommended https://glitch.com/~aframe
Description:
I have both existing lights and the above added to the scene element.
Works the first time (no other lights) the second time the scene loads (it's in a react app but removed and then loaded again ) the above is ignored and the lights are added.