Socket
Socket
Sign inDemoInstall

three-mesh-bvh

Package Overview
Dependencies
Maintainers
1
Versions
66
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.7.2 to 0.7.3

2

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

@@ -5,0 +5,0 @@ "module": "src/index.js",

@@ -9,3 +9,3 @@ import { BYTES_PER_NODE, IS_LEAFNODE_FLAG } from '../Constants.js';

if ( node.count ) {
if ( 'count' in node ) {

@@ -41,3 +41,3 @@ return 1;

const stride2Offset = byteOffset / 2;
const isLeaf = ! ! node.count;
const isLeaf = 'count' in node;
const boundingData = node.boundingData;

@@ -44,0 +44,0 @@ for ( let i = 0; i < 6; i ++ ) {

@@ -221,3 +221,3 @@ import {

// copy the data over to the new texture array
const dimension = Math.ceil( Math.sqrt( count ) );
const dimension = Math.ceil( Math.sqrt( count ) ) || 1;
const length = finalStride * dimension * dimension;

@@ -224,0 +224,0 @@ const dataArray = new targetBufferCons( length );

@@ -545,4 +545,28 @@ import { BufferAttribute, BufferGeometry, Vector3, Vector4, Matrix4, Matrix3 } from 'three';

mergeBufferGeometries( _intermediateGeometry, { useGroups, skipAttributes }, targetGeometry );
if ( _intermediateGeometry.length === 0 ) {
// if there are no geometries then just create a fake empty geometry to provide
targetGeometry.setIndex( null );
// remove all geometry
const attrs = targetGeometry.attributes;
for ( const key in attrs ) {
targetGeometry.deleteAttribute( key );
}
// create dummy attributes
for ( const key in this.attributes ) {
targetGeometry.setAttribute( this.attributes[ key ], new BufferAttribute( new Float32Array( 0 ), 4, false ) );
}
} else {
mergeBufferGeometries( _intermediateGeometry, { useGroups, skipAttributes }, targetGeometry );
}
for ( const key in targetGeometry.attributes ) {

@@ -549,0 +573,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