\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.",[3065,3066],{"name":3039,"color":3040},{"name":3067,"color":3068},"p3-minor-bug","F28C37",457,"useEventListener bug in controls","2024-07-24T06:42:25Z","https://github.com/Tresjs/cientos/issues/457",0.76495016,{"description":3075,"labels":3076,"number":3082,"owner":3028,"repository":3083,"state":3030,"title":3084,"updated_at":3085,"url":3086,"score":3087},"### Description\n\nYou should be able to emit the contact force events, when 2 objects collide\n\n### Suggested solution\n\nCould be base on: https://github.com/pmndrs/react-three-rapier?tab=readme-ov-file#contact-force-events Using Vue Interface for emit and events\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/rapier/blob/main/CODE_OF_CONDUCT.md)\n- [X] Read the [Contributing Guidelines](https://github.com/Tresjs/rapier/blob/main/CONTRIBUTING.md).\n- [X] Read the [docs](https://rapier.tresjs.org/guide).\n- [X] Check that there isn't [already an issue](https://github.com/tresjs/rapier/issues) that reports the same bug to avoid creating a duplicate.",[3077,3078,3079],{"name":3019,"color":3020},{"name":3025,"color":3026},{"name":3080,"color":3081},"v1","5B6B67",106,"rapier","Contact force events","2024-10-11T09:22:18Z","https://github.com/Tresjs/rapier/issues/106",0.7708954,{"description":3089,"labels":3090,"number":3092,"owner":3028,"repository":3045,"state":3030,"title":3093,"updated_at":3094,"url":3095,"score":3096},"### Describe the bug\r\n\r\nIf you just add TresCanvas to your code, you will get the error.\r\n[Vue warn]: onUnmounted is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.\r\n\r\nsample of stackblitz has same problem too.\r\n\r\n\r\nAn error occurs even if you only add TresCanvas to a vue project without anything.\r\n\r\nApp.vue\r\n```\u003Cscript setup lang=\"ts\">\r\nimport { RouterLink, RouterView } from 'vue-router'\r\nimport HelloWorld from './components/HelloWorld.vue'\r\n\u003C/script>\r\n\r\n\u003Ctemplate>\r\n \u003Cheader>\r\n \u003Cimg alt=\"Vue logo\" class=\"logo\" src=\"@/assets/logo.svg\" width=\"125\" height=\"125\" />\r\n\r\n \u003Cdiv class=\"wrapper\">\r\n \u003CHelloWorld msg=\"You did it!\" />\r\n\r\n \u003Cnav>\r\n \u003CRouterLink to=\"/\">Home\u003C/RouterLink>\r\n \u003CRouterLink to=\"/about\">About\u003C/RouterLink>\r\n \u003C/nav>\r\n \u003C/div>\r\n \u003C/header>\r\n\r\n \u003CRouterView />\r\n\u003C/template>\r\n\r\n\u003Cstyle scoped>\r\n\r\n\u003C/style>\r\n```\r\n\r\nAboutView\r\n```\r\n\u003Ctemplate>\r\n \u003Cdiv class=\"about\">\r\n \u003Ch1>This is an about page\u003C/h1>\r\n \u003Cdiv class=\"canvas\">\r\n \u003CTresCanvas>\r\n \u003C!-- Your scene here -->\r\n \u003C/TresCanvas>\r\n \u003C/div>\r\n \u003C/div>\r\n\u003C/template>\r\n\u003Cscript setup lang=\"ts\">\r\nimport { TresCanvas } from '@tresjs/core'\r\n\u003C/script>\r\n\u003Cstyle>\r\n@media (min-width: 1024px) {\r\n .about {\r\n min-height: 100vh;\r\n display: flex;\r\n align-items: center;\r\n }\r\n}\r\n.canvas {\r\n width: 100px;\r\n height: 100px;\r\n}\r\n\u003C/style>\r\n```\r\n\r\n### Reproduction\r\n\r\nhttps://stackblitz.com/edit/tresjs-minimal-reproduction\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: Linux 5.15 Ubuntu 22.04.4 LTS 22.04.4 LTS (Jammy Jellyfish)\r\n CPU: (8) x64 13th Gen Intel(R) Core(TM) i7-1355U\r\n Memory: 1.70 GB / 7.76 GB\r\n Container: Yes\r\n Shell: 5.1.16 - /bin/bash\r\n Binaries:\r\n Node: 20.18.0 - ~/.nvm/versions/node/v20.18.0/bin/node\r\n npm: 11.0.0 - ~/.nvm/versions/node/v20.18.0/bin/npm\r\n npmPackages:\r\n @tresjs/cientos: ^4.0.3 => 4.0.3 \r\n @tresjs/core: ^4.3.2 => 4.3.2 \r\n vite: ~6.0.6 => 6.0.6\r\n```\r\n\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.",[3091],{"name":3039,"color":3040},905,"I get an error when using TresCanvas. Like this .. ( onUnmounted is called when there is no active component instance to be associated with. Lifecycle injection APIs can... )","2025-02-08T10:41:31Z","https://github.com/Tresjs/tres/issues/905",0.78180414,{"description":3098,"labels":3099,"number":3101,"owner":3028,"repository":3029,"state":3102,"title":3103,"updated_at":3104,"url":3105,"score":3106},"### Describe the bug\n\nWhen I want to use dynamic classes in HTML from cientos, nothing happens.\r\n\r\nComponent: `Telescope`\n\n### Reproduction\n\nhttps://github.com/Dekier/html-error\n\n### Steps to reproduce\n\nyarn => yarn dev\n\n### System Info\n\n_No response_\n\n### Used Package Manager\n\nyarn\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.",[3100],{"name":3039,"color":3040},251,"closed","[Html] - problem with dynamic classes (nuxt)","2023-10-18T10:50:28Z","https://github.com/Tresjs/cientos/issues/251",0.7372727,{"description":3108,"labels":3109,"number":3101,"owner":3028,"repository":3045,"state":3102,"title":3113,"updated_at":3114,"url":3115,"score":3106},"**Describe the bug**\r\n\r\nWhen using `useRenderLoop`, immediately calling `pause` doesn't cause the animation to be initially paused:\r\n\r\n```js\r\nconst { onLoop, pause } = useRenderLoop();\r\nonLoop(() => {\r\n if (boxMeshRef.value) {\r\n boxMeshRef.value.rotation.y += 0.01;\r\n }\r\n});\r\npause();\r\n```\r\n\r\nI'd expect the above code to result in an animation that doesn't run until `play()` is ran, but instead, it's as if `pause()` was never called.\r\n\r\nThe following also don't work:\r\n\r\n- Calling `pause()` in a watcher on `boxMeshRef.value`\r\n- Calling `pause()` in any watcher with `immediate: true`\r\n- Calling `pause()` in `onMounted()`\r\n\r\nThe only workaround I've found is to call `pause()` in a `nextTick()` callback.\r\n\r\n**Reproduction**\r\n\r\nhttps://stackblitz.com/edit/tresjs-basic-q53da8?file=src/components/TheExperience.vue\r\n\r\n**System Info**\r\n\r\n```\r\n System:\r\n OS: macOS 13.2.1\r\n CPU: (10) arm64 Apple M2 Pro\r\n Memory: 878.45 MB / 16.00 GB\r\n Shell: 5.8.1 - /bin/zsh\r\n Binaries:\r\n Node: 18.15.0 - ~/.nvm/versions/node/v18.15.0/bin/node\r\n Yarn: 1.22.19 - ~/.nvm/versions/node/v18.15.0/bin/yarn\r\n npm: 9.5.0 - ~/.nvm/versions/node/v18.15.0/bin/npm\r\n Browsers:\r\n Chrome: 112.0.5615.137\r\n Safari: 16.3\r\n npmPackages:\r\n @tresjs/cientos: ^2.0.0-rc.1 => 2.0.0-rc.1\r\n @tresjs/core: ^2.0.0-rc.2 => 2.0.0-rc.2\r\n vite: ^4.0.0 => 4.0.1\r\n```\r\n",[3110],{"name":3111,"color":3112},"investigation","D03599","Calling `pause` immediately after `onLoop` doesn't do anything","2024-05-30T06:46:00Z","https://github.com/Tresjs/tres/issues/251",{"description":3117,"labels":3118,"number":3119,"owner":3028,"repository":3029,"state":3102,"title":3120,"updated_at":3121,"url":3122,"score":3123},"### Describe the bug\n\nIn v3.7.0, I can‘t find BakeShadows or its exported in path `dist/core/misc`. Did there be an error during packaging? thanks.\r\nThe content of `dist/core/misc/index.d.ts` is:\r\n```\r\nimport { useTweakPane } from './useTweakPane';\r\nimport { Stats } from './Stats';\r\nimport { StatsGl } from './StatsGl';\r\nimport Html from './html/HTML.vue';\r\nexport { useTweakPane, Html, Stats, StatsGl };\r\n```\n\n### Reproduction\n\nhttps://stackblitz.com/edit/tresjs-basic?file=package.json,src%2Fcomponents%2FTheExperience.vue\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/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.",[],334,"BakeShadows is missing from dist folder in v3.7.0","2024-01-19T02:41:27Z","https://github.com/Tresjs/cientos/issues/334",0.7527159,{"description":3125,"labels":3126,"number":3130,"owner":3028,"repository":3045,"state":3102,"title":3131,"updated_at":3132,"url":3133,"score":3134},"### Describe the bug\n\nWe should automatically invalidate when useTexture resolves the textures fetching. Is not really noticeable on the reproduction but I have a asset heavy demo that occurs \n\nhttps://github.com/user-attachments/assets/bfe5ce99-64c8-4b7a-aeea-c97858614a8c\n\n### Reproduction\n\nhttps://stackblitz.com/~/edit/tresjs-minimal-reproduction-sht9ttt5?file=src/App.vue\n\n### Steps to reproduce\n\n_No response_\n\n### System Info\n\n```shell\nSystem:\n OS: Linux 5.0 undefined\n CPU: (4) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz\n Memory: 0 Bytes / 0 Bytes\n Shell: 1.0 - /bin/jsh\n Binaries:\n Node: 18.20.3 - /usr/local/bin/node\n Yarn: 1.22.19 - /usr/local/bin/yarn\n npm: 10.2.3 - /usr/local/bin/npm\n pnpm: 8.15.6 - /usr/local/bin/pnpm\n npmPackages:\n @tresjs/cientos: 4.1.0 => 4.1.0 \n @tresjs/core: 4.3.2 => 4.3.2 \n @tresjs/leches: ^0.14.0 => 0.14.0 \n vite: ^6.0.3 => 6.0.5\n```\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.",[3127],{"name":3128,"color":3129},"p4-important-bug","D93F0B",909,"on-demand invalidation not triggered when assets are loaded.","2025-02-06T09:34:37Z","https://github.com/Tresjs/tres/issues/909",0.7545665,["Reactive",3136],{},["Set"],["ShallowReactive",3139],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fJ_SJJD97tcnTyXi6tbWkVdRf__A7jBzIAE4NynJHYZw":-1},"/Tresjs/tres/518"]