@woosh/meep-engine 2.168.1 → 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 (287) 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/asset/loaders/ArrayBufferLoader.d.ts.map +1 -1
  154. package/src/engine/asset/loaders/ArrayBufferLoader.js +7 -0
  155. package/src/engine/ecs/speaker/lines/sets/LineSetDescription.d.ts.map +1 -1
  156. package/src/engine/ecs/speaker/lines/sets/LineSetDescription.js +3 -1
  157. package/src/engine/ecs/terrain/ecs/TerrainSystem.d.ts.map +1 -1
  158. package/src/engine/ecs/terrain/ecs/TerrainSystem.js +4 -1
  159. package/src/engine/ecs/terrain/tiles/TerrainTileManager.d.ts +29 -0
  160. package/src/engine/ecs/terrain/tiles/TerrainTileManager.d.ts.map +1 -1
  161. package/src/engine/ecs/terrain/tiles/TerrainTileManager.js +84 -23
  162. package/src/engine/graphics/CONTEXT_LOSS_RECOVERY_PLAN.md +446 -0
  163. package/src/engine/graphics/GraphicsEngine.d.ts +56 -7
  164. package/src/engine/graphics/GraphicsEngine.d.ts.map +1 -1
  165. package/src/engine/graphics/GraphicsEngine.js +196 -24
  166. package/src/engine/graphics/context/WebGLContextFailureReason.d.ts +9 -0
  167. package/src/engine/graphics/context/WebGLContextFailureReason.d.ts.map +1 -0
  168. package/src/engine/graphics/context/WebGLContextFailureReason.js +17 -0
  169. package/src/engine/graphics/context/WebGLContextMonitor.d.ts +106 -0
  170. package/src/engine/graphics/context/WebGLContextMonitor.d.ts.map +1 -0
  171. package/src/engine/graphics/context/WebGLContextMonitor.js +341 -0
  172. package/src/engine/graphics/context/WebGLContextState.d.ts +14 -0
  173. package/src/engine/graphics/context/WebGLContextState.d.ts.map +1 -0
  174. package/src/engine/graphics/context/WebGLContextState.js +24 -0
  175. package/src/engine/graphics/context/testWebGLContextLoss.d.ts +2 -0
  176. package/src/engine/graphics/context/testWebGLContextLoss.d.ts.map +1 -0
  177. package/src/engine/graphics/context/testWebGLContextLoss.js +696 -0
  178. package/src/engine/graphics/ecs/camera/serialization/CameraSerializationAdapter.d.ts.map +1 -1
  179. package/src/engine/graphics/ecs/camera/serialization/CameraSerializationAdapter.js +68 -32
  180. package/src/engine/graphics/ecs/camera/serialization/CameraSerializationUpgrader_0_1.d.ts +14 -0
  181. package/src/engine/graphics/ecs/camera/serialization/CameraSerializationUpgrader_0_1.d.ts.map +1 -0
  182. package/src/engine/graphics/ecs/camera/serialization/CameraSerializationUpgrader_0_1.js +41 -0
  183. package/src/engine/graphics/ecs/decal/v2/FPDecalSystem.js +1 -1
  184. package/src/engine/graphics/ecs/mesh-v2/ShadedGeometrySystem.d.ts.map +1 -1
  185. package/src/engine/graphics/ecs/mesh-v2/ShadedGeometrySystem.js +5 -0
  186. package/src/engine/graphics/ecs/trail2d/Trail2DSystem.d.ts +1 -1
  187. package/src/engine/graphics/ecs/trail2d/Trail2DSystem.d.ts.map +1 -1
  188. package/src/engine/graphics/ecs/trail2d/Trail2DSystem.js +2 -1
  189. package/src/engine/graphics/ecs/trail3d/Trail3DSystem.d.ts +1 -1
  190. package/src/engine/graphics/ecs/trail3d/Trail3DSystem.d.ts.map +1 -1
  191. package/src/engine/graphics/ecs/trail3d/Trail3DSystem.js +3 -5
  192. package/src/engine/graphics/geometry/MikkT/BuildNeighborsFast.d.ts.map +1 -1
  193. package/src/engine/graphics/geometry/MikkT/BuildNeighborsFast.js +3 -2
  194. package/src/engine/graphics/geometry/MikkT/GenerateSharedVerticesIndexList.d.ts.map +1 -1
  195. package/src/engine/graphics/geometry/MikkT/GenerateSharedVerticesIndexList.js +3 -1
  196. package/src/engine/graphics/geometry/computeMeshSurfaceArea.js +1 -1
  197. package/src/engine/graphics/load_and_set_cubemap_v0.d.ts +5 -0
  198. package/src/engine/graphics/load_and_set_cubemap_v0.d.ts.map +1 -1
  199. package/src/engine/graphics/load_and_set_cubemap_v0.js +26 -21
  200. package/src/engine/graphics/particles/particular/group/ParticleGroup.d.ts.map +1 -1
  201. package/src/engine/graphics/particles/particular/group/ParticleGroup.js +19 -8
  202. package/src/engine/graphics/particles/particular/group/optimizeCommandQueue.js +1 -1
  203. package/src/engine/graphics/texture/atlas/AtlasLookupTexture.d.ts.map +1 -1
  204. package/src/engine/graphics/texture/atlas/AtlasLookupTexture.js +10 -3
  205. package/src/engine/graphics/texture/atlas/TextureAtlas.d.ts.map +1 -1
  206. package/src/engine/graphics/texture/atlas/TextureAtlas.js +4 -1
  207. package/src/engine/graphics/texture/atlas/gpu/WebGLTextureAtlas.d.ts.map +1 -1
  208. package/src/engine/graphics/texture/atlas/gpu/WebGLTextureAtlas.js +11 -0
  209. package/src/engine/graphics/texture/cubemap/load_environment_map.d.ts.map +1 -1
  210. package/src/engine/graphics/texture/cubemap/load_environment_map.js +5 -2
  211. package/src/engine/graphics/texture/sampler/distance/computeSignedDistanceField_Chamfer.d.ts.map +1 -1
  212. package/src/engine/graphics/texture/sampler/distance/computeSignedDistanceField_Chamfer.js +26 -18
  213. package/src/engine/graphics/texture/sampler/filter/sampler2d_blur_gaussian.d.ts +15 -2
  214. package/src/engine/graphics/texture/sampler/filter/sampler2d_blur_gaussian.d.ts.map +1 -1
  215. package/src/engine/graphics/texture/sampler/filter/sampler2d_blur_gaussian.js +29 -3
  216. package/src/engine/graphics/texture/sampler/resize/sampler2d_scale_down_lanczos.d.ts +11 -1
  217. package/src/engine/graphics/texture/sampler/resize/sampler2d_scale_down_lanczos.d.ts.map +1 -1
  218. package/src/engine/graphics/texture/sampler/resize/sampler2d_scale_down_lanczos.js +158 -171
  219. package/src/engine/graphics/texture/sampler/sampler2d_paint.js +1 -1
  220. package/src/engine/graphics/texture/sampler/util/bitSet2Sampler2D.js +2 -2
  221. package/src/engine/input/ecs/util/TopDownCameraControllerHelper.d.ts.map +1 -1
  222. package/src/engine/input/ecs/util/TopDownCameraControllerHelper.js +10 -3
  223. package/src/engine/navigation/ecs/components/PathSerializationUpgrader_2_3.d.ts +14 -0
  224. package/src/engine/navigation/ecs/components/PathSerializationUpgrader_2_3.d.ts.map +1 -0
  225. package/src/engine/navigation/ecs/components/PathSerializationUpgrader_2_3.js +38 -0
  226. package/src/engine/network/orchestrator/ServerAuthoritativeClient.d.ts.map +1 -1
  227. package/src/engine/network/orchestrator/ServerAuthoritativeClient.js +433 -425
  228. package/src/engine/physics/constraint/solve_constraints.d.ts +4 -1
  229. package/src/engine/physics/constraint/solve_constraints.d.ts.map +1 -1
  230. package/src/engine/physics/constraint/solve_constraints.js +38 -13
  231. package/src/engine/physics/contact/ManifoldStore.d.ts +15 -3
  232. package/src/engine/physics/contact/ManifoldStore.d.ts.map +1 -1
  233. package/src/engine/physics/contact/ManifoldStore.js +15 -3
  234. package/src/engine/physics/ecs/Joint.d.ts +7 -4
  235. package/src/engine/physics/ecs/Joint.d.ts.map +1 -1
  236. package/src/engine/physics/ecs/Joint.js +7 -4
  237. package/src/engine/physics/ecs/PhysicsSystem.d.ts +14 -0
  238. package/src/engine/physics/ecs/PhysicsSystem.d.ts.map +1 -1
  239. package/src/engine/physics/ecs/PhysicsSystem.js +16 -0
  240. package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
  241. package/src/engine/physics/fluid/ecs/FluidSystem.d.ts +3 -3
  242. package/src/engine/physics/narrowphase/convex_convex_manifold.d.ts +15 -7
  243. package/src/engine/physics/narrowphase/convex_convex_manifold.d.ts.map +1 -1
  244. package/src/engine/physics/narrowphase/convex_convex_manifold.js +33 -10
  245. package/src/engine/physics/narrowphase/refine_ray_concave.d.ts +6 -2
  246. package/src/engine/physics/narrowphase/refine_ray_concave.d.ts.map +1 -1
  247. package/src/engine/physics/narrowphase/refine_ray_concave.js +6 -2
  248. package/src/engine/physics/narrowphase/refine_ray_hit.d.ts +6 -2
  249. package/src/engine/physics/narrowphase/refine_ray_hit.d.ts.map +1 -1
  250. package/src/engine/physics/narrowphase/refine_ray_hit.js +6 -2
  251. package/src/engine/physics/queries/raycast.d.ts.map +1 -1
  252. package/src/engine/physics/queries/raycast.js +11 -4
  253. package/src/engine/save/storage/IndexedDBStorage.d.ts.map +1 -1
  254. package/src/engine/save/storage/IndexedDBStorage.js +21 -3
  255. package/src/engine/simulation/Ticker.d.ts +12 -0
  256. package/src/engine/simulation/Ticker.d.ts.map +1 -1
  257. package/src/engine/simulation/Ticker.js +18 -0
  258. package/src/engine/sound/simulation/AcousticSimulator.d.ts.map +1 -1
  259. package/src/engine/sound/simulation/AcousticSimulator.js +9 -1
  260. package/src/engine/sound/simulation/core/VolumeField.d.ts +6 -2
  261. package/src/engine/sound/simulation/core/VolumeField.d.ts.map +1 -1
  262. package/src/engine/sound/simulation/core/VolumeField.js +6 -2
  263. package/src/engine/sound/simulation/probe/AcousticProbeField.d.ts +6 -2
  264. package/src/engine/sound/simulation/probe/AcousticProbeField.d.ts.map +1 -1
  265. package/src/engine/sound/simulation/probe/AcousticProbeField.js +6 -2
  266. package/src/engine/sound/simulation/probe/acoustic_probe_transfer.d.ts +6 -2
  267. package/src/engine/sound/simulation/probe/acoustic_probe_transfer.d.ts.map +1 -1
  268. package/src/engine/sound/simulation/probe/acoustic_probe_transfer.js +6 -2
  269. package/src/engine/sound/simulation/probe/bakeProbeReflectors.d.ts +3 -1
  270. package/src/engine/sound/simulation/probe/bakeProbeReflectors.d.ts.map +1 -1
  271. package/src/engine/sound/simulation/probe/bakeProbeReflectors.js +3 -1
  272. package/src/engine/ui/GUIEngine.d.ts.map +1 -1
  273. package/src/engine/ui/GUIEngine.js +8 -1
  274. package/src/generation/theme/TerrainTheme.d.ts.map +1 -1
  275. package/src/generation/theme/TerrainTheme.js +2 -1
  276. package/src/generation/theme/ThemeEngine.d.ts.map +1 -1
  277. package/src/generation/theme/ThemeEngine.js +6 -5
  278. package/src/view/ViewGroup.d.ts.map +1 -1
  279. package/src/view/ViewGroup.js +9 -7
  280. package/src/view/graphics/WebGLContextFailureView.d.ts +19 -0
  281. package/src/view/graphics/WebGLContextFailureView.d.ts.map +1 -0
  282. package/src/view/graphics/WebGLContextFailureView.js +76 -0
  283. package/src/view/minimap/Minimap.d.ts +8 -0
  284. package/src/view/minimap/Minimap.d.ts.map +1 -1
  285. package/src/view/minimap/Minimap.js +16 -3
  286. package/src/view/minimap/dom/MinimapMarkerView.d.ts.map +1 -1
  287. package/src/view/minimap/dom/MinimapMarkerView.js +3 -1
