Closed jaekong closed 5 months ago
Hey @jtodaone thanks for opening this ticket
@Tinoooo maybe we need to add a conditional for the nextValue
inside the if?
I'm working on primitive
. Will attempt to address this with the same patch.
Confirmed i'm having the same issue
Not happening if I'm creating the mesh new Mesh(bufferGeometry,....)
and use that mesh as primitive <primitive :object="mesh">
,
Describe the bug
I was trying to load an OBJ file and get the geometry out to make it a TresLine instead of TresMesh, but it kept failed. And every BufferGeometry I've tried has failed the same thing, including empty new one (
new BufferGeometry()
).I could bypass this by changing the nodeOps part of compiled tres.js file, by wrapping the setAttribute call in patchProps method with try-catch, and it seems to work. But it feels kinda hacky and I am assuming there would be some data lost during this process.
https://github.com/Tresjs/tres/blob/211c3e172726a4cb339a02333ac596fcf3bb7793/src/core/nodeOps.ts#L187C7-L187C7
Reproduction
https://stackblitz.com/edit/tresjs-basic-yrhocm?file=src%2Fcomponents%2FTheExperience.vue
Steps to reproduce
<script>
section. (ex.const geometry = new BufferGeometry()
)<primitive :object="geometry">
tag.System Info
Used Package Manager
npm
Code of Conduct