@woosh/meep-engine 2.113.16 → 2.115.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 (138) hide show
  1. package/build/meep.cjs +96 -55
  2. package/build/meep.min.js +1 -1
  3. package/build/meep.module.js +96 -55
  4. package/editor/ecs/component/editors/Sampler2DEditor.js +3 -3
  5. package/package.json +1 -1
  6. package/src/core/binary/clz32.d.ts +7 -0
  7. package/src/core/binary/clz32.d.ts.map +1 -0
  8. package/src/core/binary/clz32.js +37 -0
  9. package/src/core/binary/is_data_url.d.ts.map +1 -1
  10. package/src/core/binary/is_data_url.js +1 -0
  11. package/src/core/binary/makeArrayBuffer.d.ts.map +1 -1
  12. package/src/core/binary/makeArrayBuffer.js +1 -0
  13. package/src/core/binary/msb_32.d.ts +7 -1
  14. package/src/core/binary/msb_32.d.ts.map +1 -1
  15. package/src/core/binary/msb_32.js +3 -12
  16. package/src/core/collection/RingBuffer.d.ts +1 -1
  17. package/src/core/collection/RingBuffer.js +1 -1
  18. package/src/core/collection/array/array_filter_by_multiple.d.ts +2 -0
  19. package/src/core/collection/array/array_filter_by_multiple.d.ts.map +1 -1
  20. package/src/core/collection/array/array_filter_by_multiple.js +11 -4
  21. package/src/core/collection/array/array_group_by.d.ts +10 -0
  22. package/src/core/collection/array/array_group_by.d.ts.map +1 -0
  23. package/src/core/collection/array/{groupArrayBy.js → array_group_by.js} +3 -3
  24. package/src/core/collection/array/array_sort_quick.d.ts +13 -0
  25. package/src/core/collection/array/array_sort_quick.d.ts.map +1 -0
  26. package/src/core/collection/array/{arrayQuickSort.js → array_sort_quick.js} +5 -1
  27. package/src/core/collection/array/combine_hash.js +1 -1
  28. package/src/core/{primitives → collection}/array/compareArrays.d.ts.map +1 -1
  29. package/src/core/{primitives → collection}/array/computeIntegerArrayHash.d.ts.map +1 -1
  30. package/src/core/{primitives → collection}/array/computeStridedArrayHash.d.ts.map +1 -1
  31. package/src/core/{primitives → collection}/array/computeStridedIntegerArrayHash.d.ts.map +1 -1
  32. package/src/core/collection/array/randomMultipleFromArray.d.ts +6 -6
  33. package/src/core/collection/array/randomMultipleFromArray.d.ts.map +1 -1
  34. package/src/core/collection/array/randomMultipleFromArray.js +5 -5
  35. package/src/core/collection/array/typed/sparse_typed_array_hash.js +1 -1
  36. package/src/core/collection/array/typed/typedArrayConstructorByInstance.d.ts.map +1 -0
  37. package/src/core/geom/2d/Rectangle.d.ts.map +1 -1
  38. package/src/core/geom/2d/Rectangle.js +18 -5
  39. package/src/core/geom/2d/aabb/aabb2_overlap_exists.d.ts.map +1 -1
  40. package/src/core/geom/2d/aabb/aabb2_overlap_exists.js +4 -1
  41. package/src/core/geom/2d/convex-hull/fixed_convex_hull_humus.d.ts +3 -3
  42. package/src/core/geom/2d/convex-hull/fixed_convex_hull_humus.d.ts.map +1 -1
  43. package/src/core/geom/2d/convex-hull/fixed_convex_hull_humus.js +11 -4
  44. package/src/core/geom/2d/convex-hull/fixed_convex_hull_relaxation.js +2 -2
  45. package/src/core/geom/2d/convex-hull/orientation3_array.js +2 -2
  46. package/src/core/geom/2d/intersect_ray_2d.d.ts.map +1 -1
  47. package/src/core/geom/2d/intersect_ray_2d.js +5 -5
  48. package/src/core/geom/2d/{compute_triangle_area_2d.d.ts → triangle2d_compute_area.d.ts} +2 -2
  49. package/src/core/geom/2d/triangle2d_compute_area.d.ts.map +1 -0
  50. package/src/core/geom/2d/{compute_triangle_area_2d.js → triangle2d_compute_area.js} +1 -1
  51. package/src/core/geom/2d/triangle2d_contains_point.d.ts +14 -0
  52. package/src/core/geom/2d/triangle2d_contains_point.d.ts.map +1 -0
  53. package/src/core/geom/2d/triangle2d_contains_point.js +39 -0
  54. package/src/core/geom/2d/triangle2d_get_barycentric.d.ts +2 -2
  55. package/src/core/geom/2d/triangle2d_get_barycentric.d.ts.map +1 -1
  56. package/src/core/geom/2d/triangle2d_get_barycentric.js +1 -1
  57. package/src/core/geom/Vector2.d.ts.map +1 -1
  58. package/src/core/geom/Vector2.js +2 -2
  59. package/src/core/math/bessel_3.d.ts +1 -1
  60. package/src/core/math/bessel_3.js +1 -1
  61. package/src/core/math/computeWholeDivisorLow.d.ts +1 -1
  62. package/src/core/math/computeWholeDivisorLow.d.ts.map +1 -1
  63. package/src/core/math/computeWholeDivisorLow.js +8 -5
  64. package/src/core/math/interval/separation1D.d.ts.map +1 -0
  65. package/src/core/math/{separation1D.js → interval/separation1D.js} +3 -3
  66. package/src/core/math/solveQuadratic.d.ts.map +1 -1
  67. package/src/core/math/solveQuadratic.js +10 -0
  68. package/src/core/model/object/compareValues.js +3 -3
  69. package/src/engine/EntityCreator.d.ts +11 -11
  70. package/src/engine/EntityCreator.d.ts.map +1 -1
  71. package/src/engine/EntityCreator.js +2 -4
  72. package/src/engine/ecs/grid/HeightMap2NormalMap.js +2 -2
  73. package/src/engine/ecs/grid/NormalMap2AOMap.js +3 -3
  74. package/src/engine/graphics/impostors/octahedral/util/build_cutout_from_atlas_by_alpha.d.ts +2 -2
  75. package/src/engine/graphics/impostors/octahedral/util/build_cutout_from_atlas_by_alpha.d.ts.map +1 -1
  76. package/src/engine/graphics/impostors/octahedral/util/build_cutout_from_atlas_by_alpha.js +5 -55
  77. package/src/engine/graphics/impostors/octahedral/util/sampler2d_build_cutout.d.ts +9 -0
  78. package/src/engine/graphics/impostors/octahedral/util/sampler2d_build_cutout.d.ts.map +1 -0
  79. package/src/engine/graphics/impostors/octahedral/util/sampler2d_build_cutout.js +64 -0
  80. package/src/engine/graphics/render/forward_plus/LightManager.js +2 -2
  81. package/src/engine/graphics/sh3/path_tracer/material/MaterialConverter.js +2 -2
  82. package/src/engine/graphics/sh3/path_tracer/sorting/sort_bvh_nodes_by_distance_to_point.js +2 -2
  83. package/src/engine/graphics/texture/sampler/Sampler2D.d.ts.map +1 -1
  84. package/src/engine/graphics/texture/sampler/Sampler2D.js +4 -2
  85. package/src/engine/graphics/texture/sampler/filter/kaiser_bessel_window.js +1 -1
  86. package/src/engine/graphics/texture/sampler/filter/sampler2d_scale_down_generic.js +1 -1
  87. package/src/engine/graphics/texture/sampler/sampler2d_multiply_vector.d.ts +8 -0
  88. package/src/engine/graphics/texture/sampler/sampler2d_multiply_vector.d.ts.map +1 -0
  89. package/src/engine/graphics/texture/sampler/{sampler_multiply_vector.js → sampler2d_multiply_vector.js} +1 -1
  90. package/src/engine/graphics/texture/sampler/sampler2d_to_float32_texture.d.ts +8 -0
  91. package/src/engine/graphics/texture/sampler/sampler2d_to_float32_texture.d.ts.map +1 -0
  92. package/src/engine/graphics/texture/sampler/{sampler2DToFloat32Texture.js → sampler2d_to_float32_texture.js} +2 -2
  93. package/src/engine/graphics/texture/sampler/util/drawSamplerHTML.d.ts.map +1 -1
  94. package/src/engine/graphics/texture/sampler/util/drawSamplerHTML.js +3 -1
  95. package/src/engine/graphics/texture/virtual/VirtualTextureTileLoader.js +2 -2
  96. package/src/engine/grid/obstacle/GridObstacle.d.ts.map +1 -1
  97. package/src/engine/grid/obstacle/GridObstacle.js +1 -1
  98. package/src/engine/physics/computeInterceptPoint.js +20 -6
  99. package/src/engine/physics/mls-mpm/MLS_MPM.d.ts.map +1 -1
  100. package/src/engine/physics/mls-mpm/MLS_MPM.js +14 -17
  101. package/src/generation/grid/generation/road/GridTaskGenerateRoads.js +2 -2
  102. package/src/core/UUID.d.ts +0 -6
  103. package/src/core/UUID.d.ts.map +0 -1
  104. package/src/core/UUID.js +0 -21
  105. package/src/core/collection/array/arrayQuickSort.d.ts +0 -12
  106. package/src/core/collection/array/arrayQuickSort.d.ts.map +0 -1
  107. package/src/core/collection/array/array_remove_element.d.ts +0 -11
  108. package/src/core/collection/array/array_remove_element.d.ts.map +0 -1
  109. package/src/core/collection/array/array_remove_element.js +0 -16
  110. package/src/core/collection/array/groupArrayBy.d.ts +0 -10
  111. package/src/core/collection/array/groupArrayBy.d.ts.map +0 -1
  112. package/src/core/geom/2d/compute_triangle_area_2d.d.ts.map +0 -1
  113. package/src/core/geom/2d/convex-hull/orientation3.d.ts +0 -12
  114. package/src/core/geom/2d/convex-hull/orientation3.d.ts.map +0 -1
  115. package/src/core/geom/2d/convex-hull/orientation3.js +0 -489
  116. package/src/core/geom/2d/convex-hull/orientation3_v2.d.ts +0 -9
  117. package/src/core/geom/2d/convex-hull/orientation3_v2.d.ts.map +0 -1
  118. package/src/core/geom/2d/convex-hull/orientation3_v2.js +0 -12
  119. package/src/core/math/separation1D.d.ts.map +0 -1
  120. package/src/engine/graphics/texture/sampler/sampler2DToFloat32Texture.d.ts +0 -8
  121. package/src/engine/graphics/texture/sampler/sampler2DToFloat32Texture.d.ts.map +0 -1
  122. package/src/engine/graphics/texture/sampler/sampler_multiply_vector.d.ts +0 -8
  123. package/src/engine/graphics/texture/sampler/sampler_multiply_vector.d.ts.map +0 -1
  124. package/src/engine/graphics/texture/sampler/typedArrayConstructorByInstance.d.ts.map +0 -1
  125. package/src/engine/save/storage/InMemoryLocalStorage.d.ts +0 -6
  126. package/src/engine/save/storage/InMemoryLocalStorage.d.ts.map +0 -1
  127. package/src/engine/save/storage/InMemoryLocalStorage.js +0 -13
  128. /package/src/core/{primitives → collection}/array/compareArrays.d.ts +0 -0
  129. /package/src/core/{primitives → collection}/array/compareArrays.js +0 -0
  130. /package/src/core/{primitives → collection}/array/computeIntegerArrayHash.d.ts +0 -0
  131. /package/src/core/{primitives → collection}/array/computeIntegerArrayHash.js +0 -0
  132. /package/src/core/{primitives → collection}/array/computeStridedArrayHash.d.ts +0 -0
  133. /package/src/core/{primitives → collection}/array/computeStridedArrayHash.js +0 -0
  134. /package/src/core/{primitives → collection}/array/computeStridedIntegerArrayHash.d.ts +0 -0
  135. /package/src/core/{primitives → collection}/array/computeStridedIntegerArrayHash.js +0 -0
  136. /package/src/{engine/graphics/texture/sampler → core/collection/array/typed}/typedArrayConstructorByInstance.d.ts +0 -0
  137. /package/src/{engine/graphics/texture/sampler → core/collection/array/typed}/typedArrayConstructorByInstance.js +0 -0
  138. /package/src/core/math/{separation1D.d.ts → interval/separation1D.d.ts} +0 -0
