three-mesh-bvh
Advanced tools
Comparing version
{ | ||
"name": "three-mesh-bvh", | ||
"version": "0.8.3", | ||
"version": "0.9.0", | ||
"description": "A BVH implementation to speed up raycasting against three.js meshes.", | ||
@@ -5,0 +5,0 @@ "module": "src/index.js", |
@@ -1139,6 +1139,6 @@ # three-mesh-bvh | ||
```js | ||
shaderStructs : string | ||
BVHShaderGLSL.bvh_struct_definitions : string | ||
``` | ||
Set of shaders structs and defined constants used for interacting with the packed BVH in a shader. See [src/gpu/shaderFunctions.js](https://github.com/gkjohnson/three-mesh-bvh/blob/master/src/gpu/shaderFunctions.js) for full implementations and declarations. | ||
Set of shaders structs and defined constants used for interacting with the packed BVH in a shader. See [src/gpu/bvh_struct_definitions.glsl.js](https://github.com/gkjohnson/three-mesh-bvh/blob/master/src/gpu/bvh_struct_definitions.glsl.js) for full implementations and declarations. | ||
@@ -1148,6 +1148,8 @@ ### shaderFunctions | ||
```js | ||
shaderFunctions : string | ||
BVHShaderGLSL.bvh_distance_functions : string | ||
BVHShaderGLSL.bvh_ray_functions : string | ||
BVHShaderGLSL.common_functions : string | ||
``` | ||
Set of shader functions used for interacting with the packed BVH in a shader and sampling [VertexAttributeTextures](#VertexAttributeTexture). See [src/gpu/shaderFunctions.js](https://github.com/gkjohnson/three-mesh-bvh/blob/master/src/gpu/shaderFunctions.js) for full implementations and declarations. | ||
Set of shader functions used for interacting with the packed BVH in a shader and sampling [VertexAttributeTextures](#VertexAttributeTexture). See [src/gpu/glsl](https://github.com/gkjohnson/three-mesh-bvh/tree/master/src/gpu/glsl) for full implementations and declarations. | ||
@@ -1154,0 +1156,0 @@ ## Gotchas |
@@ -118,7 +118,7 @@ // Distance to Point | ||
bvh,\ | ||
point, faceIndices, faceNormal, barycoord, side, outPoint\ | ||
point, maxDistance, faceIndices, faceNormal, barycoord, side, outPoint\ | ||
)\ | ||
_bvhClosestPointToPoint(\ | ||
bvh.position, bvh.index, bvh.bvhBounds, bvh.bvhContents,\ | ||
point, faceIndices, faceNormal, barycoord, side, outPoint\ | ||
point, maxDistance, faceIndices, faceNormal, barycoord, side, outPoint\ | ||
) | ||
@@ -131,3 +131,3 @@ | ||
// point to check | ||
vec3 point, | ||
vec3 point, float maxDistance, | ||
@@ -145,3 +145,3 @@ // output variables | ||
float closestDistanceSquared = pow( 100000.0, 2.0 ); | ||
float closestDistanceSquared = maxDistance * maxDistance; | ||
bool found = false; | ||
@@ -148,0 +148,0 @@ while ( ptr > - 1 && ptr < BVH_STACK_DEPTH ) { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1615548
0.02%1179
0.17%