Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<TresSprite @click="() => console.log('')" /> throws error on pointer interaction #527

Open
5 tasks done
andretchen0 opened this issue Jan 29, 2024 · 3 comments · Fixed by #529
Open
5 tasks done

Comments

@andretchen0
Copy link
Contributor

andretchen0 commented Jan 29, 2024

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

StackBlitz

Additional context

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

@garrlker
Copy link
Collaborator

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

image

Copied your reproduction into my local and it worked first try

@andretchen0
Copy link
Contributor Author

@garrlker Sure thing! Let me know if there's anything I can help with on #515.

@garrlker garrlker linked a pull request Jan 31, 2024 that will close this issue
29 tasks
@garrlker
Copy link
Collaborator

@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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants