three-mesh-bvh
Advanced tools
Comparing version 0.6.0 to 0.6.1
{ | ||
"name": "three-mesh-bvh", | ||
"version": "0.6.0", | ||
"version": "0.6.1", | ||
"description": "A BVH implementation to speed up raycasting against three.js meshes.", | ||
@@ -5,0 +5,0 @@ "module": "src/index.js", |
import { BufferAttribute } from 'three'; | ||
import { MeshBVHNode } from './MeshBVHNode.js'; | ||
import { getLongestEdgeIndex, computeSurfaceArea, copyBounds, unionBounds, expandByTriangleBounds } from '../utils/ArrayBoxUtilities.js'; | ||
import { getLongestEdgeIndex, computeSurfaceArea, copyBounds, unionBounds, expandByTriangleBounds, makeEmptyBounds } from '../utils/ArrayBoxUtilities.js'; | ||
import { | ||
@@ -562,2 +562,5 @@ CENTER, AVERAGE, SAH, TRIANGLE_INTERSECT_COST, TRAVERSAL_COST, | ||
// clear the bounds to empty | ||
makeEmptyBounds( fullBounds ); | ||
const posAttr = geo.attributes.position; | ||
@@ -564,0 +567,0 @@ const index = geo.index.array; |
@@ -15,2 +15,9 @@ export function arrayToBox( nodeIndex32, array, target ) { | ||
export function makeEmptyBounds( target ) { | ||
target[ 0 ] = target[ 1 ] = target[ 2 ] = Infinity; | ||
target[ 3 ] = target[ 4 ] = target[ 5 ] = - Infinity; | ||
} | ||
export function getLongestEdgeIndex( bounds ) { | ||
@@ -17,0 +24,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
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
1179374
13168