@woosh/meep-engine 2.67.0 → 2.69.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/build/bundle-worker-terrain.js +1 -1
  2. package/build/meep.cjs +698 -1270
  3. package/build/meep.min.js +1 -1
  4. package/build/meep.module.js +698 -1270
  5. package/package.json +1 -1
  6. package/src/core/bvh2/binary/2/BinaryUint32BVH.js +55 -28
  7. package/src/core/bvh2/binary/2/BinaryUint32BVH.spec.js +3 -3
  8. package/src/core/bvh2/binary/2/bvh32_query_user_data_overlaps_clipping_volume.js +94 -0
  9. package/src/core/bvh2/binary/2/bvh32_query_user_data_ray.js +17 -18
  10. package/src/core/bvh2/bvh3/query/BVHQueryIntersectsFrustum.js +4 -2
  11. package/src/core/geom/3d/aabb/AABB3.js +14 -14
  12. package/src/core/geom/3d/aabb/aabb3_array_intersects_clipping_volume_array.js +30 -0
  13. package/src/core/geom/3d/aabb/aabb3_intersects_clipping_volume_array.js +51 -0
  14. package/src/core/geom/3d/frustum/{read_frustum_planes_to_array.js → read_three_planes_to_array.js} +5 -3
  15. package/src/core/geom/3d/triangle/triangle_intersects_clipping_volume.js +51 -0
  16. package/src/engine/ecs/terrain/ecs/TerrainSystem.js +2 -2
  17. package/src/engine/ecs/terrain/ecs/makeTerrainWorkerProxy.js +1 -1
  18. package/src/engine/ecs/terrain/tiles/TerrainTile.js +9 -46
  19. package/src/engine/graphics/ecs/mesh/Mesh.d.ts +0 -1
  20. package/src/engine/graphics/ecs/mesh-v2/ShadedGeometry.d.ts +0 -5
  21. package/src/engine/graphics/ecs/mesh-v2/ShadedGeometry.js +0 -1
  22. package/src/engine/graphics/geometry/buffered/query/GeometrySpatialQueryAccelerator.d.ts +2 -2
  23. package/src/engine/graphics/geometry/buffered/query/GeometrySpatialQueryAccelerator.js +79 -36
  24. package/src/engine/graphics/geometry/buffered/query/bvh32_geometry_overlap_clipping_volume.js +88 -0
  25. package/src/engine/graphics/geometry/buffered/query/bvh32_geometry_raycast.js +108 -0
  26. package/src/engine/graphics/geometry/bvh/buffered/bvh32_from_indexed_geometry.js +4 -30
  27. package/src/engine/graphics/geometry/bvh/buffered/bvh32_from_unindexed_geometry.js +30 -0
  28. package/src/engine/graphics/geometry/bvh/buffered/bvh32_set_leaf_from_triangle.js +41 -0
  29. package/src/engine/graphics/material/optimization/prototypeMaterialOptimizer.js +16 -19
  30. package/src/engine/graphics/render/forward_plus/LightManager.js +2 -2
  31. package/src/engine/graphics/render/forward_plus/prototype/prototypeLightManager.js +46 -47
  32. package/src/engine/graphics/render/forward_plus/query/query_bvh_frustum_from_texture.js +2 -2
  33. package/src/engine/graphics/render/view/CameraView.js +8 -8
  34. package/src/core/bvh2/BVHTasks.js +0 -65
  35. package/src/core/bvh2/BinaryNode.d.ts +0 -13
  36. package/src/core/bvh2/BinaryNode.js +0 -1188
  37. package/src/core/bvh2/BinaryNode.spec.js +0 -309
  38. package/src/core/bvh2/LeafNode.d.ts +0 -7
  39. package/src/core/bvh2/LeafNode.js +0 -147
  40. package/src/core/bvh2/Node.d.ts +0 -9
  41. package/src/core/bvh2/Node.js +0 -196
  42. package/src/core/bvh2/NodeValidator.js +0 -197
  43. package/src/core/bvh2/StacklessTraverser.js +0 -154
  44. package/src/core/bvh2/StacklessTraverser.spec.js +0 -109
  45. package/src/core/bvh2/binary/BinaryBVH.js +0 -281
  46. package/src/core/bvh2/binary/IndexedBinaryBVH.js +0 -407
  47. package/src/core/bvh2/binary/IndexedBinaryBVH.spec.js +0 -27
  48. package/src/core/bvh2/binary/IndexedBinaryBVHVisitor.js +0 -11
  49. package/src/core/bvh2/binary/NodeType.js +0 -8
  50. package/src/core/bvh2/binary/RayLeafIntersectionVisitor.js +0 -59
  51. package/src/core/bvh2/serialization/deserializeBinaryNode.js +0 -40
  52. package/src/core/bvh2/serialization/deserializeBinaryNodeFromBinaryBuffer.js +0 -90
  53. package/src/core/bvh2/serialization/serializeBinaryNode.js +0 -31
  54. package/src/core/bvh2/serialization/serializeBinaryNodeToBinaryBuffer.js +0 -86
  55. package/src/core/bvh2/transform/BottomUpOptimizingRebuilder.js +0 -144
  56. package/src/core/bvh2/transform/RotationOptimizer.js +0 -123
  57. package/src/core/bvh2/transform/RotationOptimizer.spec.js +0 -303
  58. package/src/core/bvh2/transform/tryRotateSingleNode.js +0 -260
  59. package/src/core/bvh2/traversal/BVHVisitor.js +0 -30
  60. package/src/core/bvh2/traversal/RaycastBVHVisitor.js +0 -66
  61. package/src/core/bvh2/traversal/ThreeClippingPlaneComputingBVHVisitor.js +0 -384
  62. package/src/core/bvh2/traversal/ThreeFrustumsIntersectionBVHVisitor.js +0 -52
  63. package/src/core/bvh2/traversal/bvh_traverse_pre_order_using_stack.js +0 -43
  64. package/src/core/bvh2/traversal/queryBinaryNode_ClippingPlanes.d.ts +0 -5
  65. package/src/core/bvh2/traversal/queryBinaryNode_ClippingPlanes.js +0 -66
  66. package/src/core/bvh2/traversal/queryBinaryNode_CollectData.js +0 -49
  67. package/src/core/bvh2/traversal/queryBinaryNode_CollectLeaves.js +0 -51
  68. package/src/core/bvh2/traversal/queryBinaryNode_FrustumIntersections.js +0 -77
  69. package/src/core/bvh2/traversal/queryBinaryNode_SphereIntersections.js +0 -63
  70. package/src/core/bvh2/traversal/traverseBinaryNodeUsingVisitor.js +0 -50
  71. package/src/core/bvh2/traversal/traverseBinaryNodeUsingVisitor_DepthFirst_PreOrder.js +0 -34
  72. package/src/core/bvh2/util/find_least_common_ancestor.js +0 -34
  73. package/src/core/bvh2/visual/convert_bvh_to_dot_format_string.js +0 -50
  74. package/src/core/geom/2d/bvh/BinaryNode2.js +0 -152
  75. package/src/core/geom/2d/bvh/LeafNode2.js +0 -11
  76. package/src/core/geom/2d/bvh/Node2.js +0 -51
  77. package/src/core/geom/3d/aabb/aabb3_array_intersects_frustum_array.js +0 -20
  78. package/src/core/geom/3d/aabb/aabb3_intersects_frustum_array.js +0 -35
  79. package/src/engine/ecs/terrain/tiles/FirstRayIntersectionTerrainBVHVisitor.js +0 -74
  80. package/src/engine/graphics/geometry/buffered/query/ClippingPlaneContainmentComputingVisitor.js +0 -195
  81. package/src/engine/graphics/geometry/buffered/query/GeometryVisitor.js +0 -87
  82. package/src/engine/graphics/geometry/buffered/query/RaycastNearestHitComputingVisitor.js +0 -206
  83. package/src/engine/graphics/geometry/bvh/BVHFromGeometry.js +0 -72
  84. package/src/engine/graphics/geometry/bvh/buffered/BVHGeometryRaycaster.js +0 -240
  85. package/src/engine/graphics/geometry/bvh/buffered/BinaryBVHFromBufferGeometry.js +0 -123
  86. package/src/engine/graphics/geometry/bvh/buffered/IndexedTraingleBoundsComputer.js +0 -43
  87. package/src/engine/graphics/render/forward_plus/query/query_bvh_frustum_from_objects.js +0 -133