@@ -1,32 +1,68 @@
1
- import { BinaryClassSerializationAdapter } from "../../../../ecs/storage/binary/BinaryClassSerializationAdapter.js";
2
- import { Camera } from "../Camera.js";
3
-
4
- export class CameraSerializationAdapter extends BinaryClassSerializationAdapter {
5
-
6
- klass = Camera;
7
- version = 0;
8
-
9
- /**
10
- *
11
- * @param {BinaryBuffer} buffer
12
- * @param {Camera} value
13
- */
14
- serialize(buffer, value) {
15
- buffer.writeUint8(value.autoClip ? 1 : 0);
16
- value.active.toBinaryBuffer(buffer);
17
-
18
- // TODO serialize hysteresis
19
-
20
- // TODO serialize fov
21
- }
22
-
23
- /**
24
- *
25
- * @param {BinaryBuffer} buffer
26
- * @param {Camera} value
27
- */
28
- deserialize(buffer, value) {
29
- value.autoClip = buffer.readUint8() !== 0;
30
- value.active.fromBinaryBuffer(buffer);
31
- }
32
- }
1
+ import { BinaryClassSerializationAdapter } from "../../../../ecs/storage/binary/BinaryClassSerializationAdapter.js";
2
+ import { Camera } from "../Camera.js";
3
+ import { ProjectionType } from "../ProjectionType.js";
4
+
5
+ /**
6
+ * Projection type is a string enum on the component; on the wire it is an
7
+ * ordinal so the format does not carry text and does not change if the enum is
8
+ * renamed.
9
+ * @type {ProjectionType[]}
10
+ */
11
+ const PROJECTION_ORDINALS = [
12
+ ProjectionType.Perspective,
13
+ ProjectionType.Orthographic
14
+ ];
15
+
16
+ export class CameraSerializationAdapter extends BinaryClassSerializationAdapter {
17
+
18
+ klass = Camera;
19
+ version = 1;
20
+
21
+ /**
22
+ *
23
+ * @param {BinaryBuffer} buffer
24
+ * @param {Camera} value
25
+ */
26
+ serialize(buffer, value) {
27
+ buffer.writeUint8(value.autoClip ? 1 : 0);
28
+ value.active.toBinaryBuffer(buffer);
29
+
30
+ buffer.writeFloat32(value.autoClipHysteresis);
31
+ value.fov.toBinaryBuffer(buffer);
32
+
33
+ buffer.writeFloat64(value.clip_near);
34
+ buffer.writeFloat64(value.clip_far);
35
+
36
+ const projection = PROJECTION_ORDINALS.indexOf(value.projectionType.getValue());
37
+
38
+ if (projection === -1) {
39
+ throw new Error(`Unsupported projection type '${value.projectionType.getValue()}'`);
40
+ }
41
+
42
+ buffer.writeUint8(projection);
43
+ }
44
+
45
+ /**
46
+ *
47
+ * @param {BinaryBuffer} buffer
48
+ * @param {Camera} value
49
+ */
50
+ deserialize(buffer, value) {
51
+ value.autoClip = buffer.readUint8() !== 0;
52
+ value.active.fromBinaryBuffer(buffer);
53
+
54
+ value.autoClipHysteresis = buffer.readFloat32();
55
+ value.fov.fromBinaryBuffer(buffer);
56
+
57
+ value.clip_near = buffer.readFloat64();
58
+ value.clip_far = buffer.readFloat64();
59
+
60
+ const projection = PROJECTION_ORDINALS[buffer.readUint8()];
61
+
62
+ if (projection === undefined) {
63
+ throw new Error(`Unsupported projection type ordinal`);
64
+ }
65
+
66
+ value.projectionType.set(projection);
67
+ }
68
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Version 0 stored only `autoClip` and `active`; field of view, both clip
3
+ * planes, the auto-clip hysteresis and the projection type were never written,
4
+ * so a saved camera came back with a default lens.
5
+ *
6
+ * Version 1 adds them. An older save has no values to carry across, so they are
7
+ * filled from the component's own defaults -- which is what loading a version 0
8
+ * camera already produced, only now the format has somewhere to put them.
9
+ */
10
+ export class CameraSerializationUpgrader_0_1 extends BinaryClassUpgrader {
11
+ upgrade(source: any, target: any): void;
12
+ }
13
+ import { BinaryClassUpgrader } from "../../../../ecs/storage/binary/BinaryClassUpgrader.js";
14
+ //# sourceMappingURL=CameraSerializationUpgrader_0_1.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CameraSerializationUpgrader_0_1.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/ecs/camera/serialization/CameraSerializationUpgrader_0_1.js"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AACH;IAQI,wCAmBC;CACJ;oCAxCmC,uDAAuD"}
@@ -0,0 +1,41 @@
1
+ import { BinaryClassUpgrader } from "../../../../ecs/storage/binary/BinaryClassUpgrader.js";
2
+ import { Camera } from "../Camera.js";
3
+
4
+ /**
5
+ * Version 0 stored only `autoClip` and `active`; field of view, both clip
6
+ * planes, the auto-clip hysteresis and the projection type were never written,
7
+ * so a saved camera came back with a default lens.
8
+ *
9
+ * Version 1 adds them. An older save has no values to carry across, so they are
10
+ * filled from the component's own defaults -- which is what loading a version 0
11
+ * camera already produced, only now the format has somewhere to put them.
12
+ */
13
+ export class CameraSerializationUpgrader_0_1 extends BinaryClassUpgrader {
14
+ constructor() {
15
+ super();
16
+
17
+ this.__startVersion = 0;
18
+ this.__targetVersion = 1;
19
+ }
20
+
21
+ upgrade(source, target) {
22
+ const autoClip = source.readUint8();
23
+
24
+ // `active` is an ObservedBoolean, one byte
25
+ const active = source.readUint8();
26
+
27
+ target.writeUint8(autoClip);
28
+ target.writeUint8(active);
29
+
30
+ const defaults = new Camera();
31
+
32
+ target.writeFloat32(defaults.autoClipHysteresis);
33
+ defaults.fov.toBinaryBuffer(target);
34
+
35
+ target.writeFloat64(defaults.clip_near);
36
+ target.writeFloat64(defaults.clip_far);
37
+
38
+ // ordinal 0 is Perspective, the component default
39
+ target.writeUint8(0);
40
+ }
41
+ }
@@ -213,7 +213,7 @@ class Context extends SystemEntityContext {
213
213
  this.__fp_decal = null;
214
214
 
215
215
  const transform = this.getTransform();
216
- transform.subscribe(this.__update_transform, this);
216
+ transform.unsubscribe(this.__update_transform, this);
217
217
 
218
218
  const decal_spec = this.getDecalComponent();
219
219
 
@@ -1 +1 @@
1
- {"version":3,"file":"ShadedGeometrySystem.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/ecs/mesh-v2/ShadedGeometrySystem.js"],"names":[],"mappings":"AA8DA;IASI;;;OAGG;IACH,4BAmEC;IAjEG,2DAA+C;IAE/C;;;;OAIG;IACH,iBAAsB;IAEtB;;;;OAIG;IACH,uBAA0B;IAE1B;;;;OAIG;IACH,wBAAgC;IAEhC;;;;OAIG;IACH,4BAAoC;IAEpC;;;;OAIG;IACH,kCAA0C;IAE1C;;;;OAIG;IACH,qBAA6B;IAI7B,0BAYE;IAEF,yBAIC;IAIL;;;OAGG;IACH,eAEC;IAED;;;OAGG;IACH,4BAFa,IAAI,MAAM,EAAC,MAAM,CAAC,CAI9B;IAED;;;;OAIG;IACH,+BAHW,MAAM,+CAsBhB;IAED;;;;OAIG;IACH,iCAHW,MAAM,GACL,OAAO,CAmBlB;IAED;;;;OAIG;IACH,4BASC;IAED;;;;OAIG;IACH,8BAMC;IAED,2CAqCC;IAED,4CAcC;IAED;;;;;OAKG;IACH,SAJW,cAAc,KACd,SAAS,UACT,MAAM,QA2ChB;IAED;;;;;OAKG;IACH,WAJW,cAAc,KACd,SAAS,UACT,MAAM,QA4BhB;IAED;;;;;;OAMG;IACH,4BALW,MAAM,EAAE,iBACR,MAAM,UACN,MAAM,EAAE,GAAC,UAAU,MAAM,CAAC,GACxB,MAAM,CAQlB;IAED;;;;;;;;;;;OAWG;IACH,kBAVW,MAAM,YACN,MAAM,YACN,MAAM,eACN,MAAM,eACN,MAAM,eACN,MAAM,uEAGJ;QAAC,MAAM,EAAC,MAAM,CAAC;QAAC,IAAI,EAAC,cAAc,CAAC;QAAC,OAAO,EAAE,aAAa,CAAA;KAAC,EAAE,CA8D1E;IAGD;;;;;;;;;;;;OAYG;IACH,wBAXW,aAAa,YACb,MAAM,YACN,MAAM,YACN,MAAM,eACN,MAAM,eACN,MAAM,eACN,MAAM,uEAGJ;QAAC,MAAM,EAAC,MAAM,CAAC;QAAC,IAAI,EAAC,cAAc,CAAA;KAAC,GAAC,SAAS,CAmF1D;;CACJ;uBAliBsB,wBAAwB;0BACrB,qCAAqC;+BAIhC,qBAAqB;iBATnC,uCAAuC;oBAZpC,mCAAmC;2BAQ5B,yCAAyC;8BAEtC,2CAA2C"}
1
+ {"version":3,"file":"ShadedGeometrySystem.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/ecs/mesh-v2/ShadedGeometrySystem.js"],"names":[],"mappings":"AA8DA;IASI;;;OAGG;IACH,4BAmEC;IAjEG,2DAA+C;IAE/C;;;;OAIG;IACH,iBAAsB;IAEtB;;;;OAIG;IACH,uBAA0B;IAE1B;;;;OAIG;IACH,wBAAgC;IAEhC;;;;OAIG;IACH,4BAAoC;IAEpC;;;;OAIG;IACH,kCAA0C;IAE1C;;;;OAIG;IACH,qBAA6B;IAI7B,0BAYE;IAEF,yBAIC;IAIL;;;OAGG;IACH,eAEC;IAED;;;OAGG;IACH,4BAFa,IAAI,MAAM,EAAC,MAAM,CAAC,CAI9B;IAED;;;;OAIG;IACH,+BAHW,MAAM,+CAsBhB;IAED;;;;OAIG;IACH,iCAHW,MAAM,GACL,OAAO,CAmBlB;IAED;;;;OAIG;IACH,4BASC;IAED;;;;OAIG;IACH,8BAMC;IAED,2CAqCC;IAED,4CAmBC;IAED;;;;;OAKG;IACH,SAJW,cAAc,KACd,SAAS,UACT,MAAM,QA2ChB;IAED;;;;;OAKG;IACH,WAJW,cAAc,KACd,SAAS,UACT,MAAM,QA4BhB;IAED;;;;;;OAMG;IACH,4BALW,MAAM,EAAE,iBACR,MAAM,UACN,MAAM,EAAE,GAAC,UAAU,MAAM,CAAC,GACxB,MAAM,CAQlB;IAED;;;;;;;;;;;OAWG;IACH,kBAVW,MAAM,YACN,MAAM,YACN,MAAM,eACN,MAAM,eACN,MAAM,eACN,MAAM,uEAGJ;QAAC,MAAM,EAAC,MAAM,CAAC;QAAC,IAAI,EAAC,cAAc,CAAC;QAAC,OAAO,EAAE,aAAa,CAAA;KAAC,EAAE,CA8D1E;IAGD;;;;;;;;;;;;OAYG;IACH,wBAXW,aAAa,YACb,MAAM,YACN,MAAM,YACN,MAAM,eACN,MAAM,eACN,MAAM,eACN,MAAM,uEAGJ;QAAC,MAAM,EAAC,MAAM,CAAC;QAAC,IAAI,EAAC,cAAc,CAAA;KAAC,GAAC,SAAS,CAmF1D;;CACJ;uBAviBsB,wBAAwB;0BACrB,qCAAqC;+BAIhC,qBAAqB;iBATnC,uCAAuC;oBAZpC,mCAAmC;2BAQ5B,yCAAyC;8BAEtC,2CAA2C"}
@@ -291,6 +291,11 @@ export class ShadedGeometrySystem extends System {
291
291
  view_list.on.added.remove(this.__handle_view_added, this);
292
292
  view_list.on.removed.remove(this.__handle_view_removed, this);
293
293
 
294
+ // startup registered this layer by name and RenderLayerManager.add
295
+ // throws on a duplicate, so leaving it behind makes the next startup
296
+ // fail outright. Every sibling system releases its layer here.
297
+ graphics.layers.remove(this.__render_layer);
298
+ this.__render_layer = null;
294
299
  }
