Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

three-mesh-bvh

Package Overview
Dependencies
Maintainers
1
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

three-mesh-bvh - npm Package Versions

1
57

0.4.0

Diff

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

Changelog

Source

[0.3.0] - 2020-12-01

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

Changelog

Source

[0.2.0] - 2020-02-07

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.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc