`<TresSprite @click="() => console.log('')" />` throws error on pointer interaction
andretchen0 opened this issue · comments
Describe the bug
When ...
<TresSprite @click="(e) => { console.log('ok', e); }" />
... is moused over, it throws this error:
Uncaught TypeError: proxy must report the same value for the non-writable, non-configurable property '"modelViewMatrix"'
Expected
@click
should work normally and not throw an error.
Reproduction
Additional context
- Working example in plain Three.js for comparison.
- Discussion thread of Vue proxy error on discourse.threejs.org
System Info
System:
OS: Linux 5.0 undefined
CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 0 Bytes / 0 Bytes
Shell: 1.0 - /bin/jsh
Binaries:
Node: 18.18.0 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 10.2.3 - /usr/local/bin/npm
pnpm: 8.14.0 - /usr/local/bin/pnpm
npmPackages:
@tresjs/cientos: ^3.5.1 => 3.5.1
@tresjs/core: ^3.4.1 => 3.4.1
@tresjs/eslint-config-vue: ^0.2.1 => 0.2.1
vite: ^4.5.0 => 4.5.0
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.
Replying here to keep the main thread clean as well
1st, thank you for making this issue and reproduction! Your questions and repros are helping me a ton!
2nd,
The solution I've been working on for #515 for abstracts the parts of the event system so we support events for everything in the scene, not just Object3Ds. Originally I had made that change to support event's on primitives
, BUT, It looks like those changes allow for TresSprite
events to work as well
Copied your reproduction into my local and it worked first try
@andretchen0 I've got my draft PR up, #529, I would love if you could give it a thorough look over when you get a chance?
Hi @andretchen0 can you please check if this still the case in v4 after @garrlker changes? If not please close it