@woosh/meep-engine 2.48.22 → 2.49.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 (230) hide show
  1. package/editor/ecs/component/editors/three/BufferGeometryEditor.js +1 -1
  2. package/editor/ecs/component/editors/three/MeshEditor.js +1 -1
  3. package/editor/tools/GridPaintTool.js +1 -1
  4. package/editor/tools/SelectionTool.js +1 -1
  5. package/editor/tools/paint/TerrainPaintTool.js +1 -1
  6. package/editor/view/GridPickCoordinateView.js +1 -1
  7. package/editor/view/library/MeshLibraryView.js +1 -1
  8. package/package.json +1 -1
  9. package/src/core/UUID.js +2 -0
  10. package/src/core/assert.js +4 -1
  11. package/src/core/binary/32BitEncoder.js +1 -1
  12. package/src/core/binary/ctz32.js +1 -1
  13. package/src/core/binary/operations/bitCount.spec.js +19 -0
  14. package/src/core/binary/uint82float.spec.js +7 -0
  15. package/src/core/bvh2/LeafNode.js +2 -2
  16. package/src/core/bvh2/Node.d.ts +1 -1
  17. package/src/core/bvh2/Node.js +1 -1
  18. package/src/core/bvh2/NodeValidator.js +1 -1
  19. package/src/core/bvh2/bvh3/EBBVHLeafProxy.js +3 -0
  20. package/src/core/bvh2/bvh3/query/compute_tight_near_far_clipping_planes.js +5 -4
  21. package/src/core/bvh2/serialization/deserializeBinaryNode.js +1 -1
  22. package/src/core/bvh2/serialization/deserializeBinaryNodeFromBinaryBuffer.js +2 -2
  23. package/src/core/bvh2/serialization/serializeBinaryNode.js +1 -1
  24. package/src/core/bvh2/serialization/serializeBinaryNodeToBinaryBuffer.js +2 -2
  25. package/src/core/bvh2/transform/RotationOptimizer.spec.js +161 -155
  26. package/src/core/cache/Cache.js +4 -2
  27. package/src/core/codegen/LineBuilder.js +15 -3
  28. package/src/core/codegen/LineBuilder.spec.js +7 -0
  29. package/src/core/collection/HashMap.js +491 -236
  30. package/src/core/collection/HashMap.spec.js +110 -1
  31. package/src/core/collection/array/{typedArrayToDataType.js → typed/typedArrayToDataType.js} +1 -1
  32. package/src/core/collection/array/weightedRandomFromArray.spec.js +20 -0
  33. package/src/core/collection/heap/Uint32Heap.js +1 -0
  34. package/src/core/debug/matchers/AnyOf.js +1 -2
  35. package/src/core/events/signal/Signal.js +7 -5
  36. package/src/core/events/signal/SignalBinding.js +56 -54
  37. package/src/core/events/signal/SignalFlags.js +7 -0
  38. package/src/core/function/Functions.js +1 -1
  39. package/src/core/geom/{Rectangle.js → 2d/Rectangle.js} +5 -5
  40. package/src/core/geom/{AABB2.js → 2d/aabb/AABB2.js} +10 -78
  41. package/src/core/geom/2d/aabb/aabb2_compute_center_from_multiple.js +19 -0
  42. package/src/core/geom/2d/aabb/aabb2_compute_overlap.js +42 -0
  43. package/src/core/geom/2d/aabb/aabb2_contains.js +23 -0
  44. package/src/core/geom/2d/aabb/aabb2_distance_sqr_to_point.js +25 -0
  45. package/src/core/geom/2d/aabb/aabb2_distance_to_point.js +17 -0
  46. package/src/core/geom/2d/aabb/aabb2_distance_to_point.spec.js +17 -0
  47. package/src/core/geom/2d/aabb/aabb2_overlap_exists.js +18 -0
  48. package/src/core/geom/2d/aabb/aabb2_signed_distance_sqr_to_point.js +45 -0
  49. package/src/core/geom/2d/aabb/aabb2_signed_distance_sqr_to_point.spec.js +40 -0
  50. package/src/core/geom/2d/aabb/aabb2_signed_distance_to_point.js +27 -0
  51. package/src/core/geom/2d/convex-hull/fixed_convex_hull_humus.js +4 -0
  52. package/src/core/geom/2d/quad-tree/PointQuadTree.js +3 -0
  53. package/src/core/geom/2d/quad-tree/QuadTreeDatum.js +1 -1
  54. package/src/core/geom/2d/quad-tree/QuadTreeNode.js +3 -3
  55. package/src/core/geom/2d/quad-tree/qt_collect_by_circle.js +6 -8
  56. package/src/core/geom/2d/quad-tree/qt_match_data_by_circle.js +3 -3
  57. package/src/core/geom/2d/quad-tree/qt_query_data_nearest_to_point.js +8 -10
  58. package/src/core/{bvh2/aabb3 → geom/3d/aabb}/AABB3.d.ts +1 -1
  59. package/src/core/{bvh2/aabb3 → geom/3d/aabb}/AABB3.js +13 -13
  60. package/src/core/{bvh2/aabb3 → geom/3d/aabb}/AABB3.spec.js +1 -1
  61. package/src/core/geom/3d/aabb/aabb3_compute_plane_side.js +17 -15
  62. package/src/core/geom/3d/aabb/aabb3_compute_plane_side.spec.js +25 -0
  63. package/src/core/geom/3d/aabb/aabb3_detailed_volume_intersection.js +1 -1
  64. package/src/core/geom/3d/aabb/aabb3_from_v3_array.js +3 -0
  65. package/src/core/geom/3d/aabb/aabb3_from_v3_array.spec.js +32 -0
  66. package/src/core/geom/3d/aabb/aabb3_intersects_aabb3.spec.js +115 -0
  67. package/src/core/geom/3d/aabb/aabb3_raycast.js +6 -1
  68. package/src/core/geom/3d/aabb/aabb3_signed_distance_sqr_to_point.js +13 -9
  69. package/src/core/{bvh2/aabb3 → geom/3d/aabb}/serializeAABB3Encoded_v0.js +6 -6
  70. package/src/core/geom/3d/{CircleMath.js → compute_circle_bounding_box.js} +1 -1
  71. package/src/core/geom/3d/decompose_matrix_4_array.js +18 -19
  72. package/src/core/geom/3d/frustum/frustum3_computeNearestPointToPoint.js +1 -1
  73. package/src/{engine/graphics/ecs/mesh-v2 → core/geom/3d/matrix}/allocate_transform_m4.js +1 -1
  74. package/src/core/geom/3d/normal/hemioct/decode_hemioct_to_unit.js +26 -0
  75. package/src/core/geom/3d/normal/hemioct/encode_unit3_hemioct.js +0 -26
  76. package/src/core/geom/3d/normal/hemioct/unit_hemioct.spec.js +2 -1
  77. package/src/core/geom/3d/plane/computePlaneLineIntersection.js +51 -0
  78. package/src/core/geom/3d/plane/computePlanePlaneIntersection.js +77 -0
  79. package/src/core/geom/3d/plane/computePlaneRayIntersection.js +55 -0
  80. package/src/core/geom/3d/plane/plane3_computeLineSegmentIntersection.js +50 -0
  81. package/src/core/geom/3d/plane/planeRayIntersection.js +14 -0
  82. package/src/core/geom/3d/{tetrahedra/in_sphere_fast.js → sphere/in_sphere3d_fast.js} +1 -1
  83. package/src/core/geom/3d/{tetrahedra/in_sphere_robust.js → sphere/in_sphere3d_robust.js} +1 -1
  84. package/src/core/geom/3d/sphere/sphere_array_intersects_point.js +2 -2
  85. package/src/core/geom/3d/sphere/{sphereIntersectsPoint.js → sphere_intersects_point.js} +7 -4
  86. package/src/core/geom/3d/sphere/sphere_intersects_point.spec.js +134 -0
  87. package/src/core/geom/3d/sphere/sphere_intersects_ray.spec.js +49 -0
  88. package/src/core/geom/3d/sphere/sphere_radius_sqr_from_v3_array_transformed.js +11 -7
  89. package/src/core/geom/3d/tetrahedra/delaunay/{debug_validate_mesh.js → debug/debug_validate_mesh.js} +1 -1
  90. package/src/core/geom/3d/tetrahedra/delaunay/{push_boundary_with_validation.js → debug/push_boundary_with_validation.js} +1 -1
  91. package/src/core/geom/3d/tetrahedra/delaunay/{validate_cavity_boundary.js → debug/validate_cavity_boundary.js} +2 -2
  92. package/src/core/geom/3d/tetrahedra/delaunay/tetrahedral_mesh_compute_cavity.js +2 -2
  93. package/src/core/geom/3d/triangle/computeTriangleRayIntersection.js +0 -164
  94. package/src/core/geom/3d/triangle/computeTriangleRayIntersectionBarycentric.js +87 -0
  95. package/src/core/geom/3d/triangle/computeTriangleRayIntersectionBarycentricEdge.js +81 -0
  96. package/src/core/geom/{GeometryMath.js → 3d/triangle/rayTriangleIntersection.js} +7 -3
  97. package/src/core/geom/ConicRay.js +160 -152
  98. package/src/core/geom/Matrix4.js +2 -0
  99. package/src/core/geom/Quaternion.js +19 -1
  100. package/src/core/geom/packing/max-rect/MaxRectangles.js +5 -215
  101. package/src/core/geom/packing/max-rect/cost/costByBestShortSide.js +11 -0
  102. package/src/core/geom/packing/max-rect/cost/costByRemainingArea.js +14 -0
  103. package/src/core/geom/packing/max-rect/cutArea.js +79 -0
  104. package/src/core/geom/packing/max-rect/findBestContainer.js +58 -0
  105. package/src/core/geom/packing/max-rect/packOneBox.js +49 -0
  106. package/src/core/geom/v3_dot.js +1 -1
  107. package/src/core/graph/GraphUtils.js +1 -1
  108. package/src/core/graph/build_face_graph_from_mesh.js +1 -3
  109. package/src/core/graph/layout/CircleLayout.js +3 -3
  110. package/src/core/graph/layout/{BoxLayouter.js → box/BoxLayouter.js} +6 -50
  111. package/src/core/graph/layout/box/applyCentralGravityAABB2.js +29 -0
  112. package/src/core/json/resolvePath.spec.js +14 -0
  113. package/src/core/land/reactive/{compiler/ReactiveCompiler.spec.js → compileReactiveExpression.spec.js} +17 -17
  114. package/src/core/math/random/MersenneTwister.spec.js +19 -0
  115. package/src/core/math/random/randomGaussian.spec.js +9 -0
  116. package/src/core/math/statistics/computeStatisticalMean.js +2 -2
  117. package/src/core/model/node-graph/visual/NodeVisualData.js +1 -1
  118. package/src/core/model/reactive/model/arithmetic/ReactiveAdd.js +1 -1
  119. package/src/core/model/reactive/model/arithmetic/ReactiveDivide.js +3 -1
  120. package/src/core/model/reactive/model/arithmetic/ReactiveMultiply.js +1 -1
  121. package/src/core/model/reactive/model/arithmetic/ReactiveNegate.js +3 -1
  122. package/src/core/model/reactive/model/arithmetic/ReactiveSubtract.js +1 -1
  123. package/src/core/model/reactive/model/comparative/ReactiveEquals.js +1 -1
  124. package/src/core/model/reactive/model/comparative/ReactiveGreaterThan.js +3 -1
  125. package/src/core/model/reactive/model/comparative/ReactiveGreaterThanOrEqual.js +3 -1
  126. package/src/core/model/reactive/model/comparative/ReactiveLessThan.js +3 -1
  127. package/src/core/model/reactive/model/comparative/ReactiveLessThanOrEqual.js +3 -1
  128. package/src/core/model/reactive/model/comparative/ReactiveNotEquals.js +1 -1
  129. package/src/core/model/reactive/model/logic/ReactiveAnd.js +1 -1
  130. package/src/core/model/reactive/model/logic/ReactiveNot.js +3 -1
  131. package/src/core/model/reactive/model/logic/ReactiveOr.js +1 -1
  132. package/src/core/primitives/numbers/computeHashFloat.spec.js +7 -0
  133. package/src/core/process/task/util/iteratorTask.js +3 -1
  134. package/src/engine/animation/curve/AnimationCurve.js +34 -5
  135. package/src/engine/animation/curve/AnimationCurve.spec.js +100 -0
  136. package/src/engine/asset/AssetTransformer.js +1 -0
  137. package/src/engine/asset/loaders/GLTFAssetLoader.js +1 -1
  138. package/src/engine/asset/loaders/image/ImageRGBADataLoader.js +2 -2
  139. package/src/engine/asset/preloader/Preloader.js +3 -3
  140. package/src/engine/computeStridedIntegerArrayHash.js +4 -2
  141. package/src/engine/ecs/components/Renderable.d.ts +2 -2
  142. package/src/engine/ecs/components/Renderable.js +1 -1
  143. package/src/{ecs → engine/ecs}/grid/pick.js +4 -4
  144. package/src/engine/ecs/gui/position/ViewportPositionSystem.js +1 -1
  145. package/src/engine/ecs/parent/entity_node_compute_bounding_box.js +1 -1
  146. package/src/engine/ecs/storage/binary/collection/BinaryCollectionSerializer.js +1 -18
  147. package/src/engine/ecs/systems/MotionSystem.js +7 -1
  148. package/src/engine/ecs/systems/SynchronizePositionSystem.js +8 -2
  149. package/src/engine/ecs/terrain/tiles/TerrainTile.js +1 -1
  150. package/src/engine/ecs/terrain/tiles/TerrainTileManager.js +2 -2
  151. package/src/engine/ecs/tooltip/TooltipComponentSystem.js +1 -1
  152. package/src/engine/ecs/transform/Transform.js +1 -1
  153. package/src/engine/graphics/camera/makeScreenScissorFrustum.d.ts +1 -1
  154. package/src/engine/graphics/camera/makeScreenScissorFrustum.js +3 -3
  155. package/src/engine/graphics/camera/testClippingPlaneComputation.js +13 -13
  156. package/src/engine/graphics/ecs/camera/Camera.js +1 -1
  157. package/src/engine/graphics/ecs/light/LightSystem.js +1 -1
  158. package/src/engine/graphics/ecs/mesh/Mesh.d.ts +1 -1
  159. package/src/engine/graphics/ecs/mesh/Mesh.js +1 -1
  160. package/src/engine/graphics/ecs/mesh-v2/ShadedGeometry.d.ts +1 -1
  161. package/src/engine/graphics/ecs/mesh-v2/ShadedGeometry.js +1 -1
  162. package/src/engine/graphics/ecs/mesh-v2/aggregate/SGMesh.d.ts +1 -1
  163. package/src/engine/graphics/ecs/mesh-v2/aggregate/SGMesh.js +1 -1
  164. package/src/engine/graphics/ecs/mesh-v2/aggregate/SGMeshSystem.js +9 -0
  165. package/src/engine/graphics/ecs/mesh-v2/sg_hierarchy_compute_bounding_box_via_parent_entity.d.ts +1 -1
  166. package/src/engine/graphics/geometry/MikkT/MikkTSpace.js +1 -1
  167. package/src/engine/graphics/geometry/MikkT/STSpace.js +1 -1
  168. package/src/engine/graphics/geometry/bvh/buffered/BVHGeometryRaycaster.js +1 -1
  169. package/src/engine/graphics/geometry/skining/computeSkinnedMeshBoundingVolumes.js +1 -1
  170. package/src/engine/graphics/material/optimization/MaterialOptimizationContext.js +1 -1
  171. package/src/engine/graphics/particles/particular/engine/MovingBoundingBox.js +1 -1
  172. package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitter.js +1 -1
  173. package/src/engine/graphics/particles/particular/engine/emitter/ParticleLayer.js +1 -1
  174. package/src/engine/graphics/particles/particular/engine/parameter/ParameterLookupTable.js +1 -0
  175. package/src/engine/graphics/particles/particular/engine/utils/volume/prototypeParticleVolume.js +1 -1
  176. package/src/engine/graphics/postprocess/threejs/postprocessing/TexturePass.js +2 -2
  177. package/src/engine/graphics/render/forward_plus/debug/createScreenGrid.js +1 -1
  178. package/src/engine/graphics/render/view/CameraView.js +1 -1
  179. package/src/engine/graphics/sh3/path_tracer/GeometryBVHBatched.js +2 -2
  180. package/src/engine/graphics/texture/atlas/AtlasPatch.js +2 -2
  181. package/src/engine/graphics/texture/atlas/TextureAtlas.spec.js +2 -2
  182. package/src/engine/graphics/texture/sampler/Sampler2D.js +1 -1
  183. package/src/engine/graphics/texture/sampler/sampler2d_compute_texel_value_conversion_scale_to_uint8.js +1 -1
  184. package/src/engine/graphics/util/makeMeshPreviewScene.js +1 -1
  185. package/src/engine/graphics/util/renderObjectToSampler2D.js +1 -1
  186. package/src/engine/intelligence/behavior/Behavior.spec.js +15 -0
  187. package/src/engine/intelligence/mcts/MoveEdge.js +1 -1
  188. package/src/engine/reference/v1/ReferenceManager.js +3 -0
  189. package/src/engine/reference/v2/Reference.js +33 -37
  190. package/src/engine/sound/sopra/README.md +6 -0
  191. package/src/engine/ui/tiles2d/computeTileGridMove.js +3 -2
  192. package/src/engine/ui/tiles2d/computeTileGridMove.spec.js +1 -1
  193. package/src/generation/automata/CaveGeneratorCellularAutomata.js +10 -7
  194. package/src/generation/automata/CaveGeneratorCellularAutomata.spec.js +12 -0
  195. package/src/generation/automata/CellularAutomata.js +5 -4
  196. package/src/generation/filtering/numeric/complex/CellFilterGaussianBlur.js +25 -9
  197. package/src/generation/theme/AreaMask.js +1 -1
  198. package/src/view/View.js +1 -1
  199. package/src/view/elements/progress/RectangularPieProgressView.js +1 -1
  200. package/src/view/minimap/Minimap.js +1 -1
  201. package/src/view/minimap/dom/MinimapCameraView.js +1 -1
  202. package/src/view/minimap/gl/MinimapFogOfWar.js +1 -1
  203. package/src/view/tooltip/DomTooltipObserver.js +1 -1
  204. package/src/view/tooltip/TooltipManager.js +1 -1
  205. package/src/view/tooltip/TooltipView.js +1 -1
  206. package/src/view/util/DomSizeObserver.js +2 -2
  207. package/src/core/geom/2d/AABB2Math.js +0 -40
  208. package/src/core/geom/2d/AABB2Math.spec.js +0 -17
  209. package/src/core/geom/Plane.js +0 -250
  210. package/src/core/land/reactive/ReactiveLexer.js +0 -158
  211. package/src/core/land/reactive/ReactiveLexer.ts +0 -181
  212. package/src/core/land/reactive/ReactiveListener.ts +0 -323
  213. package/src/core/land/reactive/ReactiveParser.js +0 -1573
  214. package/src/core/land/reactive/ReactiveParser.ts +0 -1776
  215. package/src/core/land/reactive/ReactiveVisitor.js +0 -1
  216. package/src/core/land/reactive/ReactiveVisitor.ts +0 -218
  217. package/src/core/land/reactive/compiler/ReactiveCompiler.js +0 -350
  218. package/src/core/land/reactive/compiler/ReactiveNearlyCompiler.js +0 -166
  219. package/src/core/land/reactive/compiler/ReactiveParser.js +0 -34
  220. package/src/core/land/reactive/nearley/ReactiveNearley.js +0 -187
  221. /package/src/core/geom/{LineSegment2.js → 2d/LineSegment2.js} +0 -0
  222. /package/src/core/geom/{Rectangle.spec.js → 2d/Rectangle.spec.js} +0 -0
  223. /package/src/core/geom/{AABB2.d.ts → 2d/aabb/AABB2.d.ts} +0 -0
  224. /package/src/core/geom/{AABB2.spec.js → 2d/aabb/AABB2.spec.js} +0 -0
  225. /package/src/core/{bvh2/aabb3 → geom/3d/aabb}/deserializeAABB3.js +0 -0
  226. /package/src/core/{bvh2/aabb3 → geom/3d/aabb}/deserializeAABB3Encoded_v0.js +0 -0
  227. /package/src/core/{bvh2/aabb3 → geom/3d/aabb}/deserializeAABB3Quantized16Uint.js +0 -0
  228. /package/src/core/{bvh2/aabb3 → geom/3d/aabb}/serializeAABB3.js +0 -0
  229. /package/src/core/{bvh2/aabb3 → geom/3d/aabb}/serializeAABB3Quantized16Uint.js +0 -0
  230. /package/src/{engine/graphics/ecs/mesh-v2 → core/geom/3d/vector}/allocate_v3.js +0 -0
