aframe-environment-component
aframe-environment-component copied to clipboard
self removing of sub elements component
When the environment is removed, shouldn't we remove the sub elements from the scene ?
I try to remove the environment to set another sky in my scene, but i still have some content on my scene even after removing this sub elements (for example with the forest, i have a still have a green sky).
@Tiska you should remove the generated files from your PR.
Done ! Have you an idea about the sky color that stays after removing the component from the scene ?
I forgot about this PR. In my current project I'm doing
sceneEl.removeAttribute("environment");
sceneEl.querySelectorAll(".environment").forEach((e) => e.remove());
that is similar. Note in this PR, stars mesh, geometry, material are not properly disposed, only the entity is removed.
More complete version in #94
@dmarcos please close this one.