New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@viewar/guide

Package Overview
Dependencies
Maintainers
8
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@viewar/guide - npm Package Compare versions

Comparing version 0.11.2 to 0.11.3

2

package.json
{
"name": "@viewar/guide",
"version": "0.11.2",
"version": "0.11.3",
"description": "ViewAR Guide",

@@ -5,0 +5,0 @@ "main": "dist/viewar-guide.js",

@@ -89,19 +89,15 @@ import Vector3 from '../../math/vector3'

let previousPosition;
if (previous === NO_WAYPOINT) {
// Use the guide's initial pose if there is no previous waypoint.
previousPosition = body.initialPose.position.clone();
} else {
previousPosition = new Vector3(previous.pose.position);
}
if (previous !== NO_WAYPOINT) {
const previousPosition = new Vector3(previous.pose.position);
let guidePosition = projectPointOnEdge(normalizeYPosition(position), [normalizeYPosition(currentPosition), normalizeYPosition(previousPosition)]);
let guidePosition = projectPointOnEdge(normalizeYPosition(position), [normalizeYPosition(currentPosition), normalizeYPosition(previousPosition)]);
if (guidePosition) {
const totalDistance = currentPosition.clone().subtract(previousPosition).length();
const distance = guidePosition.clone().subtract(previousPosition).length();
if (guidePosition) {
const totalDistance = currentPosition.clone().subtract(previousPosition).length();
const distance = guidePosition.clone().subtract(previousPosition).length();
const heightDiff = currentPosition.y - previousPosition.y;
let height = previousPosition.y + heightDiff / totalDistance * distance;
return { success: true, height };
const heightDiff = currentPosition.y - previousPosition.y;
let height = previousPosition.y + heightDiff / totalDistance * distance;
return { success: true, height };
}
}

@@ -108,0 +104,0 @@ }

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc