Added help message in AR view
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
import React from "react"
|
import React from "react"
|
||||||
import { StyleSheet, View, TouchableHighlight, Image } from "react-native"
|
import { StyleSheet, View, TouchableHighlight, Image, Text } from "react-native"
|
||||||
import {
|
import {
|
||||||
ViroARSceneNavigator,
|
ViroARSceneNavigator,
|
||||||
ViroARScene,
|
ViroARScene,
|
||||||
@@ -235,6 +235,10 @@ export class ARViewer extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
const message = this.workItemId
|
||||||
|
? "Work item nearby. Stand still, point phone at a nearby surface and move it around slowly."
|
||||||
|
: "No work item detected. Wait for GPS signal to stabilize and move closer to a work item."
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View style={{ width: "100%", height: "100%" }}>
|
<View style={{ width: "100%", height: "100%" }}>
|
||||||
<ViroARSceneNavigator
|
<ViroARSceneNavigator
|
||||||
@@ -261,6 +265,27 @@ export class ARViewer extends React.Component {
|
|||||||
<Image source={backImage} />
|
<Image source={backImage} />
|
||||||
</TouchableHighlight>
|
</TouchableHighlight>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
|
<View
|
||||||
|
style={{
|
||||||
|
flexDirection: "row",
|
||||||
|
justifyContent: "center",
|
||||||
|
position: "absolute",
|
||||||
|
bottom: 30,
|
||||||
|
left: 0,
|
||||||
|
right: 0,
|
||||||
|
backgroundColor: "#99999980",
|
||||||
|
}}>
|
||||||
|
<Text
|
||||||
|
style={{
|
||||||
|
textAlign: "center",
|
||||||
|
fontSize: 24,
|
||||||
|
padding: 10,
|
||||||
|
color: "#FFFFFF",
|
||||||
|
}}>
|
||||||
|
{message}
|
||||||
|
</Text>
|
||||||
|
</View>
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ import React from "react"
|
|||||||
import { Platform } from "react-native"
|
import { Platform } from "react-native"
|
||||||
|
|
||||||
export const config = {
|
export const config = {
|
||||||
//localIPAddr: "192.168.1.175",
|
localIPAddr: "192.168.1.175",
|
||||||
localIPAddr: "192.168.1.14",
|
//localIPAddr: "192.168.1.14",
|
||||||
viroAPIKey: "06F37B6A-74DA-4A83-965A-7DE2209A5C46",
|
viroAPIKey: "06F37B6A-74DA-4A83-965A-7DE2209A5C46",
|
||||||
googleGeocodeAPIKey: "AIzaSyCs4JVT6gysnY5dAJ7KjVJYeykLv_xz1GI",
|
googleGeocodeAPIKey: "AIzaSyCs4JVT6gysnY5dAJ7KjVJYeykLv_xz1GI",
|
||||||
googleGeocodeURL: "https://maps.googleapis.com/maps/api/geocode/json",
|
googleGeocodeURL: "https://maps.googleapis.com/maps/api/geocode/json",
|
||||||
@@ -15,8 +15,8 @@ export const config = {
|
|||||||
homeRegionDelta: 0.005,
|
homeRegionDelta: 0.005,
|
||||||
geocodeDelayMilliseconds: 500,
|
geocodeDelayMilliseconds: 500,
|
||||||
|
|
||||||
//defaultUser: "john@lyon-smith.org",
|
defaultUser: "john@lyon-smith.org",
|
||||||
defaultUser: "",
|
// defaultUser: "",
|
||||||
|
|
||||||
// This region is downtown Toronto
|
// This region is downtown Toronto
|
||||||
initialRegion: {
|
initialRegion: {
|
||||||
@@ -27,12 +27,12 @@ export const config = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
// This region is Bainbridge Island
|
// This region is Bainbridge Island
|
||||||
// initialRegion: {
|
initialRegion: {
|
||||||
// latitude: 47.629536,
|
latitude: 47.629536,
|
||||||
// longitude: -122.524162,
|
longitude: -122.524162,
|
||||||
// latitudeDelta: 0.0922,
|
latitudeDelta: 0.0922,
|
||||||
// longitudeDelta: 0.0421,
|
longitudeDelta: 0.0421,
|
||||||
// },
|
},
|
||||||
|
|
||||||
// alwaysShowWorkItemInAR: true,
|
// alwaysShowWorkItemInAR: true,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user