@woosh/meep-engine 2.168.0 → 2.169.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 (295) hide show
  1. package/README.md +2 -2
  2. package/build/bundle-worker-image-decoder.js +1 -1
  3. package/package.json +1 -1
  4. package/src/REVIEW_2026_08_06/adv-core.md +511 -0
  5. package/src/REVIEW_2026_08_06/adv-gfx.md +480 -0
  6. package/src/REVIEW_2026_08_06/adv-view.md +446 -0
  7. package/src/REVIEW_2026_08_06/api-core.md +296 -0
  8. package/src/REVIEW_2026_08_06/api-engine.md +195 -0
  9. package/src/REVIEW_2026_08_06/bvh-phys-sound-net.md +507 -0
  10. package/src/REVIEW_2026_08_06/core-binary.md +348 -0
  11. package/src/REVIEW_2026_08_06/core-collection.md +376 -0
  12. package/src/REVIEW_2026_08_06/core-math.md +221 -0
  13. package/src/REVIEW_2026_08_06/core-process.md +266 -0
  14. package/src/REVIEW_2026_08_06/core-science.md +223 -0
  15. package/src/REVIEW_2026_08_06/engine-ai-nav.md +279 -0
  16. package/src/REVIEW_2026_08_06/engine-animation.md +167 -0
  17. package/src/REVIEW_2026_08_06/engine-asset.md +166 -0
  18. package/src/REVIEW_2026_08_06/engine-ecs.md +920 -0
  19. package/src/REVIEW_2026_08_06/engine-input.md +197 -0
  20. package/src/REVIEW_2026_08_06/engine-misc.md +248 -0
  21. package/src/REVIEW_2026_08_06/engine-terrain.md +52 -0
  22. package/src/REVIEW_2026_08_06/generation.md +176 -0
  23. package/src/REVIEW_2026_08_06/geom-2d.md +434 -0
  24. package/src/REVIEW_2026_08_06/geom-3d.md +117 -0
  25. package/src/REVIEW_2026_08_06/gfx-gi.md +143 -0
  26. package/src/REVIEW_2026_08_06/gfx-render.md +740 -0
  27. package/src/REVIEW_2026_08_06/gfx-texture.md +690 -0
  28. package/src/REVIEW_2026_08_06/prior-criticals.md +49 -0
  29. package/src/REVIEW_2026_08_06/prior-highs.md +138 -0
  30. package/src/REVIEW_2026_08_06/test-gaps.md +364 -0
  31. package/src/REVIEW_2026_08_06/view.md +667 -0
  32. package/src/REVIEW_2026_08_06.md +571 -0
  33. package/src/core/binary/BinaryBuffer.d.ts.map +1 -1
  34. package/src/core/binary/BinaryBuffer.js +12 -1
  35. package/src/core/binary/BitImage2.d.ts +5 -1
  36. package/src/core/binary/BitImage2.d.ts.map +1 -1
  37. package/src/core/binary/BitImage2.js +5 -1
  38. package/src/core/bvh8/build/NodeProxy.d.ts.map +1 -1
  39. package/src/core/bvh8/build/NodeProxy.js +314 -308
  40. package/src/core/collection/list/List.d.ts +15 -0
  41. package/src/core/collection/list/List.d.ts.map +1 -1
  42. package/src/core/collection/list/List.js +34 -0
  43. package/src/core/collection/list/SortedListProjection.d.ts.map +1 -1
  44. package/src/core/collection/list/SortedListProjection.js +4 -1
  45. package/src/core/collection/map/BiMap.d.ts +25 -2
  46. package/src/core/collection/map/BiMap.d.ts.map +1 -1
  47. package/src/core/collection/map/BiMap.js +57 -3
  48. package/src/core/debug/matchers/IsAnything.d.ts.map +1 -1
  49. package/src/core/debug/matchers/IsAnything.js +5 -1
  50. package/src/core/events/signal/Signal.d.ts.map +1 -1
  51. package/src/core/events/signal/Signal.js +3 -1
  52. package/src/core/geom/2d/polygon/TRIANGULATION_DESIGN.md +433 -0
  53. package/src/core/geom/2d/polygon/polygon2_is_counter_clockwise.d.ts +31 -0
  54. package/src/core/geom/2d/polygon/polygon2_is_counter_clockwise.d.ts.map +1 -0
  55. package/src/core/geom/2d/polygon/polygon2_is_counter_clockwise.js +84 -0
  56. package/src/core/geom/2d/polygon/polygon2_signed_area.d.ts +24 -2
  57. package/src/core/geom/2d/polygon/polygon2_signed_area.d.ts.map +1 -1
  58. package/src/core/geom/2d/polygon/polygon2_signed_area.js +52 -34
  59. package/src/core/geom/2d/polygon/polygon2_triangulate.corpus.d.ts +28 -0
  60. package/src/core/geom/2d/polygon/polygon2_triangulate.corpus.d.ts.map +1 -0
  61. package/src/core/geom/2d/polygon/polygon2_triangulate.corpus.js +86 -0
  62. package/src/core/geom/2d/polygon/polygon2_triangulate.d.ts +40 -0
  63. package/src/core/geom/2d/polygon/polygon2_triangulate.d.ts.map +1 -0
  64. package/src/core/geom/2d/polygon/polygon2_triangulate.js +1280 -0
  65. package/src/core/geom/2d/polygon/polygon2_triangulation_deviation.d.ts +28 -0
  66. package/src/core/geom/2d/polygon/polygon2_triangulation_deviation.d.ts.map +1 -0
  67. package/src/core/geom/2d/polygon/polygon2_triangulation_deviation.js +77 -0
  68. package/src/core/geom/2d/triangle/tri2_rasterize_conservative.d.ts +6 -3
  69. package/src/core/geom/2d/triangle/tri2_rasterize_conservative.d.ts.map +1 -1
  70. package/src/core/geom/2d/triangle/tri2_rasterize_conservative.js +26 -13
  71. package/src/core/geom/2d/triangle/tri2_signed_area.d.ts +17 -1
  72. package/src/core/geom/2d/triangle/tri2_signed_area.d.ts.map +1 -1
  73. package/src/core/geom/2d/triangle/tri2_signed_area.js +35 -23
  74. package/src/core/geom/2d/v2_morton_encode.d.ts +20 -0
  75. package/src/core/geom/2d/v2_morton_encode.d.ts.map +1 -0
  76. package/src/core/geom/2d/v2_morton_encode.js +23 -0
  77. package/src/core/geom/3d/atlas/segment/atlas_merge_charts.d.ts.map +1 -1
  78. package/src/core/geom/3d/atlas/segment/atlas_merge_charts.js +4 -1
  79. package/src/core/geom/3d/polygon/polygon3_compute_normal.d.ts +27 -0
  80. package/src/core/geom/3d/polygon/polygon3_compute_normal.d.ts.map +1 -0
  81. package/src/core/geom/3d/polygon/polygon3_compute_normal.js +60 -0
  82. package/src/core/geom/3d/polygon/polygon3_triangulate.d.ts +34 -0
  83. package/src/core/geom/3d/polygon/polygon3_triangulate.d.ts.map +1 -0
  84. package/src/core/geom/3d/polygon/polygon3_triangulate.js +94 -0
  85. package/src/core/geom/3d/quaternion/quat3_multiply.d.ts +8 -2
  86. package/src/core/geom/3d/quaternion/quat3_multiply.d.ts.map +1 -1
  87. package/src/core/geom/3d/quaternion/quat3_multiply.js +8 -2
  88. package/src/core/geom/3d/shape/ConvexHullShape3D.d.ts.map +1 -1
  89. package/src/core/geom/3d/shape/ConvexHullShape3D.js +32 -2
  90. package/src/core/geom/3d/topology/struct/binary/io/face/bt_face_triangulate.d.ts +23 -6
  91. package/src/core/geom/3d/topology/struct/binary/io/face/bt_face_triangulate.d.ts.map +1 -1
  92. package/src/core/geom/3d/topology/struct/binary/io/face/bt_face_triangulate.js +268 -124
  93. package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_assert_valid.d.ts +17 -0
  94. package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_assert_valid.d.ts.map +1 -0
  95. package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_assert_valid.js +44 -0
  96. package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_count_edge_faces.d.ts +20 -0
  97. package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_count_edge_faces.d.ts.map +1 -0
  98. package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_count_edge_faces.js +40 -0
  99. package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_is_closed.d.ts +19 -0
  100. package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_is_closed.d.ts.map +1 -0
  101. package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_is_closed.js +34 -0
  102. package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_is_manifold.d.ts +22 -0
  103. package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_is_manifold.d.ts.map +1 -0
  104. package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_is_manifold.js +37 -0
  105. package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_validate.d.ts +87 -0
  106. package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_validate.d.ts.map +1 -0
  107. package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_validate.js +599 -0
  108. package/src/core/geom/3d/triangle/tri3_compute_signed_volume.d.ts +32 -0
  109. package/src/core/geom/3d/triangle/tri3_compute_signed_volume.d.ts.map +1 -1
  110. package/src/core/geom/3d/triangle/tri3_compute_signed_volume.js +66 -7
  111. package/src/core/geom/3d/triangle/tri3_mesh_compute_signed_volume.d.ts +22 -1
  112. package/src/core/geom/3d/triangle/tri3_mesh_compute_signed_volume.d.ts.map +1 -1
  113. package/src/core/geom/3d/triangle/tri3_mesh_compute_signed_volume.js +83 -38
  114. package/src/core/geom/MANIFOLD_COMPARISON_2026_08_01.md +554 -0
  115. package/src/core/geom/vec3/v3_cotangent.d.ts +6 -2
  116. package/src/core/geom/vec3/v3_cotangent.d.ts.map +1 -1
  117. package/src/core/geom/vec3/v3_cotangent.js +6 -2
  118. package/src/core/geom/vec3/v3_cross.d.ts +6 -2
  119. package/src/core/geom/vec3/v3_cross.d.ts.map +1 -1
  120. package/src/core/geom/vec3/v3_cross.js +6 -2
  121. package/src/core/geom/vec3/v3_multiply.d.ts +6 -2
  122. package/src/core/geom/vec3/v3_multiply.d.ts.map +1 -1
  123. package/src/core/geom/vec3/v3_multiply.js +6 -2
  124. package/src/core/geom/vec3/v3_subtract.d.ts +6 -2
  125. package/src/core/geom/vec3/v3_subtract.d.ts.map +1 -1
  126. package/src/core/geom/vec3/v3_subtract.js +6 -2
  127. package/src/core/localization/Localization.js +1 -1
  128. package/src/core/math/random/randomSeed.d.ts +13 -0
  129. package/src/core/math/random/randomSeed.d.ts.map +1 -0
  130. package/src/core/math/random/randomSeed.js +16 -0
  131. package/src/core/math/spline/spline3_hermite_apply_transform.d.ts +50 -0
  132. package/src/core/math/spline/spline3_hermite_apply_transform.d.ts.map +1 -0
  133. package/src/core/math/spline/spline3_hermite_apply_transform.js +107 -0
  134. package/src/core/math/spline/spline3_hermite_reverse.d.ts +34 -0
  135. package/src/core/math/spline/spline3_hermite_reverse.d.ts.map +1 -0
  136. package/src/core/math/spline/spline3_hermite_reverse.js +49 -0
  137. package/src/core/math/statistics/hammersley_sequence.d.ts +17 -4
  138. package/src/core/math/statistics/hammersley_sequence.d.ts.map +1 -1
  139. package/src/core/math/statistics/hammersley_sequence.js +25 -16
  140. package/src/core/process/Future.d.ts.map +1 -1
  141. package/src/core/process/Future.js +12 -0
  142. package/src/core/process/PromiseWatcher.d.ts.map +1 -1
  143. package/src/core/process/PromiseWatcher.js +9 -2
  144. package/src/core/process/executor/ConcurrentExecutor.d.ts.map +1 -1
  145. package/src/core/process/executor/ConcurrentExecutor.js +12 -2
  146. package/src/core/process/worker/WorkerProxy.d.ts.map +1 -1
  147. package/src/core/process/worker/WorkerProxy.js +5 -2
  148. package/src/core/process/worker/extractTransferables.d.ts.map +1 -1
  149. package/src/core/process/worker/extractTransferables.js +4 -1
  150. package/src/engine/Engine.d.ts +12 -12
  151. package/src/engine/Engine.d.ts.map +1 -1
  152. package/src/engine/Engine.js +149 -10
  153. package/src/engine/EngineHarness.d.ts.map +1 -1
  154. package/src/engine/EngineHarness.js +4 -1
  155. package/src/engine/asset/loaders/ArrayBufferLoader.d.ts.map +1 -1
  156. package/src/engine/asset/loaders/ArrayBufferLoader.js +7 -0
  157. package/src/engine/ecs/speaker/lines/sets/LineSetDescription.d.ts.map +1 -1
  158. package/src/engine/ecs/speaker/lines/sets/LineSetDescription.js +3 -1
  159. package/src/engine/ecs/terrain/ecs/TerrainSystem.d.ts.map +1 -1
  160. package/src/engine/ecs/terrain/ecs/TerrainSystem.js +4 -1
  161. package/src/engine/ecs/terrain/tiles/TerrainTileManager.d.ts +29 -0
  162. package/src/engine/ecs/terrain/tiles/TerrainTileManager.d.ts.map +1 -1
  163. package/src/engine/ecs/terrain/tiles/TerrainTileManager.js +84 -23
  164. package/src/engine/graphics/CONTEXT_LOSS_RECOVERY_PLAN.md +446 -0
  165. package/src/engine/graphics/GraphicsEngine.d.ts +56 -7
  166. package/src/engine/graphics/GraphicsEngine.d.ts.map +1 -1
  167. package/src/engine/graphics/GraphicsEngine.js +196 -24
  168. package/src/engine/graphics/context/WebGLContextFailureReason.d.ts +9 -0
  169. package/src/engine/graphics/context/WebGLContextFailureReason.d.ts.map +1 -0
  170. package/src/engine/graphics/context/WebGLContextFailureReason.js +17 -0
  171. package/src/engine/graphics/context/WebGLContextMonitor.d.ts +106 -0
  172. package/src/engine/graphics/context/WebGLContextMonitor.d.ts.map +1 -0
  173. package/src/engine/graphics/context/WebGLContextMonitor.js +341 -0
  174. package/src/engine/graphics/context/WebGLContextState.d.ts +14 -0
  175. package/src/engine/graphics/context/WebGLContextState.d.ts.map +1 -0
  176. package/src/engine/graphics/context/WebGLContextState.js +24 -0
  177. package/src/engine/graphics/context/testWebGLContextLoss.d.ts +2 -0
  178. package/src/engine/graphics/context/testWebGLContextLoss.d.ts.map +1 -0
  179. package/src/engine/graphics/context/testWebGLContextLoss.js +696 -0
  180. package/src/engine/graphics/ecs/camera/serialization/CameraSerializationAdapter.d.ts.map +1 -1
  181. package/src/engine/graphics/ecs/camera/serialization/CameraSerializationAdapter.js +68 -32
  182. package/src/engine/graphics/ecs/camera/serialization/CameraSerializationUpgrader_0_1.d.ts +14 -0
  183. package/src/engine/graphics/ecs/camera/serialization/CameraSerializationUpgrader_0_1.d.ts.map +1 -0
  184. package/src/engine/graphics/ecs/camera/serialization/CameraSerializationUpgrader_0_1.js +41 -0
  185. package/src/engine/graphics/ecs/decal/v2/FPDecalSystem.js +1 -1
  186. package/src/engine/graphics/ecs/mesh-v2/ShadedGeometrySystem.d.ts.map +1 -1
  187. package/src/engine/graphics/ecs/mesh-v2/ShadedGeometrySystem.js +5 -0
  188. package/src/engine/graphics/ecs/trail2d/Trail2D.d.ts +5 -1
  189. package/src/engine/graphics/ecs/trail2d/Trail2D.d.ts.map +1 -1
  190. package/src/engine/graphics/ecs/trail2d/Trail2D.js +15 -0
  191. package/src/engine/graphics/ecs/trail2d/Trail2DSystem.d.ts +1 -1
  192. package/src/engine/graphics/ecs/trail2d/Trail2DSystem.d.ts.map +1 -1
  193. package/src/engine/graphics/ecs/trail2d/Trail2DSystem.js +2 -1
  194. package/src/engine/graphics/ecs/trail3d/Trail3D.d.ts +4 -1
  195. package/src/engine/graphics/ecs/trail3d/Trail3D.d.ts.map +1 -1
  196. package/src/engine/graphics/ecs/trail3d/Trail3D.js +488 -476
  197. package/src/engine/graphics/ecs/trail3d/Trail3DSystem.d.ts +1 -1
  198. package/src/engine/graphics/ecs/trail3d/Trail3DSystem.d.ts.map +1 -1
  199. package/src/engine/graphics/ecs/trail3d/Trail3DSystem.js +280 -253
  200. package/src/engine/graphics/geometry/MikkT/BuildNeighborsFast.d.ts.map +1 -1
  201. package/src/engine/graphics/geometry/MikkT/BuildNeighborsFast.js +3 -2
  202. package/src/engine/graphics/geometry/MikkT/GenerateSharedVerticesIndexList.d.ts.map +1 -1
  203. package/src/engine/graphics/geometry/MikkT/GenerateSharedVerticesIndexList.js +3 -1
  204. package/src/engine/graphics/geometry/computeMeshSurfaceArea.js +1 -1
  205. package/src/engine/graphics/load_and_set_cubemap_v0.d.ts +5 -0
  206. package/src/engine/graphics/load_and_set_cubemap_v0.d.ts.map +1 -1
  207. package/src/engine/graphics/load_and_set_cubemap_v0.js +26 -21
  208. package/src/engine/graphics/particles/particular/group/ParticleGroup.d.ts.map +1 -1
  209. package/src/engine/graphics/particles/particular/group/ParticleGroup.js +19 -8
  210. package/src/engine/graphics/particles/particular/group/optimizeCommandQueue.js +1 -1
  211. package/src/engine/graphics/texture/atlas/AtlasLookupTexture.d.ts.map +1 -1
  212. package/src/engine/graphics/texture/atlas/AtlasLookupTexture.js +10 -3
  213. package/src/engine/graphics/texture/atlas/TextureAtlas.d.ts.map +1 -1
  214. package/src/engine/graphics/texture/atlas/TextureAtlas.js +4 -1
  215. package/src/engine/graphics/texture/atlas/gpu/WebGLTextureAtlas.d.ts.map +1 -1
  216. package/src/engine/graphics/texture/atlas/gpu/WebGLTextureAtlas.js +11 -0
  217. package/src/engine/graphics/texture/cubemap/load_environment_map.d.ts.map +1 -1
  218. package/src/engine/graphics/texture/cubemap/load_environment_map.js +5 -2
  219. package/src/engine/graphics/texture/sampler/distance/computeSignedDistanceField_Chamfer.d.ts.map +1 -1
  220. package/src/engine/graphics/texture/sampler/distance/computeSignedDistanceField_Chamfer.js +26 -18
  221. package/src/engine/graphics/texture/sampler/filter/sampler2d_blur_gaussian.d.ts +15 -2
  222. package/src/engine/graphics/texture/sampler/filter/sampler2d_blur_gaussian.d.ts.map +1 -1
  223. package/src/engine/graphics/texture/sampler/filter/sampler2d_blur_gaussian.js +29 -3
  224. package/src/engine/graphics/texture/sampler/resize/sampler2d_scale_down_lanczos.d.ts +11 -1
  225. package/src/engine/graphics/texture/sampler/resize/sampler2d_scale_down_lanczos.d.ts.map +1 -1
  226. package/src/engine/graphics/texture/sampler/resize/sampler2d_scale_down_lanczos.js +158 -171
  227. package/src/engine/graphics/texture/sampler/sampler2d_paint.js +1 -1
  228. package/src/engine/graphics/texture/sampler/util/bitSet2Sampler2D.js +2 -2
  229. package/src/engine/input/ecs/util/TopDownCameraControllerHelper.d.ts.map +1 -1
  230. package/src/engine/input/ecs/util/TopDownCameraControllerHelper.js +10 -3
  231. package/src/engine/navigation/ecs/components/PathSerializationUpgrader_2_3.d.ts +14 -0
  232. package/src/engine/navigation/ecs/components/PathSerializationUpgrader_2_3.d.ts.map +1 -0
  233. package/src/engine/navigation/ecs/components/PathSerializationUpgrader_2_3.js +38 -0
  234. package/src/engine/network/orchestrator/ServerAuthoritativeClient.d.ts.map +1 -1
  235. package/src/engine/network/orchestrator/ServerAuthoritativeClient.js +433 -425
  236. package/src/engine/physics/constraint/solve_constraints.d.ts +4 -1
  237. package/src/engine/physics/constraint/solve_constraints.d.ts.map +1 -1
  238. package/src/engine/physics/constraint/solve_constraints.js +38 -13
  239. package/src/engine/physics/contact/ManifoldStore.d.ts +15 -3
  240. package/src/engine/physics/contact/ManifoldStore.d.ts.map +1 -1
  241. package/src/engine/physics/contact/ManifoldStore.js +15 -3
  242. package/src/engine/physics/ecs/Joint.d.ts +7 -4
  243. package/src/engine/physics/ecs/Joint.d.ts.map +1 -1
  244. package/src/engine/physics/ecs/Joint.js +7 -4
  245. package/src/engine/physics/ecs/PhysicsSystem.d.ts +14 -0
  246. package/src/engine/physics/ecs/PhysicsSystem.d.ts.map +1 -1
  247. package/src/engine/physics/ecs/PhysicsSystem.js +16 -0
  248. package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
  249. package/src/engine/physics/fluid/ecs/FluidSystem.d.ts +3 -3
  250. package/src/engine/physics/narrowphase/convex_convex_manifold.d.ts +15 -7
  251. package/src/engine/physics/narrowphase/convex_convex_manifold.d.ts.map +1 -1
  252. package/src/engine/physics/narrowphase/convex_convex_manifold.js +33 -10
  253. package/src/engine/physics/narrowphase/refine_ray_concave.d.ts +6 -2
  254. package/src/engine/physics/narrowphase/refine_ray_concave.d.ts.map +1 -1
  255. package/src/engine/physics/narrowphase/refine_ray_concave.js +6 -2
  256. package/src/engine/physics/narrowphase/refine_ray_hit.d.ts +6 -2
  257. package/src/engine/physics/narrowphase/refine_ray_hit.d.ts.map +1 -1
  258. package/src/engine/physics/narrowphase/refine_ray_hit.js +6 -2
  259. package/src/engine/physics/queries/raycast.d.ts.map +1 -1
  260. package/src/engine/physics/queries/raycast.js +11 -4
  261. package/src/engine/save/storage/IndexedDBStorage.d.ts.map +1 -1
  262. package/src/engine/save/storage/IndexedDBStorage.js +21 -3
  263. package/src/engine/simulation/Ticker.d.ts +12 -0
  264. package/src/engine/simulation/Ticker.d.ts.map +1 -1
  265. package/src/engine/simulation/Ticker.js +18 -0
  266. package/src/engine/sound/simulation/AcousticSimulator.d.ts.map +1 -1
  267. package/src/engine/sound/simulation/AcousticSimulator.js +9 -1
  268. package/src/engine/sound/simulation/core/VolumeField.d.ts +6 -2
  269. package/src/engine/sound/simulation/core/VolumeField.d.ts.map +1 -1
  270. package/src/engine/sound/simulation/core/VolumeField.js +6 -2
  271. package/src/engine/sound/simulation/probe/AcousticProbeField.d.ts +6 -2
  272. package/src/engine/sound/simulation/probe/AcousticProbeField.d.ts.map +1 -1
  273. package/src/engine/sound/simulation/probe/AcousticProbeField.js +6 -2
  274. package/src/engine/sound/simulation/probe/acoustic_probe_transfer.d.ts +6 -2
  275. package/src/engine/sound/simulation/probe/acoustic_probe_transfer.d.ts.map +1 -1
  276. package/src/engine/sound/simulation/probe/acoustic_probe_transfer.js +6 -2
  277. package/src/engine/sound/simulation/probe/bakeProbeReflectors.d.ts +3 -1
  278. package/src/engine/sound/simulation/probe/bakeProbeReflectors.d.ts.map +1 -1
  279. package/src/engine/sound/simulation/probe/bakeProbeReflectors.js +3 -1
  280. package/src/engine/ui/GUIEngine.d.ts.map +1 -1
  281. package/src/engine/ui/GUIEngine.js +8 -1
  282. package/src/generation/theme/TerrainTheme.d.ts.map +1 -1
  283. package/src/generation/theme/TerrainTheme.js +2 -1
  284. package/src/generation/theme/ThemeEngine.d.ts.map +1 -1
  285. package/src/generation/theme/ThemeEngine.js +6 -5
  286. package/src/view/ViewGroup.d.ts.map +1 -1
  287. package/src/view/ViewGroup.js +9 -7
  288. package/src/view/graphics/WebGLContextFailureView.d.ts +19 -0
  289. package/src/view/graphics/WebGLContextFailureView.d.ts.map +1 -0
  290. package/src/view/graphics/WebGLContextFailureView.js +76 -0
  291. package/src/view/minimap/Minimap.d.ts +8 -0
  292. package/src/view/minimap/Minimap.d.ts.map +1 -1
  293. package/src/view/minimap/Minimap.js +16 -3
  294. package/src/view/minimap/dom/MinimapMarkerView.d.ts.map +1 -1
  295. package/src/view/minimap/dom/MinimapMarkerView.js +3 -1
