Tresjs / tres

Declarative ThreeJS using Vue Components
https://tresjs.org
MIT License
1.93k stars 86 forks source link

Recursive error when using a ref anywhere in the canvas when it changes on a click event handler inside a v-for #649

Closed franciscohermida closed 1 month ago

franciscohermida commented 2 months ago

Describe the bug

Doing:

Expecting: No recursive error

Happening: recursive error because click handler is called again when ref is being used elsewhere in the canvas

Reproduction

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

Steps to reproduce

Click on each of the boxes and check console

System Info

No response

Used Package Manager

npm

Code of Conduct

alvarosabu commented 2 months ago

Hi @franciscohermida thanks for opening this, I think this will be fixed with #529 on the v4 release.

We are fine-tuning the PR and we expect to merge it soon, I will let you know so you can test it with the next channel release.

alvarosabu commented 1 month ago

Hi @franciscohermida can you try again with the new v4 to see if it's still happening? Thanks 🙏🏻

franciscohermida commented 1 month ago

@alvarosabu seems fixed thanks!