We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Im trying to use an old luma.gl example. So im trying to convert old methods to newer versions methods.
Reading the docs, i know loadTextures is deprecated and i should now use: new Texture(gl, {data: url, parameters})
loadTextures
new Texture(gl, {data: url, parameters})
But lets say i have something like that:
loadTextures(gl, { urls: [url], parameters: { parameters: { [GL.TEXTURE_MAG_FILTER]: GL.LINEAR, [GL.TEXTURE_MIN_FILTER]: GL.LINEAR, [GL.TEXTURE_WRAP_S]: GL.CLAMP_TO_EDGE, [GL.TEXTURE_WRAP_T]: GL.CLAMP_TO_EDGE } } }).then(textures => { this.setState({texture: textures[0]}); });
How should i convert this snippet to use the new format?
The text was updated successfully, but these errors were encountered:
Without looking closely at the API and making sure this exact code is working before posting, it would be something like:
this.setState({texture: new Texture2D(gl, { data: url, parameters: { [GL.TEXTURE_MAG_FILTER]: GL.LINEAR, [GL.TEXTURE_MIN_FILTER]: GL.LINEAR, [GL.TEXTURE_WRAP_S]: GL.CLAMP_TO_EDGE, [GL.TEXTURE_WRAP_T]: GL.CLAMP_TO_EDGE } });
Sorry, something went wrong.
No branches or pull requests
Im trying to use an old luma.gl example. So im trying to convert old methods to newer versions methods.
Reading the docs, i know
loadTextures
is deprecated and i should now use:new Texture(gl, {data: url, parameters})
But lets say i have something like that:
How should i convert this snippet to use the new format?
The text was updated successfully, but these errors were encountered: