Tweak to AR view
This commit is contained in:
@@ -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}
|
||||||
|
|||||||
Reference in New Issue
Block a user