I want to use the uploaded images, like for TextureLoader in three.js:
_pickImage = async () => {
try {
let result = await ImagePicker.launchImageLibraryAsync({
mediaTypes: ImagePicker.MediaTypeOptions.Images,
quality: 1,
});
if (!result.cancelled) {
FileSystem.getContentUriAsync(result.uri).then(cUri => {
const loader = new TextureLoader();
loader.load( cUri, function(texture) {
drawPainting(texture);
});
});
}
} catch (E) {
console.log(E);
}
};