Skip to content

Releases: gkjohnson/three-mesh-bvh

v0.4.0

11 Jun 17:16
Compare
Choose a tag to compare

Added

  • MeshBVH.refit function to refit the bounds to modified vertices.
  • setBoundingBox MeshBVH construction option.
  • MeshBVH.getBoundingBox function.
  • intersectsRange callback option to MeshBVH.shapecast.

Changed

  • Removed src/worker/generateAsync.js function. Use GenerateMeshBVHWorker 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 to MeshBVH.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

06 Mar 17:53
Compare
Choose a tag to compare

Fixed

  • Include built umd file including v0.3.6 changes.

v0.3.6

03 Mar 16:55
Compare
Choose a tag to compare

Fixed

  • Incorrect face index would be returned from intersection (related to three.js bug fixed in v0.126.1).

v0.3.5

01 Mar 05:46
Compare
Choose a tag to compare

Fixed

  • Case where raycastFirst failed to return a valid result.

v0.3.4

25 Feb 18:34
Compare
Choose a tag to compare

Changed

  • Raycast result to return a custom intersection object aligned with three.js v0.126.0.

v0.3.3

24 Jan 20:58
Compare
Choose a tag to compare

Added

  • depth argument to intersectsBoundsFunc and intersectsTriangleFunc of shapecast.
  • "webvr" and "webxr" tags.
  • closestPointToSegment function to the triangle object used during shapecast which can be used for capsule intersection detection.

v0.3.2

24 Dec 00:28
Compare
Choose a tag to compare

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 the NOT_INTERSECTED, INTERSECTED, or CONTAINED constants. Returning true and false currently retains the old functionality.

v0.3.1

15 Dec 03:47
Compare
Choose a tag to compare

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

02 Dec 02:41
Compare
Choose a tag to compare

Added

  • generateAsync function in the /src/worker folder to help generate BVHs asynchronously with WebWorkers.

Changed

  • three.js version to use v0.123.0, change Matrix4.getInverse to Matrix4.invert.

v0.2.0

08 Feb 07:55
Compare
Choose a tag to compare

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.