\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.7936281,{"description":2885,"labels":2886,"number":2887,"owner":2868,"repository":2888,"state":2870,"title":2889,"updated_at":2890,"url":2891,"score":2892},"\r\n\r\nCurrently , my only solution is change import \r\nimport { TresCanvas as TC, TresCanvasProps } from '@tresjs/core';\r\n\r\nTo\r\nimport { TresCanvas as TC } from '@tresjs/core';\r\nimport { TresCanvasProps } from '@tresjs/core/dist/components/TresCanvas.vue';\r\n\r\nHave anyone same problem when run experiments ? I tried on Window 10 , node 19.6 and Mac 18.16 have same problem and solution :/ \r\n\r\n",[],54,"lab","Unresolvable type reference TresCanvasProps ","2023-07-18T03:21:05Z","https://github.com/Tresjs/lab/issues/54",0.7940978,{"description":2894,"labels":2895,"number":2867,"owner":2868,"repository":2896,"state":2897,"title":2898,"updated_at":2899,"url":2900,"score":2874},"### Description\r\n\r\nUpdating ` \"@tresjs/core\": \"3.9.0\" ` to **4.0.2**\r\nand maybe ` \"three\": \"^0.164.1\" ` and ` \"@types/three\": \"^0.164.0\" ` to **0.165.0** too\r\n\r\n\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.",[],"nuxt","closed","Update the module to Tres v4","2024-06-26T15:58:18Z","https://github.com/Tresjs/nuxt/issues/105",{"description":2902,"labels":2903,"number":2904,"owner":2868,"repository":2905,"state":2897,"title":2906,"updated_at":2907,"url":2908,"score":2909},"### Describe the bug\n\nWhen zooming on an HTML component it becomes apparent that its content is blurry.\n\n### Reproduction\n\nhttps://play.tresjs.org/#eNqVVVtv2zYU/isHCoY8TJbkOMk6LR3cuEWXYbmg8cOwqA+0RFtMKJIgKSdG4P++Q9IX2S1S1/CDec53vnM/fo3GmpoPSiXzlkZ5dGFKzZQFQ22rgBMxe19E1hTRn4VgjZLawitcEsPK+5pU8vmaqBjuv3y+HEku9b0iJY3hRo6loKhSTMxgCVMtGzi2tab0+I8Oj3M9ImJOzAY0tCh7NGkp9S52RBqqyUgKqyU3MfxlG/6tFaPCStMxHI1WkNLb98oVgYMUAl/GwozDe3gtBEDJKdE+kxyOj96dfLwcnR3HTmN8tiYHq1vqJYSrmuQwJdwEQYBg1uOFovl+kRxCtla1dlupfL9yDmS3pct3K4nqJYZ9kYYeYUfwYWmjOLEUXwAXnYrOexMmKuzejPvuAX68/o5qo2hp2ZyGokKupGGWSYHoh99jcN+vRQTp2my3+JA3sjW0N2ktBmvQ6BU4ndocq518GI2vbm+S/25vr2HZ5XCur6mpd71lMbiv85ZraUlHfk1sndxdBe2KZZ0iFuUzlQ21egE50TMXxEM/hn5yFsOgG3vH81hKgaRUM8KhdFVHq1WXu5Gma4O1wM9aiaNFNeQVM5aIkvampLSe4izLMED4Fy0dspvwR6ZdpaUg/B82q+03yZ/EcOqTZ8guULVART85QVFJjO2FoVrFFiIL/UXBRdppPj6NXXD3s8YgcFYmslqEsW6wQkzkkOH0AChSVX64wrOmLrAc+ln2ixc8s8rWm/eyEEc4foHoB1iACSmfZlq2osJN82t0lGXOD9Lg3PoAozgKy9lriEoejRR4dzx9sVLgucmDQyfrngSnKKLaWmXyNC0rgfYV5WyuE0FtKlSTduHDQXKe9FPXstSJEV1Efst2iMPV+BnuYIH0vyXZln4l3vVinyl5UkQcEvsGOzxNsk3ga2HSMGfT5XYn9RBehxsi43mG8f5KTdMtA15+XOeD69uBD/tZcoaMeGjoS9LsVneFwwnWtPoJ4mDwFjUCexVt2AGka6hL/jQ5TzmbfJdy7+/hAOY9i+FJ8i4ZhI7tqZJGVi3fts/5xH1Y4iJYg6Apm+2tQSkbxTjVt8qdit11IJzL57+9bPNf5G1qWj59R/5oXkI2dzihVM+xx9v5wcNAbVB/ur+hL/h7owxRv6n8Qo3krYsxwC5x8THsDs5He+W3Gm/O2Hx68WduldROoBb/Nr30YX25NwMeBF994Tzez8DojSptMxskg03Bl/8D+Ff00Q==\n\n### Steps to reproduce\n\n_No response_\n\n### System Info\n\n```shell\n\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/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.",[],601,"cientos","Scaled Html component is blurry","2025-03-05T19:08:09Z","https://github.com/Tresjs/cientos/issues/601",0.7413264,{"description":2911,"labels":2912,"number":2928,"owner":2868,"repository":2879,"state":2897,"title":2929,"updated_at":2930,"url":2931,"score":2932},"### Describe the bug\n\nI am using tresjs and would like to reference my newly loaded .glb and a directional light.\r\nI should say, the page actually functions as expected, however the red squiggly line appears in my local VSCode with an error, and so would like to nail it down if possible.\r\n\r\n\r\nFinal note: this typescript compiler error only occurs on my local VSCode system, as can be seen from the StackBlitz link below, it doesn't occur there.\r\nSo I'm not sure if this is even a bug, but I'd like to ask for help to remove the red squiggly line from my local system, thanks if possible.\n\n### Reproduction\n\nhttps://stackblitz.com/edit/vitejs-vite-qn7w4v\n\n### Steps to reproduce\n\nI've tried changing the type of ref to a few things, eg: \u003CTHREE.DirectionalLight>, however nothing seems to remove this error:\r\n\r\n(property) ref?: ((Ref\u003CTHREE.DirectionalLight> | Readonly\u003CRef\u003CTHREE.DirectionalLight>>) & VNodeRef) | undefined\r\n\n\n### System Info\n\n```shell\nHere is my package.json for that project:\r\n\r\n{\r\n \"name\": \"tresjs_1\",\r\n \"private\": true,\r\n \"version\": \"0.0.0\",\r\n \"type\": \"module\",\r\n \"scripts\": {\r\n \"dev\": \"vite\",\r\n \"build\": \"vue-tsc && vite build\",\r\n \"preview\": \"vite preview\"\r\n },\r\n \"dependencies\": {\r\n \"@tresjs/cientos\": \"^2.1.3\",\r\n \"@tresjs/core\": \"^2.1.2\",\r\n \r\n \"three\": \"^0.153.0\",\r\n \"three-stdlib\": \"^2.23.9\",\r\n \"vue\": \"^3.2.47\"\r\n },\r\n \"devDependencies\": {\r\n \r\n \"@types/three\": \"^0.152.1\",\r\n \"@vitejs/plugin-vue\": \"^4.1.0\",\r\n \"typescript\": \"^5.0.2\",\r\n \"vite\": \"^4.3.9\",\r\n \"vue-tsc\": \"^1.4.2\"\r\n }\r\n}\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.",[2913,2916,2919,2922,2925],{"name":2914,"color":2915},"bug","d73a4a",{"name":2917,"color":2918},"good first issue","7057ff",{"name":2920,"color":2921},"help wanted","008672",{"name":2923,"color":2924},"dx","1576AD",{"name":2926,"color":2927},"types","5C076E",301,"Typescript compiler error for refs with tresjs","2023-07-11T11:38:59Z","https://github.com/Tresjs/tres/issues/301",0.7599301,{"description":2934,"labels":2935,"number":2936,"owner":2868,"repository":2879,"state":2897,"title":2937,"updated_at":2938,"url":2939,"score":2940},"### Describe the bug\n\nUsing the TresJS nuxt module on Nuxt 3.8.1. \r\nWhen trying to use `useTexture` directly in a script setup, I'm getting a \"500 - document is not defined\" error upon loading the page!\r\n\r\nSo this:\r\n```\r\n\u003Cscript setup lang=\"ts\">\r\nimport { extend } from '@tresjs/core';\r\nimport { OrbitControls } from '@tresjs/cientos';\r\n\r\nextend({ OrbitControls });\r\n\r\nconst pbrTexture = await useTexture({\r\n map: 'https://raw.githubusercontent.com/Tresjs/assets/main/textures/black-rock/Rock035_2K_Displacement.jpg',\r\n displacementMap:\r\n 'https://raw.githubusercontent.com/Tresjs/assets/main/textures/black-rock/Rock035_2K_Displacement.jpg',\r\n roughnessMap:\r\n 'https://raw.githubusercontent.com/Tresjs/assets/main/textures/black-rock/Rock035_2K_Roughness.jpg',\r\n normalMap:\r\n 'https://raw.githubusercontent.com/Tresjs/assets/main/textures/black-rock/Rock035_2K_NormalGL.jpg',\r\n ambientOcclusion:\r\n 'https://raw.githubusercontent.com/Tresjs/assets/main/textures/black-rock/Rock035_2K_AmbientOcclusion.jpg',\r\n});\r\n\u003C/script>\r\n```\r\n\r\nIs throwing the error when directly calling the correspondig route.\r\n\r\nWhat is working is wrapping `useTexture` inside a onBeforeMount hook:\r\n\r\n```\r\n\u003Cscript setup lang=\"ts\">\r\nimport { extend } from '@tresjs/core';\r\nimport { OrbitControls } from '@tresjs/cientos';\r\n\r\nextend({ OrbitControls });\r\n\r\nconst pbrTexture2 = ref();\r\n\r\nonBeforeMount(async () => {\r\n pbrTexture2.value = await useTexture({\r\n map: 'https://raw.githubusercontent.com/Tresjs/assets/main/textures/black-rock/Rock035_2K_Displacement.jpg',\r\n displacementMap:\r\n 'https://raw.githubusercontent.com/Tresjs/assets/main/textures/black-rock/Rock035_2K_Displacement.jpg',\r\n roughnessMap:\r\n 'https://raw.githubusercontent.com/Tresjs/assets/main/textures/black-rock/Rock035_2K_Roughness.jpg',\r\n normalMap:\r\n 'https://raw.githubusercontent.com/Tresjs/assets/main/textures/black-rock/Rock035_2K_NormalGL.jpg',\r\n ambientOcclusion:\r\n 'https://raw.githubusercontent.com/Tresjs/assets/main/textures/black-rock/Rock035_2K_AmbientOcclusion.jpg',\r\n });\r\n});\r\n\u003C/script>\r\n```\r\n\r\nI've provided a very basic reproduction below!\n\n### Reproduction\n\nhttps://stackblitz.com/edit/nuxt-starter-fn4snl?file=app.vue\n\n### Steps to reproduce\n\nSimply navigate to the reproduction link\n\n### System Info\n\n```shell\nFrom Stackblitz: \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: 9.4.2 - /usr/local/bin/npm\r\n pnpm: 8.9.2 - /usr/local/bin/pnpm\r\n npmPackages:\r\n @tresjs/cientos: ^3.6.0 => 3.6.0 \r\n @tresjs/nuxt: ^1.2.2 => 1.2.2 \r\n @tresjs/post-processing: ^0.5.0 => 0.5.0 \r\n\r\nFrom my Local environment:\r\n System:\r\n OS: Windows 11 10.0.22621\r\n CPU: (16) x64 13th Gen Intel(R) Core(TM) i7-1360P\r\n Memory: 10.65 GB / 31.64 GB\r\n Binaries:\r\n Node: 18.18.2 - C:\\Program Files\\nodejs\\node.EXE\r\n Yarn: 1.22.19 - C:\\Program Files\\nodejs\\yarn.CMD\r\n npm: 9.8.1 - C:\\Program Files\\nodejs\\npm.CMD\r\n pnpm: 8.10.2 - ~\\AppData\\Local\\pnpm\\pnpm.EXE\r\n Browsers:\r\n Edge: Chromium (119.0.2151.58)\r\n Internet Explorer: 11.0.22621.1\n```\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.",[],444,"Document is not defined when using `useTexture`","2023-12-11T14:42:48Z","https://github.com/Tresjs/tres/issues/444",0.7628359,{"description":2942,"labels":2943,"number":2951,"owner":2868,"repository":2879,"state":2897,"title":2952,"updated_at":2953,"url":2954,"score":2955},"### Describe the bug\n\nI am importing useSeek in my project:\r\n```typescript\r\nimport { useSeek } from \"@tresjs/core\";\r\n```\r\n\r\nSince the upgrade to Tres 3.8.0, I get the error `Module \"\"@tresjs/core\"\" has no exported member \"useSeek\". Did you mean to use \"import useSeek from \"@tresjs/core\"\" instead?`\r\n\r\nIndeed, useSeek, useRaycaster and useLoader which are exported in src/composables/index.d.ts don't seem to be present in the package anymore.\n\n### Reproduction\n\nhttps://www.runpkg.com/?@tresjs/core@3.8.0/dist/src/composables/index.d.ts\n\n### Steps to reproduce\n\nUnfortunately I didn't manage to reproduce the issue on Stackblitz, but the link above shows that the 3 files are missing from the directory where it's supposed to be imported from.\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.",[2944,2945,2948],{"name":2914,"color":2915},{"name":2946,"color":2947},"p2-edge-case","ABCC40",{"name":2949,"color":2950},"regression","167F7A",619,"useSeek, useRaycaster and useLoader are missing from TresJS 3.8.0","2024-04-08T10:24:47Z","https://github.com/Tresjs/tres/issues/619",0.7641408,{"description":2957,"labels":2958,"number":2963,"owner":2868,"repository":2879,"state":2897,"title":2964,"updated_at":2965,"url":2966,"score":2967},"### Describe the bug\n\n\"Hello, I have two questions:\r\n\r\n1.In the custom rendering, it seems that Vue's unmount hooks, 'onUnmounted' and 'onBeforeUnmount', are not working. I'm using 'onLoop', and when I navigate to another page and then return, it creates a new 'onLoop' which runs alongside the previous one, including the 'onLoop' inside 'useFBO'. Currently, I can only unmount them by using 'onLoop.off' at the root canvas component.\r\n2.I am using version 3.5.1, and I've noticed significant frame drops with touch and other events. I'm not sure if this has been optimized in newer versions.\r\n3.I encounter a problem when using 'Tres' on two different pages. When I navigate from page 1 with 'tres' to page 2 with 'tres', nothing is displayed. However, if I go from page 1 with 'tres' to page 3 without 'tres', and then to page 2 with 'tres', this problem does not occur.\"\r\n\n\n### Reproduction\n\nhttps://github.com/zhangyijie0214/nuxt-tres-test\n\n### Steps to reproduce\n\nnpm install\r\nnpm run dev\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.",[2959,2960],{"name":2914,"color":2915},{"name":2961,"color":2962},"waiting for author","B145BC",475,"Routing Jump - Problem Occurring","2024-02-18T01:59:58Z","https://github.com/Tresjs/tres/issues/475",0.77450556,{"description":2969,"labels":2970,"number":2981,"owner":2868,"repository":2879,"state":2897,"title":2982,"updated_at":2983,"url":2984,"score":2985},"### Description\r\n\r\nI have a model which is animated in blender and I am able to play it in Tres. But I want to control the timeline based on the window scroll or any value in the app. How can I achieve this? I went through the docs completely but didn't find anything..\r\n\r\n### Suggested solution\r\n\r\nA function to control the animation like setTime or setFrame.\r\n\r\n### Alternative\r\n\r\n_No response_\r\n\r\n### Reproduction Repository\r\nhttps://github.com/AnupamKris/threeBugFix\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.",[2971,2974,2977,2980],{"name":2972,"color":2973},"pending-triage","97A4FE",{"name":2975,"color":2976},"needs reproduction","511ECF",{"name":2978,"color":2979},"investigation","D03599",{"name":2961,"color":2962},648,"Control GLTF animation based on a value or scroll.","2024-07-06T13:48:46Z","https://github.com/Tresjs/tres/issues/648",0.7765453,["Reactive",2987],{},["Set"],["ShallowReactive",2990],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$f4ibJ0Tprrim5lJW7aruKFCpgj_6Bk3cEBMNGzQTAu2w":-1},"/Tresjs/rapier/105"]