\r\n \u003COrbitControls />\r\n \u003CSuspense>\r\n \u003CFBXModel path=\"https://raw.githubusercontent.com/Tresjs/assets/main/models/fbx/low-poly-truck/Jeep_done.fbx\" />\r\n \u003C/Suspense>\r\n \u003CTresDirectionalLight :position=\"[-4, 8, 4]\" :intensity=\"1.5\" cast-shadow />\r\n \u003C/TresCanvas>\r\n\u003C/template>\r\n\r\n```\n\n### System Info\n\n```shell\n\"@tresjs/cientos\": \"^3.8.0\"\r\n\"@tresjs/core\": \"^3.7.0\"\r\n\"@tresjs/nuxt\": \"^2.1.1\"\r\n\"@tresjs/post-processing\": \"^0.7.0\"\r\n\"nuxt\": \"^3.10.3\"\r\n\"three\": \"^0.162.0\"\r\n\"vue\": \"^3.4.21\"\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/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.",[],364,"Failed to resolve import \"tweakpane\" from \"node_modules/@tresjs/cientos/dist/trescientos.js?v=617975b6\". Does the file exist?","2024-03-17T11:34:37Z","https://github.com/Tresjs/cientos/issues/364",0.67664117,{"description":2944,"labels":2945,"number":2958,"owner":2857,"repository":2876,"state":2923,"title":2959,"updated_at":2960,"url":2961,"score":2962},"### Describe the bug\r\n\r\nThis code logs `state.controls` null even if there is a Control in the scene (for example OrbitControls)\r\n\r\n```\r\nconst { onBeforeRender, pause, resume } = useLoop()\r\n\r\nconst updateCallback = (state) => {\r\n if (!sphereRef.value) { return }\r\n console.log(state.controls)\r\n sphereRef.value.position.y += Math.sin(state.elapsed) * 0.01\r\n}\r\n```\r\n\r\nThe problem is here https://github.com/Tresjs/tres/blob/0720d186e92ca9faa9e5f4e51a3269504bed2a09/src/composables/useLoop/index.ts#L18C4-L27C5\r\n\r\nWe are creating an snapshot of the time the `useLoop` is used, which doesn't contain the updated controls. \r\n\r\n\r\n\r\n### Reproduction\r\n\r\nlocal playground\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\nSystem:\r\n OS: macOS 14.3.1\r\n CPU: (8) arm64 Apple M1 Pro\r\n Memory: 69.00 MB / 16.00 GB\r\n Shell: 5.9 - /bin/zsh\r\n Binaries:\r\n Node: 20.12.2 - ~/.nvm/versions/node/v20.12.2/bin/node\r\n Yarn: 1.22.19 - /usr/local/bin/yarn\r\n npm: 10.5.0 - ~/.nvm/versions/node/v20.12.2/bin/npm\r\n pnpm: 8.15.4 - ~/Library/pnpm/pnpm\r\n bun: 1.0.2 - ~/.bun/bin/bun\r\n Browsers:\r\n Brave Browser: 120.1.61.116\r\n Chrome: 124.0.6367.208\r\n Safari: 17.3.1\r\n npmPackages:\r\n @tresjs/cientos: 3.8.0 => 3.8.0 \r\n @tresjs/core: workspace:^ => 4.0.0-rc.1 \r\n @tresjs/leches: 0.15.0-next.3 => 0.15.0-next.3\r\n```\r\n\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.",[2946,2949,2952,2955],{"name":2947,"color":2948},"bug","d73a4a",{"name":2950,"color":2951},"v4","7980EA",{"name":2953,"color":2954},"p4-important-bug","D93F0B",{"name":2956,"color":2957},"regression","167F7A",686,"`useLoop` callback state missing controls","2024-05-23T12:17:31Z","https://github.com/Tresjs/tres/issues/686",0.68202364,["Reactive",2964],{},["Set"],["ShallowReactive",2967],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fTW64RxjbrSB2BEqR2ZWRx_WBZIhGxR_TwU3fbtgSdKs":-1},"/Tresjs/tres/284"]