mirror of
https://github.com/gre/gl-react.git
synced 2026-01-25 16:43:36 +00:00
Merge pull request #143 from brentvatne/expo-fs-api-update
[gl-react-expo] Fix for new FileSystem API
This commit is contained in:
commit
480e5e367a
@ -1,5 +1,5 @@
|
||||
//@flow
|
||||
import { NativeModules, Image } from "react-native";
|
||||
import { Image } from "react-native";
|
||||
import Expo from "expo";
|
||||
import { TextureLoader } from "gl-react";
|
||||
import type { DisposablePromise } from "gl-react/lib/helpers/disposable";
|
||||
@ -33,9 +33,9 @@ const remoteAsset = (uri: string) => {
|
||||
new Promise((success, failure) =>
|
||||
Image.getSize(uri, (width, height) => success({ width, height }), failure)
|
||||
),
|
||||
NativeModules.ExponentFileSystem.downloadAsync(
|
||||
Expo.FileSystem.downloadAsync(
|
||||
uri,
|
||||
`ExponentAsset-${key}${ext}`,
|
||||
Expo.FileSystem.documentDirectory + `ExponentAsset-${key}${ext}`,
|
||||
{
|
||||
cache: true
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user