| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
…and not on every mouse move (setAttribute('raycaster', {origin, direction}) is called by the cursor component in onMouseMove triggering refreshObjects on each tick with the default raycaster refresh interval that is 0)
|
That issue is actually new in aframe 1.6.0. It wasn't an issue in 1.5.0. |
Sorry, something went wrong.
|
You can test on the http://localhost:8080/showcase/ui/ example, put a console.log in raycaster refreshObjects function. |
Sorry, something went wrong.
|
Prior to 1.6.0 the handling of instances of classes like Vector3 when updating components had bugs (#3681, #5181). Passing in the same reference in subsequent .setAttribute calls would not trigger any update, as no changes would be detected, even if the values were actually changed. Looking at the cursor, it does call .setAttribute with newly computed values, with the expectation that the raycaster gets updated. So update now being called with 1.6.0 is IMO the correct behaviour. That the raycaster always marks itself dirty regardless of what changed, seem to be a different bug that now surfaces, for which this PR seems like a good fix. |
Sorry, something went wrong.
|
Thanks so much! |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Description:
Before this PR, setAttribute('raycaster', {origin, direction}) is called by the cursor component in onMouseMove triggering raycaster update method and this.setDirty() so actually calling raycaster.refreshObjects() on every tick with the default raycaster refresh interval that is 0, or every 100ms minimum if you set raycaster interval to 100 for example, even if nothing changed in the scene.
Some notes:
Changes proposed: