viewar-guide
Advanced tools
Comparing version 0.6.1 to 0.6.2
{ | ||
"name": "viewar-guide", | ||
"version": "0.6.1", | ||
"version": "0.6.2", | ||
"description": "ViewAR Guide", | ||
@@ -5,0 +5,0 @@ "main": "dist/viewar-guide.js", |
@@ -91,4 +91,10 @@ | ||
const durationInSeconds = (timerInfo.frameLength - frameDifference) / 1000; | ||
// const durationInSeconds = timerInfo.frameLength / 1000; | ||
// Only delay if frameDifference is positive => tick will automatically wait if it's too short. | ||
let durationInSeconds; | ||
if (frameDifference > 0) { | ||
durationInSeconds = (timerInfo.frameLength - frameDifference) / 1000; | ||
} else { | ||
durationInSeconds = timerInfo.frameLength / 1000; | ||
} | ||
poseQueue.push(Object.assign(new Pose(pose), { | ||
@@ -98,3 +104,3 @@ durationInSeconds, | ||
frameDifference += timerInfo.timeElapsed - timerInfo.frameLength; | ||
frameDifference = timerInfo.timeElapsed - timerInfo.frameLength; | ||
// console.log(`Tick ${tick} took ${frameDifference}ms too long.`, durationInSeconds); | ||
@@ -101,0 +107,0 @@ |
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
186022
2605