` just below the `TresDirectionalLight`, and sets it ref property to a shallow ref. This seems to cause an error in the library:\r\n\r\n```\r\nthree.module.js:52035 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'matrixWorld')\r\n at new Lm (three.module.js:52035:23)\r\n at n (tres.js:1202:14)\r\n at mountElement (runtime-dom.esm-browser.js:5971:21)\r\n at processElement (runtime-dom.esm-browser.js:5945:7)\r\n at patch (runtime-dom.esm-browser.js:5813:11)\r\n at mountChildren (runtime-dom.esm-browser.js:6057:7)\r\n at processFragment (runtime-dom.esm-browser.js:6239:7)\r\n at patch (runtime-dom.esm-browser.js:5799:9)\r\n at ReactiveEffect.componentUpdateFn [as fn] (runtime-dom.esm-browser.js:6440:11)\r\n at ReactiveEffect.run (runtime-dom.esm-browser.js:471:19)\r\n```\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.",[2914,2915],{"name":2857,"color":2858},{"name":2916,"color":2917},"p4-important-bug","D93F0B",860,"TresDirectionalLightHelper Uncaught (in promise): Cannot read properties of undefined (reading 'matrixWorld')","2024-10-19T11:51:58Z","https://github.com/Tresjs/tres/issues/860",0.73966074,{"description":2924,"labels":2925,"number":377,"owner":2863,"repository":2883,"state":2926,"title":2927,"updated_at":2928,"url":2929,"score":2930},"### Describe the bug\r\n\r\nI'm trying to create a gradient Fragment Shader using this\r\n\r\n```\r\nconst gradientMaterialVertexShader = `\r\nvarying vec2 vUv;\r\nvoid main() {\r\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position,1.0);\r\n vUv = uv;\r\n}\r\n`;\r\n\r\nconst gradientMaterialFragmentShader = `\r\nvarying vec2 vUv;\r\nuniform vec3 fromColor;\r\nuniform vec3 toColor;\r\nvoid main() {\r\n gl_FragColor = vec4(mix(fromColor, toColor, vUv.y), 1.0);\r\n}\r\n`;\r\n```\r\n\r\nand\r\n\r\n```\r\n \u003CTresShaderMaterial\r\n :vertex-shader=\"gradientMaterialVertexShader\"\r\n :fragment-shader=\"gradientMaterialFragmentShader\"\r\n :uniforms=\"{\r\n fromColor: {value: new THREE.Color('#ffff00')},\r\n toColor: {value: new THREE.Color('#ff00ff')},\r\n }\"\r\n >\u003C/TresShaderMaterial>\r\n\r\n```\r\n\r\nbut the object has uniform color instead of a gradient. I'm not sure what I'm doing wrong, but I tried to do something similar to the fragment shader example on the playground\r\n\r\n### Reproduction\r\n\r\nhttps://stackblitz.com/edit/tresjs-shader-mthgxw?file=src%2Fcomponents%2Fshaders%2Ffragment.glsl,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\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/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.",[],"closed","Gradient shader doesn't work","2023-12-24T16:22:44Z","https://github.com/Tresjs/tres/issues/481",0.68528616,{"description":2932,"labels":2933,"number":2944,"owner":2863,"repository":2883,"state":2926,"title":2945,"updated_at":2946,"url":2947,"score":2948},"### Describe the bug\n\n```\r\n \u003CTresMesh\r\n v-for=\"(player, key) in players\"\r\n :key=\"key\"\r\n :scale=\"1\"\r\n cast-shadow\r\n :position=\"[player.x, player.y, player.z]\"\r\n >\r\n \u003CTresBoxGeometry :args=\"[1, 1, 1]\" />\r\n \u003CTresMeshNormalMaterial />\r\n \u003C/TresMesh>\r\n```\r\n\r\nIf players increase size (new player) is not being added to the scene\r\n\r\n\n\n### Reproduction\n\nhttps://stackblitz.com/edit/node-7ddska?file=src%2Fviews%2FHomeView.vue\n\n### Steps to reproduce\n\nHit key \"R\", you will see the list on top increase but not the amount of boxes\n\n### System Info\n\n```shell\nSystem:\r\n OS: Linux 5.0 undefined\r\n CPU: (2) 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: 16.14.2 - /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 npmPackages:\r\n @tresjs/cientos: ^2.0.0 => 2.0.0 \r\n @tresjs/core: ^2.0.0 => 2.0.0 \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.",[2934,2935,2938,2941],{"name":2857,"color":2858},{"name":2936,"color":2937},"good first issue","7057ff",{"name":2939,"color":2940},"help wanted","008672",{"name":2942,"color":2943},"community","DC9921",284,"v-for of meshes doesn't add new instances to scene ","2023-06-09T11:39:28Z","https://github.com/Tresjs/tres/issues/284",0.7198796,{"description":2950,"labels":2951,"number":2873,"owner":2863,"repository":2955,"state":2926,"title":2956,"updated_at":2957,"url":2958,"score":2878},"### Description\n\n\r\n\r\nWe can create a wrapper using extend to add CSM and apply shaders to other materials, as we can see in that example. We're applying vertex shader to a physical material using the [glass demo](https://playground.tresjs.org/experiments/glass-material),\n\n### Suggested solution\n\na wrapper around https://www.npmjs.com/package/three-custom-shader-material\n\n### Alternative\n\nI don't know if there are another alternatives, but CSM is one of the most used\n\n### Additional context\n\nThe Idea is to create just a wrapper\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.",[2952],{"name":2953,"color":2954},"feature","c2e0c6","cientos","Custom shader material","2023-10-26T13:42:49Z","https://github.com/Tresjs/cientos/issues/109",{"description":2960,"labels":2961,"number":2967,"owner":2863,"repository":2864,"state":2926,"title":2968,"updated_at":2969,"url":2970,"score":2971},"I'm using `nuxt` with `SSG`, so running `nuxt generate` to build it,\r\nI noticed this thing, everything works fine in dev mode, but when i build using `generate` the `onLoop` function never get called. \r\nAttached I have the reproduction link\r\n\r\nI'm running on \r\n\r\n```json\r\n \"nuxt\": \"^3.11.2\",\r\n \"@tresjs/cientos\": \"^3.8.0\",\r\n \"@tresjs/core\": \"^3.8.0\",\r\n \"@tresjs/nuxt\": \"^2.1.1\",\r\n ```\r\n \r\nDEV MODE, as you can see it triggers the logs correctly, including the loop\r\n\r\n\r\nBUILD, the `onLoop` never get triggered\r\n\r\n\r\n\r\n\r\n### Reproduction\r\n\r\nhttps://stackblitz.com/edit/nuxt-starter-hsw5j9\r\n\r\n### Steps to reproduce\r\n\r\n`npm i`\r\n`npm run dev`\r\n`npm run generate`\r\n\r\n### System Info\r\n\r\n```shell\r\nSystem:\r\n OS: macOS 14.4.1\r\n CPU: (8) x64 Apple M1\r\n Memory: 16.41 MB / 16.00 GB\r\n Shell: 5.9 - /bin/zsh\r\n Binaries:\r\n Node: 20.10.0 - ~/.nvm/versions/node/v20.10.0/bin/node\r\n npm: 10.2.3 - ~/.nvm/versions/node/v20.10.0/bin/npm\r\n pnpm: 8.6.7 - ~/Library/pnpm/pnpm\r\n bun: 1.0.17 - ~/.bun/bin/bun\r\n Browsers:\r\n Brave Browser: 122.1.63.169\r\n Chrome: 123.0.6312.107\r\n Safari: 17.4.1\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.",[2962,2963,2964],{"name":2857,"color":2858},{"name":2916,"color":2917},{"name":2965,"color":2966},"upstream","DDC01F",97,"`onLoop` function not called in `nuxt generate` (SSG) but working in dev mode","2024-07-05T13:42:14Z","https://github.com/Tresjs/nuxt/issues/97",0.7296859,["Reactive",2973],{},["Set"],["ShallowReactive",2976],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fMBzJfEVmIHbqHltFFzPPx6ybOxxZEoquRblDenM2rKM":-1},"/Tresjs/tres/778"]