295
300
 
296
301
  /**
@@ -6,7 +6,7 @@ declare class Trail2DSystem extends System<any> {
6
6
  */
7
7
  constructor(engine: Engine);
8
8
  dependencies: (typeof Transform | typeof Trail2D)[];
9
- components_used: ResourceAccessSpecification<typeof Trail2D>[];
9
+ components_used: (ResourceAccessSpecification<typeof Transform> | ResourceAccessSpecification<typeof Trail2D>)[];
10
10
  /**
11
11
  *
12
12
  * @type {RibbonXFixedPhysicsSimulator}
@@ -1 +1 @@
1
- {"version":3,"file":"Trail2DSystem.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/ecs/trail2d/Trail2DSystem.js"],"names":[],"mappings":";AA0BA;IAkCI;;;OAGG;IACH,4BA4BC;IAjED,oDAAoC;IAEpC,+DAEE;IAEF;;;OAGG;IACH,WAFU,4BAA4B,CAES;IAE/C;;;;OAIG;IACH,wBAAiC;IAGjC;;;;OAIG;IACH,oBAAgB;IAEhB;;;OAGG;IACH,YAAgB;IAcZ;;;;OAIG;IACH,iBAAsB;IAEtB;;;OAGG;IACH,UAFU,cAAc,CAEO;IAE/B;;;OAGG;IACH,aAFU,cAAY,IAAI,CAEH;IAK3B,2CAmBC;IAED,4CAIC;IAED;;;;;OAKG;IACH,sBAsDC;IAED;;;;;OAKG;IACH,YAHW,OAAO,aADP,SAAS,YAET,MAAM,QAahB;IAED;;;;;OAKG;IACH,kBAJW,OAAO,aACP,SAAS,UACT,MAAM,QAShB;IAED;;;;OAIG;IACH,yBAHW,OAAO,aACP,SAAS,QAoCnB;IAED,6BAWC;CACJ;uBAtQsB,wBAAwB;0BACrB,qCAAqC;oBAY3C,cAAc;4CAdU,uDAAuD;6CAYtD,yDAAyD;+BARvE,yBAAyB"}
1
+ {"version":3,"file":"Trail2DSystem.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/ecs/trail2d/Trail2DSystem.js"],"names":[],"mappings":";AA0BA;IAmCI;;;OAGG;IACH,4BA4BC;IAlED,oDAAoC;IAEpC,iHAGE;IAEF;;;OAGG;IACH,WAFU,4BAA4B,CAES;IAE/C;;;;OAIG;IACH,wBAAiC;IAGjC;;;;OAIG;IACH,oBAAgB;IAEhB;;;OAGG;IACH,YAAgB;IAcZ;;;;OAIG;IACH,iBAAsB;IAEtB;;;OAGG;IACH,UAFU,cAAc,CAEO;IAE/B;;;OAGG;IACH,aAFU,cAAY,IAAI,CAEH;IAK3B,2CAmBC;IAED,4CAIC;IAED;;;;;OAKG;IACH,sBAsDC;IAED;;;;;OAKG;IACH,YAHW,OAAO,aADP,SAAS,YAET,MAAM,QAahB;IAED;;;;;OAKG;IACH,kBAJW,OAAO,aACP,SAAS,UACT,MAAM,QAShB;IAED;;;;OAIG;IACH,yBAHW,OAAO,aACP,SAAS,QAoCnB;IAED,6BAWC;CACJ;uBAvQsB,wBAAwB;0BACrB,qCAAqC;oBAY3C,cAAc;4CAdU,uDAAuD;6CAYtD,yDAAyD;+BARvE,yBAAyB"}
@@ -28,7 +28,8 @@ class Trail2DSystem extends System {
28
28
  dependencies = [Trail2D, Transform];
29
29
 
30
30
  components_used = [
31
- ResourceAccessSpecification.from(Trail2D, ResourceAccessKind.Write)
31
+ ResourceAccessSpecification.from(Trail2D, ResourceAccessKind.Write),
32
+ ResourceAccessSpecification.from(Transform, ResourceAccessKind.Read)
32
33
  ];
33
34
 
34
35
  /**
@@ -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":";AAsDA;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;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;uBA/QsB,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"}
@@ -11,11 +11,8 @@ import { Transform } from '../../../ecs/transform/Transform.js';
11
11
  import { Reference } from "../../../reference/v2/Reference.js";
12
12
  import { GraphicsEngine } from "../../GraphicsEngine.js";
13
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
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";
19
16
  import { TubeXPlugin } from "../../trail/tube/TubeXPlugin.js";
20
17
 
21
18
  import Trail3D from './Trail3D.js';
@@ -56,7 +53,8 @@ class Trail3DSystem extends System {
56
53
  dependencies = [Trail3D, Transform];
57
54
 
58
55
  components_used = [
59
- ResourceAccessSpecification.from(Trail3D, ResourceAccessKind.Write)
56
+ ResourceAccessSpecification.from(Trail3D, ResourceAccessKind.Write),
57
+ ResourceAccessSpecification.from(Transform, ResourceAccessKind.Read)
60
58
  ];
61
59
 
62
60
  /**
@@ -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"}
@@ -1,21 +1,26 @@
1
- import { buildCubeURLs } from "./texture/cubemap/buildCubeURLs.js";
2
- import { load_environment_map } from "./texture/cubemap/load_environment_map.js";
3
-
4
- /**
5
- *
6
- * @param {GraphicsEngine} graphics
7
- * @param {string} folder_path
8
- * @param {string} file_extension
9
- */
10
- export async function load_and_set_cubemap_v0(graphics, folder_path, file_extension) {
11
- const paths = buildCubeURLs(folder_path, file_extension);
12
-
13
- const { filtered } = await load_environment_map({
14
- path: paths,
15
- renderer: graphics.renderer,
16
- original: false,
17
- filtered: true
18
- });
19
-
20
- graphics.scene.environment = filtered;
21
- }
1
+ import { EnvironmentTextureProjection } from "./texture/EnvironmentTextureProjection.js";
2
+ import { buildCubeURLs } from "./texture/cubemap/buildCubeURLs.js";
3
+ import { load_environment_map } from "./texture/cubemap/load_environment_map.js";
4
+
5
+ /**
6
+ * Loads a piece-wise cubemap and installs it as the scene's image-based-lighting source.
7
+ *
8
+ * The prefiltering (PMREM) is performed by the graphics engine rather than the loader, so that the
9
+ * engine keeps hold of the source texture and can repeat the bake - the prefiltered result lives in a
10
+ * render target and does not survive a WebGL context loss.
11
+ *
12
+ * @param {GraphicsEngine} graphics
13
+ * @param {string} folder_path
14
+ * @param {string} file_extension
15
+ */
16
+ export async function load_and_set_cubemap_v0(graphics, folder_path, file_extension) {
17
+ const paths = buildCubeURLs(folder_path, file_extension);
18
+
19
+ const { original } = await load_environment_map({
20
+ path: paths,
21
+ original: true,
22
+ filtered: false
23
+ });
24
+
25
+ graphics.set_environment_map(original, EnvironmentTextureProjection.Cube);
26
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"ParticleGroup.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/particles/particular/group/ParticleGroup.js"],"names":[],"mappings":"AAoBA;IACI;;;;;OAKG;IACH,qDAHW,OAAO,EA8CjB;IA1CG,mBAA0B;IAC1B;;;OAGG;IACH,4BAAgB;IAEhB,kBAAoB;IAEpB;;;OAGG;IACH,cAAuC;IAEvC;;;OAGG;IACH,UAAa;IAEb;;;OAGG;IACH,cAAmB;IAEnB,mBAAqB;IACrB,qBAAuB;IAEvB,oCAAqC;IACrC,4BAA8B;IAE9B;;;OAGG;IACH,cAFU,MAAO,SAAS,CAAC,CAEL;IAEtB,sBAAiC;IAKrC;;;;;OAKG;IACH,+BAJW,YAAY,GAAC,YAAY,GAAC,WAAW,GAAC,WAAW,GAAC,UAAU,GAAC,UAAU,GAAC,UAAU,GAAC,SAAS,kBAE1F,wBAAwB,GAAC,eAAe,CAQpD;IAED;;;OAGG;IACH,oBAFa,uBAAuB,GAAC,cAAc,CAUlD;IAED,cAmCC;IAED;;OAEG;IACH,gCAcC;IAED,cASC;IAED;;;OAGG;IACH,UAFa,OAAO,CAanB;IAED,6BAEC;IAED;;;OAGG;IACH,mBAFW,MAAM,QAMhB;IAED;;;OAGG;IACH,UAFa,MAAM,CASlB;IAED;;OAEG;IACH,6BAEC;IAED;;;OAGG;IACH,kCAEC;IAED,uCAIC;IAED;;;;;OAKG;IACH,2DAFW,MAAO,MAAM,CAAC,QAIxB;IAED;;;;;OAKG;IACH,4BAJW,MAAM,kBACN,MAAM,UACN,QAAM,YAAY,GAAC,YAAY,GAAC,UAAU,QAapD;IAED,sEAKC;IAED;;;;OAIG;IACH,wBAHW,MAAM,GACJ,MAAM,CAIlB;IAED,0BAKC;IAED,2CAaC;IAED,8CAkBC;IAED;;;;;OAKG;IACH,2EAFW,MAAM,EAAE,QAclB;IAED;;;;;OAKG;IACH,kFAFW,MAAM,QAahB;IAED;;;;;;;OAOG;IACH,0GAiBC;IAED;;;;;;;;OAQG;IACH,kHAkBC;IAED;;;OAGG;IACH,4BAFW,SAAS,QA+BnB;IAED;;;OAGG;IACH,uBAFW,UAAW,QAgFrB;IAED;;;;OAIG;IACH,4BAHW,MAAM,UACN,MAAM,QAiChB;IAED;;;;OAIG;IACH,aAHW,MAAM,UACN,MAAM,QAahB;IAED;;;OAGG;IACH,0BAKC;IAED,kCAMC;IAED,mCAaC;IAED;;;OAGG;IACH,4BAIC;CACJ;0BA1mByB,gBAAgB;mBAHvB,+BAA+B;yCAD3C,OAAO;gCAAP,OAAO;wCAAP,OAAO;+BAAP,OAAO"}
1
+ {"version":3,"file":"ParticleGroup.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/particles/particular/group/ParticleGroup.js"],"names":[],"mappings":"AAoBA;IACI;;;;;OAKG;IACH,qDAHW,OAAO,EA8CjB;IA1CG,mBAA0B;IAC1B;;;OAGG;IACH,4BAAgB;IAEhB,kBAAoB;IAEpB;;;OAGG;IACH,cAAuC;IAEvC;;;OAGG;IACH,UAAa;IAEb;;;OAGG;IACH,cAAmB;IAEnB,mBAAqB;IACrB,qBAAuB;IAEvB,oCAAqC;IACrC,4BAA8B;IAE9B;;;OAGG;IACH,cAFU,MAAO,SAAS,CAAC,CAEL;IAEtB,sBAAiC;IAKrC;;;;;OAKG;IACH,+BAJW,YAAY,GAAC,YAAY,GAAC,WAAW,GAAC,WAAW,GAAC,UAAU,GAAC,UAAU,GAAC,UAAU,GAAC,SAAS,kBAE1F,wBAAwB,GAAC,eAAe,CAQpD;IAED;;;OAGG;IACH,oBAFa,uBAAuB,GAAC,cAAc,CAUlD;IAED,cAmCC;IAED;;OAEG;IACH,gCAcC;IAED,cASC;IAED;;;OAGG;IACH,UAFa,OAAO,CAanB;IAED,6BAEC;IAED;;;OAGG;IACH,mBAFW,MAAM,QAMhB;IAED;;;OAGG;IACH,UAFa,MAAM,CASlB;IAED;;OAEG;IACH,6BAEC;IAED;;;OAGG;IACH,kCAEC;IAED,uCAIC;IAED;;;;;OAKG;IACH,2DAFW,MAAO,MAAM,CAAC,QAIxB;IAED;;;;;OAKG;IACH,4BAJW,MAAM,kBACN,MAAM,UACN,QAAM,YAAY,GAAC,YAAY,GAAC,UAAU,QAapD;IAED,sEAKC;IAED;;;;OAIG;IACH,wBAHW,MAAM,GACJ,MAAM,CAIlB;IAED,0BAKC;IAED,2CAaC;IAED,8CAkBC;IAED;;;;;OAKG;IACH,2EAFW,MAAM,EAAE,QAclB;IAED;;;;;OAKG;IACH,kFAFW,MAAM,QAahB;IAED;;;;;;;OAOG;IACH,0GAiBC;IAED;;;;;;;;OAQG;IACH,kHAkBC;IAED;;;OAGG;IACH,4BAFW,SAAS,QA+BnB;IAED;;;OAGG;IACH,uBAFW,UAAW,QA2FrB;IAED;;;;OAIG;IACH,4BAHW,MAAM,UACN,MAAM,QAiChB;IAED;;;;OAIG;IACH,aAHW,MAAM,UACN,MAAM,QAahB;IAED;;;OAGG;IACH,0BAKC;IAED,kCAMC;IAED,mCAaC;IAED;;;OAGG;IACH,4BAIC;CACJ;0BArnByB,gBAAgB;mBAHvB,+BAA+B;yCAD3C,OAAO;gCAAP,OAAO;wCAAP,OAAO;+BAAP,OAAO"}
@@ -471,24 +471,35 @@ export class ParticleGroup {
471
471
 
472
472
  let numSwapElements = 0;
473
473
  const swaps = [];
474
- let swapDestination = this.size - 1;
475
474
 
476
475
  let i, j;
477
476
 
478
- for (i = deleteCount - 1; i >= 0; i--) {
477
+ //Compaction: every hole below the new size is backfilled with a live
478
+ //element taken from the tail block that is about to be discarded. Each
479
+ //backfill must consume a *different* source -- reusing one duplicates
480
+ //that particle into several slots and silently drops the others.
481
+ let source = oldSize - 1;
482
+ let tailVictim = deleteCount - 1;
483
+
484
+ for (i = 0; i < deleteCount; i++) {
479
485
  const victim = indices[i];
480
486
 
481
- if (swapDestination === victim) {
482
- swapDestination--;
487
+ if (victim >= newSize) {
488
+ //indices ascend, so this and everything after it already sits
489
+ //inside the discarded tail and needs no backfill
490
+ break;
483
491
  }
484
492
 
485
- if (victim >= newSize) {
486
- //is beyond the end of the new array and will be removed anyway, no need to swap
487
- continue;
493
+ //a tail slot that is itself being deleted is not a live source
494
+ while (tailVictim >= 0 && indices[tailVictim] === source) {
495
+ tailVictim--;
496
+ source--;
488
497
  }
489
498
 
490
- swaps.push(victim, swapDestination);
499
+ swaps.push(victim, source);
491
500
  numSwapElements += 2;
501
+
502
+ source--;
492
503
  }
493
504
 
494
505
 
@@ -140,7 +140,7 @@ export function optimizeCommandQueue(queue) {
140
140
  //it's important that Add and Remove operations are sorted to the front of the queue, before Write operations
141
141
  if (operatorA < operatorB) {
142
142
  return -1;
143
- } else if (operatorB > operatorA) {
143
+ } else if (operatorA > operatorB) {
144
144
  return 1;
145
145
  }
146
146
 
@@ -1 +1 @@
1
- {"version":3,"file":"AtlasLookupTexture.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/texture/atlas/AtlasLookupTexture.js"],"names":[],"mappings":"AAEA;IAEQ;;;OAGG;IACH,OAFU,eAAa,IAAI,CAEV;IAEjB;;;;OAIG;IACH,mBAAoB;IAEpB;;;;OAIG;IACH,eAAgC;IAEhC,qBAAiD;IAUrD;;;OAGG;IACH,kCAEC;IAED,eA0CC;CACJ;4BArFgF,OAAO"}
1
+ {"version":3,"file":"AtlasLookupTexture.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/texture/atlas/AtlasLookupTexture.js"],"names":[],"mappings":"AAEA;IAEQ;;;OAGG;IACH,OAFU,eAAa,IAAI,CAEV;IAEjB;;;;OAIG;IACH,mBAAoB;IAEpB;;;;OAIG;IACH,eAAgC;IAEhC,qBAAiD;IAYrD;;;OAGG;IACH,kCAEC;IAED,eA+CC;CACJ;4BA5FgF,OAAO"}
@@ -29,7 +29,9 @@ export class AtlasLookupTexture {
29
29
  this.texture.magFilter = NearestFilter;
30
30
  this.texture.minFilter = NearestFilter;
31
31
  this.texture.generateMipmaps = false;
32
- this.texture.internalFormat = 'RGB16UI';
32
+ // four channels are written per record, so the internal format has to be
33
+ // the four-channel one to match RGBAIntegerFormat
34
+ this.texture.internalFormat = 'RGBA16UI';
33
35
  }
34
36
 
35
37
  /**
@@ -49,13 +51,18 @@ export class AtlasLookupTexture {
49
51
 
50
52
  const rowSize = this.__row_size;
51
53
 
52
- const expected_row_count = Math.ceil(patch_count / rowSize);
54
+ // at least one row: a zero-height texture is not a valid GL allocation,
55
+ // and an atlas legitimately starts out with no patches
56
+ const expected_row_count = Math.max(1, Math.ceil(patch_count / rowSize));
53
57
 
54
58
  const texture = this.texture;
55
59
 
56
60
  const image = texture.image;
57
61
 
58
- if (image.height < expected_row_count) {
62
+ // the texture starts out 1x1, so a height-only check is satisfied by any
63
+ // patch count that fits in a single row and no storage is ever allocated
64
+ // for it -- writes past the first record are then silently dropped
65
+ if (image.width !== rowSize || image.height < expected_row_count) {
59
66
  texture.dispose();
60
67
 
61
68
  image.height = expected_row_count;
@@ -1 +1 @@
1
- {"version":3,"file":"TextureAtlas.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/texture/atlas/TextureAtlas.js"],"names":[],"mappings":"AAkBA;IACI;;;;;;OAMG;IACH,mBALW,MAAM,cACN,cAAc,kBACd,MAAM,EA2DhB;IAjDG;;;;OAIG;IACH,eAA0B;IAE1B;;;OAGG;IACH,gBAAiB;IAEjB;;;OAGG;IACH,eAFU,OAAO,CAEkB;IAInC;;;;OAIG;IACH,2BAAgH;IAGhH;;;OAGG;IACH,eAAiD;IAEjD;;QAEI;;WAEG;;MAEN;IAED;;;;OAIG;IACH,sBAA0B;IAG9B;;;OAGG;IACH,yBAEC;IAED;;;;OAIG;IACH,kBAHW,SAAS,GACP,UAAU,GAAC,SAAS,CAYhC;IAED;;;OAGG;IACH,eAFa,OAAO,CAInB;IAED;;;;OAIG;IACH,gBAHW,UAAU,GACR,OAAO,CAQnB;IAED;;OAEG;IACH,cAkBC;IAED;;;;;OAKG;IACH,UAJW,MAAM,KACN,MAAM,GACJ,OAAO,CA0CnB;IAED;;;;OAIG;IACH,mBAqBC;IAED;;;;OAIG;IACH,mBAaC;IAED;;;;;;OAMG;IACH,kBAIC;IAED;;;;;OAKG;IACH,aAJW,SAAS,YACT,MAAM,GACL,UAAU,CAgCrB;IAED;;;;;OAKG;IACH,YAJW,MAAM,KACN,MAAM,GACJ,OAAO,CAInB;IAED;;;;OAIG;IACH,cAHW,UAAU,GACT,OAAO,CAiClB;IAED;;;OAGG;IACH,UAFa,OAAO,CAsBnB;IAED;;;;OAIG;IACH,aAqGC;IAED;;OAEG;IACH,cA6BC;IAsDD;;OAEG;IACH,cAQC;CACJ;qCAtjBoC,2BAA2B;oBAN5C,kCAAkC;mBAFnC,0CAA0C;0BAMnC,yBAAyB;2BAGxB,iBAAiB;+BAbb,gDAAgD"}
1
+ {"version":3,"file":"TextureAtlas.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/texture/atlas/TextureAtlas.js"],"names":[],"mappings":"AAkBA;IACI;;;;;;OAMG;IACH,mBALW,MAAM,cACN,cAAc,kBACd,MAAM,EA2DhB;IAjDG;;;;OAIG;IACH,eAA0B;IAE1B;;;OAGG;IACH,gBAAiB;IAEjB;;;OAGG;IACH,eAFU,OAAO,CAEkB;IAInC;;;;OAIG;IACH,2BAAgH;IAGhH;;;OAGG;IACH,eAAiD;IAEjD;;QAEI;;WAEG;;MAEN;IAED;;;;OAIG;IACH,sBAA0B;IAG9B;;;OAGG;IACH,yBAEC;IAED;;;;OAIG;IACH,kBAHW,SAAS,GACP,UAAU,GAAC,SAAS,CAYhC;IAED;;;OAGG;IACH,eAFa,OAAO,CAInB;IAED;;;;OAIG;IACH,gBAHW,UAAU,GACR,OAAO,CAQnB;IAED;;OAEG;IACH,cAkBC;IAED;;;;;OAKG;IACH,UAJW,MAAM,KACN,MAAM,GACJ,OAAO,CA0CnB;IAED;;;;OAIG;IACH,mBAqBC;IAED;;;;OAIG;IACH,mBAaC;IAED;;;;;;OAMG;IACH,kBAIC;IAED;;;;;OAKG;IACH,aAJW,SAAS,YACT,MAAM,GACL,UAAU,CAgCrB;IAED;;;;;OAKG;IACH,YAJW,MAAM,KACN,MAAM,GACJ,OAAO,CAInB;IAED;;;;OAIG;IACH,cAHW,UAAU,GACT,OAAO,CAiClB;IAED;;;OAGG;IACH,UAFa,OAAO,CAyBnB;IAED;;;;OAIG;IACH,aAqGC;IAED;;OAEG;IACH,cA6BC;IAsDD;;OAEG;IACH,cAQC;CACJ;qCAzjBoC,2BAA2B;oBAN5C,kCAAkC;mBAFnC,0CAA0C;0BAMnC,yBAAyB;2BAGxB,iBAAiB;+BAbb,gDAAgD"}
@@ -359,7 +359,10 @@ export class TextureAtlas extends AbstractTextureAtlas {
359
359
  const patch = patches[i];
360
360
 
361
361
  if (patch.getFlag(AtlasPatchFlag.Packed)) {
362
- patch.clearFlag(AtlasPatchFlag.Packed | AtlasPatchFlag.Packed);
362
+ // repacking moves patches, so whatever is painted at the old
363
+ // position is stale -- clearing Painted is what schedules the
364
+ // repaint at the new one
365
+ patch.clearFlag(AtlasPatchFlag.Packed | AtlasPatchFlag.Painted);
363
366
 
364
367
  this.packer.remove(patch.packing);
365
368
  }
@@ -1 +1 @@
1
- {"version":3,"file":"WebGLTextureAtlas.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/texture/atlas/gpu/WebGLTextureAtlas.js"],"names":[],"mappings":"AAeA;IACI;;;;;;;;OAgEC;IAvDG;;;;OAIG;IACH,kBAAmB;IAEnB;;;;OAIG;IACH,kBAAmB;IAEnB;;;;OAIG;IACH,cAAyB;IAEzB;;;;OAIG;IACH,gBAAgB;IAEhB;;;;OAIG;IACH,iBAAiB;IAEjB;;;;OAIG;IACH,qBAAqB;IAErB;;;;OAIG;IACH,mBAAuB;IAEvB;;;;OAIG;IACH,kBAAsK;IAG1K;;;;;;;;;OASG;IACH,+BAPW,MAAM,YACN,MAAM,gBACN,MAAM,iBACN,MAAM,gBACN,MAAM,iBACN,MAAM,cAiBhB;IAED,eAqCC;IAED;;;;OAIG;IACH,qCA0BC;CACJ;2BAvK0B,kBAAkB"}
1
+ {"version":3,"file":"WebGLTextureAtlas.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/texture/atlas/gpu/WebGLTextureAtlas.js"],"names":[],"mappings":"AAeA;IACI;;;;;;;;OAgEC;IAvDG;;;;OAIG;IACH,kBAAmB;IAEnB;;;;OAIG;IACH,kBAAmB;IAEnB;;;;OAIG;IACH,cAAyB;IAEzB;;;;OAIG;IACH,gBAAgB;IAEhB;;;;OAIG;IACH,iBAAiB;IAEjB;;;;OAIG;IACH,qBAAqB;IAErB;;;;OAIG;IACH,mBAAuB;IAEvB;;;;OAIG;IACH,kBAAsK;IAG1K;;;;;;;;;OASG;IACH,+BAPW,MAAM,YACN,MAAM,gBACN,MAAM,iBACN,MAAM,gBACN,MAAM,iBACN,MAAM,cAuBhB;IAED,eA0CC;IAED;;;;OAIG;IACH,qCA0BC;CACJ;2BAlL0B,kBAAkB"}
@@ -96,6 +96,12 @@ export class WebGLTextureAtlas {
96
96
  const patch = new AtlasPatch();
97
97
  patch.id = id;
98
98
 
99
+ // layout() packs `patch.packing`, so the target dimensions have to be
100
+ // recorded here or every patch is a zero-sized rectangle at the origin
101
+ // and they all pack on top of one another
102
+ patch.size.set(target_width, target_height);
103
+ patch.packing.set(0, 0, target_width, target_height);
104
+
99
105
  this.__patches.push(patch);
100
106
  this.__sources[id] = source;
101
107
 
@@ -143,6 +149,11 @@ export class WebGLTextureAtlas {
143
149
  const patch = this.__patches[i];
144
150
 
145
151
  patch.packing.copy(aabb);
152
+
153
+ // build() paints through patch.position, so the packed origin has
154
+ // to land there too -- otherwise every patch is copied to (0,0)
155
+ // no matter where the packer placed it
156
+ patch.position.set(aabb.x0, aabb.y0);
146
157
  });
147
158
  }
148
159
 
@@ -1 +1 @@
1
- {"version":3,"file":"load_environment_map.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/texture/cubemap/load_environment_map.js"],"names":[],"mappings":"AA8EA;;;;;;;GAOG;AACH,6EANW,MAAM,GAAC,MAAM,EAAE,GAIb;IAAC,QAAQ,CAAC,EAAC,MAAM,WAAW,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,WAAW,CAAA;CAAC,CA8EvE"}
1
+ {"version":3,"file":"load_environment_map.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/texture/cubemap/load_environment_map.js"],"names":[],"mappings":"AAiFA;;;;;;;GAOG;AACH,6EANW,MAAM,GAAC,MAAM,EAAE,GAIb;IAAC,QAAQ,CAAC,EAAC,MAAM,WAAW,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,WAAW,CAAA;CAAC,CA8EvE"}
@@ -1,4 +1,4 @@
1
- import { CubeTextureLoader, LinearFilter, PMREMGenerator, sRGBEncoding, TextureLoader, UnsignedByteType } from "three";
1
+ import { CubeTextureLoader, LinearFilter, PMREMGenerator, sRGBEncoding, TextureLoader } from "three";
2
2
  import { EXRLoader } from "three/examples/jsm/loaders/EXRLoader.js";
3
3
  import { HDRCubeTextureLoader } from "three/examples/jsm/loaders/HDRCubeTextureLoader.js";
4
4
  import { noop } from "../../../../core/function/noop.js";
@@ -53,8 +53,11 @@ function load_hdr_cube_texture(paths) {
53
53
  */
54
54
  function load_exr_texture(path) {
55
55
  return new Promise((resolve, reject) => {
56
+ // EXR is HDR data; EXRLoader only decodes into FloatType or HalfFloatType
57
+ // and defaults to HalfFloatType. Requesting UnsignedByteType left the
58
+ // decoder without an output buffer, so every .exr environment map failed
59
+ // to load. Match load_hdr_cube_texture and take the loader's default.
56
60
  new EXRLoader()
57
- .setDataType(UnsignedByteType)
58
61
  .load(path, texture => {
59
62
  resolve(texture);
60
63
  }, noop, reject);
@@ -1 +1 @@
1
- {"version":3,"file":"computeSignedDistanceField_Chamfer.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/texture/sampler/distance/computeSignedDistanceField_Chamfer.js"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AACH,4GALW,MAAM,MACN,MAAM,MACN,MAAM,mBAkIhB"}
1
+ {"version":3,"file":"computeSignedDistanceField_Chamfer.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/texture/sampler/distance/computeSignedDistanceField_Chamfer.js"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AACH,4GALW,MAAM,MACN,MAAM,MACN,MAAM,mBA0IhB"}