Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HMR disposal #23

Closed
alvarosabu opened this issue Dec 5, 2022 · 4 comments · Fixed by #111
Closed

HMR disposal #23

alvarosabu opened this issue Dec 5, 2022 · 4 comments · Fixed by #111
Labels
discussion 💭 help wanted Extra attention is needed

Comments

@alvarosabu
Copy link
Member

Atm HMR disposal is not working as expected. Meshes are duplicated and this could lead to performance issues on large scenes.

Also not nice for DX. User needs to reload everytime.

This one is pretty tricky.

Desired solution.

Renderer, scene and object follow a disposal flow when HMR hits

@alvarosabu alvarosabu added good first issue Good for newcomers help wanted Extra attention is needed discussion 💭 and removed good first issue Good for newcomers labels Dec 5, 2022
@alvarosabu alvarosabu pinned this issue Dec 9, 2022
@alvarosabu
Copy link
Member Author

Update: I realized that HMR works differently if the changes come from the experience <script> tag (reloads js) rather than the <template> (doesn't)

We will need to only dispose of scene objects when changes come from the template.

@alvarosabu
Copy link
Member Author

I opened a ticket on vitejs/vite-plugin-vue#103

@alvarosabu
Copy link
Member Author

I opened a ticket on vitejs/vite#12097 with a possible solution, it will need to be done with 2 PRs, one for Vite and another for Vue Plugin

@davidmoshal
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion 💭 help wanted Extra attention is needed
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

2 participants