Added RNFS and refactor image upload to use it

This commit is contained in:
John Lyon-Smith
2018-05-14 10:38:38 -07:00
parent 6fae5ef5d6
commit eda43b0869
16 changed files with 174 additions and 109 deletions

View File

@@ -62,6 +62,10 @@ class WorkItemSceneAR extends React.Component {
return this.arScene
.performARHitTestWithRay(orientation.forward)
.then((results) => {
if (!results) {
return
}
const forward = orientation.forward
const position = orientation.position
// Default position is just one meter in front of the user.
@@ -69,9 +73,6 @@ class WorkItemSceneAR extends React.Component {
[forward[0] * 1.0, forward[1] * 1.0, forward[2]] * 1.0
let hitResultPosition = null
console.log(orientation)
console.log(results)
// Filter the hit test results based on the position.
for (var i = 0; i < results.length; i++) {
let result = results[i]
@@ -109,9 +110,7 @@ class WorkItemSceneAR extends React.Component {
this.updateInitialRotation()
}, 200)
})
.catch((err) => {
console.log(err)
})
.catch((err) => {})
})
}