summit/frontend/node_modules/three-mesh-bvh/build/index.umd.cjs.map

1 line
435 KiB
Plaintext
Raw Normal View History

2025-12-08 16:31:30 +00:00
{"version":3,"file":"index.umd.cjs","sources":["../src/core/Constants.js","../src/core/build/geometryUtils.js","../src/core/build/computeBoundsUtils.js","../src/utils/ArrayBoxUtilities.js","../src/core/build/splitUtils.js","../src/core/MeshBVHNode.js","../src/core/build/sortUtils.generated.js","../src/core/build/sortUtils_indirect.generated.js","../src/core/utils/nodeBufferUtils.js","../src/core/build/buildUtils.js","../src/core/build/buildTree.js","../src/math/SeparatingAxisBounds.js","../src/math/MathUtilities.js","../src/math/ExtendedTriangle.js","../src/math/OrientedBox.js","../src/utils/PrimitivePool.js","../src/utils/ExtendedTrianglePool.js","../src/core/utils/BufferStack.js","../src/core/cast/shapecast.js","../src/core/cast/closestPointToPoint.js","../src/utils/ThreeRayIntersectUtilities.js","../src/utils/TriangleUtilities.js","../src/core/utils/iterationUtils.generated.js","../src/core/cast/refit.generated.js","../src/core/utils/intersectUtils.js","../src/core/utils/iterationUtils_indirect.generated.js","../src/core/cast/raycast.generated.js","../src/core/cast/raycastFirst.generated.js","../src/core/cast/intersectsGeometry.generated.js","../src/core/cast/closestPointToGeometry.generated.js","../src/core/cast/refit_indirect.generated.js","../src/core/cast/raycast_indirect.generated.js","../src/core/cast/raycastFirst_indirect.generated.js","../src/core/cast/intersectsGeometry_indirect.generated.js","../src/core/cast/closestPointToGeometry_indirect.generated.js","../src/utils/BufferUtils.js","../src/core/cast/bvhcast.js","../src/core/MeshBVH.js","../src/objects/MeshBVHHelper.js","../src/debug/Debug.js","../src/utils/GeometryRayIntersectUtilities.js","../src/utils/ExtensionUtilities.js","../src/gpu/VertexAttributeTexture.js","../src/gpu/MeshBVHUniformStruct.js","../src/utils/StaticGeometryGenerator.js","../src/gpu/glsl/common_functions.glsl.js","../src/gpu/glsl/bvh_distance_functions.glsl.js","../src/gpu/glsl/bvh_ray_functions.glsl.js","../src/gpu/glsl/bvh_struct_definitions.glsl.js","../src/index.js"],"sourcesContent":["// Split strategy constants\nexport const CENTER = 0;\nexport const AVERAGE = 1;\nexport const SAH = 2;\n\n// Traversal constants\nexport const NOT_INTERSECTED = 0;\nexport const INTERSECTED = 1;\nexport const CONTAINED = 2;\n\n// SAH cost constants\n// TODO: hone these costs more. The relative difference between them should be the\n// difference in measured time to perform a triangle intersection vs traversing\n// bounds.\nexport const TRIANGLE_INTERSECT_COST = 1.25;\nexport const TRAVERSAL_COST = 1;\n\n\n// Build constants\nexport const BYTES_PER_NODE = 6 * 4 + 4 + 4;\nexport const IS_LEAFNODE_FLAG = 0xFFFF;\n\n// EPSILON for computing floating point error during build\n// https://en.wikipedia.org/wiki/Machine_epsilon#Values_for_standard_hardware_floating_point_arithmetics\nexport const FLOAT32_EPSILON = Math.pow( 2, - 24 );\n\nexport const SKIP_GENERATION = Symbol( 'SKIP_GENERATION' );\n","import { BufferAttribute } from 'three';\n\nexport function getVertexCount( geo ) {\n\n\treturn geo.index ? geo.index.count : geo.attributes.position.count;\n\n}\n\nexport function getTriCount( geo ) {\n\n\treturn getVertexCount( geo ) / 3;\n\n}\n\nexport function getIndexArray( vertexCount, BufferConstructor = ArrayBuffer ) {\n\n\tif ( vertexCount > 65535 ) {\n\n\t\treturn new Uint32Array( new BufferConstructor( 4 * vertexCount ) );\n\n\t} else {\n\n\t\treturn new Uint16Array( new BufferConstructor( 2 * vertexCount ) );\n\n\t}\n\n}\n\n// ensures that an index is present on the geometry\nexport function ensureIndex( geo, options ) {\n\n\tif ( ! geo.index ) {\n\n\t\tconst vertexCount = geo.attributes.position.count;\n\t\tconst BufferConstructor = options.useSharedArrayBuffer ? SharedArrayBuffer : ArrayBuffer;\n\t\tconst index = getIndexArray( vertexCount, BufferConstructor );\n\t\tgeo.setIndex( new BufferAttribute( index, 1 ) );\n\n\t\tfor ( let i = 0; i < vertexCount; i ++ ) {\n\n\t\t\tindex[ i ] = i;\n\n\t\t}\n\n\t}\n\n}\n\n// Computes the set of { offset, count } ranges which need independent BVH roots. Each\