Hubs-Foundation / hubs

Duck-themed multi-user virtual spaces in WebVR. Built with A-Frame.
https://hubsfoundation.org
Mozilla Public License 2.0
2.13k stars 1.41k forks source link

particle-emitter dos not free resource on remove like Geometrys #1956

Open arpu opened 4 years ago

arpu commented 4 years ago

Description particle-emitter dos not free resource on remove like Geometrys

To Reproduce Steps to reproduce the behavior:

  1. add a particel Emitter
  2. remove particel Emitter
  3. Geometrys and texture are not freed
  4. See error

Expected behavior free resouce on aframe particle-emitter component on remove

Hardware

https://github.com/mozilla/hubs/blob/master/src/components/particle-emitter.js

does not have the remove() function

gfodor commented 4 years ago

hey @robertlong I was going to fix this, but I think this is needs to be added to ParticleEmitter in https://github.com/MozillaReality/lib-hubs/blob/master/packages/three-particle-emitter/src/index.ts -- we need a release() function to call. I haven't worked in hubs-lib, would you mind looking at this?