Skip to content

Instantly share code, notes, and snippets.

@bnjm
bnjm / ModelWithDownload.js
Last active November 9, 2018 15:50 — forked from macrozone/ModelWithDownload.js
Example how to download a 3dmodel from the internet using react-native-arkit
// @flow
import { ARKit } from 'react-native-arkit'
import { branch, compose, lifecycle, renderComponent } from 'recompose'
import { unzip } from 'react-native-zip-archive'
import RNFetchBlob from 'react-native-fetch-blob'
import React from 'react'
const getModelPath = modelId => (
`${RNFetchBlob.fs.dirs.CacheDir}/models/${modelId}/`
)