@@ -6,7 +6,7 @@ declare class Trail3DSystem extends System<any> {
6
6
  */
7
7
  constructor(engine: Engine);
8
8
  dependencies: (typeof Transform | typeof Trail3D)[];
9
- components_used: ResourceAccessSpecification<typeof Trail3D>[];
9
+ components_used: (ResourceAccessSpecification<typeof Transform> | ResourceAccessSpecification<typeof Trail3D>)[];
10
10
  /**
11
11
  * @type {TubeXFixedPhysicsSimulator}
12
12
  */
@@ -1 +1 @@
1
- {"version":3,"file":"Trail3DSystem.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/ecs/trail3d/Trail3DSystem.js"],"names":[],"mappings":";AAyBA;IAiCI;;;OAGG;IACH,4BAkBC;IAtDD,oDAAoC;IAEpC,+DAEE;IAEF;;OAEG;IACH,WAFU,0BAA0B,CAES;IAiB7C;;;OAGG;IACH,YAAgB;IAeZ;;OAEG;IACH,UAFU,cAAc,CAEO;IAE/B;;OAEG;IACH,aAFU,cAAY,IAAI,CAEH;IAG3B,2CAmBC;IAED,4CAIC;IA2DD;;;;OAIG;IACH,YAJW,OAAO,aACP,SAAS,YACT,MAAM,QAgBhB;IAED;;;;OAIG;IACH,kBAJW,OAAO,aACP,SAAS,UACT,MAAM,QAQhB;IAED;;;OAGG;IACH,yBAHW,OAAO,aACP,SAAS,QAkCnB;IAED,6BAWC;;CACJ;uBAlPsB,wBAAwB;0BACrB,qCAAqC;oBAW3C,cAAc;4CAbU,uDAAuD;2CAUxD,0DAA0D;+BANtE,yBAAyB"}
1
+ {"version":3,"file":"Trail3DSystem.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/ecs/trail3d/Trail3DSystem.js"],"names":[],"mappings":";AAmDA;IAkCI;;;OAGG;IACH,4BAkBC;IAvDD,oDAAoC;IAEpC,iHAGE;IAEF;;OAEG;IACH,WAFU,0BAA0B,CAES;IAiB7C;;;OAGG;IACH,YAAgB;IAeZ;;OAEG;IACH,UAFU,cAAc,CAEO;IAE/B;;OAEG;IACH,aAFU,cAAY,IAAI,CAEH;IAG3B,2CAmBC;IAED,4CAIC;IA4DD;;;;OAIG;IACH,YAJW,OAAO,aACP,SAAS,YACT,MAAM,QAgBhB;IAED;;;;OAIG;IACH,kBAJW,OAAO,aACP,SAAS,UACT,MAAM,QAQhB;IAED;;;OAGG;IACH,yBAHW,OAAO,aACP,SAAS,QAiCnB;IAED,6BAWC;;CACJ;uBA7QsB,wBAAwB;0BACrB,qCAAqC;oBAQ3C,cAAc;4CAVU,uDAAuD;2CAMxD,0DAA0D;+BAFtE,yBAAyB"}
@@ -1,253 +1,280 @@
1
- import { assert } from "../../../../core/assert.js";
2
- import { BVH } from "../../../../core/bvh2/bvh3/BVH.js";
3
- import { bvh_query_depth_range_in_frustum } from "../../../../core/bvh2/bvh3/query/bvh_query_depth_range_in_frustum.js";
4
- import Vector3 from '../../../../core/geom/Vector3.js';
5
- import { clamp } from "../../../../core/math/clamp.js";
6
- import { max2 } from "../../../../core/math/max2.js";
7
- import { ResourceAccessKind } from "../../../../core/model/ResourceAccessKind.js";
8
- import { ResourceAccessSpecification } from "../../../../core/model/ResourceAccessSpecification.js";
9
- import { System } from '../../../ecs/System.js';
10
- import { Transform } from '../../../ecs/transform/Transform.js';
11
- import { Reference } from "../../../reference/v2/Reference.js";
12
- import { GraphicsEngine } from "../../GraphicsEngine.js";
13
- import { make_bvh_visibility_builder } from "../../render/make_bvh_visibility_builder.js";
14
- import {
15
- TUBE_ATTRIBUTE_ADDRESS_AGE,
16
- TUBE_ATTRIBUTE_ADDRESS_UV_V
17
- } from "../../trail/tube/tube_attributes_spec.js";
18
- import { TubeXFixedPhysicsSimulator } from "../../trail/tube/simulator/TubeXFixedPhysicsSimulator.js";
19
- import { TubeXPlugin } from "../../trail/tube/TubeXPlugin.js";
20
-
21
- import Trail3D from './Trail3D.js';
22
- import { Trail3DFlags } from "./Trail3DFlags.js";
23
-
24
- const v3Temp1 = new Vector3();
25
-
26
- class Trail3DSystem extends System {
27
- dependencies = [Trail3D, Transform];
28
-
29
- components_used = [
30
- ResourceAccessSpecification.from(Trail3D, ResourceAccessKind.Write)
31
- ];
32
-
33
- /**
34
- * @type {TubeXFixedPhysicsSimulator}
35
- */
36
- simulator = new TubeXFixedPhysicsSimulator();
37
-
38
- /**
39
- * @type {Reference<TubeXPlugin>}
40
- */
41
- #tube_plugin = Reference.NULL;
42
-
43
- /**
44
- * @type {number}
45
- */
46
- #timeDelta = 0;
47
-
48
- /**
49
- * @type {Engine}
50
- */
51
- #engine = null;
52
-
53
- /**
54
- * @private
55
- * @type {BVH}
56
- */
57
- bvh = new BVH();
58
-
59
- /**
60
- * @param {Engine} engine
61
- * @constructor
62
- */
63
- constructor(engine) {
64
- super();
65
-
66
- assert.defined(engine, 'engine');
67
- assert.notNull(engine, 'engine');
68
- assert.equal(engine.isEngine, true, 'engine.isEngine !== true');
69
-
70
- this.#engine = engine;
71
-
72
- /**
73
- * @type {GraphicsEngine}
74
- */
75
- this.graphics = engine.graphics;
76
-
77
- /**
78
- * @type {RenderLayer|null}
79
- */
80
- this.renderLayer = null;
81
- }
82
-
83
- async startup(entityManager) {
84
- this.entityManager = entityManager;
85
-
86
- this.renderLayer = this.graphics.layers.create('trail-3d-system');
87
-
88
- this.renderLayer.buildVisibleSet = make_bvh_visibility_builder(
89
- this.entityManager, this.bvh,
90
- (destination, offset, entity, ecd) => {
91
- destination[offset] = ecd.getComponent(entity, Trail3D).mesh
92
- return 1;
93
- }
94
- );
95
-
96
- const bvh = this.bvh;
97
- this.renderLayer.compute_depth_range = (result, frustum, nx, ny, nz, c) => {
98
- bvh_query_depth_range_in_frustum(result, bvh, frustum, nx, ny, nz, c);
99
- };
100
-
101
- this.#tube_plugin = await this.#engine.plugins.acquire(TubeXPlugin);
102
- }
103
-
104
- async shutdown(entityManager) {
105
- this.graphics.layers.remove(this.renderLayer);
106
-
107
- this.#tube_plugin.release();
108
- }
109
-
110
- /**
111
- * @param {Trail3D} trail
112
- * @param {Transform} transform
113
- */
114
- #build_trail(trail, transform) {
115
- const segmentsPerSecond = 60;
116
- const maxSegments = 1024;
117
-
118
- const segment_count = Math.ceil(clamp(trail.maxAge * segmentsPerSecond, 2, maxSegments));
119
-
120
- trail.build(segment_count);
121
-
122
- const tube = trail.tube;
123
-
124
- const tubes = this.#tube_plugin.getValue();
125
-
126
- const material = tubes.obtain_material_x(trail.material);
127
-
128
- trail.mesh.material = material;
129
-
130
- trail.time = 0;
131
- trail.trailingIndex = 0;
132
- trail.timeSinceLastUpdate = 0;
133
- trail.distanceSinceLastUpdate = 0;
134
-
135
- const trail_offset = trail.offset;
136
- const transform_position = transform.position;
137
-
138
- const position_x = trail_offset.x + transform_position.x;
139
- const position_y = trail_offset.y + transform_position.y;
140
- const position_z = trail_offset.z + transform_position.z;
141
-
142
- const color = trail.color;
143
-
144
- // initialize knots. setCount has already seeded a valid default frame on every
145
- // knot, so the freshly built (collapsed) tube is well-formed — a zero-length,
146
- // invisible point — until the head starts moving and supplies real tangents.
147
- for (let i = 0; i < segment_count; i++) {
148
- const f = i / (segment_count - 1);
149
-
150
- tube.setKnotColor(i, color.x * 255, color.y * 255, color.z * 255);
151
- tube.setKnotPosition(i, position_x, position_y, position_z);
152
- tube.setKnotThickness(i, trail.width);
153
- tube.setKnotAttribute_Scalar(i, TUBE_ATTRIBUTE_ADDRESS_UV_V, f);
154
- // seeded age = maxAge means "already expired", so alpha follows the fade law: 0
155
- tube.setKnotAlpha(i, 0);
156
- tube.setKnotAttribute_Scalar(i, TUBE_ATTRIBUTE_ADDRESS_AGE, trail.maxAge);
157
- }
158
-
159
- trail.bvh.resize(
160
- position_x, position_y, position_z,
161
- position_x, position_y, position_z
162
- );
163
-
164
- trail.setFlag(Trail3DFlags.Built);
165
- }
166
-
167
- /**
168
- * @param {Trail3D} trail
169
- * @param {Transform} transform
170
- * @param {number} entityId
171
- */
172
- link(trail, transform, entityId) {
173
- // Trail3DFlags.Lit is final by link time bake it into the material spec
174
- // (the material cache key) so lit and unlit trails obtain distinct materials
175
- trail.material.lit = trail.getFlag(Trail3DFlags.Lit);
176
-
177
- if (!trail.getFlag(Trail3DFlags.Built)) {
178
- this.#build_trail(trail, transform);
179
- } else {
180
-
181
- const material = this.#tube_plugin.getValue().obtain_material_x(trail.material);
182
- trail.mesh.material = material;
183
- }
184
-
185
- trail.bvh.link(this.bvh, entityId);
186
- }
187
-
188
- /**
189
- * @param {Trail3D} component
190
- * @param {Transform} transform
191
- * @param {number} entity
192
- */
193
- unlink(component, transform, entity) {
194
-
195
- component.bvh.unlink();
196
-
197
- // release resources
198
- component.dispose();
199
- }
200
-
201
- /**
202
- * @param {Trail3D} trail
203
- * @param {Transform} transform
204
- */
205
- updateTrailEntity(trail, transform) {
206
- const timeDelta = this.#timeDelta;
207
-
208
- /**
209
- * @type {TubeX|null}
210
- */
211
- const tube = trail.tube;
212
-
213
- const newPosition = v3Temp1;
214
-
215
- newPosition.copy(trail.offset);
216
- newPosition.applyMatrix4(transform.matrix);
217
-
218
- trail.timeSinceLastUpdate += timeDelta;
219
- trail.time += timeDelta;
220
-
221
- const ageOffset = max2(0, trail.maxAge - trail.time);
222
-
223
- this.simulator.update(tube, trail.maxAge, timeDelta, trail.color.w);
224
-
225
- if (trail.getFlag(Trail3DFlags.Spawning)) {
226
- trail.updateHead(newPosition.x, newPosition.y, newPosition.z, ageOffset);
227
- }
228
-
229
- if (trail.getFlag(Trail3DFlags.BoundsNeedUpdate)) {
230
- const bvh = trail.bvh;
231
-
232
- tube.computeBoundingBox(bvh.bounds);
233
- bvh.write_bounds();
234
-
235
- trail.clearFlag(Trail3DFlags.BoundsNeedUpdate);
236
- }
237
- }
238
-
239
- update(timeDelta) {
240
-
241
- const em = this.entityManager;
242
-
243
- const dataset = em.dataset;
244
-
245
- this.#timeDelta = timeDelta;
246
-
247
- if (dataset !== null) {
248
- dataset.traverseEntities([Trail3D, Transform], this.updateTrailEntity, this);
249
- }
250
- }
251
- }
252
-
253
- export default Trail3DSystem;
1
+ import { assert } from "../../../../core/assert.js";
2
+ import { BVH } from "../../../../core/bvh2/bvh3/BVH.js";
3
+ import { bvh_query_depth_range_in_frustum } from "../../../../core/bvh2/bvh3/query/bvh_query_depth_range_in_frustum.js";
4
+ import Vector3 from '../../../../core/geom/Vector3.js';
5
+ import { clamp } from "../../../../core/math/clamp.js";
6
+ import { max2 } from "../../../../core/math/max2.js";
7
+ import { ResourceAccessKind } from "../../../../core/model/ResourceAccessKind.js";
8
+ import { ResourceAccessSpecification } from "../../../../core/model/ResourceAccessSpecification.js";
9
+ import { System } from '../../../ecs/System.js';
10
+ import { Transform } from '../../../ecs/transform/Transform.js';
11
+ import { Reference } from "../../../reference/v2/Reference.js";
12
+ import { GraphicsEngine } from "../../GraphicsEngine.js";
13
+ import { make_bvh_visibility_builder } from "../../render/make_bvh_visibility_builder.js";
14
+ import { TubeXFixedPhysicsSimulator } from "../../trail/tube/simulator/TubeXFixedPhysicsSimulator.js";
15
+ import { TUBE_ATTRIBUTE_ADDRESS_AGE, TUBE_ATTRIBUTE_ADDRESS_UV_V } from "../../trail/tube/tube_attributes_spec.js";
16
+ import { TubeXPlugin } from "../../trail/tube/TubeXPlugin.js";
17
+
18
+ import Trail3D from './Trail3D.js';
19
+ import { Trail3DFlags } from "./Trail3DFlags.js";
20
+
21
+ const v3Temp1 = new Vector3();
22
+
23
+ /**
24
+ * Separate from {@link v3Temp1}: the build path runs from `link`, the head path
25
+ * from `update`, and sharing one scratch across the two would couple them for no
26
+ * gain.
27
+ * @type {Vector3}
28
+ */
29
+ const v3_build_position = new Vector3();
30
+
31
+ /**
32
+ * World point the trail's head tracks: the component's {@link Trail3D#offset},
33
+ * which lives in the entity's LOCAL frame, carried through the entity's full
34
+ * transform — so it rides the entity's rotation and scales with it.
35
+ *
36
+ * Build-time seeding and the per-frame head update must agree on this. If they
37
+ * disagree, the freshly built tube sits collapsed somewhere the head never
38
+ * visits, and the head's first move draws a segment bridging the two — a
39
+ * one-frame streak as long as the disagreement, in a direction fixed by the
40
+ * offset rather than by travel.
41
+ *
42
+ * @param {Vector3} result
43
+ * @param {Trail3D} trail
44
+ * @param {Transform} transform
45
+ * @returns {void}
46
+ */
47
+ function compute_head_position(result, trail, transform) {
48
+ result.copy(trail.offset);
49
+ result.applyMatrix4(transform.matrix);
50
+ }
51
+
52
+ class Trail3DSystem extends System {
53
+ dependencies = [Trail3D, Transform];
54
+
55
+ components_used = [
56
+ ResourceAccessSpecification.from(Trail3D, ResourceAccessKind.Write),
57
+ ResourceAccessSpecification.from(Transform, ResourceAccessKind.Read)
58
+ ];
59
+
60
+ /**
61
+ * @type {TubeXFixedPhysicsSimulator}
62
+ */
63
+ simulator = new TubeXFixedPhysicsSimulator();
64
+
65
+ /**
66
+ * @type {Reference<TubeXPlugin>}
67
+ */
68
+ #tube_plugin = Reference.NULL;
69
+
70
+ /**
71
+ * @type {number}
72
+ */
73
+ #timeDelta = 0;
74
+
75
+ /**
76
+ * @type {Engine}
77
+ */
78
+ #engine = null;
79
+
80
+ /**
81
+ * @private
82
+ * @type {BVH}
83
+ */
84
+ bvh = new BVH();
85
+
86
+ /**
87
+ * @param {Engine} engine
88
+ * @constructor
89
+ */
90
+ constructor(engine) {
91
+ super();
92
+
93
+ assert.defined(engine, 'engine');
94
+ assert.notNull(engine, 'engine');
95
+ assert.equal(engine.isEngine, true, 'engine.isEngine !== true');
96
+
97
+ this.#engine = engine;
98
+
99
+ /**
100
+ * @type {GraphicsEngine}
101
+ */
102
+ this.graphics = engine.graphics;
103
+
104
+ /**
105
+ * @type {RenderLayer|null}
106
+ */
107
+ this.renderLayer = null;
108
+ }
109
+
110
+ async startup(entityManager) {
111
+ this.entityManager = entityManager;
112
+
113
+ this.renderLayer = this.graphics.layers.create('trail-3d-system');
114
+
115
+ this.renderLayer.buildVisibleSet = make_bvh_visibility_builder(
116
+ this.entityManager, this.bvh,
117
+ (destination, offset, entity, ecd) => {
118
+ destination[offset] = ecd.getComponent(entity, Trail3D).mesh
119
+ return 1;
120
+ }
121
+ );
122
+
123
+ const bvh = this.bvh;
124
+ this.renderLayer.compute_depth_range = (result, frustum, nx, ny, nz, c) => {
125
+ bvh_query_depth_range_in_frustum(result, bvh, frustum, nx, ny, nz, c);
126
+ };
127
+
128
+ this.#tube_plugin = await this.#engine.plugins.acquire(TubeXPlugin);
129
+ }
130
+
131
+ async shutdown(entityManager) {
132
+ this.graphics.layers.remove(this.renderLayer);
133
+
134
+ this.#tube_plugin.release();
135
+ }
136
+
137
+ /**
138
+ * @param {Trail3D} trail
139
+ * @param {Transform} transform
140
+ */
141
+ #build_trail(trail, transform) {
142
+ const segmentsPerSecond = 60;
143
+ const maxSegments = 1024;
144
+
145
+ const segment_count = Math.ceil(clamp(trail.maxAge * segmentsPerSecond, 2, maxSegments));
146
+
147
+ trail.build(segment_count);
148
+
149
+ const tube = trail.tube;
150
+
151
+ const tubes = this.#tube_plugin.getValue();
152
+
153
+ const material = tubes.obtain_material_x(trail.material);
154
+
155
+ trail.mesh.material = material;
156
+
157
+ trail.time = 0;
158
+ trail.trailingIndex = 0;
159
+ trail.timeSinceLastUpdate = 0;
160
+ trail.distanceSinceLastUpdate = 0;
161
+
162
+ // seed exactly where updateTrailEntity will place the head, or the first
163
+ // head move bridges the gap with a visible segment
164
+ compute_head_position(v3_build_position, trail, transform);
165
+
166
+ const position_x = v3_build_position.x;
167
+ const position_y = v3_build_position.y;
168
+ const position_z = v3_build_position.z;
169
+
170
+ const color = trail.color;
171
+
172
+ // initialize knots. setCount has already seeded a valid default frame on every
173
+ // knot, so the freshly built (collapsed) tube is well-formed a zero-length,
174
+ // invisible point until the head starts moving and supplies real tangents.
175
+ for (let i = 0; i < segment_count; i++) {
176
+ const f = i / (segment_count - 1);
177
+
178
+ tube.setKnotColor(i, color.x * 255, color.y * 255, color.z * 255);
179
+ tube.setKnotPosition(i, position_x, position_y, position_z);
180
+ tube.setKnotThickness(i, trail.width);
181
+ tube.setKnotAttribute_Scalar(i, TUBE_ATTRIBUTE_ADDRESS_UV_V, f);
182
+ // seeded age = maxAge means "already expired", so alpha follows the fade law: 0
183
+ tube.setKnotAlpha(i, 0);
184
+ tube.setKnotAttribute_Scalar(i, TUBE_ATTRIBUTE_ADDRESS_AGE, trail.maxAge);
185
+ }
186
+
187
+ trail.bvh.resize(
188
+ position_x, position_y, position_z,
189
+ position_x, position_y, position_z
190
+ );
191
+
192
+ trail.setFlag(Trail3DFlags.Built);
193
+ }
194
+
195
+ /**
196
+ * @param {Trail3D} trail
197
+ * @param {Transform} transform
198
+ * @param {number} entityId
199
+ */
200
+ link(trail, transform, entityId) {
201
+ // Trail3DFlags.Lit is final by link time — bake it into the material spec
202
+ // (the material cache key) so lit and unlit trails obtain distinct materials
203
+ trail.material.lit = trail.getFlag(Trail3DFlags.Lit);
204
+
205
+ if (!trail.getFlag(Trail3DFlags.Built)) {
206
+ this.#build_trail(trail, transform);
207
+ } else {
208
+
209
+ const material = this.#tube_plugin.getValue().obtain_material_x(trail.material);
210
+ trail.mesh.material = material;
211
+ }
212
+
213
+ trail.bvh.link(this.bvh, entityId);
214
+ }
215
+
216
+ /**
217
+ * @param {Trail3D} component
218
+ * @param {Transform} transform
219
+ * @param {number} entity
220
+ */
221
+ unlink(component, transform, entity) {
222
+
223
+ component.bvh.unlink();
224
+
225
+ // release resources
226
+ component.dispose();
227
+ }
228
+
229
+ /**
230
+ * @param {Trail3D} trail
231
+ * @param {Transform} transform
232
+ */
233
+ updateTrailEntity(trail, transform) {
234
+ const timeDelta = this.#timeDelta;
235
+
236
+ /**
237
+ * @type {TubeX|null}
238
+ */
239
+ const tube = trail.tube;
240
+
241
+ const newPosition = v3Temp1;
242
+
243
+ compute_head_position(newPosition, trail, transform);
244
+
245
+ trail.timeSinceLastUpdate += timeDelta;
246
+ trail.time += timeDelta;
247
+
248
+ const ageOffset = max2(0, trail.maxAge - trail.time);
249
+
250
+ this.simulator.update(tube, trail.maxAge, timeDelta, trail.color.w);
251
+
252
+ if (trail.getFlag(Trail3DFlags.Spawning)) {
253
+ trail.updateHead(newPosition.x, newPosition.y, newPosition.z, ageOffset);
254
+ }
255
+
256
+ if (trail.getFlag(Trail3DFlags.BoundsNeedUpdate)) {
257
+ const bvh = trail.bvh;
258
+
259
+ tube.computeBoundingBox(bvh.bounds);
260
+ bvh.write_bounds();
261
+
262
+ trail.clearFlag(Trail3DFlags.BoundsNeedUpdate);
263
+ }
264
+ }
265
+
266
+ update(timeDelta) {
267
+
268
+ const em = this.entityManager;
269
+
270
+ const dataset = em.dataset;
271
+
272
+ this.#timeDelta = timeDelta;
273
+
274
+ if (dataset !== null) {
275
+ dataset.traverseEntities([Trail3D, Transform], this.updateTrailEntity, this);
276
+ }
277
+ }
278
+ }
279
+
280
+ export default Trail3DSystem;
@@ -1 +1 @@
1
- {"version":3,"file":"BuildNeighborsFast.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/geometry/MikkT/BuildNeighborsFast.js"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AACH,8CANW,UAAU,UACV,MAAM,EAAE,GAAC,YAAY,eACrB,MAAM,EAAE,kBACR,MAAM,GACJ,IAAI,CA6HhB"}
1
+ {"version":3,"file":"BuildNeighborsFast.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/geometry/MikkT/BuildNeighborsFast.js"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AACH,8CANW,UAAU,UACV,MAAM,EAAE,GAAC,YAAY,eACrB,MAAM,EAAE,kBACR,MAAM,GACJ,IAAI,CA8HhB"}
@@ -112,9 +112,10 @@ export function BuildNeighborsFast(pTriInfos, pEdges, piTriListIn, iNrTrianglesI
112
112
  pEdges[j * 3 + 1]
113
113
  ); // resolve index ordering and edge_num
114
114
 
115
- // flip i0_B and i1_B
115
+ // flip i0_B and i1_B: an adjacent face walks the shared edge in the
116
+ // opposite direction, so B's pair matches A's only once reversed
116
117
  const i0_B = temp_edge_B[1];
117
- const i1_B = temp_edge_B[2];
118
+ const i1_B = temp_edge_B[0];
118
119
  const edgenum_B = temp_edge_B[2];
119
120
 
120
121
  //assert(!(i0_A==i1_B && i1_A==i0_B));
@@ -1 +1 @@
1
- {"version":3,"file":"GenerateSharedVerticesIndexList.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/geometry/MikkT/GenerateSharedVerticesIndexList.js"],"names":[],"mappings":"AAmGA;;;;;;GAMG;AACH,sEALW,MAAM,EAAE,GAAC,UAAU,gDAEnB,MAAM,GACJ,IAAI,CAuGhB"}
1
+ {"version":3,"file":"GenerateSharedVerticesIndexList.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/geometry/MikkT/GenerateSharedVerticesIndexList.js"],"names":[],"mappings":"AAqGA;;;;;;GAMG;AACH,sEALW,MAAM,EAAE,GAAC,UAAU,gDAEnB,MAAM,GACJ,IAAI,CAuGhB"}
@@ -76,7 +76,9 @@ function radixsort_pair(comp, data, comp2, data2, n) {
76
76
  for (let pass = 0; pass < data_size; pass++, shift += 8) {
77
77
  /* Insert the elements in their correct location based on their bin. */
78
78
  for (let i = 0; i < n; i++) {
79
- const bin_index = pass * 257 + (_comp_0[i] >> shift) & 0xff;
79
+ // `+` binds tighter than `&`, so the mask has to be parenthesised or
80
+ // it applies to the whole sum and every pass past the first mis-bins
81
+ const bin_index = pass * 257 + ((_comp_0[i] >> shift) & 0xff);
80
82
 
81
83
  const pos = bins[bin_index]++;
82
84
 
@@ -37,7 +37,7 @@ export function computeMeshSurfaceArea(result, points, indices, polygon_count =
37
37
  const c3 = c * 3;
38
38
 
39
39
  const x2 = points[c3];
40
- const y2 = points[c3 + 2];
40
+ const y2 = points[c3 + 1];
41
41
  const z2 = points[c3 + 2];
42
42
 
43
43
  const area = tri3_area(x0, y0, z0, x1, y1, z1, x2, y2, z2);
@@ -1,4 +1,9 @@
1
1
  /**
2
+ * Loads a piece-wise cubemap and installs it as the scene's image-based-lighting source.
3
+ *
4
+ * The prefiltering (PMREM) is performed by the graphics engine rather than the loader, so that the
5
+ * engine keeps hold of the source texture and can repeat the bake - the prefiltered result lives in a
6
+ * render target and does not survive a WebGL context loss.
2
7
  *
3
8
  * @param {GraphicsEngine} graphics
4
9
  * @param {string} folder_path
@@ -1 +1 @@
1
- {"version":3,"file":"load_and_set_cubemap_v0.d.ts","sourceRoot":"","sources":["../../../../src/engine/graphics/load_and_set_cubemap_v0.js"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,+EAHW,MAAM,kBACN,MAAM,iBAahB"}
1
+ {"version":3,"file":"load_and_set_cubemap_v0.d.ts","sourceRoot":"","sources":["../../../../src/engine/graphics/load_and_set_cubemap_v0.js"],"names":[],"mappings":"AAIA;;;;;;;;;;GAUG;AACH,+EAHW,MAAM,kBACN,MAAM,iBAYhB"}