\r\n \u003C/template>\r\n\u003C/TresCanvas>\r\n\u003Cscript>\r\nconst options = [ {\r\n label: '平行光',\r\n value: 'TresDirectionalLight',\r\n },\r\n {\r\n label: '点光源',\r\n value: 'TresPointLight',\r\n },\r\n {\r\n label: '聚光灯',\r\n value: 'TresSpotLight',\r\n },\r\n {\r\n label: '半球光',\r\n value: 'TresHemisphereLight',\r\n }]\r\n const lightSetting = ref([{\r\n type: 'TresDirectionalLight',\r\n config: {\r\n position: [5, 5, 5],\r\n targets: [0, 0, 0],\r\n color: '#ffffff',\r\n intensity: 1,\r\n castShadow: false\r\n }\r\n }\r\n ])\r\n\u003C/script>\r\n当我改变 type 值的时候就报错 Cannot read properties of null (reading 'children'),不加 v-light-helper的时候正常不会报错。\n\n### Reproduction\n\n还未上线\n\n### Steps to reproduce\n\n\u003CTresCanvas v-bind=\"canvasConfig\" ref=\"TresCanvasRef\">\r\n \u003Ctemplate v-for=\"(item,i) in lightSetting\">\r\n \u003Ccomponent ref=\"lightRef\" :is=\"item.type\" v-light-helper v-bind=\"item.config\" />\r\n \u003C/template>\r\n\u003C/TresCanvas>\r\n\u003Cscript>\r\nconst options = [ {\r\n label: '平行光',\r\n value: 'TresDirectionalLight',\r\n },\r\n {\r\n label: '点光源',\r\n value: 'TresPointLight',\r\n },\r\n {\r\n label: '聚光灯',\r\n value: 'TresSpotLight',\r\n },\r\n {\r\n label: '半球光',\r\n value: 'TresHemisphereLight',\r\n }]\r\n const lightSetting = ref([{\r\n type: 'TresDirectionalLight',\r\n config: {\r\n position: [5, 5, 5],\r\n targets: [0, 0, 0],\r\n color: '#ffffff',\r\n intensity: 1,\r\n castShadow: false\r\n }\r\n }\r\n ])\r\n\u003C/script>\r\n当我改变 type 值的时候就报错 Cannot read properties of null (reading 'children'),不加 v-light-helper的时候正常不会报错。\n\n### System Info\n\n```shell\nCannot read properties of null (reading 'children')\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/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.",[],871,"tres"," Cannot read properties of null (reading 'children')","2024-11-13T01:30:10Z","https://github.com/Tresjs/tres/issues/871",0.76122946,{"description":2906,"labels":2907,"number":2917,"owner":2877,"repository":2918,"state":2919,"title":2920,"updated_at":2921,"url":2922,"score":2923},"### Describe the bug\r\n\r\nWhen using OrbitControls, the scene freezes unrecoverably.\r\n\r\n### Reproduction\r\n\r\nhttps://tresjs.org/guide/\r\n\r\n### Steps to reproduce\r\n\r\ndo this:\r\n\r\n\r\n\r\n### System Info\r\n\r\n_No response_\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.",[2908,2911,2914],{"name":2909,"color":2910},"bug","d73a4a",{"name":2912,"color":2913},"good first issue","7057ff",{"name":2915,"color":2916},"help wanted","008672",100,"cientos","closed","OrbitControls fail on touch devices","2023-06-27T15:43:33Z","https://github.com/Tresjs/cientos/issues/100",0.6984732,{"description":2925,"labels":2926,"number":1508,"owner":2877,"repository":2918,"state":2919,"title":2928,"updated_at":2929,"url":2930,"score":2931},"### Describe the bug\r\n\r\nI used the component OrbitControls,\r\nBut set enableDamping, the controls has no damping\r\n\r\n### Reproduction\r\n\r\nhttps://stackblitz.com/edit/tresjs-basic-krexte?file=src%2Fcomponents%2FTheExperience.vue\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",[2927],{"name":2909,"color":2910},"Why does the enableDamping of orbitControls not take effect?","2023-05-24T07:22:27Z","https://github.com/Tresjs/cientos/issues/80",0.70200354,{"description":2933,"labels":2934,"number":1508,"owner":2877,"repository":2936,"state":2919,"title":2937,"updated_at":2938,"url":2939,"score":2931},"**Describe the bug**\r\nA scene using `EffectComposer` gets broken when resizing the screen\r\n\r\n**Reproduction**\r\n[Reproduction](https://stackblitz.com/edit/nuxt-starter-hzbvpr?file=nuxt.config.ts,app.vue,components%2FModel.vue)\r\n\r\n**Steps**\r\nSteps to reproduce the behavior:\r\n1. Go to '...'\r\n2. Resize Scene\r\n\r\n**Expected behavior**\r\nScene with post-processing doesn't break\r\n\r\n**Screenshots**\r\n\r\nhttps://github.com/Tresjs/post-processing/assets/4699008/ce16b034-1b7b-49df-a708-320cf13c9831\r\n\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 System:\r\n OS: macOS 14.1\r\n CPU: (8) arm64 Apple M1 Pro\r\n Memory: 89.77 MB / 16.00 GB\r\n Shell: 5.9 - /bin/zsh\r\n Binaries:\r\n Node: 18.14.1 - ~/.nvm/versions/node/v18.14.1/bin/node\r\n Yarn: 1.22.19 - /usr/local/bin/yarn\r\n npm: 9.3.1 - ~/.nvm/versions/node/v18.14.1/bin/npm\r\n Browsers:\r\n Brave Browser: 118.1.59.124\r\n Chrome: 119.0.6045.105\r\n Firefox: 118.0.1\r\n Safari: 17.1\r\n npmPackages:\r\n @tresjs/cientos: ^3.6.0 => 3.6.0 \r\n @tresjs/leches: 0.14.0-next.0 => 0.14.0-next.0 \r\n @tresjs/nuxt: ^1.2.2 => 1.2.2 \r\n @tresjs/post-processing: 0.6.0 => 0.6.0 \r\n```\r\n**Additional context**\r\nAdd any other context about the problem here.\r\n",[2935],{"name":2909,"color":2910},"post-processing","[Nuxt - Astro] Maximum recursive updates exceeded on window resize","2023-11-14T13:32:23Z","https://github.com/Tresjs/post-processing/issues/80",{"description":2941,"labels":2942,"number":2944,"owner":2877,"repository":2900,"state":2919,"title":2945,"updated_at":2946,"url":2947,"score":2948},"\r\n![Uploading Screenshot 2023-05-03 at 13.36.05.png…]()\r\n\r\n\r\n**Describe the bug**\r\nThreeJS team introduced more breaking changes regarding color https://discourse.threejs.org/t/updates-to-color-management-in-three-js-r152/50791\r\n\r\n```\r\nChanges to property names:\r\n\r\nTHREE.WebGLRenderer property .outputEncoding renamed to .outputColorSpace\r\nTHREE.Texture property .encoding renamed to .colorSpace\r\nsRGBEncoding renamed to SRGBColorSpace\r\nLinearEncoding renamed to LinearSRGBColorSpace\r\nChanges to defaults:\r\n\r\nTHREE.WebGLRenderer property .outputColorSpace now defaults to sRGB (THREE.SRGBColorSpace)\r\nTHREE.ColorManagement.enabled now defaults to true\r\n\r\n```\r\n\r\n**Reproduction**\r\nhttps://tresjs.org/guide/\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 System:\r\n OS: macOS 13.2.1\r\n CPU: (8) arm64 Apple M1 Pro\r\n Memory: 79.83 MB / 16.00 GB\r\n Shell: 5.8.1 - /bin/zsh\r\n Binaries:\r\n Node: 18.14.1 - ~/.nvm/versions/node/v18.14.1/bin/node\r\n Yarn: 1.22.19 - /usr/local/bin/yarn\r\n npm: 9.3.1 - ~/.nvm/versions/node/v18.14.1/bin/npm\r\n Browsers:\r\n Brave Browser: 112.1.50.121\r\n Chrome: 112.0.5615.137\r\n Safari: 16.3\r\n npmPackages:\r\n @tresjs/cientos: 2.0.0-beta.6 => 2.0.0-beta.6 \r\n @tresjs/core: 2.0.0-beta.11 => 2.0.0-beta.11 \r\n vite: ^4.3.4 => 4.3.4 \r\n```\r\n\r\n**Additional context**\r\nAdd any other context about the problem here.\r\n",[2943],{"name":2909,"color":2910},243,"Three v152 color management changes","2023-05-03T11:55:08Z","https://github.com/Tresjs/tres/issues/243",0.72043395,{"description":2950,"labels":2951,"number":2953,"owner":2877,"repository":2900,"state":2919,"title":2954,"updated_at":2955,"url":2956,"score":2957},"## Bug\r\n\r\nNodeOps accidentally shares `scene` across multiple `TresCanvas`s.\r\n\r\nSee the StackBlitz reproduction for details.\r\n\r\n## Problem\r\n\r\nNodeOps's [`let scene`](https://github.com/Tresjs/tres/blob/f6097a3d6a3e34fddb689266b062869fe5a9bf1e/src/core/nodeOps.ts#L15) is [set whenever a new `Scene` is added to any `TresCanvas`](https://github.com/Tresjs/tres/blob/f6097a3d6a3e34fddb689266b062869fe5a9bf1e/src/core/nodeOps.ts#L84) – i.e., the variable points to the last `Scene` added to a `TresCanvas`. If elements from another `TresCanvas` read `scene` in nodeOps, the code expects that they will find *their* `Scene`, but they do not.\r\n\r\n## Solution?\r\n\r\n### Solution A\r\n\r\nWe could refactor nodeOps as `(context: TresContext) => NodeOps`. \r\n\r\nEvery new instance of `TresCanvas` could create a new nodeOps instance which contains a unique `TresContext` (i.e., with the appropriate `Scene`) within its scope.\r\n\r\n### Solution B\r\n\r\nOtherwise, we could simply recurse up the parent chain until we reach a `Scene` or run out of parents.\r\n\r\n## Reproduction\r\n\r\nhttps://stackblitz.com/edit/tresjs-basic-e6uzmm?file=src%2FApp.vue\r\n\r\n## System Info\r\n\r\n```shell\r\nSystem:\r\n OS: Linux 5.0 undefined\r\n CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz\r\n Memory: 0 Bytes / 0 Bytes\r\n Shell: 1.0 - /bin/jsh\r\n Binaries:\r\n Node: 18.18.0 - /usr/local/bin/node\r\n Yarn: 1.22.19 - /usr/local/bin/yarn\r\n npm: 10.2.3 - /usr/local/bin/npm\r\n pnpm: 8.14.0 - /usr/local/bin/pnpm\r\n npmPackages:\r\n @tresjs/cientos: ^3.5.1 => 3.5.1 \r\n @tresjs/core: ^3.4.1 => 3.4.1 \r\n @tresjs/eslint-config-vue: ^0.2.1 => 0.2.1 \r\n vite: ^4.5.0 => 4.5.0\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.",[2952],{"name":2909,"color":2910},560,"NodeOps shares `scene` across multiple`TresCanvas`s","2024-03-08T10:36:46Z","https://github.com/Tresjs/tres/issues/560",0.72856927,{"description":2959,"labels":2960,"number":2964,"owner":2877,"repository":2900,"state":2919,"title":2965,"updated_at":2966,"url":2967,"score":2968},"### Description\n\nAs a developer using TresJS I would like to have a collection of small recipes demonstrating 3d concepts and integrations with libraries like gsap for animation.\n\n### Suggested solution\n\nReplace examples with a Cookbook section.\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.",[2961],{"name":2962,"color":2963},"docs","0075ca",557,"Cookbook 🧑🍳 ","2024-03-05T08:26:19Z","https://github.com/Tresjs/tres/issues/557",0.728903,{"description":2970,"labels":2971,"number":2974,"owner":2877,"repository":2918,"state":2919,"title":2975,"updated_at":2976,"url":2977,"score":2978},"### Description\n\nAs a developer, I would like to have a composable to easily move and object with path via click https://x.com/AndrewChenE/status/1742001427491455213?s=20\n\n### Suggested solution\n\nDunno yet\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.",[2972,2973],{"name":2912,"color":2913},{"name":2915,"color":2916},325,"Click to move object with Path","2024-01-28T14:11:14Z","https://github.com/Tresjs/cientos/issues/325",0.7436976,["Reactive",2980],{},["Set"],["ShallowReactive",2983],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fWrzPTX5wSITXLCy78aTxXjsP9d-fPq4Lm2uqk9LfkxY":-1},"/Tresjs/tres/287"]