Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We��ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OGL TextureLoader and react-ogl useLoader are incompatible #69

Closed
awesomechoi11 opened this issue Sep 7, 2022 · 1 comment · Fixed by #70
Closed

OGL TextureLoader and react-ogl useLoader are incompatible #69

awesomechoi11 opened this issue Sep 7, 2022 · 1 comment · Fixed by #70
Labels
bug Something isn't working

Comments

@awesomechoi11
Copy link

useLoader passes url as url but TextureLoader only accepts src

https://github.com/oframe/ogl/blob/b9817c6b207507365471c8af0387e0df16a3f843/src/extras/TextureLoader.js#L13

urls.map(async (url: string) => {

urls.map(async (url: string) => {
  // @ts-ignore OGL's loaders don't have a consistent signature
  if (classExtends(loader, OGL.TextureLoader)) return loader.load(gl, { url })
  
  return await loader.load(gl, url)
}),
@CodyJasonBennett
Copy link
Member

Fix out in v0.9.1. We'll have to add coverage there, API is very fragile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
2 participants