Releases: gkjohnson/three-mesh-bvh
Releases · gkjohnson/three-mesh-bvh
v0.4.0
Added
MeshBVH.refit
function to refit the bounds to modified vertices.setBoundingBox
MeshBVH construction option.MeshBVH.getBoundingBox
function.intersectsRange
callback option toMeshBVH.shapecast
.
Changed
- Removed
src/worker/generateAsync.js
function. UseGenerateMeshBVHWorker
instead. - Use
type: module
in package.json to enable use of es6 modules in node. - Add
sideEffects: false
to package.json. - Remove ability to generate an unpacked BVH.
- Improved "closestPointToPoint" performance slightly.
MeshBVH.shapecast
to take an object of callback functions instead of a list of function arguments and the triangle intersection callback has been changed to take a single triangle index. See README for new API. Calls using the old function will log a warning.
Fixed
MeshBVHVisualizer
not using the new geometry BVH if one was generated.MeshBVHVisualizer
not using the new mesh if it was set.- Case where passing in null
intersectsTriangleFunc
toMeshBVH.shapecast
could throw an error. - Case where the buffer being raycast against was not cleared correctly if a BVH had multiple roots.
v0.3.7
v0.3.6
v0.3.5
v0.3.4
v0.3.3
v0.3.2
Fixed
- Case where float 32 rounding error could result in leaf bounds not completely containing the triangles by expanding the bounds by an estimation of the error.
Changed
Shapecast
intersectsBoundsFunc
to return one of theNOT_INTERSECTED
,INTERSECTED
, orCONTAINED
constants. Returningtrue
andfalse
currently retains the old functionality.
v0.3.1
Added
- Performance improvements when computing distance to geometry.
shapecast
to the docs.MeshBVHVisualizer
to exports.
Fixed
- Cloning the bvh visualizer causing an error.
- Bug with shapecast function where one node would not be checked when using the node score function.
Changed
- Change the bvh visualizer so it automatically copies the local position and rotation of the target mesh.
v0.3.0
v0.2.0
Added
- MeshBVH.serialize and deserialize functions so the bvh can be computed and transferred from a webworker.
lazyGeneration
(defaults to true) option for faster tree initialization.- Support for a buffer-packed tree if
lazyGeneration
is false or a tree has been deserialized for a more smaller memory footprint.
Changed
- CENTER tree computation to improve raycast performance and create more balanced trees.