Tresjs / tres

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

`<primitive> :object` breaking references to THREE objects #701

Open andretchen0 opened 1 month ago

andretchen0 commented 1 month ago

Describe the bug

Problem

When using a THREE object in <primitive :object="[the THREE object]">, the on-screen object cannot be updated in <script setup>.

Possible cause

It appears that src/core/nodeOps.ts clones the primitive's :object, breaking the reference to the THREE object in <script setup>.

Reproduction

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

Code of Conduct

andretchen0 commented 1 month ago

Related: