All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
MeshBVH.refit
function to refit the bounds to modified vertices.setBoundingBox
MeshBVH construction option.MeshBVH.getBoundingBox
function.intersectsRange
callback option toMeshBVH.shapecast
.
- 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.
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.
- Include built umd file including v0.3.6 changes.
- Incorrect face index would be returned from intersection (related to three.js bug fixed in v0.126.1).
- Case where
raycastFirst
failed to return a valid result.
- Raycast result to return a custom intersection object aligned with three.js v0.126.0.
depth
argument tointersectsBoundsFunc
andintersectsTriangleFunc
ofshapecast
.- "webvr" and "webxr" tags.
closestPointToSegment
function to the triangle object used during shapecast which can be used for capsule intersection detection.
- 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.
Shapecast
intersectsBoundsFunc
to return one of theNOT_INTERSECTED
,INTERSECTED
, orCONTAINED
constants. Returningtrue
andfalse
currently retains the old functionality.
- Performance improvements when computing distance to geometry.
shapecast
to the docs.MeshBVHVisualizer
to exports.
- Cloning the bvh visualizer causing an error.
- Bug with shapecast function where one node would not be checked when using the node score function.
- Change the bvh visualizer so it automatically copies the local position and rotation of the target mesh.
generateAsync
function in the/src/worker
folder to help generate BVHs asynchronously with WebWorkers.
- three.js version to use v0.123.0, change
Matrix4.getInverse
toMatrix4.invert
.
- 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.
- CENTER tree computation to improve raycast performance and create more balanced trees.
- Uglify warning for inline defined functions.
- Changed three.js peer dependency version from ^ to >= to prevent warnings.
- Use the BufferGeometry bounding box if it exists and set it if it does not.
- Use the center of the triangles bounding box instead of the average of the vertices as the triangles center when binning the polygons.
- Bug where
closestPointToGeometry
would throw an error when target vectors were provided because a function name was misspelled.
- API for performing intersecting boxes, spheres, and geometry.
- API for checking the distance to geometry and points.
- Fixed issue where an index buffer of the incorrect type was created if there were more than 2^16 vertices.
- Fixed MeshBVHVisualizer not visualizing all the groups in the bvh.
- Error conditions when using
InterleavedAttributeBuffers
for both index and position geometry attributes. - The geometry index attribute is modified when building the
MeshBVH
. And index attribute is created on geometry if it does not exist.
- Fix the bounds tree not respecting groups
- Add included files array to package.json.