Tresjs / tres

Declarative ThreeJS using Vue Components

Home Page:https://tresjs.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Clicking on the scene cannot update model events

Sea-DH1 opened this issue · comments

commented

Describe the bug

If the canvasClick event is removed, it will run normally.
The requirement is to click on a blank area of the scene to modify the model back to its original color.
Is there any way to achieve this?

Reproduction

https://stackblitz.com/edit/stackblitz-starters-qdxqhm?file=src%2Fcomponents%2FTheExperience.vue

Steps to reproduce

Run npm install followed by npm run dev

System Info

No response

Used Package Manager

npm

Code of Conduct

Hi @Sea-DH1, this is not a bug, if you add a click event handler to the canvas this will interfere with the Tres event manager which is based on RayCasting

Although I understand your use-case, I think we could implement an onPointerMissed #515 @garrlker is it something cover by your PR for v4?

commented

After reading the content of the PR, it seems to have solved my problem.