viewar-guide
Advanced tools
Comparing version 0.7.1 to 0.8.0
{ | ||
"name": "viewar-guide", | ||
"version": "0.7.1", | ||
"version": "0.8.0", | ||
"description": "ViewAR Guide", | ||
@@ -5,0 +5,0 @@ "main": "dist/viewar-guide.js", |
@@ -25,3 +25,3 @@ import { createComplexState, createSimpleState, createStateMachine } from './transducer' | ||
export const getNextState = (currentState, {guideRequested, userFar, destinationChanged, destinationReached, guideShouldHalt}, logState) => { | ||
export const getNextState = (currentState, {guideRequested, userFar, recalibrationRequested, destinationReached, guideShouldHalt}, logState) => { | ||
const newState = (() => { | ||
@@ -38,2 +38,3 @@ switch (currentState) { | ||
if (!guideRequested) return stopMovingState | ||
if (recalibrationRequested) return arriveState | ||
if (userFar) return stopMovingState | ||
@@ -45,2 +46,3 @@ if (guideShouldHalt) return arriveState | ||
if (!guideRequested) return stopMovingState | ||
if (recalibrationRequested) return stopMovingState | ||
if (userFar) return stopMovingState | ||
@@ -47,0 +49,0 @@ if (destinationReached) return stopMovingState |
@@ -32,2 +32,3 @@ import { createStateMachine } from './transducer' | ||
if (!guideRequested && dismissGuideOnFinish) return hidden | ||
if (recalibrationRequested) return recalibrate | ||
if (destinationChosen && destinationReached) return presenting | ||
@@ -41,3 +42,2 @@ if (destinationChosen && !destinationReached) { | ||
} | ||
if (recalibrationRequested) return recalibrate | ||
return listen | ||
@@ -48,2 +48,3 @@ | ||
if (destinationChosen && destinationReached) return presenting | ||
if (recalibrationRequested) return recalibrate | ||
if (destinationChosen && !destinationReached) { | ||
@@ -56,3 +57,2 @@ if(userFar) { | ||
} | ||
if (recalibrationRequested) return recalibrate | ||
return talking | ||
@@ -63,5 +63,5 @@ | ||
if (userFar) return waiting | ||
if (recalibrationRequested) return recalibrate | ||
if (!userNear && destinationReached) return waiting | ||
if (userNear && destinationReached) return presenting | ||
if (recalibrationRequested) return recalibrate | ||
return guiding | ||
@@ -71,5 +71,5 @@ | ||
if (!guideRequested && dismissGuideOnFinish) return hidden | ||
if (recalibrationRequested) return recalibrate | ||
if (userNear && destinationReached) return presenting | ||
if (userNear && !destinationReached) return guiding | ||
if (recalibrationRequested) return recalibrate | ||
return waiting | ||
@@ -84,6 +84,6 @@ | ||
if (!guideSpeaking && dismissGuideOnFinish) return hidden | ||
if (recalibrationRequested) return recalibrate | ||
if (destinationChosen && destinationReached) return presenting | ||
if (destinationChosen && !destinationReached) return guiding | ||
if (!dismissGuideOnFinish) return listen | ||
if (recalibrationRequested) return recalibrate | ||
return presenting | ||
@@ -90,0 +90,0 @@ |
@@ -20,3 +20,3 @@ import { createComplexState, createSimpleState, createStateMachine } from './transducer' | ||
const getNextState = (currentState, {guideRequested, userNear, destinationChanged}, logState) => { | ||
const getNextState = (currentState, {guideRequested, userNear, destinationChanged, recalibrationRequested}, logState) => { | ||
const newState = (() => { | ||
@@ -30,2 +30,3 @@ switch (currentState) { | ||
if (!guideRequested) return stopHoveringState | ||
if (recalibrationRequested) return stopHoveringState | ||
if (destinationChanged) return stopHoveringState | ||
@@ -32,0 +33,0 @@ if (userNear) return stopHoveringState |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
186453
2608