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.4 to 0.11.5

2

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

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

@@ -7,3 +7,3 @@ import Vector3 from '../../math/vector3'

import logPath from '../../utils/log-path';
import { NO_WAYPOINT } from '../../constants';
import { NO_WAYPOINT, METER } from '../../constants';
import { projectPointOnEdge, clamp } from '../../math/math'

@@ -84,19 +84,22 @@

let previousPosition;
if (previous !== NO_WAYPOINT) {
const previousPosition = new Vector3(previous.pose.position);
previousPosition = new Vector3(previous.pose.position);
} else {
previousPosition = new Vector3(body.initialPose.position);
}
let guidePosition = projectPointOnEdge(position, [currentPosition, previousPosition]);
let guidePosition = projectPointOnEdge(position, [currentPosition, 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) - body.initialPose.position.y;
return { success: true, height };
}
const heightDiff = currentPosition.y - previousPosition.y;
let height = (previousPosition.y + heightDiff / totalDistance * distance) - body.initialPose.position.y + METER * 0.4;
return { success: true, height };
}
}
// Return zero height for guidePosition can't be projected onto the path.
// Return zero height if guidePosition can't be projected onto the path.
return { success: false, height: 0 };

@@ -103,0 +106,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