Tweak to AR view

This commit is contained in:
John Lyon-Smith
2018-05-16 17:15:51 -07:00
parent 15bc64a42b
commit bb8c33846a

View File

@@ -63,13 +63,8 @@ class WorkItemSceneAR extends React.Component {
return this.arScene return this.arScene
.performARHitTestWithRay(orientation.forward) .performARHitTestWithRay(orientation.forward)
.then((results) => { .then((results) => {
if (!results) { const { forward, position } = orientation
return // Default position is just one meter in front of the user
}
const forward = orientation.forward
const position = orientation.position
// Default position is just one meter in front of the user.
const defaultPosition = const defaultPosition =
[forward[0] * 1.0, forward[1] * 1.0, forward[2]] * 1.0 [forward[0] * 1.0, forward[1] * 1.0, forward[2]] * 1.0
let hitResultPosition = null let hitResultPosition = null
@@ -187,7 +182,7 @@ class WorkItemSceneAR extends React.Component {
innerAngle={5} innerAngle={5}
outerAngle={20} outerAngle={20}
direction={[0, -1, 0]} direction={[0, -1, 0]}
position={[0, 30, 0]} position={[0, 10, 0]}
color="#ffffff" color="#ffffff"
castsShadow={true} castsShadow={true}
shadowNearZ={0.1} shadowNearZ={0.1}