@@ -1,7 +1,7 @@
1
1
  import Vector3 from "../../../../../core/geom/Vector3.js";
2
2
 
3
3
  import { Vector3 as ThreeVector3 } from 'three';
4
- import { rayTriangleIntersection } from "../../../../../core/geom/GeometryMath.js";
4
+ import { rayTriangleIntersection } from "../../../../../core/geom/3d/triangle/rayTriangleIntersection.js";
5
5
  import { SurfacePoint3 } from "../../../../../core/geom/3d/SurfacePoint3.js";
6
6
  import { assert } from "../../../../../core/assert.js";
7
7
  import { v3_length } from "../../../../../core/geom/v3_length.js";
@@ -1,5 +1,5 @@
1
1
  import { computeSkinnedMeshVertices } from "./computeSkinnedMeshVertices.js";
2
- import { AABB3 } from "../../../../core/bvh2/aabb3/AABB3.js";
2
+ import { AABB3 } from "../../../../core/geom/3d/aabb/AABB3.js";
3
3
  import Vector4 from "../../../../core/geom/Vector4.js";
4
4
  import { computeBoundingSphereFromVertexData } from "../computeBoundingSphereFromVertexData.js";
5
5
  import { Box3, Sphere as ThreeSphere, Vector3 as ThreeVector3 } from "three";
