is not adding `scene.fog(new Fog())`\r\n\r\n**Reproduction**\r\n[Reproduction](https://stackblitz.com/edit/tresjs-basic-ntxpns?file=src%2Fcomponents%2FTheExperience.vue,src%2Fcomponents%2FThePortal.vue,vite.config.ts,src%2Fshaders%2Ffragment.glsl,src%2FApp.vue)\r\n\r\n**Steps**\r\nSteps to reproduce the behavior:\r\n1. Add a `\u003CTresFog />` to the scene\r\n\r\n**Expected behavior**\r\nScene should have [Fog](https://threejs.org/docs/?q=fog#api/en/scenes/Fog)\r\n\r\n**Screenshots**\r\nIf applicable, add screenshots to help explain your problem.\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: 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: 16.14.2 - /usr/local/bin/node\r\n Yarn: 1.22.19 - /usr/local/bin/yarn\r\n npm: 7.17.0 - /usr/local/bin/npm\r\n npmPackages:\r\n @tresjs/cientos: ^1.2.2 => 1.2.2 \r\n @tresjs/core: ^1.3.2 => 1.3.2 \r\n vite: ^3.2.4 => 3.2.5 \r\n```\r\n\r\n**Additional context**\r\nAdd any other context about the problem here.\r\n",[2922,2923,2926],{"name":2901,"color":2902},{"name":2924,"color":2925},"good first issue","7057ff",{"name":2927,"color":2928},"help wanted","008672",49,"TresFog is not adding fog to scene","2022-12-21T14:54:16Z","https://github.com/Tresjs/tres/issues/49",0.72940433,{"description":2935,"labels":2936,"number":2929,"owner":2877,"repository":2938,"state":2905,"title":2939,"updated_at":2940,"url":2941,"score":2942},"**Describe the bug**\r\nA clear and concise description of what the bug is. If you intend to submit a PR for this issue, tell us in the description. Thanks!\r\n\r\nHi! Fist of all, What a great library! I'm playing with it, and so far... I LOVE IT! now... to the error, I am currently trying to use the post-processing package on a scene and I get the following error when I use it:\r\n\r\n\r\n\r\n**Reproduction**\r\nThis same happens whenever you check the examples:\r\nhttps://playground.tresjs.org/experiments/nuxt-stones\r\n\r\n\r\n\r\n\r\n**Steps**\r\nSteps to reproduce the behavior:\r\n1. Just adding the EffectComposer with a default bloom effect.\r\n\r\n**Expected behavior**\r\nFor the effect composer component to work\r\n\r\n**Screenshots**\r\nIf applicable, add screenshots to help explain your problem.\r\n\r\n**System Info**\r\nOutput of `npx envinfo --system --npmPackages '{vite,@tresjs/*, three, vue}' --binaries --browsers` \r\n```\r\nSystem:\r\n OS: macOS 13.4.1\r\n CPU: (8) arm64 Apple M1\r\n Memory: 323.22 MB / 16.00 GB\r\n Shell: 5.9 - /bin/zsh\r\n Binaries:\r\n Node: 18.15.0 - ~/.nvm/versions/node/v18.15.0/bin/node\r\n npm: 9.5.0 - ~/.nvm/versions/node/v18.15.0/bin/npm\r\n Browsers:\r\n Chrome: 116.0.5845.110\r\n Safari: 16.5.2\r\n npmPackages:\r\n @tresjs/cientos: ^3.1.0 => 3.1.0 \r\n @tresjs/core: ^3.1.0 => 3.1.0 \r\n @tresjs/post-processing: ^0.3.0 => 0.3.0 \r\n vite: ^2.8.0 => 2.9.16 \r\n```\r\n\r\n**Additional context**\r\nAdd any other context about the problem here.\r\n",[2937],{"name":2901,"color":2902},"post-processing","Cannot read properties of undefined (reading 'canvas')","2023-10-19T15:07:15Z","https://github.com/Tresjs/post-processing/issues/49",0.7387024,{"description":2944,"labels":2945,"number":2946,"owner":2877,"repository":2947,"state":2905,"title":2948,"updated_at":2949,"url":2950,"score":2951},"### Describe the bug\n\nClicking on examples lands on 404 page not found.\n\n### Reproduction\n\nhttps://cientos.tresjs.org/examples.html\n\n### Steps to reproduce\n\n_No response_\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/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.",[],102,"cientos","404 on examples website docs","2023-06-26T06:27:10Z","https://github.com/Tresjs/cientos/issues/102",0.7409012,{"description":2953,"labels":2954,"number":2946,"owner":2877,"repository":2961,"state":2905,"title":2962,"updated_at":2963,"url":2964,"score":2951},"### Description\n\nAs a developer using Tres-rapier I would like to have a proper documentation\n\n### Suggested solution\n\nFollow the standards of the ecosystem\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.",[2955,2958],{"name":2956,"color":2957},"enhancement","a2eeef",{"name":2959,"color":2960},"docs","0075ca","rapier","Docs","2024-09-11T04:06:46Z","https://github.com/Tresjs/rapier/issues/102",{"description":2966,"labels":2967,"number":2968,"owner":2877,"repository":2878,"state":2905,"title":2969,"updated_at":2970,"url":2971,"score":2972},"### 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.74115425,{"description":2974,"labels":2975,"number":2983,"owner":2877,"repository":2878,"state":2905,"title":2984,"updated_at":2985,"url":2986,"score":2987},"### Description\r\n\r\n## Problem\r\n\r\nUpdates/renders share the same unordered-from-the-components-perspective callback \"slot\", leading to out-of-sync visuals.\r\n\r\n## Example\r\n\r\nHere's the Cientos' playground demo for `MeshReflectionMaterial`. Notice the extra \"jumps\" in the reflection:\r\n\r\nhttps://github.com/Tresjs/tres/assets/20469369/314a4154-7cef-47d0-977e-e98fd53c8c13\r\n\r\nHere are two adjacent frames. Notice that the \"real\" elements haven't moved, but the reflection \"jumps\" from one frame to the next:\r\n\r\n\u003Cimg width=\"1044\" alt=\"Screenshot 2024-03-29 at 15 13 35\" src=\"https://github.com/Tresjs/tres/assets/20469369/47a6f2d1-817c-4bf1-a164-70969fb3aa7d\">\r\n\r\n## Why it happens\r\n\r\nThe \"jumps\" occur because the updates/renders are all firing in `onLoop`, but out-of-order from the perspective of the FBO reflection. So for a file like this ...\r\n\r\n```vue\r\n\u003Cscript setup lang=\"ts\">\r\nimport { TresCanvas, useRenderLoop } from '@tresjs/core'\r\nimport DemoComponent from './DemoComponent.vue'\r\n\r\nconst { onLoop } = useRenderLoop()\r\n\r\nonLoop(({ elapsed }) => {\r\n console.log(\"Demo update\", elapsed)\r\n})\r\n\u003C/script>\r\n\r\n\u003Ctemplate>\r\n \u003CTresCanvas>\r\n \u003CTresPerspectiveCamera />\r\n \u003CDemoComponent>\u003C/DemoComponent>\r\n \u003C/TresCanvas>\r\n\u003C/template>\r\n\r\n```\r\n\r\n... a single \"tick\" of `onLoop` looks like this:\r\n\r\n\u003Cimg width=\"238\" alt=\"Screenshot 2024-03-29 at 16 41 44\" src=\"https://github.com/Tresjs/tres/assets/20469369/63d33e65-de88-48dc-859d-709863672227\">\r\n\r\nWith this ordering, if `DemoComponent` renders the scene to an FBO, and is then rendered to the screen, it'll always be 1 frame behind `Demo`.\r\n\r\n\r\n\r\n### Suggested solution\r\n\r\nWe could follow R3F's lead here:\r\n\r\n* [Guarantee that rendering happens after `onLoop`](https://docs.pmnd.rs/react-three-fiber/api/hooks#useframe)\r\n* Implement these:\r\n** https://docs.pmnd.rs/react-three-fiber/api/hooks#taking-over-the-render-loop\r\n** https://docs.pmnd.rs/react-three-fiber/api/hooks#negative-indices\r\n\r\nFor example, R3F's `OrbitControls` uses a negative index:\r\n\r\nhttps://github.com/pmndrs/drei/blob/c147c2b1064bc4b457150f995bf714c2e43cf56f/src/core/OrbitControls.tsx#L58C1-L61C13\r\n\r\nIf I understand correctly, that means that the OrbitControls camera is updated before the rest of the scene, which is important in the case of FBOs like in the reflection material.\r\n\r\n### Alternative\r\n\r\nAs a simpler – though less flexible – solution, we could add a few callbacks:\r\n\r\n* `useRenderLoop().onBeforeRender()` – for FBOs\r\n* `useRenderLoop().onRender()` – for actually rendering to the screen\r\n\r\n### Additional context\r\n\r\n_No response_\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.",[2976,2977,2980],{"name":2901,"color":2902},{"name":2978,"color":2979},"feature","c2e0c6",{"name":2981,"color":2982},"p2-to-be-discussed","97C1B1",607,"`useRenderLoop`: render after updates","2024-05-30T06:58:57Z","https://github.com/Tresjs/tres/issues/607",0.74155486,["Reactive",2989],{},["Set"],["ShallowReactive",2992],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$ftyXy6BuxEEYKDit_ZAno9OP7XTKJJyr3ABmNlAj2Tgg":-1},"/Tresjs/tres/107"]