-
-
Notifications
You must be signed in to change notification settings - Fork 167
Open
Description
Describe the bug
The value of a <TresGroup> ref does not update the number of children (and in general, probably doesn't reflect the latest state of the underlying Three Group object). But this only happens in specific circumstances. It seems to only happen when there is another element as a sibling to, but not a child of, the group. I can't narrow it down more than that at the moment.
Reproduction
https://stackblitz.com/edit/tresjs-minimal-reproduction-gp2hknji?file=package.json
Steps to reproduce
- Look at the minimal reproduction.
- Run with
npm run devif needed. - Open the console.
- Observe that boxes are being added to the scene.
- Observe that the console is logging
0forboxesRef.value?.children.length. - Remove/comment out the
<TresGridHelper>element. - Observe that the console now correctly shows the number of children going up.
System Info
- Chrome
- Bun as package manager (irrelevant, happens in minimal reproduction)
- Windows 10 (irrelevant, happens in minimal reproduction)
- Astro (irrelevant, happens in minimal reproduction)
{
"dependencies": {
"@astrojs/vue": "^5.1.3",
"@tresjs/core": "^5.2.0",
"astro": "^5.16.4",
"three": "^0.182.0",
"vue": "^3.5.25",
},
}Used Package Manager
npm
Code of Conduct
- I agree to follow this project's Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- The provided reproduction is a minimal reproducible example of the bug.
Metadata
Metadata
Assignees
Labels
No labels