\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," Cannot read properties of null (reading 'children')","2024-11-13T01:30:10Z","https://github.com/Tresjs/tres/issues/871",0.7062381,{"description":2895,"labels":2896,"number":2897,"owner":2853,"repository":2854,"state":2855,"title":2898,"updated_at":2899,"url":2900,"score":2901},"### Describe the bug\n\ni have made a clean nuxt 3.15.4 installation, with three.js 0.174.0, @tresjs/core 4.3.3 and @tresjs/nuxt 3.0.8, in firefox.\nin the console, i have these warnings:\n```\nMouseEvent.mozPressure is deprecated. Use PointerEvent.pressure instead. [tres.js:695:6](http://localhost:3000/_nuxt/node_modules/@tresjs/core/dist/tres.js)\nMouseEvent.mozInputSource is deprecated. Use PointerEvent.pointerType instead. [tres.js:695:6](http://localhost:3000/_nuxt/node_modules/@tresjs/core/dist/tres.js)\n```\nthis probably suggests that tresjs uses older browser mouse events. i have opened the same nuxt instance in chrome and it didnt give any warnings, so this is definitely an firefox-only issue.\n\nuser agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:135.0) Gecko/20100101 Firefox/135.0\n\n### Reproduction\n\nhttps://stackblitz.com/edit/tresjs-minimal-reproduction\n\n### Steps to reproduce\n\nstackblitz should run in firefox browser, on chrome this warning doesnt exist\n\n### System Info\n\n```shell\nSystem:\n OS: Windows 11 10.0.26100\n CPU: (12) x64 AMD Ryzen 5 7535HS with Radeon Graphics\n Memory: 4.49 GB / 23.32 GB\n Binaries:\n Node: 23.6.1 - C:\\nvm4w\\nodejs\\node.EXE\n npm: 10.9.2 - C:\\nvm4w\\nodejs\\npm.CMD\n pnpm: 10.2.0 - C:\\nvm4w\\nodejs\\pnpm.CMD\n Browsers:\n Edge: Chromium (132.0.2957.140)\n Internet Explorer: 11.0.26100.1882\n npmPackages:\n @tresjs/core: ^4.3.3 => 4.3.3\n @tresjs/nuxt: ^3.0.8 => 3.0.8\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.",[],952,"Firefox warning: \"MouseEvent.mozPressure\" and \"MouseEvent.mozInputSource\" are deprecated","2025-03-02T20:32:14Z","https://github.com/Tresjs/tres/issues/952",0.70797557,{"description":2903,"labels":2904,"number":2909,"owner":2853,"repository":2854,"state":2855,"title":2910,"updated_at":2911,"url":2912,"score":2913},"### Describe the bug\n\n\r\n\n\n### Reproduction\n\nhttps://stackblitz.com/edit/stackblitz-starters-namsht?file=src%2Fcomponents%2FTheExperience.vue\n\n### Steps to reproduce\n\nnpm install && npm 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.",[2905,2908],{"name":2906,"color":2907},"investigation","D03599",{"name":2867,"color":2868},783,"When there is an annotated tag, the children of the scene will generate _Object3D model information","2024-08-15T17:41:17Z","https://github.com/Tresjs/tres/issues/783",0.71144617,{"description":2915,"labels":2916,"number":2926,"owner":2853,"repository":2854,"state":2927,"title":2928,"updated_at":2929,"url":2930,"score":2931},"### Description\n\nCurrently, `TresObject3D#material` doesn't allow to set array. My suggestion is to make Array acceptable as well.\r\n\r\nhttps://github.com/Tresjs/tres/blob/main/src/types/index.ts#L43\r\n\r\n```\r\n- material?: THREE.Material & TresBaseObject\r\n+ material?: THREE.Material & TresBaseObject | (THREE.Material & TresBaseObject)[]\r\n```\r\n\r\n## (Personal) reason\r\n\r\nI use TresJS and [spine-ts THREE.JS](https://github.com/EsotericSoftware/spine-runtimes/blob/4.1/spine-ts/spine-threejs/README.md). \r\n\r\nTHREE.Mesh#material's type is `Material | Material[]`. (https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/three/src/objects/Mesh.d.ts#L24)\r\n\r\nspine-ts' set Array material according to THREE's type. (https://github.com/EsotericSoftware/spine-runtimes/blob/4.1/spine-ts/spine-threejs/src/MeshBatcher.ts#L60)\r\n\r\nHowever, `TresObject3D#material` doesn't allow to set Array material, when a spine's mesh is rendered in Scene of TresJS and a material**s** in spine's mesh are evaluate, TresJS throws runtime error.\r\n\r\n\r\n## Basis that my suggestion is reasonable\r\n\r\nA type of THREE.Mesh#material extending THREE.Object3D is `Material | Material[]`, so I think it's reasonable that a type of `TresObject3D#material` extending THREE.Object3D is `THREE.Material & TresBaseObject | (THREE.Material & TresBaseObject)[]`.\r\n\n\n### Suggested solution\n\nhttps://github.com/Tresjs/tres/blob/main/src/types/index.ts#L43\r\n\r\n```\r\n- material?: THREE.Material & TresBaseObject\r\n+ material?: THREE.Material & TresBaseObject | (THREE.Material & TresBaseObject)[]\r\n```\r\n\r\nand adding logic for array.\n\n### Alternative\n\nnothing. I currently use pnpm patch and add logic for array.\n\n### Additional context\n\nI can create PR for this suggestion.\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.",[2917,2920,2923],{"name":2918,"color":2919},"types","5C076E",{"name":2921,"color":2922},"PR welcome","2D76B0",{"name":2924,"color":2925},"p3-significant","2C78E3",496,"closed","Allow `TresObject3D#material` to set Array","2024-07-05T15:18:00Z","https://github.com/Tresjs/tres/issues/496",0.6327577,{"description":2933,"labels":2934,"number":2938,"owner":2853,"repository":2854,"state":2927,"title":2939,"updated_at":2940,"url":2941,"score":2942},"On `v4` I noticed that if a `Sprite` is inside a `Group`, the events coming from the raycast are not triggered, only the missing one, even if the events are binded to the Sprite itself, not the parent group.\r\nRed is `Sprite+Group`, Blue is `Sprite`\r\n\r\n\r\n\r\n-- ADDITION:\r\nI noticed one interesting thing too. In the demo if you swap the order of the sprites, everything is gonna break\r\n```js\r\n \u003CSpriteNoGroup />\r\n \u003CSpriteWithGroup />\r\n ```\r\nTry to swap e bring the one with the group first, it throws an error.\r\n\r\nhttps://github.com/Tresjs/tres/assets/6367879/cbbe512b-c2f9-4734-be8f-5c985f627555\r\n\r\n\r\n### Reproduction\r\n\r\nhttps://stackblitz.com/edit/nuxt-starter-yxv5gz?file=components%2FSpriteWithGroup.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\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.",[2935],{"name":2936,"color":2937},"p4-important-bug","D93F0B",759,"Sprite - Raycast events not firing if inside group","2024-07-09T14:15:56Z","https://github.com/Tresjs/tres/issues/759",0.65231335,{"description":2944,"labels":2945,"number":2946,"owner":2853,"repository":2947,"state":2927,"title":2948,"updated_at":2949,"url":2950,"score":2951},"### Description\n\nAs a dev using TresJS, I would like to have smooth OrbitControls and TrackballControls\n\n### Suggested solution\n\nhttps://twitter.com/niccolofanton/status/1836727821005139988\r\nhttps://github.com/niccolofanton/SmoothOrbitControls\r\n\r\nCredits @niccolofanton\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/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.",[],495,"cientos","Smooth Orbit Controls","2024-09-27T16:09:51Z","https://github.com/Tresjs/cientos/issues/495",0.6554036,{"description":2953,"labels":2954,"number":2961,"owner":2853,"repository":2854,"state":2927,"title":2962,"updated_at":2963,"url":2964,"score":2965},"Since vue compiler doesn't recognize the TresJS as native, users need to add this code to the `vite.config.ts` \n\n isCustomElement: tag => tag.startsWith('Tres') && tag !== 'TresCanvas',",[2955,2958],{"name":2956,"color":2957},"docs","0075ca",{"name":2959,"color":2960},"v2","FEE22E",169,"Add customElement vue compiler code to docs","2023-03-30T06:19:00Z","https://github.com/Tresjs/tres/issues/169",0.65669376,["Reactive",2967],{},["Set"],["ShallowReactive",2970],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fNr120Dhj44vPkTDDZyCR6vpUMeB7-k0I9hb3Y2dqyEA":-1},"/Tresjs/cientos/407"]