Skip to content

Releases: gkjohnson/three-mesh-bvh

v0.9.4

18 Dec 08:19

Choose a tag to compare

Added

  • Docs for bvhcast function.
  • More usage of "PURE" annotations.
  • Added "version" field to serialized data.
  • Add support for "shiftTriangleOffsets" function.

Changed

  • Changed the internal storage of child indices from uint32 offsets to node indices. Old serialized data will continue to work via a "fixup" step while logging a warning.

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.