\r\n\u003C/template>\r\n\r\n//both logs from cientos\r\ntransformData: {\r\n inheritType: 1, \r\n eulerOrder: 'ZYX', \r\n rotation: Array(3), \r\n parentMatrix: _Matrix4, \r\n parentMatrixWorld: _Matrix4\r\n}\r\ntres__name: \"Group\"\r\n```\r\n\n\n### System Info\n\n```shell\nSystem:\r\n OS: macOS 14.3.1\r\n CPU: (10) arm64 Apple M1 Pro\r\n Memory: 90.00 MB / 16.00 GB\r\n Shell: 5.9 - /bin/zsh\r\n Binaries:\r\n Node: 18.18.0 - ~/.nvm/versions/node/v18.18.0/bin/node\r\n Yarn: 1.22.21 - ~/.nvm/versions/node/v18.18.0/bin/yarn\r\n npm: 9.8.1 - ~/.nvm/versions/node/v18.18.0/bin/npm\r\n Browsers:\r\n Chrome: 125.0.6422.112\n```\n\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/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.\n- [X] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.",[2879,2882],{"name":2880,"color":2881},"needs reproduction","16309A",{"name":2883,"color":2884},"waiting for author","DEEAB8",429,"FBXLoader: Missing data from userData field ","2024-09-12T20:08:31Z","https://github.com/Tresjs/cientos/issues/429",0.74419695,{"description":2891,"labels":2892,"number":2899,"owner":2857,"repository":2858,"state":2859,"title":2900,"updated_at":2901,"url":2902,"score":2903},"### Description\r\n\r\nAs a dev using TresJS, I would like to have an abstraction for [Drag Controls](https://threejs.org/docs/#examples/en/controls/DragControls)\r\n\r\n\r\n\r\n### Suggested solution\r\n\r\nSimilar to https://github.com/pmndrs/drei?tab=readme-ov-file#dragcontrols\r\nhttps://threejs.org/examples/?q=drag#misc_controls_drag\r\n\r\n\r\n### Alternative\r\n\r\n_No response_\r\n\r\n### Additional context\r\n\r\n_No response_\r\n\r\n### Validations\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.",[2893,2896],{"name":2894,"color":2895},"feature","c2e0c6",{"name":2897,"color":2898},"p3-significant","2C78E3",455,"Drag Controls","2024-11-27T10:47:00Z","https://github.com/Tresjs/cientos/issues/455",0.7494861,{"description":2905,"labels":2906,"number":2909,"owner":2857,"repository":2858,"state":2859,"title":2910,"updated_at":2911,"url":2912,"score":2913},"\r\n\r\n\r\n\r\n### Description\r\n\r\nImplement a MeshRefractionMaterial \r\n\r\n\r\n### Suggested solution\r\n\r\nSome links for context:\r\nhttps://medium.com/geekculture/simulating-refraction-in-three-js-9e367753bf6d\r\nhttps://github.com/pmndrs/drei/blob/master/src/core/MeshRefractionMaterial.tsx\r\nhttps://github.com/pmndrs/drei/blob/master/src/materials/MeshRefractionMaterial.tsx\r\n\r\n### Alternative\r\n\r\n_No response_\r\n\r\n### Additional context\r\n\r\n_No response_\r\n\r\n### Validations\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.",[2907,2908],{"name":2894,"color":2895},{"name":2897,"color":2898},454,"MeshRefractionMaterial","2024-07-23T11:40:40Z","https://github.com/Tresjs/cientos/issues/454",0.7520332,{"description":2915,"labels":2916,"number":2923,"owner":2857,"repository":2858,"state":2859,"title":2924,"updated_at":2925,"url":2926,"score":2927},"### Describe the bug\r\n\r\nSome controls have long-standing bugs where changing props causes duplicate events to be added. \r\n\r\nE.g., flipping makeDefault in CameraControls causes duplicate events to be added. This will add 100 duplicate events:\r\n\r\n```\r\nconst makeDefault = shallowRef(true)\r\n// Flip `makeDefault` 100 times, add 100 events! Lol\r\nArray.from({length: 100}).fill(0).forEach(\r\n (_, i) => setTimeout(\r\n () => {\r\n makeDefault.value = !makeDefault.value\r\n }, i * 1000 / 25)\r\n)\r\n\u003C/script>\r\n\r\n\u003Ctemplate>\r\n \u003CTresLeches />\r\n \u003CTresCanvas v-bind=\"gl\">\r\n \u003CTresPerspectiveCamera :position=\"[5, 5, 5]\" />\r\n \u003CCameraControls\r\n v-bind=\"controlsState\"\r\n ref=\"controlsRef\"\r\n :make-default=\"makeDefault\"\r\n @change=\"onChange\"\r\n @start=\"onStart\"\r\n @end=\"onEnd\"\r\n />\r\n \r\n```\r\n \r\n \r\nThat means every time these emits would be expected to fire once, they're fired 100 times:\r\n\r\n```\r\nfunction addEventListeners() {\r\n useEventListener(controlsRef.value as any, 'update', () => {\r\n emit('change', controlsRef.value)\r\n invalidateOnDemand()\r\n })\r\n useEventListener(controlsRef.value as any, 'controlend', () => emit('end', controlsRef.value))\r\n useEventListener(controlsRef.value as any, 'controlstart', () => emit('start', controlsRef.value))\r\n}\r\n```\r\n\r\nThe problem is the anonymous functions:\r\n\r\nNote: If a particular anonymous function is in the list of event listeners registered for a certain target, and then later in the code, an identical anonymous function is given in an addEventListener call, the second function will also be added to the list of event listeners for that target.\r\n\r\nIndeed, anonymous functions are not identical even if defined using the same unchanging source-code called repeatedly, even if in a loop.\r\n\r\nRepeatedly defining the same unnamed function in such cases can be problematic. (See Memory issues, below.)\r\n\r\nhttps://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener\r\nMDN Web Docs\r\n[EventTarget: addEventListener() method - Web APIs | MDN](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener)\r\nThe addEventListener() method of the EventTarget interface\r\nsets up a function that will be called whenever the specified event is delivered to the target.\r\n\r\n### Reproduction\r\n\r\nN/A\r\n\r\n### Steps to reproduce\r\n\r\n_No response_\r\n\r\n### System Info\r\n\r\n_No response_\r\n\r\n### Used Package Manager\r\n\r\nnpm\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.",[2917,2920],{"name":2918,"color":2919},"bug","d73a4a",{"name":2921,"color":2922},"p3-minor-bug","F28C37",457,"useEventListener bug in controls","2024-07-24T06:42:25Z","https://github.com/Tresjs/cientos/issues/457",0.7562551,{"description":2929,"labels":2930,"number":2935,"owner":2857,"repository":2871,"state":2859,"title":2936,"updated_at":2937,"url":2938,"score":2939},"### Description\r\n\r\nAs a developer using TresJS, I want to have a `\u003CPortal>` component that can contain a separate `Scene` and `context`.\r\n\r\n### Suggested solution\r\n\r\nProvide a `\u003CPortal>` component similar to R3F.\r\n\r\n### Requirements\r\n\r\n- [ ] Add override-able pointer to `TresContext` (Also add as prop to TresCanvas: see #581 ); use vanilla `THREE.Vector2`, accept `Vector2` and `UsePointerOptions` as TresCanvas prop\r\n- [ ] Make these fields on `TresContext` swappable and (in some case injectable by the user): scene, camera, cameras, controls, raycaster, eventManager, sizes\r\n\r\n### Validations\r\n\r\n- [X] I agree to follow this project's [Code of Conduct](https://github.com/Tresjs/tres/blob/main/CODE_OF_CONDUCT.md)\r\n- [X] Read the [Contributing Guidelines](https://github.com/Tresjs/tres/blob/main/CONTRIBUTING.md).\r\n- [X] Read the [docs](https://tresjs.org/guide).\r\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.",[2931,2932],{"name":2897,"color":2898},{"name":2933,"color":2934},"v5","EFC959",789,"Portal","2025-02-06T09:59:01Z","https://github.com/Tresjs/tres/issues/789",0.7573346,{"description":2941,"labels":2942,"number":2943,"owner":2857,"repository":2871,"state":2944,"title":2945,"updated_at":2946,"url":2947,"score":2948},"### Describe the bug\r\n\r\nIf the canvasClick event is removed, it will run normally.\r\nThe requirement is to click on a blank area of the scene to modify the model back to its original color.\r\nIs there any way to achieve this?\r\n\r\n### Reproduction\r\n\r\nhttps://stackblitz.com/edit/stackblitz-starters-qdxqhm?file=src%2Fcomponents%2FTheExperience.vue\r\n\r\n### Steps to reproduce\r\n\r\nRun npm install followed by npm run dev\r\n\r\n### System Info\r\n\r\n_No response_\r\n\r\n### Used Package Manager\r\n\r\nnpm\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/tres/blob/main/CODE_OF_CONDUCT.md)\r\n- [X] Read the [Contributing Guidelines](https://github.com/Tresjs/tres/blob/main/CONTRIBUTING.md).\r\n- [X] Read the [docs](https://tresjs.org/guide).\r\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.\r\n- [X] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.",[],561,"closed","Clicking on the scene cannot update model events","2024-03-05T08:24:56Z","https://github.com/Tresjs/tres/issues/561",0.6671594,{"description":2950,"labels":2951,"number":2956,"owner":2857,"repository":2871,"state":2944,"title":2957,"updated_at":2958,"url":2959,"score":2960},"### Describe the bug\n\nReported by Guillaume Leo on discord:\r\n\r\n- Object prop is not reactive\r\n- Conditional rendering is not working. `v-if` \r\n\r\nhttps://discord.com/channels/1047126995424780288/1193882152811642892\n\n### Reproduction\n\nhttps://stackblitz.com/fork/github/stackblitz/starters/tree/main/tres?title=TresJS&description=Quick%20start%20repo%20for%20Tres.js%20projects\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.",[2952,2953],{"name":2918,"color":2919},{"name":2954,"color":2955},"v4","7980EA",503,"Conditional and dynamic rendering of primitives.","2024-05-30T06:40:39Z","https://github.com/Tresjs/tres/issues/503",0.7161679,{"description":2962,"labels":2963,"number":2968,"owner":2857,"repository":2871,"state":2944,"title":2969,"updated_at":2970,"url":2971,"score":2972},"**Describe the bug**\r\nUpdate new way of loading controls for examples",[2964,2965],{"name":2868,"color":2869},{"name":2966,"color":2967},"pending-triage","97A4FE",167,"[v2] - Update three/example/loaders to new url from three","2023-04-06T07:38:35Z","https://github.com/Tresjs/tres/issues/167",0.71944684,["Reactive",2974],{},["Set"],["ShallowReactive",2977],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$f6o7JoYw97uzmJm5Qn-r28JgZE_6TZbzuXzdLzNlTraY":-1},"/Tresjs/tres/543"]