\r\n```\r\nbut also by importing it from the assets folder.\r\n\r\n```javascript\r\nimport MilkyWayEnvironment from '@assets/environments/milkyway-4k.jpg'\r\n\r\n\u003CEnvironment\r\n :path=\"MilkyWayEnvironment\"\r\n :background=\"true\"\r\n/>\r\n```\r\n\r\nWhen using the component I get only a warning :\r\n```\r\n[Vue warn]: expose() should be passed a plain object, received ref. \r\n at \u003CComponent path=\"/milkyway-4k.jpg\" background=true > \r\n at \u003CApp>\r\n```\r\n\r\nWhen I use useEnvironments I get 2 warnings and 1 error : \r\n```\r\n[Vue warn]: injection \"useTres\" not found. \r\nUnhandled error during execution of setup function \r\ntres.js:431 Uncaught (in promise) Error: useTresContext must be used together with useTresContextProvider\r\n```\r\n\r\nI tried to import the environment image into Stackblitz but it doesn't work. \n\n### Reproduction\n\nhttps://stackblitz.com/edit/tresjs-basic-8r1lk7\n\n### Steps to reproduce\n\n_No response_\n\n### System Info\n\n_No response_\n\n### Used Package Manager\n\nyarn\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.",[2856,2859],{"name":2857,"color":2858},"needs reproduction","16309A",{"name":2860,"color":2861},"waiting for author","DEEAB8",305,"Tresjs","cientos","open","Environment not working","2023-12-22T00:49:40Z","https://github.com/Tresjs/cientos/issues/305",0.6783619,{"description":2871,"labels":2872,"number":2875,"owner":2863,"repository":2864,"state":2865,"title":2876,"updated_at":2877,"url":2878,"score":2879},"### Describe the bug\n\nWhen using the default FBXLoader from threejs the userData field has way more data.\r\nI would expect these fields to have the same amount of data ?\r\nI'm missing `originalName` and `unitScaleFactor`\r\n\r\nUsing the [Threejs Editor](https://threejs.org/editor/) you can import any fbxfile and see the extra userData \n\n### Reproduction\n\nhttps://threejs.org/editor/\n\n### Steps to reproduce\n\nFBXLoader from threejs\r\n```\r\nimport { FBXLoader } from 'three/addons/loaders/FBXLoader'\r\nconst fbxLoader = new FBXLoader()\r\nfbxLoader.load(fbx_path, (object) => {\r\n console.log(object.userData)\r\n }\r\n)\r\n//log\r\noriginalName: \"119565\"\r\ntransformData: {\r\n eulerOrder: \"ZYX\"\r\n inheritType: 1\r\n parentMatrix: _Matrix4 {elements: Array(16)}\r\n parentMatrixWorld: _Matrix4 {elements: Array(16)}\r\n rotation: (3) [0.0000025044780654876655, -0, 0]\r\n},\r\nunitScaleFactor: 0.1\r\n```\r\n\r\nUsage with cientos\r\n```\r\nimport { useFBX } from '@tresjs/cientos'\r\n\r\nconst model = await useFBX('fbx_path')\r\n\r\nconsole.log(model.userData)\r\n\r\n//or\r\n\r\nimport { FBXModel } from '@tresjs/cientos'\r\n\r\nconst modelRef = ref(null)\r\n\r\nwatch(modelRef, (model) => {\r\n console.log(model.value)\r\n})\r\n\u003Ctemplate>\r\n \u003CFBXModel\r\n ref=\"modelRef\"\r\n :path=\"fbx_path\"\r\n />\r\n\u003C/template>\r\n\r\n//both logs from cientos\r\ntransformData: {\r\n inheritType: 1, \r\n eulerOrder: 'ZYX', \r\n rotation: Array(3), \r\n parentMatrix: _Matrix4, \r\n parentMatrixWorld: _Matrix4\r\n}\r\ntres__name: \"Group\"\r\n```\r\n\n\n### System Info\n\n```shell\nSystem:\r\n OS: macOS 14.3.1\r\n CPU: (10) arm64 Apple M1 Pro\r\n Memory: 90.00 MB / 16.00 GB\r\n Shell: 5.9 - /bin/zsh\r\n Binaries:\r\n Node: 18.18.0 - ~/.nvm/versions/node/v18.18.0/bin/node\r\n Yarn: 1.22.21 - ~/.nvm/versions/node/v18.18.0/bin/yarn\r\n npm: 9.8.1 - ~/.nvm/versions/node/v18.18.0/bin/npm\r\n Browsers:\r\n Chrome: 125.0.6422.112\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.",[2873,2874],{"name":2857,"color":2858},{"name":2860,"color":2861},429,"FBXLoader: Missing data from userData field ","2024-09-12T20:08:31Z","https://github.com/Tresjs/cientos/issues/429",0.7135891,{"description":2881,"labels":2882,"number":2889,"owner":2863,"repository":2864,"state":2865,"title":2890,"updated_at":2891,"url":2892,"score":2893},"### Describe the bug\n\n`useProgress` uses threejs `DefaultLoadingManager` under the hood. Progress restarts with concurrent resources\n\n### Reproduction\n\nhttps://lab.tresjs.org/experiments/potions-classroom\n\n### Steps to reproduce\n\n_No response_\n\n### System Info\n\n_No response_\n\n### Used Package Manager\n\npnpm\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.",[2883,2886],{"name":2884,"color":2885},"bug","d73a4a",{"name":2887,"color":2888},"p3-minor-bug","F28C37",575,"useProgress re-starts when other resources start loading","2025-01-02T14:42:43Z","https://github.com/Tresjs/cientos/issues/575",0.7139319,{"description":2895,"labels":2896,"number":2903,"owner":2863,"repository":2864,"state":2865,"title":2904,"updated_at":2905,"url":2906,"score":2907},"\r\n\r\n\r\n\r\n### Description\r\n\r\nImplement a MeshRefractionMaterial \r\n\r\n\r\n### Suggested solution\r\n\r\nSome links for context:\r\nhttps://medium.com/geekculture/simulating-refraction-in-three-js-9e367753bf6d\r\nhttps://github.com/pmndrs/drei/blob/master/src/core/MeshRefractionMaterial.tsx\r\nhttps://github.com/pmndrs/drei/blob/master/src/materials/MeshRefractionMaterial.tsx\r\n\r\n### Alternative\r\n\r\n_No response_\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/cientos/blob/main/CODE_OF_CONDUCT.md)\r\n- [X] Read the [Contributing Guidelines](https://github.com/Tresjs/cientos/blob/main/CONTRIBUTING.md).\r\n- [X] Read the [docs](https://cientos.tresjs.org/guide).\r\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.",[2897,2900],{"name":2898,"color":2899},"feature","c2e0c6",{"name":2901,"color":2902},"p3-significant","2C78E3",454,"MeshRefractionMaterial","2024-07-23T11:40:40Z","https://github.com/Tresjs/cientos/issues/454",0.73280424,{"description":2909,"labels":2910,"number":2913,"owner":2863,"repository":2864,"state":2865,"title":2914,"updated_at":2915,"url":2916,"score":2917},"### Description\r\n\r\nAs a dev using TresJS, I would like to have an abstraction for [Drag Controls](https://threejs.org/docs/#examples/en/controls/DragControls)\r\n\r\n\r\n\r\n### Suggested solution\r\n\r\nSimilar to https://github.com/pmndrs/drei?tab=readme-ov-file#dragcontrols\r\nhttps://threejs.org/examples/?q=drag#misc_controls_drag\r\n\r\n\r\n### Alternative\r\n\r\n_No response_\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/cientos/blob/main/CODE_OF_CONDUCT.md)\r\n- [X] Read the [Contributing Guidelines](https://github.com/Tresjs/cientos/blob/main/CONTRIBUTING.md).\r\n- [X] Read the [docs](https://cientos.tresjs.org/guide).\r\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.",[2911,2912],{"name":2898,"color":2899},{"name":2901,"color":2902},455,"Drag Controls","2024-11-27T10:47:00Z","https://github.com/Tresjs/cientos/issues/455",0.7526201,{"description":2919,"labels":2920,"number":2924,"owner":2863,"repository":2925,"state":2865,"title":2926,"updated_at":2927,"url":2928,"score":2929},"### Describe the bug\n\nInitial properties not getting used when vue-object is created.\r\n\r\neg in official tresjs playground use:\r\n\r\n\u003COrbitControls min-distance=\"20\"/>\n\n### Reproduction\n\nhttps://play.tresjs.org/#eNqdVV1z4jYU/SsaZzp5KNgmJGnrsh0K+zHbaXYzC9OX9T4I+wYrkSWNJAhMhv/eK4kPm02zpJhh8L1HR0dHuldP0VSD+VOpeLmAKIsGptBMWWLALhThVMzf5JE1efRHLlitpLbkiYyoYcWkoqV8vKGqQyZfPozGkks9UbSADvkkp1IAphQT8w75BwordZ9syJ2WNTm3lQY4/71B6DSMqVhSswcNLcbuTVJI3cZ+1jNmx1JYLfkzcAbCSuNG5KKQwlgy5+QNecoFIQUHqr3QjJyf/XrxdjS+Ou+4jPGLMRmxegE+QrmqaEbuKDchECC4qOlaQXbsgUPIhVULlLYzIjs2xoHswZnsyKhcbFD2IAlbgIaHZ2ChVpxawAghg4ZXy+6MiRI3aM79BhH8+PwtaKPQdbaEMa1BU5IpaZhlUiD6628dfL7lEUl2g9qm1kx0S2YsFQUg/iLNoz3S0d+AqdqM3YsOwW/qSDMtLd0l0g65obaKbz+G7JZmtw5c/QeQNVi9JhnVc+PG9DqkF191SL8psTH1VEqBpKAZ5aRw9uKo7XY2F5XsBrysHSW6r5usoMZ2w0a3px3J1TM6ncjdz6u0Xr53z//Qih47q793cqIq0AcvT1byfjRK+6MfKnnLtDtOUlD+N5tX9jsHUdSl33wmLAhMrTHRiy/apm5nCXOEQ4yBQdI44fhq7Jq7v5WtORbFTJbrUL81Os9ERlIsE0IULUtfReG1AicsI700/ckHHllpq/37JhdnWGeB6AdYQma0eJhruRBl11uVkbM0dfMgDRaoFxh1otCUujVV8b2RAvunp8+3CWybWZjQxZodzSXyqLJWmSxJilLg+BI4W+pYgE2EqpMmfNiPr+Ne4moycWFE55FvJy3i0Ptewx1GIP0vcXqg34bbs9hHoA+KilO077HDyzjdC98FY+wvR9zuRjiF1+GGyHidot6fwdRNG/AGWxg42d8GfNhL4ytkxG4Kq7huu7vF4QnWUL6COAx4iRqB3RJqdgLpDuoWfxlfJ5zNmpSOEY/mBs+kNXjt3bH50YksZK0YB/1Zuaptn0zKuXz8y8f2958fU0Hx8Ez83qyC5Fs8LKCXaPdhK7FGwYb0u8knWOH/fbKW5YJvN+c/kl/ASL5wGgNshDWIshs4r/ajLzAs/6l5t/IdZ7uollCLV7WPft21w/1ZC4Fv3jiP99sxfsGlw8r6cX9v+OZfbu8GKw==\n\n### Steps to reproduce\n\nOpen the reproduction-url and use the orbit-controls -> camera will jump.\n\n### System Info\n\n```shell\nUsing the tresjs playground with the latest Edge browser.\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.",[2921],{"name":2922,"color":2923},"pending-triage","97A4FE",791,"tres","reactive property bug","2024-08-21T09:46:13Z","https://github.com/Tresjs/tres/issues/791",0.7782046,{"description":2931,"labels":2932,"number":2942,"owner":2863,"repository":2943,"state":2865,"title":2944,"updated_at":2945,"url":2946,"score":2947},"### Description\n\nIf we found a way to put all the updates on just one loop, we can come with some interesting advantages.\r\n\r\n- What if the user wants to run the physics loop in a different priority?\r\n- What if we want to stop or apply some fps limit to the whole library?\r\n- Should this have better performance?\n\n### Suggested solution\n\nCurrently, this is an investigation and should not be prioritized\r\n\r\nI personally don't know if this is possible\n\n### Alternative\n\nWe still have the alternative to pass the limit FPS or to invalidate, or even the priority loop per component\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.",[2933,2936,2939],{"name":2934,"color":2935},"help wanted","008672",{"name":2937,"color":2938},"investigation","D03599",{"name":2940,"color":2941},"p1-chore","BFD4F2",123,"rapier","All in one renderloop?","2024-09-13T14:27:45Z","https://github.com/Tresjs/rapier/issues/123",0.7810948,{"description":2949,"labels":2950,"number":2953,"owner":2863,"repository":2864,"state":2865,"title":2954,"updated_at":2955,"url":2956,"score":2957},"### Describe the bug\r\n\r\nSome controls have long-standing bugs where changing props causes duplicate events to be added. \r\n\r\nE.g., flipping makeDefault in CameraControls causes duplicate events to be added. This will add 100 duplicate events:\r\n\r\n```\r\nconst makeDefault = shallowRef(true)\r\n// Flip `makeDefault` 100 times, add 100 events! Lol\r\nArray.from({length: 100}).fill(0).forEach(\r\n (_, i) => setTimeout(\r\n () => {\r\n makeDefault.value = !makeDefault.value\r\n }, i * 1000 / 25)\r\n)\r\n\u003C/script>\r\n\r\n\u003Ctemplate>\r\n \u003CTresLeches />\r\n \u003CTresCanvas v-bind=\"gl\">\r\n \u003CTresPerspectiveCamera :position=\"[5, 5, 5]\" />\r\n \u003CCameraControls\r\n v-bind=\"controlsState\"\r\n ref=\"controlsRef\"\r\n :make-default=\"makeDefault\"\r\n @change=\"onChange\"\r\n @start=\"onStart\"\r\n @end=\"onEnd\"\r\n />\r\n \r\n```\r\n \r\n \r\nThat means every time these emits would be expected to fire once, they're fired 100 times:\r\n\r\n```\r\nfunction addEventListeners() {\r\n useEventListener(controlsRef.value as any, 'update', () => {\r\n emit('change', controlsRef.value)\r\n invalidateOnDemand()\r\n })\r\n useEventListener(controlsRef.value as any, 'controlend', () => emit('end', controlsRef.value))\r\n useEventListener(controlsRef.value as any, 'controlstart', () => emit('start', controlsRef.value))\r\n}\r\n```\r\n\r\nThe problem is the anonymous functions:\r\n\r\nNote: If a particular anonymous function is in the list of event listeners registered for a certain target, and then later in the code, an identical anonymous function is given in an addEventListener call, the second function will also be added to the list of event listeners for that target.\r\n\r\nIndeed, anonymous functions are not identical even if defined using the same unchanging source-code called repeatedly, even if in a loop.\r\n\r\nRepeatedly defining the same unnamed function in such cases can be problematic. (See Memory issues, below.)\r\n\r\nhttps://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener\r\nMDN Web Docs\r\n[EventTarget: addEventListener() method - Web APIs | MDN](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener)\r\nThe addEventListener() method of the EventTarget interface\r\nsets up a function that will be called whenever the specified event is delivered to the target.\r\n\r\n### Reproduction\r\n\r\nN/A\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/cientos/blob/main/CODE_OF_CONDUCT.md)\r\n- [X] Read the [Contributing Guidelines](https://github.com/Tresjs/cientos/blob/main/CONTRIBUTING.md).\r\n- [X] Read the [docs](https://cientos.tresjs.org/guide).\r\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.\r\n- [X] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.",[2951,2952],{"name":2884,"color":2885},{"name":2887,"color":2888},457,"useEventListener bug in controls","2024-07-24T06:42:25Z","https://github.com/Tresjs/cientos/issues/457",0.78174067,{"description":2959,"labels":2960,"number":2967,"owner":2863,"repository":2925,"state":2968,"title":2969,"updated_at":2970,"url":2971,"score":2972},"### Description\r\n\r\nI created a mesh using `Three.js` and added it to the scene with `context.scene.add()`. How can I add a click event to it? \r\nInitially, I could directly write `mesh.onClick = clickMesh`, but the [#714](https://github.com/Tresjs/tres/pull/714) submission restricted this behavior.\r\n\r\n### Suggested solution\r\n\r\nMaybe you could extend the `context.scene`.\r\n\r\n### Alternative\r\n\r\n_No response_\r\n\r\n### Additional context\r\n\r\n@tresjs/core@4.0.2\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.",[2961,2964],{"name":2962,"color":2963},"wontfix","ffffff",{"name":2965,"color":2966},"has-workaround","AEA9C4",736,"closed","intersect only objects with events registered","2024-06-15T09:14:55Z","https://github.com/Tresjs/tres/issues/736",0.7265757,{"description":2974,"labels":2975,"number":2981,"owner":2863,"repository":2864,"state":2968,"title":2982,"updated_at":2983,"url":2984,"score":2985},"### Description\n\nAs a developer using `@tresjs/cientos` I want to be able to benefit from on-demand and conditional renderinghttps://github.com/Tresjs/tres/pull/497 while using the abstractions provided by this package\n\n### Suggested solution\n\nUse `invalidate` and `advance` on the abstractions that require it:\r\n\r\nEx: OrbitControls\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.",[2976,2977,2980],{"name":2898,"color":2899},{"name":2978,"color":2979},"v4","EEF2B0",{"name":2901,"color":2902},423,"Enable render modes usage on abstractions","2024-08-28T19:22:46Z","https://github.com/Tresjs/cientos/issues/423",0.7388865,["Reactive",2987],{},["Set"],["ShallowReactive",2990],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fzyPAVGaKA7TQ8QTpHLBxMyMFENWtB48GU_uln50hb5Y":-1},"/Tresjs/cientos/326"]