Update RN and Viro. iOS build working
This commit is contained in:
@@ -10,7 +10,8 @@ import {
|
||||
Viro3DObject,
|
||||
ViroSpotLight,
|
||||
ViroNode,
|
||||
ViroSurface,
|
||||
ViroQuad,
|
||||
ViroConstants,
|
||||
} from "react-viro"
|
||||
import autobind from "autobind-decorator"
|
||||
import backImage from "./images/back.png"
|
||||
@@ -136,8 +137,13 @@ class WorkItemSceneAR extends React.Component {
|
||||
}
|
||||
|
||||
@autobind
|
||||
handleTrackingInitialized() {
|
||||
this.setState({ trackingInitialized: true })
|
||||
handleTrackingUpdated(state, reason) {
|
||||
if (
|
||||
!this.state.trackingInitialized &&
|
||||
state === ViroConstants.TRACKING_NORMAL
|
||||
) {
|
||||
this.setState({ trackingInitialized: true })
|
||||
}
|
||||
}
|
||||
|
||||
@autobind
|
||||
@@ -169,7 +175,7 @@ class WorkItemSceneAR extends React.Component {
|
||||
<ViroARScene
|
||||
anchorDetectionTypes="PlanesHorizontal"
|
||||
ref={(ref) => (this.arScene = ref)}
|
||||
onTrackingInitialized={this.handleTrackingInitialized}
|
||||
onTrackingUpdated={this.handleTrackingUpdated}
|
||||
onAnchorFound={this.handleAnchorFound}>
|
||||
<ViroAmbientLight color="#ffffff" intensity={200} />
|
||||
<ViroNode
|
||||
@@ -201,7 +207,7 @@ class WorkItemSceneAR extends React.Component {
|
||||
onClick={this.handleClick}
|
||||
/>
|
||||
)}
|
||||
<ViroSurface
|
||||
<ViroQuad
|
||||
rotation={[-90, 0, 0]}
|
||||
position={[0, -0.001, 0]}
|
||||
width={2.5}
|
||||
|
||||
@@ -8,25 +8,25 @@ export const config = {
|
||||
googleGeocodeAPIKey: "AIzaSyCs4JVT6gysnY5dAJ7KjVJYeykLv_xz1GI",
|
||||
googleGeocodeURL: "https://maps.googleapis.com/maps/api/geocode/json",
|
||||
refererURL: "https://dar.kss.us.com",
|
||||
//defaultUser: "john@lyon-smith.org",
|
||||
defaultUser: "",
|
||||
defaultUser: "john@lyon-smith.org",
|
||||
//defaultUser: "",
|
||||
minGPSAccuracy: 50,
|
||||
//minGPSAccuracy: 20,
|
||||
minDistanceToItem: 10,
|
||||
geocodeDelayMilliseconds: 500,
|
||||
// This region is downtown Toronto
|
||||
initialRegion: {
|
||||
latitude: 43.653908,
|
||||
longitude: -79.384293,
|
||||
latitudeDelta: 0.0922,
|
||||
longitudeDelta: 0.0421,
|
||||
},
|
||||
// This region is Bainbridge Island
|
||||
// initialRegion: {
|
||||
// latitude: 47.629536,
|
||||
// longitude: -122.524162,
|
||||
// latitude: 43.653908,
|
||||
// longitude: -79.384293,
|
||||
// latitudeDelta: 0.0922,
|
||||
// longitudeDelta: 0.0421,
|
||||
// },
|
||||
// This region is Bainbridge Island
|
||||
initialRegion: {
|
||||
latitude: 47.629536,
|
||||
longitude: -122.524162,
|
||||
latitudeDelta: 0.0922,
|
||||
longitudeDelta: 0.0421,
|
||||
},
|
||||
alwaysShowWorkItemInAR: true,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user