Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
this.textures.forEach(t => gl.deleteTexture(t));
}
canLoad (input: any) {
return input instanceof FakeTexture;
}
get (ft: FakeTexture) {
const array = ft.getPixels();
if (array) {
const t = createNDArrayTexture(this.gl, array);
this.textures.push(t);
return t;
}
}
}
TextureLoaders.add(FakeTextureLoader);
}
get(obj: any) {
return super.get(obj.uri);
}
getSize(obj: any) {
return super.getSize(obj.uri);
}
load(obj: any) {
console.warn(
"gl-react-dom: usage of {uri} format in texture uniform is deprecated. Directly give an image URL instead."
);
return super.load(obj.uri);
}
}
TextureLoaders.add(DeprecatedUriImageTextureLoader);