@@ -22,7 +22,7 @@ import { BUFFER_GEOMETRY_UVS } from "./BUFFER_GEOMETRY_UVS.js";
22
22
  import { is_compliant_mesh } from "./is_compliant_mesh.js";
23
23
  import { MaterialDescriptor } from "./MaterialDescriptor.js";
24
24
  import { computeThreeTextureTypeFromDataType } from "../../texture/computeThreeTextureTypeFromDataType.js";
25
- import { typedArrayToDataType } from "../../../../core/collection/array/typedArrayToDataType.js";
25
+ import { typedArrayToDataType } from "../../../../core/collection/array/typed/typedArrayToDataType.js";
26
26
  import { BinaryDataType } from "../../../../core/binary/type/BinaryDataType.js";
27
27
  import {
28
28
  compute_typed_array_constructor_from_data_type
@@ -1,4 +1,4 @@
1
- import { AABB3 } from "../../../../../core/bvh2/aabb3/AABB3.js";
1
+ import { AABB3 } from "../../../../../core/geom/3d/aabb/AABB3.js";
2
2
  import { RowFirstTable } from "../../../../../core/collection/table/RowFirstTable.js";
3
3
  import Vector3 from "../../../../../core/geom/Vector3.js";
4
4
  import { BinaryDataType } from "../../../../../core/binary/type/BinaryDataType.js";
@@ -14,7 +14,7 @@ import { ParticleParameters } from "./ParticleParameters.js";
14
14
  import { BlendingType } from "../../../../texture/sampler/BlendingType.js";
15
15
  import Quaternion from "../../../../../../core/geom/Quaternion.js";
16
16
  import { ParticleEmitterFlag } from "./ParticleEmitterFlag.js";
17
- import { AABB3 } from "../../../../../../core/bvh2/aabb3/AABB3.js";
17
+ import { AABB3 } from "../../../../../../core/geom/3d/aabb/AABB3.js";
18
18
  import {
19
19
  PARTICLE_ATTRIBUTE_AGE,
20
20
  PARTICLE_ATTRIBUTE_BLEND,
@@ -1,7 +1,7 @@
1
1
  import Vector3 from "../../../../../../core/geom/Vector3.js";
2
2
  import { NumericInterval } from "../../../../../../core/math/interval/NumericInterval.js";
3
3
  import { ParameterTrackSet } from "../parameter/ParameterTrackSet.js";
4
- import { AABB3 } from "../../../../../../core/bvh2/aabb3/AABB3.js";
4
+ import { AABB3 } from "../../../../../../core/geom/3d/aabb/AABB3.js";
5
5
  import { ParticleParameters } from "./ParticleParameters.js";
6
6
  import { ConicRay } from "../../../../../../core/geom/ConicRay.js";
7
7
  import { SimulationStepDefinition } from "../simulator/SimulationStepDefinition.js";
@@ -125,6 +125,7 @@ export class ParameterLookupTable {
125
125
  */
126
126
  sample(position, result) {
127
127
  assert.isNumber(position, 'position');
128
+ assert.notNaN(position, 'position');
128
129
  // assert.greaterThanOrEqual(position, 0, 'position');
129
130
  // assert.ok(position >= 0 && position <= 1, `position must be between 0 and 1, instead was ${position}`);
130
131
 
@@ -77,7 +77,7 @@ import TopDownCameraController from "../../../../../ecs/camera/topdown/TopDownCa
77
77
  import { randomFloatBetween } from "../../../../../../../core/math/random/randomFloatBetween.js";
78
78
  import { MicronRenderPlugin } from "../../../../../micron/plugin/MicronRenderPlugin.js";
79
79
  import { obtainTerrain } from "../../../../../../ecs/terrain/util/obtainTerrain.js";
80
- import { pick } from "../../../../../../../ecs/grid/pick.js";
80
+ import { pick } from "../../../../../../ecs/grid/pick.js";
81
81
  import { clamp01 } from "../../../../../../../core/math/clamp01.js";
82
82
  import { randomFromArray } from "../../../../../../../core/math/random/randomFromArray.js";
83
83
  import { SamplingFunctionKind } from "./SamplingFunctionKind.js";
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @author alteredq / http://alteredqualia.com/
3
3
  */
4
- import * as THREE from 'TRHEE" ;
4
+ import * as THREE from 'TRHEE';
5
5
  import CopyShader from "../shaders/CopyShader.js";
6
6
 
7
7
  const TexturePass = function (texture, opacity) {
@@ -14,7 +14,7 @@ const TexturePass = function (texture, opacity) {
14
14
  this.uniforms = THREE.UniformsUtils.clone(shader.uniforms);
15
15
 
16
16
  this.uniforms["opacity"].value = (opacity !== undefined) ? opacity : 1.0;
17
- this.uniforms["tDiffuse'].value = texture;
17
+ this.uniforms["tDiffuse"].value = texture;
18
18
 
19
19
  this.material = new THREE.ShaderMaterial({
20
20
 
@@ -3,7 +3,7 @@ import { MouseEvents } from "../../../../input/devices/events/MouseEvents.js";
3
3
  import { readPositionFromMouseEvent } from "../../../../input/devices/PointerDevice.js";
4
4
  import Vector2 from "../../../../../core/geom/Vector2.js";
5
5
  import { VisualTip } from "../../../../../view/tooltip/VisualTip.js";
6
- import Rectangle from "../../../../../core/geom/Rectangle.js";
6
+ import Rectangle from "../../../../../core/geom/2d/Rectangle.js";
7
7
  import LabelView from "../../../../../view/common/LabelView.js";
8
8
  import { CanvasView } from "../../../../../view/elements/CanvasView.js";
9
9
  import EmptyView from "../../../../../view/elements/EmptyView.js";
@@ -1,5 +1,5 @@
1
1
  import { IncrementalDeltaSet } from "../visibility/IncrementalDeltaSet.js";
2
- import { AABB3 } from "../../../../core/bvh2/aabb3/AABB3.js";
2
+ import { AABB3 } from "../../../../core/geom/3d/aabb/AABB3.js";
3
3
  import { CameraViewFlags } from "./CameraViewFlags.js";
4
4
  import { Frustum } from "three";
5
5
  import { read_frustum_planes_to_array } from "../../../../core/geom/3d/frustum/read_frustum_planes_to_array.js";
@@ -5,10 +5,10 @@ import { bvh_query_leaves_ray } from "../../../../core/bvh2/bvh3/query/bvh_query
5
5
  import {
6
6
  aabb3_signed_distance_sqr_to_point
7
7
  } from "../../../../core/geom/3d/aabb/aabb3_signed_distance_sqr_to_point.js";
8
+ import { ebvh_build_for_geometry_morton } from "../../../../core/bvh2/bvh3/ebvh_build_for_geometry_morton.js";
8
9
  import {
9
10
  computeTriangleRayIntersectionBarycentric
10
- } from "../../../../core/geom/3d/triangle/computeTriangleRayIntersection.js";
11
- import { ebvh_build_for_geometry_morton } from "../../../../core/bvh2/bvh3/ebvh_build_for_geometry_morton.js";
11
+ } from "../../../../core/geom/3d/triangle/computeTriangleRayIntersectionBarycentric.js";
12
12
 
13
13
  /**
14
14
  *
@@ -1,6 +1,6 @@
1
1
  import Vector2 from "../../../../core/geom/Vector2.js";
2
- import Rectangle from "../../../../core/geom/Rectangle.js";
3
- import AABB2 from "../../../../core/geom/AABB2.js";
2
+ import Rectangle from "../../../../core/geom/2d/Rectangle.js";
3
+ import AABB2 from "../../../../core/geom/2d/aabb/AABB2.js";
4
4
 
5
5
  export class AtlasPatch {
6
6
  constructor() {
@@ -2,7 +2,7 @@ import { TextureAtlas } from "./TextureAtlas.js";
2
2
  import { Sampler2D } from "../sampler/Sampler2D.js";
3
3
  import { AtlasPatchFlag } from "./AtlasPatchFlag.js";
4
4
  import { AtlasPatch } from "./AtlasPatch.js";
5
- import { aabb2_overlapExists } from "../../../../core/geom/AABB2.js";
5
+ import { aabb2_overlap_exists } from "../../../../core/geom/2d/aabb/aabb2_overlap_exists.js";
6
6
 
7
7
  expect.extend({
8
8
  toBeContainedInAtlas(patch, atlas) {
@@ -204,7 +204,7 @@ function isPackingValid(patches, atlas) {
204
204
  const _x1 = _x0 + patch1.size.x + patch1.padding * 2;
205
205
  const _y1 = _y0 + patch1.size.y + patch1.padding * 2;
206
206
 
207
- if (aabb2_overlapExists(x0, y0, x1, y1, _x0, _y0, _x1, _y1)) {
207
+ if (aabb2_overlap_exists(x0, y0, x1, y1, _x0, _y0, _x1, _y1)) {
208
208
  return false;
209
209
  }
210
210
  }
@@ -10,7 +10,7 @@ import { mix } from "../../../../core/math/mix.js";
10
10
  import { BlendingType } from "./BlendingType.js";
11
11
  import { assert } from "../../../../core/assert.js";
12
12
  import { typedArrayConstructorByInstance } from "./typedArrayConstructorByInstance.js";
13
- import { typedArrayToDataType } from "../../../../core/collection/array/typedArrayToDataType.js";
13
+ import { typedArrayToDataType } from "../../../../core/collection/array/typed/typedArrayToDataType.js";
14
14
  import {
15
15
  compute_typed_array_constructor_from_data_type
16
16
  } from "../../../../core/binary/type/DataType2TypedArrayConstructorMapping.js";
@@ -2,7 +2,7 @@ import { BinaryDataType } from "../../../../core/binary/type/BinaryDataType.js";
2
2
  import { min2 } from "../../../../core/math/min2.js";
3
3
  import { max2 } from "../../../../core/math/max2.js";
4
4
  import { isTypedArray } from "../../../../core/collection/array/typed/isTypedArray.js";
5
- import { typedArrayToDataType } from "../../../../core/collection/array/typedArrayToDataType.js";
5
+ import { typedArrayToDataType } from "../../../../core/collection/array/typed/typedArrayToDataType.js";
6
6
  import { sampler2d_channel_compute_max } from "./sampler2d_channel_compute_max.js";
7
7
  import { sampler2d_channel_compute_min } from "./sampler2d_channel_compute_min.js";
8
8
 
@@ -11,7 +11,7 @@ import { rootObject3DFastMatrixUpdate } from "../ecs/mesh/rootObject3DFastMatrix
11
11
  import { camera_compute_distance_to_fit_length } from "../camera/camera_compute_distance_to_fit_length.js";
12
12
  import { scaleObject3ToBox } from "./ScaleObject3ToBox.js";
13
13
  import { DEG_TO_RAD } from "../../../core/math/DEG_TO_RAD.js";
14
- import AABB2 from "../../../core/geom/AABB2.js";
14
+ import AABB2 from "../../../core/geom/2d/aabb/AABB2.js";
15
15
 
16
16
  /**
17
17
  *
@@ -1,5 +1,5 @@
1
1
  import { LinearFilter, RGBAFormat, WebGLRenderTarget } from "three";
2
- import AABB2 from "../../../core/geom/AABB2.js";
2
+ import AABB2 from "../../../core/geom/2d/aabb/AABB2.js";
3
3
  import Vector2 from "../../../core/geom/Vector2.js";
4
4
  import { WebGLRendererPool } from "../render/RendererPool.js";
5
5
  import { makeMeshPreviewScene } from "./makeMeshPreviewScene.js";
@@ -0,0 +1,15 @@
1
+ import { Behavior } from "./Behavior.js";
2
+
3
+ test("constructor does not throw", () => {
4
+ expect(() => new Behavior()).not.toThrow();
5
+ });
6
+
7
+ test("context propagated from initialization method", () => {
8
+ const b = new Behavior();
9
+
10
+ const context = { test: "hello" };
11
+
12
+ b.initialize(context);
13
+
14
+ expect(b.context).toBe(context);
15
+ });
@@ -17,7 +17,7 @@ export class MoveEdge {
17
17
  * @returns S output state
18
18
  */
19
19
  move(inputState) {
20
-
20
+ throw new Error("Abstract method, needs to be overridden");
21
21
  }
22
22
 
23
23
  /**
@@ -18,6 +18,9 @@ function Reference(target) {
18
18
  this.count = 0;
19
19
  }
20
20
 
21
+ /**
22
+ * Prefer to use v2 reference system instead as it has simpler design is safer
23
+ */
21
24
  export class ReferenceManager {
22
25
  /**
23
26
  * @template Key, Value
@@ -6,39 +6,34 @@ import Signal from "../../../core/events/signal/Signal.js";
6
6
  export class Reference {
7
7
 
8
8
  /**
9
- * @template T
9
+ *
10
+ * @type {Signal<this,T>}
11
+ * @private
10
12
  */
11
- constructor() {
12
-
13
- /**
14
- *
15
- * @type {Signal}
16
- * @private
17
- */
18
- this.__onReleased = new Signal();
19
-
20
- /**
21
- *
22
- * @type {T}
23
- * @private
24
- */
25
- this.__value = null;
26
-
27
-
28
- /**
29
- *
30
- * @type {boolean}
31
- * @private
32
- */
33
- this.__is_bound = false;
34
- }
13
+ #onReleased = new Signal();
14
+
15
+ /**
16
+ *
17
+ * @type {T}
18
+ * @private
19
+ */
20
+ #value = null;
21
+
22
+
23
+ /**
24
+ *
25
+ * @type {boolean}
26
+ * @private
27
+ */
28
+ #is_bound = false;
29
+
35
30
 
36
31
  /**
37
32
  *
38
- * @returns {Signal}
33
+ * @returns {Signal<this,T>}
39
34
  */
40
35
  get onReleased() {
41
- return this.__onReleased;
36
+ return this.#onReleased;
42
37
  }
43
38
 
44
39
  /**
@@ -46,17 +41,17 @@ export class Reference {
46
41
  * @param {T} value
47
42
  */
48
43
  bind(value) {
49
- if (value === this.__value) {
44
+ if (value === this.#value) {
50
45
  return;
51
46
  }
52
47
 
53
- if (this.__is_bound) {
48
+ if (this.#is_bound) {
54
49
  throw new Error(`Reference is already bound, must release before binding to a new value`);
55
50
  }
56
51
 
57
- this.__value = value;
52
+ this.#value = value;
58
53
 
59
- this.__is_bound = true;
54
+ this.#is_bound = true;
60
55
  }
61
56
 
62
57
  /**
@@ -64,27 +59,28 @@ export class Reference {
64
59
  * @returns {T}
65
60
  */
66
61
  getValue() {
67
- return this.__value;
62
+ return this.#value;
68
63
  }
69
64
 
70
65
  release() {
71
- if (!this.__is_bound) {
66
+ if (!this.#is_bound) {
72
67
  // not bound
73
68
  return;
74
69
  }
75
70
 
76
- const v = this.__value;
71
+ const v = this.#value;
77
72
 
78
73
  // prevent further usage of the reference
79
- this.__value = null;
74
+ this.#value = null;
80
75
 
81
- this.__is_bound = false;
76
+ this.#is_bound = false;
82
77
 
83
- this.__onReleased.send2(this,v);
78
+ this.#onReleased.send2(this, v);
84
79
  }
85
80
  }
86
81
 
87
82
  /**
83
+ * Special NULL reference that can be used to indicate lack of reference
88
84
  * @readonly
89
85
  * @type {Readonly<Reference>}
90
86
  */
@@ -1 +1,7 @@
1
+ ## Sopra
2
+
3
+ Object-oriented sound engine
4
+
5
+ ---
6
+
1
7
  Loosely based on concepts from FMOD and Wwise
@@ -3,7 +3,8 @@ import { max2 } from "../../../core/math/max2.js";
3
3
  import { min2 } from "../../../core/math/min2.js";
4
4
  import { TileMoveProgram } from "./TileMoveProgram.js";
5
5
  import { TileMoveInstruction } from "./TileMoveInstruction.js";
6
- import { aabb2_contains, aabb2_overlapExists } from "../../../core/geom/AABB2.js";
6
+ import { aabb2_overlap_exists } from "../../../core/geom/2d/aabb/aabb2_overlap_exists.js";
7
+ import { aabb2_contains } from "../../../core/geom/2d/aabb/aabb2_contains.js";
7
8
 
8
9
 
9
10
  /**
@@ -121,7 +122,7 @@ export function computeTileGridMove(tile, targetX, targetY, source, target) {
121
122
  const x1 = x0 + sourceTile.size.x;
122
123
  const y1 = y0 + sourceTile.size.y;
123
124
 
124
- if (!aabb2_overlapExists(sourceOcclusionRegionX0, sourceOcclusionRegionY0, sourceOcclusionRegionX1, sourceOcclusionRegionY1, x0, y0, x1, y1)) {
125
+ if (!aabb2_overlap_exists(sourceOcclusionRegionX0, sourceOcclusionRegionY0, sourceOcclusionRegionX1, sourceOcclusionRegionY1, x0, y0, x1, y1)) {
125
126
  //tile is outside of the transfer area
126
127
  continue;
127
128
  }
@@ -1,5 +1,5 @@
1
1
  import TileGrid from "./TileGrid.js";
2
- import Rectangle from "../../../core/geom/Rectangle.js";
2
+ import Rectangle from "../../../core/geom/2d/Rectangle.js";
3
3
  import { computeTileGridMove } from "./computeTileGridMove.js";
4
4
 
5
5
  test("move to empty space works as intended", () => {
@@ -5,7 +5,6 @@ import { CellularAutomata } from "./CellularAutomata.js";
5
5
  export class CaveGeneratorCellularAutomata extends CellularAutomata {
6
6
  step(data, width, height) {
7
7
 
8
-
9
8
  const maxY = height - 1;
10
9
  const maxX = width - 1;
11
10
 
@@ -21,20 +20,24 @@ export class CaveGeneratorCellularAutomata extends CellularAutomata {
21
20
  const columnLeft = max2(x - 1, 0);
22
21
  const columnRight = min2(x + 1, maxX);
23
22
 
24
- //
23
+ // read top row
24
+ const topLeft = data[rowIndexTop + columnLeft];
25
25
  const top = data[rowIndexTop + x];
26
- const bottom = data[rowIndexBottom + x];
26
+ const topRight = data[rowIndexTop + columnRight];
27
+
28
+ // read middle row
27
29
  const left = data[rowIndex + columnLeft];
30
+ const cellValue = data[cellIndex];
28
31
  const right = data[rowIndex + columnRight];
29
- //
30
- const topLeft = data[rowIndexTop + columnLeft];
31
- const topRight = data[rowIndexTop + columnRight];
32
+
33
+ // read bottom row
32
34
  const bottomLeft = data[rowIndexBottom + columnLeft];
35
+ const bottom = data[rowIndexBottom + x];
33
36
  const bottomRight = data[rowIndexBottom + columnRight];
34
37
 
35
38
  //count neighbours
36
39
  const neighbourSum = top + bottom + left + right + topLeft + topRight + bottomLeft + bottomRight;
37
- const cellValue = data[cellIndex];
40
+
38
41
 
39
42
  if (cellValue > 0) {
40
43
  //cell is alive
@@ -0,0 +1,12 @@
1
+ import { CaveGeneratorCellularAutomata } from "./CaveGeneratorCellularAutomata.js";
2
+
3
+ test("single cell execution", () => {
4
+ const automata = new CaveGeneratorCellularAutomata();
5
+
6
+ const array = new Uint8Array([0]);
7
+
8
+ automata.step(array, 1, 1);
9
+
10
+ // cell should stay dead, no live neighbours
11
+ expect(array[0]).toBe(0);
12
+ });
@@ -1,10 +1,11 @@
1
1
  import { seededRandom } from "../../core/math/random/seededRandom.js";
2
2
 
3
3
  export class CellularAutomata {
4
- constructor() {
5
-
6
- this.random = seededRandom(1);
7
- }
4
+ /**
5
+ *
6
+ * @type {function(): number}
7
+ */
8
+ random = seededRandom(1);
8
9
 
9
10
  /**
10
11
  *
@@ -86,6 +86,20 @@ export class CellFilterGaussianBlur extends CellFilter {
86
86
  * @private
87
87
  */
88
88
  this.__inv_kernel_total_power = 0;
89
+
90
+ /**
91
+ * Written by 'initialize' stage
92
+ * @type {number}
93
+ * @private
94
+ */
95
+ this.__local_u_scale = 0;
96
+
97
+ /**
98
+ * Written by 'initialize' stage
99
+ * @type {number}
100
+ * @private
101
+ */
102
+ this.__local_v_scale = 0;
89
103
  }
90
104
 
91
105
  initialize(grid, seed) {
@@ -105,6 +119,11 @@ export class CellFilterGaussianBlur extends CellFilter {
105
119
  // store inverse, to be able to use multiply instead of division in execution
106
120
  this.__inv_kernel_total_power = 1 / this.__kernel_total_power;
107
121
 
122
+
123
+ // precompute scaling for the sampling(execute) stage
124
+ this.__local_u_scale = this.size_x / (this.samples_x - 1);
125
+ this.__local_v_scale = this.size_y / (this.samples_y - 1);
126
+
108
127
  super.initialize(grid, seed);
109
128
  }
110
129
 
@@ -140,11 +159,8 @@ export class CellFilterGaussianBlur extends CellFilter {
140
159
  const half_samples_x = (samplesX - 1) * 0.5;
141
160
  const half_samples_y = (samplesY - 1) * 0.5;
142
161
 
143
- const sizeX = this.size_x;
144
- const sizeY = this.size_y;
145
-
146
- const local_u_scale = sizeX / (samplesX - 1);
147
- const local_v_scale = sizeY / (samplesY - 1);
162
+ const local_u_scale = this.__local_u_scale;
163
+ const local_v_scale = this.__local_v_scale;
148
164
 
149
165
  let sum = 0;
150
166
  let ix, iy = 0;
@@ -157,7 +173,7 @@ export class CellFilterGaussianBlur extends CellFilter {
157
173
  for (; iy < samplesY; iy++) {
158
174
  const local_y = iy - half_samples_y;
159
175
 
160
- const offset_y = y + local_y * local_v_scale;
176
+ const sample_y = y + local_y * local_v_scale;
161
177
 
162
178
  const row_address = iy * i_samples_x;
163
179
 
@@ -165,13 +181,13 @@ export class CellFilterGaussianBlur extends CellFilter {
165
181
 
166
182
  const local_x = ix - half_samples_x;
167
183
 
168
- const offset_x = local_x * local_u_scale;
184
+ const sample_x = x + local_x * local_u_scale;
169
185
 
170
186
  const power = kernel[row_address + ix];
171
187
 
172
- const sourceValue = source.execute(grid, x + offset_x, offset_y, 0);
188
+ const source_value = source.execute(grid, sample_x, sample_y, 0);
173
189
 
174
- const sample_contribution = sourceValue * power;
190
+ const sample_contribution = source_value * power;
175
191
 
176
192
  sum += sample_contribution;
177
193
 
@@ -1,5 +1,5 @@
1
1
  import { Sampler2D } from "../../engine/graphics/texture/sampler/Sampler2D.js";
2
- import AABB2 from "../../core/geom/AABB2.js";
2
+ import AABB2 from "../../core/geom/2d/aabb/AABB2.js";
3
3
  import { computeUnsignedDistanceField } from "../../engine/graphics/texture/sampler/distanceField.js";
4
4
 
5
5
  export class AreaMask {
package/src/view/View.js CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  import Vector2 from "../core/geom/Vector2.js";
7
7
 
8
- import AABB2 from "../core/geom/AABB2.js";
8
+ import AABB2 from "../core/geom/2d/aabb/AABB2.js";
9
9
  import Signal from "../core/events/signal/Signal.js";
10
10
  import { SignalBinding } from "../core/events/signal/SignalBinding.js";
11
11
  import { assert } from "../core/assert.js";
@@ -1,6 +1,6 @@
1
1
  import View from "../../View.js";
2
2
  import SVG from "../../SVG.js";
3
- import { line2_line2_intersection } from "../../../core/geom/LineSegment2.js";
3
+ import { line2_line2_intersection } from "../../../core/geom/2d/LineSegment2.js";
4
4
  import Vector1 from "../../../core/geom/Vector1.js";
5
5
 
6
6
  export class RectangularPieProgressView extends View {
@@ -12,7 +12,7 @@ import { Camera } from "../../engine/graphics/ecs/camera/Camera.js";
12
12
  import { PointerDevice } from "../../engine/input/devices/PointerDevice.js";
13
13
  import TopDownCameraController from "../../engine/graphics/ecs/camera/topdown/TopDownCameraController.js";
14
14
  import { MinimapMarkersGL } from "./gl/MinimapMarkersGL.js";
15
- import Rectangle from "../../core/geom/Rectangle.js";
15
+ import Rectangle from "../../core/geom/2d/Rectangle.js";
16
16
  import { EntityObserver } from "../../engine/ecs/EntityObserver.js";
17
17
  import { Transform } from "../../engine/ecs/transform/Transform.js";
18
18
  import { MinimapWorldGL } from "./gl/MinimapWorldGL.js";
@@ -1,9 +1,9 @@
1
1
  import View from "../../View.js";
2
2
  import Vector3 from "../../../core/geom/Vector3.js";
3
- import { computePlaneRayIntersection } from "../../../core/geom/Plane.js";
4
3
  import ObservedValue from "../../../core/model/ObservedValue.js";
5
4
  import { SurfacePoint3 } from "../../../core/geom/3d/SurfacePoint3.js";
6
5
  import SVG from "../../SVG.js";
6
+ import { computePlaneRayIntersection } from "../../../core/geom/3d/plane/computePlaneRayIntersection.js";
7
7
 
8
8
 
9
9
  const rayContact = new SurfacePoint3();
@@ -4,7 +4,7 @@ import { Mesh, PlaneBufferGeometry } from "three";
4
4
  import { buildScreenSpaceFogOfWarShader } from "../../../engine/ecs/fow/shader/screenSpaceFogOfWarShader.js";
5
5
  import { computeUvTransformFromFogOfWar } from "../../../engine/ecs/fow/shader/FogOfWarRenderer.js";
6
6
  import { SignalBinding } from "../../../core/events/signal/SignalBinding.js";
7
- import AABB2 from "../../../core/geom/AABB2.js";
7
+ import AABB2 from "../../../core/geom/2d/aabb/AABB2.js";
8
8
 
9
9
 
10
10
  /**
@@ -1,4 +1,4 @@
1
- import Rectangle from "../../core/geom/Rectangle.js";
1
+ import Rectangle from "../../core/geom/2d/Rectangle.js";
2
2
  import { VisualTip } from "./VisualTip.js";
3
3
  import Signal from "../../core/events/signal/Signal.js";
4
4
  import ObservedBoolean from "../../core/model/ObservedBoolean.js";
@@ -1,5 +1,5 @@
1
1
  import EmptyView from "../elements/EmptyView.js";
2
- import AABB2 from "../../core/geom/AABB2.js";
2
+ import AABB2 from "../../core/geom/2d/aabb/AABB2.js";
3
3
  import Task from "../../core/process/task/Task.js";
4
4
  import ConcurrentExecutor from "../../core/process/executor/ConcurrentExecutor.js";
5
5
  import { TaskSignal } from "../../core/process/task/TaskSignal.js";
@@ -1,6 +1,6 @@
1
1
  import View from "../View.js";
2
2
  import Vector2 from "../../core/geom/Vector2.js";
3
- import AABB2 from "../../core/geom/AABB2.js";
3
+ import AABB2 from "../../core/geom/2d/aabb/AABB2.js";
4
4
  import { CompassArrowView } from "../elements/CompassArrowView.js";
5
5
  import EmptyView from "../elements/EmptyView.js";
6
6
  import { forceIntoBox } from "../../core/graph/layout/box/forceIntoBox.js";
@@ -1,5 +1,5 @@
1
- import Rectangle from "../../core/geom/Rectangle.js";
2
- import AABB2 from "../../core/geom/AABB2.js";
1
+ import Rectangle from "../../core/geom/2d/Rectangle.js";
2
+ import AABB2 from "../../core/geom/2d/aabb/AABB2.js";
3
3
  import { assert } from "../../core/assert.js";
4
4
 
5
5
  /**