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

comment on first line of templates affects rendering #528

Open
5 tasks done
BenoitBotton opened this issue Jan 29, 2024 · 1 comment
Open
5 tasks done

comment on first line of templates affects rendering #528

BenoitBotton opened this issue Jan 29, 2024 · 1 comment
Labels
has-workaround p2-edge-case Bug, but has a workaround or limited in scope (priority)

Comments

@BenoitBotton
Copy link

Describe the bug

a select is meant to swap between sets of objects in the scene.
when the code has a comment on the first line of the template, objects are added to the scene, the old ones are not removed.

Reproduction

https://stackblitz.com/edit/tresjs-basic-hmkhgf?file=src%2Fcomponents%2FDonut.vue

Steps to reproduce

run the stackblitz.
change the select to 'donuts 1', a second set of donuts is added to the scene.

delete the comment in the template (Donut.vue) and refresh the view
this time when switching using the select, the scene objects are changed, not added

System Info

No response

Used Package Manager

npm

Code of Conduct

@alvarosabu alvarosabu added p2-edge-case Bug, but has a workaround or limited in scope (priority) has-workaround labels Mar 30, 2024
@andretchen0
Copy link
Contributor

andretchen0 commented Apr 2, 2024

Reproduction

Here's a minimal reproduction.

Maybe relevant?

For an eventual fix, it might be worth looking into /src/core/nodeOps.ts. It doesn't return a value from a createComment call.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has-workaround p2-edge-case Bug, but has a workaround or limited in scope (priority)
Projects
None yet
Development

No branches or pull requests

3 participants