\r\n \u003CTresPerspectiveCamera :position=\"[-150, 470, 220]\" :look-at=\"[0, 0, 0]\" />\r\n \u003CSuspense>\r\n \u003Cprimitive :position=\"[0, -100, 0]\" v-if=\"sceneLoaded\" :object=\"scene\" />\r\n \u003C/Suspense>\r\n \u003CTresAmbientLight :intensity=\"1.2\" color=\"#ffffff\" />\r\n \u003CTresDirectionalLight :intensity=\"1\" color=\"#ffffff\" :position=\"[-100, 0, 100]\" />\r\n \u003CTresDirectionalLight :intensity=\"1\" color=\"#ffffff\" :position=\"[100, 0, 100]\" />\r\n \u003CTresDirectionalLight :intensity=\"1\" color=\"#ffffff\" :position=\"[0, 200, 0]\" />\r\n \u003COrbitControls />\r\n \u003C/TresCanvas>\r\n \r\n \r\n**CaptureScreenshot:**\r\n \u003Cscript setup>\r\nimport { useTresContext } from \"@tresjs/core\";\r\n\r\nconst { renderer } = useTresContext();\r\n\r\nconst captureScreenshot = () => {\r\n const canvas = renderer.value.domElement;\r\n const url = canvas.toDataURL();\r\n const link = document.createElement(\"a\");\r\n link.href = url;\r\n link.download = \"screenshot.png\";\r\n link.click();\r\n};\r\n\u003C/script>\r\n\n\n### Reproduction\n\nhttps://stackblitz.com/edit/tresjs-basic-bovwvh?file=tsconfig.json\n\n### Steps to reproduce\n\nnpm i\r\nnpm run dev\n\n### System Info\n\n```shell\n\"devDependencies\": {\r\n \"@nuxt/devtools\": \"latest\",\r\n \"@nuxtjs/tailwindcss\": \"^6.8.0\",\r\n \"autoprefixer\": \"^10.4.15\",\r\n \"nuxt\": \"^3.7.3\"\r\n },\r\n \"dependencies\": {\r\n \"@tresjs/cientos\": \"^3.3.0\",\r\n \"@tresjs/nuxt\": \"^1.1.6\",\r\n \"@tresjs/post-processing\": \"^0.4.0\",\r\n \"@types/node\": \"^20.6.0\",\r\n \"dom-to-image\": \"^2.6.0\",\r\n \"html2canvas\": \"^1.4.1\",\r\n \"node\": \"^16.20.2\",\r\n \"three\": \"^0.156.1\"\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.",[],408,"tres","closed","TresCanvas Screenshot","2023-12-13T09:08:50Z","https://github.com/Tresjs/tres/issues/408",0.6609867,{"description":2895,"labels":2896,"number":2912,"owner":2868,"repository":2888,"state":2889,"title":2913,"updated_at":2914,"url":2915,"score":2916},"### 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.",[2897,2900,2903,2906,2909],{"name":2898,"color":2899},"bug","d73a4a",{"name":2901,"color":2902},"good first issue","7057ff",{"name":2904,"color":2905},"help wanted","008672",{"name":2907,"color":2908},"dx","1576AD",{"name":2910,"color":2911},"types","5C076E",301,"Typescript compiler error for refs with tresjs","2023-07-11T11:38:59Z","https://github.com/Tresjs/tres/issues/301",0.6868649,{"description":2918,"labels":2919,"number":2922,"owner":2868,"repository":2888,"state":2889,"title":2923,"updated_at":2924,"url":2925,"score":2926},"### Description\n\nAs a TresJS developer, I would like to have better type support and IntelliSense. The idea would be to replace the current approach of generating the types on the build.\n\n### Suggested solution\n\nCody from Pmndrs gave me a hint on how R3F is tackling the typing. https://github.com/pmndrs/react-three-fiber/blob/v9/packages/fiber/src/three-types.ts\r\n\r\n```ts\r\ntype ThreeExports = typeof THREE\r\ntype ThreeElementsImpl = {\r\n [K in keyof ThreeExports as Uncapitalize\u003CK>]: ThreeExports[K] extends ConstructorRepresentation\r\n ? ThreeElement\u003CThreeExports[K]>\r\n : never\r\n}\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/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.",[2920,2921],{"name":2907,"color":2908},{"name":2910,"color":2911},268,"Refactor typescript support from build to runtime","2023-05-21T09:05:02Z","https://github.com/Tresjs/tres/issues/268",0.7004762,{"description":2928,"labels":2929,"number":2931,"owner":2868,"repository":2879,"state":2889,"title":2932,"updated_at":2933,"url":2934,"score":2935},"### Describe the bug\r\n\r\nI set up a brand new Nuxt3 project, added `@tresjs/nuxt` via npm and added it to modules section of **_nuxt.config.ts_** . I then added the `\u003CTresCanvas>` to the **_app.vue_**. The resulting `\u003Ccanvas ...>` in the DOM continuously grows in height... forever! What could be causing this, and how do I fix it? \r\n\r\n### Reproduction\r\n\r\nhttps://stackblitz.com/edit/trescanvas-height-error?file=app.vue\r\n\r\n### Steps to reproduce\r\n\r\nRun `npm install` and then `npm run dev`. View the results using the url provided (typically [http://localhost:3000/](http://localhost:3000/)). When using Chrome you can see the height grow by opening the dev tools window and selecting the Elements and then hovering the mouse over the \u003Cbody> element. If you drill down to the \u003Ccanvas> element you'll see the height continuously increasing!!!\r\n\r\n### System Info\r\n\r\n```shell\r\nNo errors reported. But the size of the window is continuously increasing!!!\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.",[2930],{"name":2898,"color":2899},48,"\u003CTresCanvas> results in continuous height growth of the \u003Ccanvas>","2024-01-26T14:41:44Z","https://github.com/Tresjs/nuxt/issues/48",0.7038133,{"description":2937,"labels":2938,"number":2939,"owner":2868,"repository":2888,"state":2889,"title":2940,"updated_at":2941,"url":2942,"score":2943},"### Describe the bug\r\n\r\nHi, I'm using TresJs v2(@tres/core) in Nuxt3.\r\nThrough your docs and kind explanations, I succeeded in configuring the environment and displaying 3d objects in Nuxt3.\r\n\r\nHowever, if a vue component (I made) containing the TresCanvas tag is unmounted according to the page route movement or certain conditions, and then re-enters the page and is newly mounted, it seems that the object is not rendered on the canvas tag.\r\n\r\nCan you check this?\r\nYou can see an example in the reproduction link below. You can check it when you toggle v-if with the toggle button.\r\nThank you.\r\n\r\n### Reproduction\r\n\r\nhttps://stackblitz.com/edit/nuxt-starter-36xfsn?file=nuxt.config.ts,app.vue (in Nuxt3)\r\nhttps://stackblitz.com/edit/tresjs-basic-i4h4kk?file=src%2FApp.vue (same in Vue3)\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\nnpm packages version\r\n- nuxt: 3.5.3\r\n- three: 0.153.0\r\n- @tresjs/core: 2.1.3\r\n```\r\n\r\n\r\n### Used Package Manager\r\n\r\nyarn\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.",[],302,"Nuxt3 + Tresjs rendering issue(when remounting, not displaying)","2023-06-19T15:26:29Z","https://github.com/Tresjs/tres/issues/302",0.70625556,{"description":2945,"labels":2946,"number":2956,"owner":2868,"repository":2957,"state":2889,"title":2958,"updated_at":2959,"url":2960,"score":2961},"### Description\n\nI think the structure (following also the other pkgs on the Tres ecosystem) should be something like:\r\n\r\n/src\r\n --> composables\r\n --> core\r\n --> components \r\n --> types\r\netc \r\n\r\n\r\nSo in the future we can expand to abstractions, wdyt @Neosoulink would you like to take this one?\n\n### Suggested solution\n\nFollowing the Tres standard folder\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.",[2947,2950,2953],{"name":2948,"color":2949},"enhancement","a2eeef",{"name":2951,"color":2952},"p1-chore","BFD4F2",{"name":2954,"color":2955},"v1","5B6B67",121,"rapier","Improve structure of the library","2024-09-17T16:02:03Z","https://github.com/Tresjs/rapier/issues/121",0.7071372,{"description":2963,"labels":2964,"number":2965,"owner":2868,"repository":2888,"state":2889,"title":2966,"updated_at":2967,"url":2968,"score":2969},"### Describe the bug\n\nThis error hapend when I write ` const state = useTres()` or `const { state } = useTres()` In devtools, and the scene is not loaded.\r\nThis is my code (in App.vue):\r\n```\u003Cscript setup lang=\"ts\">\r\nimport { TresCanvas, extend, useTres } from '@tresjs/core';\r\nimport { OrbitControls } from 'three/addons/controls/OrbitControls.js'\r\nimport { watchEffect } from 'vue'\r\n\r\nconst state = useTres()\r\n\r\nlet controls: OrbitControls | null = null\r\n\r\nwatchEffect(()=>{\r\n if (state.renderer && state.camera) {\r\n controls = new OrbitControls(state.camera.value!, state.renderer.value.domElement )\r\n }\r\n})\r\n\r\nextend({OrbitControls})\r\n\u003C/script>\r\n\r\n\u003Ctemplate>\r\n \u003CTresCanvas window-size>\r\n \u003CTresPerspectiveCamera />\r\n\r\n \u003CTresScene>\r\n \u003CTresMesh>\r\n \u003CTresBoxGeometry />\r\n \u003CTresMeshNormalMaterial />\r\n \u003C/TresMesh>\r\n \u003C/TresScene>\r\n \u003C/TresCanvas>\r\n\u003C/template>\r\n```\r\n\r\nI did it like in this tutorial: [The tutorial](https://youtu.be/QP3gCY5_dds)\n\n### Reproduction\n\nhttps://stackblitz.com/edit/tresjs-basic-fg1y4w?file=src%2FApp.vue\n\n### Steps to reproduce\n\nAdd \r\n```\r\nimport { useTres } from '@tresjs/core';\r\nconst state = useTres()\r\n```\r\nto your code\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.",[],410,"Uncaught Error: useTresContext must be used together with useTresContextProvider","2023-09-30T07:00:08Z","https://github.com/Tresjs/tres/issues/410",0.71058095,{"description":2971,"labels":2972,"number":2977,"owner":2868,"repository":2888,"state":2889,"title":2978,"updated_at":2979,"url":2980,"score":2981},"**Describe the bug**\r\nSince we are using a Custom Renderer, the main instances of Vue don't recognize the Tres components and throw these annoying warnings that will confuse users.\r\n\r\nOne way around this is to add this to the `vite.config.ts`:\r\n\r\n```\r\nplugins: [vue({\r\n template: {\r\n compilerOptions: {\r\n isCustomElement: tag => tag.startsWith('Tres') && tag !== 'TresCanvas',\r\n },\r\n },\r\n })],\r\n```\r\nBut that's not ideal.\r\n\r\n**Expected behavior**\r\nNo warnings\r\n\r\n**Screenshots**\r\n\u003Cimg width=\"803\" alt=\"Screenshot 2023-03-23 at 06 15 08\" src=\"https://user-images.githubusercontent.com/4699008/227110134-44644ecb-367b-4fe4-b071-8e3b645611ce.png\">\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**Additional context**\r\nAdd any other context about the problem here.\r\n",[2973,2974],{"name":2898,"color":2899},{"name":2975,"color":2976},"pending-triage","97A4FE",162,"[v2] - Failed to resolve component warnings","2023-11-23T18:35:20Z","https://github.com/Tresjs/tres/issues/162",0.712285,["Reactive",2983],{},["Set"],["ShallowReactive",2986],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fatiusa76aZQ-hNqxvYYf2TvoPOhAC2-ZkvJCtZ8HNhY":-1},"/Tresjs/tres/279"]