gl-react
gl-react copied to clipboard
document more the different texture formats
needs to appear in https://gl-react-cookbook.surge.sh/api#uniforms
Is there any documentation for textures formats at all? It's hard to guess from the source code. Should base64 data uris work? I'm trying with base64 but getting an error: "EXGL: invalid pixel data argument for gl.tecImage2d()"
I don't think base64 works for expo. it's more up to Expo side to list what's supported than on our side because we basically pass-in whatever you pass to the gl.texImage2D call
if you where using gl-react-expo ! then if gl-react-native , i guess we'll need to doc more react-native-webgl. but yeah i agree we need doc
@gre Would it be possible to preload textures within react native?
I have to dynamically alter the textures of a rendered object with the THREEjs library but the textureloader doesn't work as there's no DOM and the ImageLoader has to make an HTML Image element (document.createElementNS('img') ). There's some texture loaders available but they all require a GL object (and a renderer object) which only seems to be available within the render function.
I tried using the DOMParser library for creating an IMG but THREEjs seems to be unable to work with that as it says: "image.addEventListener is not a function".