aframe-environment-component icon indicating copy to clipboard operation
aframe-environment-component copied to clipboard

self removing of sub elements component

Open Tiska opened this issue 7 years ago • 5 comments

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 avatar Nov 06 '17 16:11 Tiska

@Tiska you should remove the generated files from your PR.

vincentfretin avatar Nov 11 '17 18:11 vincentfretin

Done ! Have you an idea about the sky color that stays after removing the component from the scene ?

Tiska avatar Nov 13 '17 08:11 Tiska

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.

vincentfretin avatar Jun 15 '23 07:06 vincentfretin

More complete version in #94

vincentfretin avatar Jun 15 '23 10:06 vincentfretin

@dmarcos please close this one.

vincentfretin avatar Jun 16 '23 08:06 vincentfretin