Not cleaning up after scene removal
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 17.6k
- Forks
- 4.4k
- PR merge metrics
- No merged PRs in 30d
Description
A-frame is not cleaning up after itself when it is removed from the DOM. And as far as I can tell there is no API to destroy the scene manually?
I'm using an embeded a-frame scene in a nuxtjs spa and have noticed when I navigate to different page components the requestAnimationFrame continues to fire (there's also a memory leak I can't figure out but that is a separate issue).
- A-Frame Version: 0.8.1
- Platform / Device: OSX / Chrome
- Reproducible Code Snippet or URL: https://brash-landmine.glitch.me/
Wait 2 seconds then record the performance in dev tools - you can see the raf.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked Glitch reproduction and navigate between Nuxt page components while recording Chrome DevTools performance data. Inspect the scene-removal lifecycle and the requestAnimationFrame that continues after DOM removal; done should mean the RAF stops when the scene is removed and the issue's requested manual destruction path is addressed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nuxtjs
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100