Skip to content

Conversation

vincentfretin
Copy link
Contributor

Properly remove all the created entities, and dispose of manually (not via aframe components) created materials and geometries, and reset fog when the component is removed.
There may still have some textures, programs, geometries in memory left though, but at least all entities are removed from the scene.
This is a more complete version of #27

this.stars = null;

// create ground
this.groundMaterial = null;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same line is at line 178 below.

this.groundMaterialProps.shading = this.environmentData.flatShading ? THREE.FlatShading : THREE.SmoothShading;
} else {
this.groundMaterialProps.flatShading = this.environmentData.flatShading;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We only support aframe 1.3.0 and above with the current code related to geometries, so we can remove this material check.

@dmarcos
Copy link
Member

dmarcos commented Jun 15, 2023

Thank you!

@dmarcos dmarcos merged commit 600ad6d into supermedium:master Jun 15, 2023
@vincentfretin vincentfretin deleted the implement-remove branch June 15, 2023 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants