New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

three-mesh-bvh

Package Overview
Dependencies
Maintainers
1
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

three-mesh-bvh - npm Package Versions

123457

0.4.2

Diff
gkjohnson
published 0.4.2 •

Changelog

Source

[0.4.2] - 2021-08-04

Fixed

  • Case where intersectsRangeFunc could be passed the incorrect node id in shapecast.
  • Bug in distanceToGeometry and closestPointToGeometry which would likely result in some closest points being missed. This fix greatly degrades performance in the case where the passed geometry does not have a BVH. It is recommended that the passed in geometry include a computed bounds tree.
  • Cases where passed in geometry that did not include an index buffer could throw an error when calling functions like closestPointToGeometry.
  • Case where raycastFirst would return the incorrect result.
  • Greatly improved MeshBVHVisualizer render and update performance.
  • Case where MeshBVHVisualizer would not correctly display a BVH for geometry with multiple groups.

Added

  • distanceToGeometry and closestPointToGeometry fast path when the passed in geometry has a bounds tree.
  • Support for position BufferAttribute to be interleaved.
gkjohnson
published 0.4.1 •

Changelog

Source

[0.4.1] - 2021-06-21

Changed

  • package.json "main" field to use a .cjs file extension
gkjohnson
published 0.4.0 •

Changelog

Source

[0.4.0] - 2021-06-11

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.
gkjohnson
published 0.3.7 •

Changelog

Source

[0.3.7] - 2021-03-06

Fixed

  • Include built umd file including v0.3.6 changes.
gkjohnson
published 0.3.6 •

Changelog

Source

[0.3.6] - 2021-03-03

Fixed

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

Changelog

Source

[0.3.5] - 2021-02-28

Fixed

  • Case where raycastFirst failed to return a valid result.
gkjohnson
published 0.3.4 •

Changelog

Source

[0.3.4] - 2021-02-25

Changed

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

Changelog

Source

[0.3.3] - 2021-01-24

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.
gkjohnson
published 0.3.2 •

Changelog

Source

[0.3.2] - 2020-12-23

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.
gkjohnson
published 0.3.1 •

Changelog

Source

[0.3.1] - 2020-12-14

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.