@@ -1,195 +0,0 @@
1
- import { aabb3_compute_plane_side } from "../../../../../core/geom/3d/aabb/aabb3_compute_plane_side.js";
2
- import { NodeType } from "../../../../../core/bvh2/binary/NodeType.js";
3
- import { computeTrianglePlaneSide } from "../../../../../core/geom/3d/triangle/computeTrianglePlaneSide.js";
4
- import { GeometrySpatialAcceleratorVisitor } from "./GeometryVisitor.js";
5
-
6
- export class ClippingPlaneContainmentComputingVisitor extends GeometrySpatialAcceleratorVisitor {
7
- constructor() {
8
- super();
9
-
10
- /**
11
- * @private
12
- * @type {Plane[]}
13
- */
14
- this.planes = [];
15
-
16
- /**
17
- *
18
- * @private
19
- * @type {number}
20
- */
21
- this.plane_count = 0;
22
-
23
- this.__hit_count_in = 0;
24
- this.__hit_count_out = 0;
25
- this.__hit_count_intersect = 0;
26
- }
27
-
28
- reset() {
29
- this.__hit_count_in = 0;
30
- this.__hit_count_intersect = 0;
31
- this.__hit_count_out = 0;
32
- }
33
-
34
- /**
35
- *
36
- * @returns {number}
37
- */
38
- getContainment() {
39
- if (this.__hit_count_out === 0) {
40
- if (this.__hit_count_intersect > 0) {
41
- return 0;
42
- } else {
43
- // fully in
44
- return 1;
45
- }
46
- } else {
47
- if (this.__hit_count_intersect > 0 || this.__hit_count_in > 0) {
48
- return 0;
49
- } else {
50
- // fully out
51
- return -1;
52
- }
53
- }
54
- }
55
-
56
- /**
57
- * @param {Plane[]} planes
58
- */
59
- setPlanes(planes) {
60
- this.planes = planes;
61
- this.plane_count = planes.length;
62
- }
63
-
64
-
65
- visit(address, type) {
66
- const root = this.__root;
67
-
68
- const data = root.data;
69
- const binaryNodeCount = root.binaryNodeCount;
70
-
71
- const planes = this.planes;
72
- const plane_count = this.plane_count;
73
-
74
- let intersect_flag = false;
75
- if (type === NodeType.LEAF) {
76
- // check triangle intersection
77
-
78
- const index = address / 6 - binaryNodeCount;
79
-
80
- const index3 = index * 3;
81
-
82
- const indices = this.__buffer_indices;
83
-
84
- const a = indices[index3];
85
- const b = indices[index3 + 1];
86
- const c = indices[index3 + 2];
87
-
88
- const vertices = this.__buffer_vertices;
89
-
90
- const stride = this.__buffer_vertex_stride;
91
- const offset = this.__buffer_position_offset;
92
-
93
- const a_address = a * stride + offset;
94
- const b_address = b * stride + offset;
95
- const c_address = c * stride + offset;
96
-
97
- const ax = vertices[a_address];
98
- const ay = vertices[a_address + 1];
99
- const az = vertices[a_address + 2];
100
-
101
- const bx = vertices[b_address];
102
- const by = vertices[b_address + 1];
103
- const bz = vertices[b_address + 2];
104
-
105
- const cx = vertices[c_address];
106
- const cy = vertices[c_address + 1];
107
- const cz = vertices[c_address + 2];
108
-
109
- for (let i = 0; i < plane_count; i++) {
110
- const plane = planes[i];
111
-
112
- const plane_normal_x = plane.normal.x;
113
- const plane_normal_y = plane.normal.y;
114
- const plane_normal_z = plane.normal.z;
115
- const plane_constant = plane.constant;
116
-
117
- const side = computeTrianglePlaneSide(
118
- plane_normal_x,
119
- plane_normal_y,
120
- plane_normal_z,
121
- plane_constant,
122
- ax, ay, az,
123
- bx, by, bz,
124
- cx, cy, cz
125
- );
126
-
127
- if (side === -3) {
128
- // fully outside
129
- this.__hit_count_out++;
130
- return false;
131
- } else if (side < 3) {
132
- intersect_flag = true;
133
- }
134
- }
135
-
136
- if (intersect_flag) {
137
- this.__hit_count_intersect++;
138
- } else {
139
- this.__hit_count_in++;
140
- }
141
-
142
- return false;
143
- } else {
144
- // this is an intermediate node (binary node)
145
-
146
- // check AABB intersection
147
-
148
-
149
- const x0 = data[address];
150
- const y0 = data[address + 1];
151
- const z0 = data[address + 2];
152
- const x1 = data[address + 3];
153
- const y1 = data[address + 4];
154
- const z1 = data[address + 5];
155
-
156
-
157
- for (let i = 0; i < plane_count; i++) {
158
- const plane = planes[i];
159
-
160
- const plane_normal_x = plane.normal.x;
161
- const plane_normal_y = plane.normal.y;
162
- const plane_normal_z = plane.normal.z;
163
- const plane_constant = plane.constant;
164
-
165
- const side = aabb3_compute_plane_side(
166
- plane_normal_x,
167
- plane_normal_y,
168
- plane_normal_z,
169
- plane_constant,
170
-
171
- x0, y0, z0,
172
- x1, y1, z1
173
- );
174
-
175
- if (side === -2) {
176
- this.__hit_count_out++;
177
-
178
- return false;
179
- } else if (side === 0) {
180
- intersect_flag = true;
181
- }
182
- }
183
-
184
- if (intersect_flag) {
185
- return true;
186
- } else {
187
- // no need to traverse further down, the whole node is in
188
- this.__hit_count_in++;
189
- return false;
190
- }
191
- }
192
-
193
-
194
- }
195
- }
@@ -1,87 +0,0 @@
1
- import { IndexedBinaryBVHVisitor } from "../../../../../core/bvh2/binary/IndexedBinaryBVHVisitor.js";
2
-
3
- export class GeometrySpatialAcceleratorVisitor extends IndexedBinaryBVHVisitor {
4
- constructor() {
5
- super();
6
-
7
-
8
- /**
9
- * @protected
10
- * @type {THREE.BufferGeometry}
11
- */
12
- this.__geometry = null;
13
-
14
- /**
15
- *
16
- * @type {number[]}
17
- * @protected
18
- */
19
- this.__buffer_indices = null;
20
-
21
- /**
22
- *
23
- * @type {number[]}
24
- * @protected
25
- */
26
- this.__buffer_vertices = null;
27
-
28
- /**
29
- *
30
- * @type {number}
31
- * @protected
32
- */
33
- this.__buffer_vertex_stride = 3;
34
-
35
- /**
36
- *
37
- * @type {number}
38
- * @protected
39
- */
40
- this.__buffer_position_offset = 0;
41
-
42
- /**
43
- * @protected
44
- * @type {IndexedBinaryBVH}
45
- */
46
- this.__root = null;
47
- }
48
-
49
- /**
50
- * @param {IndexedBinaryBVH} root
51
- */
52
- setRoot(root) {
53
- this.__root = root;
54
- }
55
-
56
-
57
- /**
58
- * @param {THREE.BufferGeometry} geometry
59
- */
60
- setGeometry(geometry) {
61
- this.geometry = geometry;
62
-
63
- const index_attribute = geometry.getIndex();
64
-
65
- if (index_attribute) {
66
- this.__buffer_indices = index_attribute.array;
67
- } else {
68
- // no index attribute
69
- this.__buffer_indices = null;
70
- }
71
-
72
- const position_attribute = geometry.getAttribute('position');
73
-
74
- if (position_attribute.isInterleavedBufferAttribute) {
75
- const data = position_attribute.data;
76
-
77
- this.__buffer_vertices = data.array;
78
- this.__buffer_vertex_stride = data.stride;
79
- this.__buffer_position_offset = position_attribute.offset;
80
- } else {
81
- this.__buffer_vertices = position_attribute.array;
82
- this.__buffer_vertex_stride = 3;
83
- this.__buffer_position_offset = 0;
84
- }
85
- }
86
-
87
- }
@@ -1,206 +0,0 @@
1
- import { SurfacePoint3 } from "../../../../../core/geom/3d/SurfacePoint3.js";
2
- import { NodeType } from "../../../../../core/bvh2/binary/NodeType.js";
3
- import Vector3 from "../../../../../core/geom/Vector3.js";
4
- import { computeTriangleRayIntersection } from "../../../../../core/geom/3d/triangle/computeTriangleRayIntersection.js";
5
- import { GeometrySpatialAcceleratorVisitor } from "./GeometryVisitor.js";
6
- import { aabb3_intersects_ray } from "../../../../../core/geom/3d/aabb/aabb3_intersects_ray.js";
7
- import { assert } from "../../../../../core/assert.js";
8
-
9
- export class RaycastNearestHitComputingVisitor extends GeometrySpatialAcceleratorVisitor {
10
- constructor() {
11
- super();
12
-
13
-
14
- /**
15
- *
16
- * @type {number}
17
- * @private
18
- */
19
- this.__nearest_distance = Number.POSITIVE_INFINITY;
20
-
21
- /**
22
- * @readonly
23
- * @type {SurfacePoint3}
24
- * @private
25
- */
26
- this.__nearest_hit = new SurfacePoint3();
27
-
28
- /**
29
- * @readonly
30
- * @type {SurfacePoint3}
31
- * @private
32
- */
33
- this.__temp_hit = new SurfacePoint3();
34
-
35
- /**
36
- *
37
- * @type {boolean}
38
- * @private
39
- */
40
- this.__hit_found = false;
41
-
42
- /**
43
- * @readonly
44
- * @type {Vector3}
45
- * @private
46
- */
47
- this.__ray_origin = new Vector3();
48
-
49
- /**
50
- * @readonly
51
- * @type {Vector3}
52
- * @private
53
- */
54
- this.__ray_direction = new Vector3();
55
- }
56
-
57
- /**
58
- *
59
- * @param {number} origin_x
60
- * @param {number} origin_y
61
- * @param {number} origin_z
62
- * @param {number} direction_x
63
- * @param {number} direction_y
64
- * @param {number} direction_z
65
- */
66
- setRay(origin_x, origin_y, origin_z, direction_x, direction_y, direction_z) {
67
- this.__ray_origin.set(
68
- origin_x,
69
- origin_y,
70
- origin_z
71
- );
72
-
73
- this.__ray_direction.set(
74
- direction_x,
75
- direction_y,
76
- direction_z
77
- );
78
- }
79
-
80
- reset() {
81
- this.__nearest_distance = Number.POSITIVE_INFINITY;
82
- this.__hit_found = false;
83
- }
84
-
85
- getNearestHit() {
86
- return this.__nearest_hit;
87
- }
88
-
89
- isHitFound() {
90
- return this.__hit_found;
91
- }
92
-
93
-
94
- visit(address, type) {
95
- const root = this.__root;
96
-
97
- const data = root.data;
98
- const binaryNodeCount = root.binaryNodeCount;
99
-
100
- const rayOrigin = this.__ray_origin;
101
- const rayDirection = this.__ray_direction;
102
-
103
- if (type === NodeType.LEAF) {
104
- // do triangle test
105
-
106
- const index = address / 6 - binaryNodeCount;
107
-
108
- const index3 = index * 3;
109
-
110
- const indices = this.__buffer_indices;
111
-
112
- let a, b, c;
113
-
114
- if (indices !== null) {
115
- assert.lessThan(index3 + 2, indices.length, 'triangle index overflow, possibly geometry changed but tree was not rebuilt?');
116
-
117
- a = indices[index3];
118
- b = indices[index3 + 1];
119
- c = indices[index3 + 2];
120
- } else {
121
- // implicit indices
122
- a = index3;
123
- b = index3 + 1;
124
- c = index3 + 2;
125
- }
126
-
127
- const vertices = this.__buffer_vertices;
128
-
129
- const stride = this.__buffer_vertex_stride;
130
- const offset = this.__buffer_position_offset;
131
-
132
- const a_address = a * stride + offset;
133
- const b_address = b * stride + offset;
134
- const c_address = c * stride + offset;
135
-
136
- assert.lessThan(a_address + 2, vertices.length, 'a-vertex overflow');
137
- assert.lessThan(b_address + 2, vertices.length, 'b-vertex overflow');
138
- assert.lessThan(c_address + 2, vertices.length, 'c-vertex overflow');
139
-
140
- const ax = vertices[a_address];
141
- const ay = vertices[a_address + 1];
142
- const az = vertices[a_address + 2];
143
-
144
- const bx = vertices[b_address];
145
- const by = vertices[b_address + 1];
146
- const bz = vertices[b_address + 2];
147
-
148
- const cx = vertices[c_address];
149
- const cy = vertices[c_address + 1];
150
- const cz = vertices[c_address + 2];
151
-
152
- const temp_hit = this.__temp_hit;
153
-
154
- if (computeTriangleRayIntersection(
155
- temp_hit,
156
- rayOrigin.x,
157
- rayOrigin.y,
158
- rayOrigin.z,
159
- rayDirection.x,
160
- rayDirection.y,
161
- rayDirection.z,
162
- ax, ay, az,
163
- bx, by, bz,
164
- cx, cy, cz
165
- )) {
166
- const d = temp_hit.position.distanceSqrTo(rayOrigin);
167
-
168
- if (d < this.__nearest_distance) {
169
- this.__nearest_hit.copy(temp_hit);
170
- this.__nearest_hit.index = index;
171
-
172
- this.__nearest_distance = d;
173
-
174
- this.__hit_found = true;
175
- }
176
-
177
- }
178
-
179
- return false;
180
-
181
- } else {
182
- // do AABB test
183
-
184
- const x0 = data[address];
185
- const y0 = data[address + 1];
186
- const z0 = data[address + 2];
187
- const x1 = data[address + 3];
188
- const y1 = data[address + 4];
189
- const z1 = data[address + 5];
190
-
191
- return aabb3_intersects_ray(
192
- x0, y0, z0,
193
- x1, y1, z1,
194
-
195
- rayOrigin.x,
196
- rayOrigin.y,
197
- rayOrigin.z,
198
-
199
- rayDirection.x,
200
- rayDirection.y,
201
- rayDirection.z
202
- );
203
-
204
- }
205
- }
206
- }
@@ -1,72 +0,0 @@
1
- /**
2
- * Created by Alex on 02/09/2015.
3
- */
4
- import { BinaryNode } from '../../../../core/bvh2/BinaryNode.js';
5
-
6
- function faceToBox(f, vertices) {
7
- const a = vertices[f.a];
8
- const b = vertices[f.b];
9
- const c = vertices[f.c];
10
- //make a box
11
- const x0 = Math.min(a.x, b.x, c.x),
12
- y0 = Math.min(a.y, b.y, c.y),
13
- z0 = Math.min(a.z, b.z, c.z),
14
- x1 = Math.max(a.x, b.x, c.x),
15
- y1 = Math.max(a.y, b.y, c.y),
16
- z1 = Math.max(a.z, b.z, c.z);
17
- return {
18
- x0: x0,
19
- y0: y0,
20
- z0: z0,
21
- x1: x1,
22
- y1: y1,
23
- z1: z1,
24
- object: f
25
- };
26
- }
27
-
28
- function fillTree(faces, vertices, tree) {
29
- const numFaces = faces.length;
30
- let a, b, c;
31
- //make a box
32
- let x0, y0, z0, x1, y1, z1;
33
- let face;
34
-
35
- function processLeaf(leaf, index) {
36
- face = faces[index];
37
- a = vertices[face.a];
38
- b = vertices[face.b];
39
- c = vertices[face.c];
40
-
41
- //make a box
42
- x0 = Math.min(a.x, b.x, c.x);
43
- y0 = Math.min(a.y, b.y, c.y);
44
- z0 = Math.min(a.z, b.z, c.z);
45
- x1 = Math.max(a.x, b.x, c.x);
46
- y1 = Math.max(a.y, b.y, c.y);
47
- z1 = Math.max(a.z, b.z, c.z);
48
-
49
- //set node
50
- leaf.setBounds(x0, y0, z0, x1, y1, z1);
51
- leaf.object = face;
52
- }
53
-
54
- tree.insertManyBoxes2(processLeaf, numFaces);
55
- }
56
-
57
- function bvhFromGeometry(geometry) {
58
- //console.time("building geometry bvh");
59
- const tree = new BinaryNode();
60
- tree.setNegativelyInfiniteBounds();
61
- const vertices = geometry.vertices;
62
- const faces = geometry.faces;
63
-
64
- fillTree(faces, vertices, tree);
65
-
66
- //console.timeEnd("building geometry bvh");
67
- //
68
- //console.log("built bvh for " + faces.length + " faces");
69
- return tree;
70
- }
71
-
72
- export default bvhFromGeometry;