Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/agargaro/bvh.js
Dynamic BVH implementation based on Erin Catto's paper and three-mesh-bvh (WIP)
https://github.com/agargaro/bvh.js
3d acceleration acceleration-data-structures bounds bounds-hierarchy bvh graphics intersection performance
Last synced: 3 months ago
JSON representation
Dynamic BVH implementation based on Erin Catto's paper and three-mesh-bvh (WIP)
- Host: GitHub
- URL: https://github.com/agargaro/bvh.js
- Owner: agargaro
- License: mit
- Created: 2024-07-11T16:42:32.000Z (7 months ago)
- Default Branch: master
- Last Pushed: 2024-10-21T11:26:41.000Z (4 months ago)
- Last Synced: 2024-10-21T16:38:36.691Z (4 months ago)
- Topics: 3d, acceleration, acceleration-data-structures, bounds, bounds-hierarchy, bvh, graphics, intersection, performance
- Language: TypeScript
- Homepage:
- Size: 113 KB
- Stars: 23
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Dynamic BVH
Work in progress... will be released soon :)
Live example: https://stackblitz.com/edit/three-ezinstancedmesh2-dynamic-bvh?file=index.ts
Create a BVH from a AABB array. You can set whetever value to each node.
Build method: top-down or insertion one by one.
## Implemented API:
createFromArray
insert
insertRange
move
delete
cleartraverse
rayIntersections
frustumCulling
frustumCullingLOD
closestPointToPoint
intersectsBox
intersectsSphere
intersectsRay
isNodeIntersected## TODO:
traverseByScore
intersectsRayFirst
intersectsBVH
closestPointToGeometry
getAllCollision
getNearestObjectexperiment rotation with N leaves and max depth
## References
- [three-mesh-bvh](https://github.com/gkjohnson/three-mesh-bvh)
- [ErinCatto_DynamicBVH](https://box2d.org/files/ErinCatto_DynamicBVH_Full.pdf)