package/build/meep.cjs CHANGED
@@ -47415,7 +47415,7 @@ class Vector2 {
47415
47415
 
47416
47416
  /**
47417
47417
  *
47418
- * @param {number[]} array
47418
+ * @param {number[]|Float32Array} array
47419
47419
  * @param {number} offset
47420
47420
  */
47421
47421
  fromArray(array, offset = 0) {
@@ -47427,7 +47427,7 @@ class Vector2 {
47427
47427
 
47428
47428
  /**
47429
47429
  *
47430
- * @param {number[]} array
47430
+ * @param {number[]|Float32Array} array
47431
47431
  * @param {number} offset
47432
47432
  */
47433
47433
  toArray(array, offset = 0) {
@@ -49003,6 +49003,34 @@ function compute_typed_array_constructor_from_data_type(dt) {
49003
49003
  return r;
49004
49004
  }
49005
49005
 
49006
+ /**
49007
+ * Useful for computing hashes of large arrays, can pick a relevant stride and skip large chunks of memory while still capturing good amount of unique information from evenly-spaced areas of the array
49008
+ * @param {number[]|Uint32Array|Uint16Array|Uint8Array} array
49009
+ * @param {number} offset
49010
+ * @param {number} length
49011
+ * @param {number} stride
49012
+ * @return {number}
49013
+ */
49014
+ function computeStridedIntegerArrayHash(
49015
+ array, offset, length, stride
49016
+ ) {
49017
+ let hash = length;
49018
+
49019
+ for (let i = offset; i < length; i += stride) {
49020
+ const value = array[i] >>> 0; //force uint32
49021
+
49022
+ /**
49023
+ * Simple hashing scheme, multiplying existing hash by a prime and adding next value
49024
+ * (h<<5) - h === h*31
49025
+ * @type {number}
49026
+ */
49027
+ hash = ((hash << 5) - hash) + value;
49028
+ }
49029
+
49030
+ // force uint32
49031
+ return hash >>> 0;
49032
+ }
49033
+
49006
49034
  /**
49007
49035
  *
49008
49036
  * @param {*} array
@@ -49128,47 +49156,6 @@ function is_typed_array_equals(a, b) {
49128
49156
  return isArrayEqualStrict(a_proxy, b_proxy);
49129
49157
  }
49130
49158
 
49131
- /**
49132
- * Based on code from reddit https://www.reddit.com/r/javascript/comments/jxa8x/bicubic_interpolation/
49133
- * @param {number} t ratio
49134
- * @param {number} a position -2
49135
- * @param {number} b position -1
49136
- * @param {number} c position +1
49137
- * @param {number} d position +2
49138
- * @returns {number}
49139
- */
49140
- function interpolate_bicubic(t, a, b, c, d) {
49141
- return 0.5 * (c - a + (2.0 * a - 5.0 * b + 4.0 * c - d + (3.0 * (b - c) + d - a) * t) * t) * t + b;
49142
- }
49143
-
49144
- /**
49145
- * Useful for computing hashes of large arrays, can pick a relevant stride and skip large chunks of memory while still capturing good amount of unique information from evenly-spaced areas of the array
49146
- * @param {number[]|Uint32Array|Uint16Array|Uint8Array} array
49147
- * @param {number} offset
49148
- * @param {number} length
49149
- * @param {number} stride
49150
- * @return {number}
49151
- */
49152
- function computeStridedIntegerArrayHash(
49153
- array, offset, length, stride
49154
- ) {
49155
- let hash = length;
49156
-
49157
- for (let i = offset; i < length; i += stride) {
49158
- const value = array[i] >>> 0; //force uint32
49159
-
49160
- /**
49161
- * Simple hashing scheme, multiplying existing hash by a prime and adding next value
49162
- * (h<<5) - h === h*31
49163
- * @type {number}
49164
- */
49165
- hash = ((hash << 5) - hash) + value;
49166
- }
49167
-
49168
- // force uint32
49169
- return hash >>> 0;
49170
- }
49171
-
49172
49159
  function typedArrayConstructorByInstance(a) {
49173
49160
  if (a instanceof Int8Array) {
49174
49161
  return Int8Array;
@@ -49195,6 +49182,19 @@ function typedArrayConstructorByInstance(a) {
49195
49182
  }
49196
49183
  }
49197
49184
 
49185
+ /**
49186
+ * Based on code from reddit https://www.reddit.com/r/javascript/comments/jxa8x/bicubic_interpolation/
49187
+ * @param {number} t ratio
49188
+ * @param {number} a position -2
49189
+ * @param {number} b position -1
49190
+ * @param {number} c position +1
49191
+ * @param {number} d position +2
49192
+ * @returns {number}
49193
+ */
49194
+ function interpolate_bicubic(t, a, b, c, d) {
49195
+ return 0.5 * (c - a + (2.0 * a - 5.0 * b + 4.0 * c - d + (3.0 * (b - c) + d - a) * t) * t) * t + b;
49196
+ }
49197
+
49198
49198
  /**
49199
49199
  * Data Texture class, providing an abstraction around 2d numerical arrays, mostly for sampling purposes
49200
49200
  * Inspired by OpenGL's glsl sampler2d API
@@ -54444,7 +54444,10 @@ function overlap1D(a0, a1, b0, b1) {
54444
54444
  * @param {number} by1
54445
54445
  * @returns {boolean} true if overlap exists, false if no overlap
54446
54446
  */
54447
- function aabb2_overlap_exists(ax0, ay0, ax1, ay1, bx0, by0, bx1, by1) {
54447
+ function aabb2_overlap_exists(
54448
+ ax0, ay0, ax1, ay1,
54449
+ bx0, by0, bx1, by1
54450
+ ) {
54448
54451
  return overlap1D(ax0, ax1, bx0, bx1)
54449
54452
  && overlap1D(ay0, ay1, by0, by1);
54450
54453
  }
@@ -59312,7 +59315,7 @@ function computeThreeTextureInternalFormatFromDataType(dt, channel_count) {
59312
59315
  * @param {Sampler2D} sampler
59313
59316
  * @returns {DataTexture}
59314
59317
  */
59315
- function sampler2DtoFloat32Texture(sampler) {
59318
+ function sampler2d_to_float32_texture(sampler) {
59316
59319
 
59317
59320
  const width = sampler.width;
59318
59321
  const height = sampler.height;
@@ -59385,7 +59388,7 @@ function heightMap2NormalMap(renderer, sampler) {
59385
59388
  const width = sampler.width;
59386
59389
  const height = sampler.height;
59387
59390
 
59388
- const texture = sampler2DtoFloat32Texture(sampler);
59391
+ const texture = sampler2d_to_float32_texture(sampler);
59389
59392
 
59390
59393
  //construct shader
59391
59394
  const shader = new NormalMapShader();
@@ -59688,9 +59691,9 @@ function normalMap2OcclusionMap(
59688
59691
  const width = resultSize.x;
59689
59692
  const height = resultSize.y;
59690
59693
  //
59691
- const normalTexture = sampler2DtoFloat32Texture(normalMap);
59694
+ const normalTexture = sampler2d_to_float32_texture(normalMap);
59692
59695
 
59693
- const heightTexture = sampler2DtoFloat32Texture(heightMap);
59696
+ const heightTexture = sampler2d_to_float32_texture(heightMap);
59694
59697
 
59695
59698
 
59696
59699
  //construct shader
@@ -87420,7 +87423,7 @@ class RingBuffer {
87420
87423
  }
87421
87424
 
87422
87425
  /**
87423
- *
87426
+ * Removed first element that fulfills the criteria
87424
87427
  * @param {function(V):boolean} condition
87425
87428
  * @param {*} [thisArg]
87426
87429
  * @returns {V|undefined}
@@ -99189,6 +99192,30 @@ function intersects1D(a0, a1, b0, b1) {
99189
99192
  return a1 >= b0 && b1 >= a0;
99190
99193
  }
99191
99194
 
99195
+ /**
99196
+ *
99197
+ * @param {number} bounds_x0
99198
+ * @param {number} bounds_y0
99199
+ * @param {number} bounds_x1
99200
+ * @param {number} bounds_y1
99201
+ * @param {number} x0
99202
+ * @param {number} y0
99203
+ * @param {number} x1
99204
+ * @param {number} y1
99205
+ * @return {boolean}
99206
+ */
99207
+ function aabb2_contains(
99208
+ bounds_x0, bounds_y0, bounds_x1, bounds_y1,
99209
+ x0, y0, x1, y1
99210
+ ) {
99211
+
99212
+ return x0 >= bounds_x0
99213
+ && x1 <= bounds_x1
99214
+ && y0 >= bounds_y0
99215
+ && y1 <= bounds_y1
99216
+ ;
99217
+ }
99218
+
99192
99219
  class Rectangle {
99193
99220
  /**
99194
99221
  *
@@ -99325,8 +99352,13 @@ class Rectangle {
99325
99352
 
99326
99353
  const _x0 = p.x;
99327
99354
  const _y0 = p.y;
99355
+ const _x1 = s.x + _x0;
99356
+ const _y1 = _y0 + s.y;
99328
99357
 
99329
- return overlap1D(x0, x1, _x0, s.x + _x0) && overlap1D(y0, y1, _y0, _y0 + s.y);
99358
+ return aabb2_overlap_exists(
99359
+ _x0, _y0, _x1, _y1,
99360
+ x0, y0, x1, y1
99361
+ );
99330
99362
  }
99331
99363
 
99332
99364
  /**
@@ -99339,6 +99371,7 @@ class Rectangle {
99339
99371
  const y0 = other.position.y;
99340
99372
  const y1 = other.size.y + y0;
99341
99373
  const x1 = other.size.x + x0;
99374
+
99342
99375
  return this._overlaps(x0, y0, x1, y1);
99343
99376
  }
99344
99377
 
@@ -99398,13 +99431,18 @@ class Rectangle {
99398
99431
  _contains(x0, y0, x1, y1) {
99399
99432
  const size = this.size;
99400
99433
 
99401
- const _x0 = this.position.x;
99402
- const _y0 = this.position.y;
99434
+ const position = this.position;
99435
+
99436
+ const _x0 = position.x;
99437
+ const _y0 = position.y;
99403
99438
 
99404
99439
  const _y1 = size.y + _y0;
99405
99440
  const _x1 = size.x + _x0;
99406
99441
 
99407
- return x0 >= _x0 && x1 <= _x1 && y0 >= _y0 && y1 <= _y1;
99442
+ return aabb2_contains(
99443
+ _x0, _y0, _x1, _y1,
99444
+ x0, y0, x1, y1
99445
+ );
99408
99446
  }
99409
99447
 
99410
99448
  /**
@@ -99415,6 +99453,7 @@ class Rectangle {
99415
99453
  contains(other) {
99416
99454
  const x0 = other.position.x;
99417
99455
  const y0 = other.position.y;
99456
+
99418
99457
  const y1 = other.size.y + y0;
99419
99458
  const x1 = other.size.x + x0;
99420
99459
 
@@ -106398,6 +106437,7 @@ function computeBinaryDataTypeByPrecision(type, precision) {
106398
106437
  const stack$1 = [];
106399
106438
 
106400
106439
  /**
106440
+ * Quicksort implementation, instead of compare operator, uses scoring function
106401
106441
  * @template T
106402
106442
  * @param {T[]|ArrayLike<number>|Uint32Array} data
106403
106443
  * @param {function(T):number} score_function
@@ -106407,12 +106447,13 @@ const stack$1 = [];
106407
106447
  * @param {function(T[],number, number):*} [swap_operator]
106408
106448
  * @param {*} [swap_context]
106409
106449
  */
106410
- function arrayQuickSort(
106450
+ function array_sort_quick(
106411
106451
  data,
106412
106452
  score_function, score_function_context,
106413
106453
  start = 0, end = data.length - 1,
106414
106454
  swap_operator = array_swap_one, swap_context = undefined
106415
106455
  ) {
106456
+
106416
106457
  if (start >= end) {
106417
106458
  // section of 0 size, nothing to sort
106418
106459
  return;
@@ -111353,7 +111394,7 @@ class LightManager {
111353
111394
  array_copy(visible_light_set.elements, 0, sorted_lights, 0, visible_light_count);
111354
111395
  array_copy(visible_decal_set.elements, 0, sorted_lights, visible_light_count, visible_decal_count);
111355
111396
 
111356
- arrayQuickSort(sorted_lights, this.__sort_visible_light_score, this, 0, expected_sorted_size - 1);
111397
+ array_sort_quick(sorted_lights, this.__sort_visible_light_score, this, 0, expected_sorted_size - 1);
111357
111398
  }
111358
111399
 
111359
111400
  __update_visible_bvh() {