Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

three-mesh-bvh

Package Overview
Dependencies
Maintainers
0
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

three-mesh-bvh - npm Package Compare versions

Comparing version 0.8.0 to 0.8.1

4

package.json
{
"name": "three-mesh-bvh",
"version": "0.8.0",
"version": "0.8.1",
"description": "A BVH implementation to speed up raycasting against three.js meshes.",

@@ -55,3 +55,3 @@ "module": "src/index.js",

"peerDependencies": {
"three": ">= 0.158.0"
"three": ">= 0.159.0"
},

@@ -58,0 +58,0 @@ "devDependencies": {

@@ -1,3 +0,5 @@

import { Vector3, Vector2, Triangle, DoubleSide, BackSide } from 'three';
import { Vector3, Vector2, Triangle, DoubleSide, BackSide, REVISION } from 'three';
const IS_GT_REVISION_169 = parseInt( REVISION ) >= 169;
// Ripped and modified From THREE.js Mesh raycast

@@ -56,2 +58,5 @@ // https://github.com/mrdoob/three.js/blob/0aa87c999fe61e216c1133fba7a95772b503eddf/src/objects/Mesh.js#L115

const barycoord = new Vector3();
Triangle.getBarycoord( _intersectionPoint, _vA, _vB, _vC, barycoord );
if ( uv ) {

@@ -105,2 +110,8 @@

if ( IS_GT_REVISION_169 ) {
intersection.barycoord = barycoord;
}
}

@@ -107,0 +118,0 @@

@@ -74,2 +74,6 @@

// extract barycoord
const barycoord = target && target.barycoord ? target.barycoord : new Vector3();
Triangle.getBarycoord( point, tempV1, tempV2, tempV3, barycoord );
// extract uvs

@@ -102,2 +106,3 @@ let uv = null;

if ( uv ) target.uv = uv;
target.barycoord = barycoord;

@@ -116,3 +121,4 @@ return target;

},
uv: uv
uv: uv,
barycoord: barycoord,
};

@@ -119,0 +125,0 @@

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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