Tresjs / tres

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

Invalid watch source error when declaring a CatmullRomCurve3 #694

Open bperel opened 1 month ago

bperel commented 1 month ago

Describe the bug

I would like to render the CatmullRomCurve3 component. On the linked Playground reproduction case (which uses TresJS 3.9.0 and Cientos 3.9.0), I get the following error:

Invalid watch source: A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.
 at <Line2points=[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]vertex-colors=undefinedcolor="#fbb03b" ...>
 at <CatmullRomCurve3points=-1.5,0,0,-0.5,1,0,0.5,0,0,1.5,1,0segments=40line-width=10 ...>
 at <App>

which is strange because I didn't declare any watcher.

Stranger: this Stackblitz that includes the same SFC displays the curve properly.

Reproduction

https://play.tresjs.org/#eNqVVE2P2jAQ/StWethDyQeCUgmlFS1a9ePQrbZ7IxxCMoBZf8l2gArx3zt2SAjb3RULOcRv3jw/z4xzCB40mC9KRdsKgnGQmkJTZYkBWynCcrH6lAXWZMHnTFCupLbkQFzKNBfb3JAjWWrJyc3EIrYxcSE13HSo09zyirF7yaeV3sKgR+70gtqpFFZL9kw+BWGlQYk0rq3gxriwwBXLLeCKkLRjoGCQ67CQTGp0+m64dH9vl+Avfbp/DRMyVpIKazBlNgv70YceSfCZ98gsTNyqf1r5RRPyPB+ZZ0GrZGDF0bTTGiYdnFEB4Y6Wdo2RfifSml0uFslg0QTixrM73TdNy+/AFOgzflm5Gk7jcy0QSOO2UEEvqLsQ8lxFGyMFtvfgcrJTALs6Jh5xWLeDLpAFa2uVGcdxUQrML4HRrY4E2FgoHnfpk0E0ivpxSY2NHYzsLOj9J1y39i3adQbKf4ySs/wJvtzF7iB/VLm4xnvLnQyjpDXegBGnLqervdZwla7jTVBxlKDf92B4twx4wSoDV9e3Q5/0cQxRkYoS9hG/rO6JZ9a5hvINwnXCa9JIDEvg9ArRhuoOP4xGMaOLrqRTPGbiiDNpTSHFkq6eTGQhuaIM9J2yVIrLycwZk7ufHrO6gtZfsYbi8Rl8Y/a15d84LIC3vtvKXK/A1uHbP79gj+9tkMuyYqfmvBC8ByNZ5TzWtK+VKNF2h+fd/vAXjIrVg7ndWxCmOdSFUftXgUdnzaehnbUamPvCeb5vx/SVKp1PNoj8Z84X/PgPoizpCg==

Steps to reproduce

No response

System Info

TresJS 3.9.0

Used Package Manager

npm

Code of Conduct

andretchen0 commented 1 month ago

@bperel , thanks for the report. Looking into it right now.