loadAsync -> THREE.Loader
See original GitHub issueWould it be possible for Expo to support the THREE.Loader signature like all other loaders?
class ExpoLoader {
load (url: string, onLoad: function, onProgress: function, onError: function) {
// ..
// async fetching, processing, etc
// ..
onLoad(asset)
new ExpoLoader().load(url, data => console.log(data))
If that were the case react-three-fiber users could have useLoader and suspense:
function Model(url) {
const { scene } = useLoader(ExpoLoader, url)
return <primitve object={scene} />
}
<Suspense fallback={<SomethingElseWhileLoading />}>
<Model url="/model.gltf" />
</Suspense>
As well as declarative GLTF: https://github.com/react-spring/gltfjsx this one especially is a pitty and i get lots of requests because people just expect it to work, which it could in theory if loadAsync is a loader. Traversing and mutating assets would be a thing of the past.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Loader#loadAsync – three.js docs
Base class for implementing loaders. Constructor. Loader( manager : LoadingManager ). manager — The loadingManager for the loader to use. Default is THREE....
Read more >ThreeJS loader loadAsync promise resolves to null without ...
I do not need the promise to resolve immediately as I am using threejs' loading manager as well. textureLoader.loadAsync(assets.normal).then(res ...
Read more >three.TextureLoader.loadAsync JavaScript and Node.js code ...
Best JavaScript code snippets using three.TextureLoader.loadAsync(Showing top 1 results out of 315) ... const imageTexture = await textureLoader.
Read more >Asynchronous JavaScript - Discover three.js!
loadAsync means you no longer need most of the information from this chapter ... No more asynchronous callback functions, no more converting loaders...
Read more >How to use the expo-three.loadAsync function in expo ... - Snyk
Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately. Enable here. github expo /...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ll investigate further
sure, could need all the help i can get!