Skip to content

Releases: gkjohnson/three-mesh-bvh

v0.9.3

01 Dec 14:04

Choose a tag to compare

Fixed

  • Fixed dependencies on WebGPURenderer compute nodes.
  • Fixed MeshBVH.bvhcast passing "NaN" nodeIndex values to callbacks when more than one group was present.
  • Fixed triangles being included in the BVH when they were not included in a groups range (eg exclude triangles in group gaps).
  • Ensure "triangle bounds" buffer is limited to the size it needs to be to avoid unnecessary memory overhead.
  • Remove limitation preventing "indirect" BVHs from being generated for BatchedMesh instances.
  • Raycasting will now return the correct material index aligned with three.js' results including when geometry with overlapping groups are used.

v0.9.2

24 Oct 00:44

Choose a tag to compare

Added

  • Types for web workers.
  • Add tsl functions for running bvh raycasting and distance queries via compute shaders.
  • Add "three-mesh-bvh/worker" export.
  • Add "three-mesh-bvh/webgpu" export.

Fixed

  • Type definitions.
  • Case where raycasting results would not match three.js' behavior.
  • Case where "intersectsGeometry" would throw an error if a geometry without an index was provided.
  • MeshBVHHelper: fix types to align with docs.
  • MeshBVHHelper: fix case where "update" causes an error if "mesh" is not provided.
  • MeshBVH: Fixed case where generating a bvh for a sub geometry was significantly slower, impacting BatchedMesh generation.

v0.9.1

20 Jun 14:42

Choose a tag to compare

Fixed

  • Type definitions

v0.9.0

21 Jan 09:15

Choose a tag to compare

Changed

  • Changed "bvhClosestPointToPoint" function signature to include "maxDistance" argument.

v0.8.3

11 Nov 23:30

Choose a tag to compare

Fixed

  • Library not working with BatchedMesh in three.js r170.

v0.8.2

01 Oct 17:16

Choose a tag to compare

Fixed

  • Unnecessarily large triangle bounds buffer used during BVH construction.

v0.8.1

29 Sep 08:56

Choose a tag to compare

Fixed

  • Made example SDF generation logic more robust.
  • Adjust the valid the three.js peer dependency.
  • Add "barycoord" to the intersection values to align with latest three.js.

v0.8.0

18 Sep 14:55

Choose a tag to compare

Fixed

  • Updated three.js version to r158 where BatchedMesh is supported and available so certain bundlers do not fail on build.

v0.7.8 (Deprecated)

11 Sep 03:07

Choose a tag to compare

deprecated due to three.js version incompatibility. Use v0.8.0.

Fixed

  • Failure with older versions of three.js in some bundlers.

v0.7.7 (Deprecated)

09 Sep 02:04

Choose a tag to compare

deprecated due to three.js version incompatibility. Use v0.8.0.

Added

  • Support for a custom "range" option to build a BVH from a sub range of the geometry.
  • BatchedMesh support for bounds tree generation functions and raycasting. See "computeBatchedBoundsTree" and "disposeBatchedBoundsTree".
  • MeshBVHHelper support for InstancedMesh, BatchedMesh.

Fixed

  • Bug in MeshBVH.bvhcast causing the incorrect bounds to be checked on the other bvh.
  • Box3.setFromObject failing when MeshBVHHelper is included.