Tresjs / tres

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

Error when using empty TresCanvas #815

Open franciscohermida opened 2 months ago

franciscohermida commented 2 months ago

Describe the bug

Using <TresCanvas></TresCanvas> will cause errors: Uncaught TypeError: l.default is not a function

Reproduction

https://stackblitz.com/edit/tresjs-basic-is86dt?file=src%2FApp.vue

Steps to reproduce

Open reproduction link Check console

System Info

No response

Used Package Manager

npm

Code of Conduct

franciscohermida commented 2 months ago

The reason I have an empty TresCanvas is because I'm transitioning to use Tres in my project where previously I had my own custom implementation.

As a work around I'm just adding a non visible TresMesh in the default slot (or any other element would probably work)

alvarosabu commented 2 months ago

Hi @franciscohermida what is your expectation for the behavior? Why is it considered a bug?

franciscohermida commented 2 months ago

Maybe I'm doing something really wrong, even though it is a one line of code loading the TresCanvas. I can live with the workaround if this is not considered a bug.