\r\n \u003C/Suspense>\r\n`\r\nAm I using it the wrong way?\n\n### Reproduction\n\nnull\n\n### Steps to reproduce\n\n_No response_\n\n### System Info\n\n_No response_\n\n### Used Package Manager\n\nnpm\n\n### Code of Conduct\n\n- [X] I agree to follow this project's [Code of Conduct](https://github.com/Tresjs/tres/blob/main/CODE_OF_CONDUCT.md)\n- [X] Read the [Contributing Guidelines](https://github.com/Tresjs/tres/blob/main/CONTRIBUTING.md).\n- [X] Read the [docs](https://tresjs.org/guide).\n- [X] Check that there isn't [already an issue](https://github.com/tresjs/tres/issues) that reports the same bug to avoid creating a duplicate.\n- [X] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.",[],667,"closed","The click event does not work on GLTFModel","2024-04-30T04:40:39Z","https://github.com/Tresjs/tres/issues/667",0.69809586,{"description":2891,"labels":2892,"number":2896,"owner":2860,"repository":2861,"state":2885,"title":2897,"updated_at":2898,"url":2899,"score":2900},"### Describe the bug\n\nThe official [Vue devtools](https://github.com/vuejs/devtools) is broken since v2. Most probably related to the edge case of the use of a custom renderer.\r\n\r\n\n\n### Reproduction\n\nhttps://stackblitz.com/edit/stackblitz-starters-sa3ruk?file=README.md\n\n### Steps to reproduce\n\nOpen in a new tab\r\nCheck dev tools\r\nCheck error in console\r\n\r\n```\r\nTypeError: Cannot read properties of undefined (reading 'ownerDocument')\r\n```\n\n### System Info\n\n_No response_\n\n### Used Package Manager\n\npnpm\n\n### Code of Conduct\n\n- [X] I agree to follow this project's [Code of Conduct](https://github.com/Tresjs/tres/blob/main/CODE_OF_CONDUCT.md)\n- [X] Read the [Contributing Guidelines](https://github.com/Tresjs/tres/blob/main/CONTRIBUTING.md).\n- [X] Read the [docs](https://tresjs.org/guide).\n- [X] Check that there isn't [already an issue](https://github.com/tresjs/tres/issues) that reports the same bug to avoid creating a duplicate.\n- [X] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.",[2893],{"name":2894,"color":2895},"bug","d73a4a",317,"Vue-devtools broken since v2 custom renderer","2023-08-23T05:12:31Z","https://github.com/Tresjs/tres/issues/317",0.7109266,{"description":2902,"labels":2903,"number":2914,"owner":2860,"repository":2915,"state":2885,"title":2916,"updated_at":2917,"url":2918,"score":2919},"### Describe the bug\r\n\r\nLensflare seems to be broken on v4\r\n\r\nCannot destructure property 'registerCamera' of '(intermediate value)(intermediate value)(intermediate value)' as it is undefined.\r\n\r\n\r\n\r\n\r\n### Reproduction\r\n\r\nRun local playground\r\n\r\n### Steps to reproduce\r\n\r\n_No response_\r\n\r\n### System Info\r\n\r\n```shell\r\nSystem:\r\n OS: macOS 14.5\r\n CPU: (8) arm64 Apple M1 Pro\r\n Memory: 51.02 MB / 16.00 GB\r\n Shell: 5.9 - /bin/zsh\r\n Binaries:\r\n Node: 20.12.2 - ~/.nvm/versions/node/v20.12.2/bin/node\r\n Yarn: 1.22.19 - /usr/local/bin/yarn\r\n npm: 10.5.0 - ~/.nvm/versions/node/v20.12.2/bin/npm\r\n pnpm: 8.15.4 - ~/Library/pnpm/pnpm\r\n bun: 1.0.2 - ~/.bun/bin/bun\r\n Browsers:\r\n Brave Browser: 120.1.61.116\r\n Chrome: 125.0.6422.142\r\n Safari: 17.5\r\n npmPackages:\r\n @tresjs/core: 4.0.0-rc.2 => 4.0.0-rc.2 \r\n @tresjs/leches: ^0.14.0 => 0.14.0\r\n```\r\n\r\n\r\n### Used Package Manager\r\n\r\npnpm\r\n\r\n### Code of Conduct\r\n\r\n- [X] I agree to follow this project's [Code of Conduct](https://github.com/Tresjs/cientos/blob/main/CODE_OF_CONDUCT.md)\r\n- [X] Read the [Contributing Guidelines](https://github.com/Tresjs/cientos/blob/main/CONTRIBUTING.md).\r\n- [X] Read the [docs](https://cientos.tresjs.org/guide).\r\n- [X] Check that there isn't [already an issue](https://github.com/Tresjs/cientos/issues) that reports the same bug to avoid creating a duplicate.\r\n- [X] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.",[2904,2905,2908,2911],{"name":2894,"color":2895},{"name":2906,"color":2907},"v4","EEF2B0",{"name":2909,"color":2910},"p4-important-bug","D93F0B",{"name":2912,"color":2913},"regression","167F7A",435,"cientos","Lensflare playground demo is broken","2024-08-28T19:23:52Z","https://github.com/Tresjs/cientos/issues/435",0.7215119,{"description":2921,"labels":2922,"number":2932,"owner":2860,"repository":2861,"state":2885,"title":2933,"updated_at":2934,"url":2935,"score":2936},"### Description\n\nAs a developer using TresJS, I would like to have an Event Management solution with the following features:\r\n\r\n- Support for:\r\n - onClick\r\n - onContextMenu (rightClick)\r\n - onDoubleClick\r\n - onWheel\r\n - onPointerDown\r\n - onPointerUp\r\n - onPointerLeave\r\n - onPointerMove\r\n - onPointerCancel\r\n - onLostPointerCapture\r\n- Event prioritization \r\n- primitive pointer events\r\n- Event bubbling and propagation #501 #426 \r\n\r\n# Propagation through intersected objects\r\n\r\nRaycasting-Based Interaction: Tres should use Three.js's raycasting to determine which objects are interacted with. A ray is cast from the camera through the mouse position into the 3D space, and intersections with objects are calculated.\r\n\r\nSimulated Bubbling: When an event occurs, Tres might propagate it through objects based on their spatial arrangement (like from child to parent), but this is based on the raycast hits and not a strict parent-child hierarchy as in the DOM.\r\n\r\nMeaning that stop propagation is based on occlusion\r\n\r\n\r\n\r\nIf the object is a Group or a model consistent with several meshes, the same concept applies, the closest mesh to the camera stops the propagation\r\n\r\n\r\n\n\n### Suggested solution\n\n# Current solution uses:\r\n\r\n- `useRaycaster` https://github.com/Tresjs/tres/blob/main/src/composables/useRaycaster/index.ts\r\n- `usePointerEventHandler` https://github.com/Tresjs/tres/tree/main/src/composables/usePointerEventHandler\r\n\r\nRegister of events is being done here \r\nhttps://github.com/Tresjs/tres/blob/main/src/composables/usePointerEventHandler/index.ts#L57-L62\r\n\r\n```ts\r\nconst registerObject = (object: Object3D & EventProps) => {\r\n const { onClick, onPointerMove, onPointerEnter, onPointerLeave } = object\r\n\r\n if (onClick) objectsWithEventListeners.click.set(object, onClick)\r\n if (onPointerMove) objectsWithEventListeners.pointerMove.set(object, onPointerMove)\r\n if (onPointerEnter) objectsWithEventListeners.pointerEnter.set(object, onPointerEnter)\r\n if (onPointerLeave) objectsWithEventListeners.pointerLeave.set(object, onPointerLeave)\r\n}\r\n\r\n // to make the registerObject available in the custom renderer (nodeOps), it is attached to the scene\r\n scene.userData.tres__registerAtPointerEventHandler = registerObject\r\n scene.userData.tres__deregisterAtPointerEventHandler = deregisterObject\r\n\r\n scene.userData.tres__registerBlockingObjectAtPointerEventHandler = registerBlockingObject\r\n scene.userData.tres__deregisterBlockingObjectAtPointerEventHandler = deregisterBlockingObject\r\n```\r\n\r\nThese are then used on the renderer by saving them on the `userData` of the scene object\r\n\r\n```ts\r\ninsert(child, parent) {\r\n if (parent && parent.isScene) scene = parent as unknown as TresScene\r\n\r\n const parentObject = parent || scene\r\n\r\n if (child?.isObject3D) {\r\n if (\r\n child && supportedPointerEvents.some(eventName => child[eventName])\r\n ) {\r\n if (!scene?.userData.tres__registerAtPointerEventHandler)\r\n throw 'could not find tres__registerAtPointerEventHandler on scene\\'s userData'\r\n\r\n scene?.userData.tres__registerAtPointerEventHandler?.(child as Object3D)\r\n }\r\n }\r\n```\r\n\r\nhttps://github.com/Tresjs/tres/blob/main/src/core/nodeOps.ts#L102\r\n\r\n# Desired solution\r\n\r\nA state/store to manage the events\r\n\n\n### Alternative\n\n_No response_\n\n### Additional context\n\n_No response_\n\n### Validations\n\n- [X] I agree to follow this project's [Code of Conduct](https://github.com/Tresjs/tres/blob/main/CODE_OF_CONDUCT.md)\n- [X] Read the [Contributing Guidelines](https://github.com/Tresjs/tres/blob/main/CONTRIBUTING.md).\n- [X] Read the [docs](https://tresjs.org/guide).\n- [X] Check that there isn't [already an issue](https://github.com/tresjs/tres/issues) that reports the same bug to avoid creating a duplicate.",[2923,2924,2926,2929],{"name":2871,"color":2872},{"name":2906,"color":2925},"7980EA",{"name":2927,"color":2928},"p3-significant","2C78E3",{"name":2930,"color":2931},"breaking-change","5612D2",515,"Pointer EventManager state","2024-05-30T06:32:45Z","https://github.com/Tresjs/tres/issues/515",0.7290721,{"description":2938,"labels":2939,"number":2941,"owner":2860,"repository":2861,"state":2885,"title":2942,"updated_at":2943,"url":2944,"score":2945},"**Describe the bug**\r\nI update the new TresJs beta version, and each canvas throw a problem with the onPointerEvent\r\n\r\nNote: I Don't have onPointerEvent, in any canvas, but I do have one PointerMove event in the \r\nhttps://serene-mousse-562782.netlify.app/MouseShaderEffect \r\nWhich is not working properly (do not update the uniforms) but also is the only page that don't throw a pointer error\r\n\r\nThe other experiments (you can navigate using the navbar) all have the onPointerEvent error\r\n\r\n**Reproduction**\r\nFollow the steps\r\n\r\n**Steps**\r\nSteps to reproduce the behavior:\r\n1. Go to [my-tresJs-playground](https://serene-mousse-562782.netlify.app/)\r\n2. Move the mouse through the canvas\r\n3. Each canvas on the routes contain this problem (except /MouseShaderEffect which do not update the uniforms)\r\n4. You can go to a different site to see\r\n\r\n\r\n**System Info**\r\nOutput of `npx envinfo --system --npmPackages '{vite,@tresjs/*, three, vue}' --binaries --browsers` \r\n\r\n\r\n**Additional context**\r\nIf I'm doing something wrong, please let me know\r\n",[2940],{"name":2894,"color":2895},189,"Problems with pointerevents","2023-04-12T14:07:01Z","https://github.com/Tresjs/tres/issues/189",0.7305758,{"description":2947,"labels":2948,"number":2950,"owner":2860,"repository":2915,"state":2885,"title":2951,"updated_at":2952,"url":2953,"score":2954},"### Describe the bug\r\n\r\nIt appears the new linter is breaking some props:\r\n\r\n* `\u003CSky/>`: https://github.com/Tresjs/cientos/commit/4999bb1dea4c902ad5b19dd5982a2e9537d84bc8#diff-bcb1b58e8e953711ce44278df539b7606cdffdceb65be40747ab67c97e79672e\r\n* `\u003CHolographicMaterial />`: https://github.com/Tresjs/cientos/commit/4999bb1dea4c902ad5b19dd5982a2e9537d84bc8#diff-9ca529b6b05acda73f50d969d3f1cd689a49b87118f7126bf5ac523277ed42d9\r\n\r\n### Reproduction\r\n\r\nN/A\r\n\r\n### Steps to reproduce\r\n\r\nSee the links in the description. They show the `git blame` where the props changed.\r\n\r\n### Code of Conduct\r\n\r\n- [X] I agree to follow this project's [Code of Conduct](https://github.com/Tresjs/cientos/blob/main/CODE_OF_CONDUCT.md)\r\n- [X] Read the [Contributing Guidelines](https://github.com/Tresjs/cientos/blob/main/CONTRIBUTING.md).\r\n- [X] Read the [docs](https://cientos.tresjs.org/guide).\r\n- [X] Check that there isn't [already an issue](https://github.com/Tresjs/cientos/issues) that reports the same bug to avoid creating a duplicate.\r\n- [X] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.",[2949],{"name":2906,"color":2907},411,"Linter is breaking some props","2024-08-28T19:22:29Z","https://github.com/Tresjs/cientos/issues/411",0.73612344,{"description":2956,"labels":2957,"number":2962,"owner":2860,"repository":2861,"state":2885,"title":2963,"updated_at":2964,"url":2965,"score":2966},"**Describe the bug**\r\nYep, lot of noisy warnings on the console about `provide` `inject`\r\n\r\n**Reproduction**\r\n[Stackblitz](https://stackblitz.com/edit/tresjs-basic?file=README.md) \r\n\r\n**Steps**\r\nSteps to reproduce the behavior:\r\n1. Open the console\r\n\r\n**Expected behavior**\r\n\r\n\r\nLess warnings\r\n\r\n**Screenshots**\r\nIf applicable, add screenshots to help explain your problem.\r\n\r\n\r\n",[2958,2959],{"name":2894,"color":2895},{"name":2960,"color":2961},"good first issue","7057ff",107,"[Vue warn]: injection \"local-scene\" not found.","2023-02-18T08:09:48Z","https://github.com/Tresjs/tres/issues/107",0.739997,{"description":2968,"labels":2969,"number":2971,"owner":2860,"repository":2915,"state":2885,"title":2972,"updated_at":2973,"url":2974,"score":2975},"### Description\n\nAdd a component, stats-gl, to measure the performance of the scene\n\n### Suggested solution\n\nSee https://github.com/pmndrs/drei#statsgl\n\n### Alternative\n\n_No response_\n\n### Additional context\n\n_No response_\n\n### Validations\n\n- [X] I agree to follow this project's [Code of Conduct](https://github.com/Tresjs/cientos/blob/main/CODE_OF_CONDUCT.md)\n- [X] Read the [Contributing Guidelines](https://github.com/Tresjs/cientos/blob/main/CONTRIBUTING.md).\n- [X] Read the [docs](https://cientos.tresjs.org/guide).\n- [X] Check that there isn't [already an issue](https://github.com/tresjs/cientos/issues) that reports the same bug to avoid creating a duplicate.",[2970],{"name":2960,"color":2961},197,"Stats-gl","2023-09-21T12:58:24Z","https://github.com/Tresjs/cientos/issues/197",0.7409761,["Reactive",2977],{},["Set"],["ShallowReactive",2980],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fkJ_1j-tq5espQLyNGTofBu31ECUYjv4Kuy3sNv9bbhc":-1},"/Tresjs/tres/282"]