viewar-guide
Advanced tools
Comparing version 0.9.0 to 0.9.1
{ | ||
"name": "viewar-guide", | ||
"version": "0.9.0", | ||
"version": "0.9.1", | ||
"description": "ViewAR Guide", | ||
@@ -5,0 +5,0 @@ "main": "dist/viewar-guide.js", |
@@ -72,2 +72,3 @@ import { EPSILON, NORMAL } from './actions' | ||
body.on('currentBody', (...args) => emit('currentBody', ...args)) | ||
navigation.on('currentPath', (...args) => emit('currentPath', ...args)) | ||
@@ -74,0 +75,0 @@ chatbot.on('guideSpeaking', (...args) => emit('guideSpeaking', ...args)) |
@@ -5,2 +5,3 @@ | ||
import Quaternion from '../../math/quaternion' | ||
import createEmitter from '../../utils/emitter' | ||
@@ -31,2 +32,4 @@ class Pose { | ||
const { emit, ...emitter } = createEmitter(); | ||
let instance = null | ||
@@ -102,2 +105,6 @@ let poseUpdate = false | ||
const processTick = (timerInfo) => { | ||
if(poseUpdate) { | ||
emit('currentBody', JSON.parse(JSON.stringify(pose))); | ||
} | ||
if (!poseUpdate) return | ||
@@ -144,3 +151,2 @@ | ||
const length = Math.sqrt(difference.x ** 2 + difference.y ** 2 + difference.z ** 2); | ||
console.log('difference', length); | ||
}; | ||
@@ -158,2 +164,3 @@ | ||
animate, | ||
...emitter, | ||
stopMoving: async() => { | ||
@@ -160,0 +167,0 @@ poseQueue = [] |
@@ -48,3 +48,4 @@ import Vector3 from '../../math/vector3' | ||
state.position.add(scaledForward) | ||
state.position.y = getTargetHeight(state.position) + body.initialHeight | ||
const targetHeight = getTargetHeight(state.position); | ||
state.position.y = targetHeight + body.initialHeight | ||
} | ||
@@ -63,3 +64,3 @@ | ||
const { bank } = orientation.toEulerAngles(); | ||
const height = Math.abs(Math.tan(bank) * distance); | ||
const height = Math.tan(bank) * distance; | ||
return height; | ||
@@ -66,0 +67,0 @@ } |
@@ -58,3 +58,3 @@ import { NO_WAYPOINT } from '../../constants' | ||
const getPreviousWaypoint = () => previousPath[ 0 ] || NO_WAYPOINT | ||
const getPreviousWaypoint = () => previousPath.length ? previousPath[ previousPath.length - 1 ] : NO_WAYPOINT | ||
@@ -61,0 +61,0 @@ const updateCurrentPath = () => { |
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
189767
2638