@woosh/meep-engine 2.164.0 → 2.165.1

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 (451) hide show
  1. package/README.md +137 -108
  2. package/build/bundle-worker-image-decoder.js +1 -1
  3. package/build/bundle-worker-terrain.js +1 -1
  4. package/package.json +1 -1
  5. package/samples/generation/SampleGenerator0.js +3 -3
  6. package/samples/generation/filters/SampleGroundMoistureFilter.js +63 -56
  7. package/samples/generation/filters/SampleNoise20_0.js +6 -1
  8. package/samples/generation/themes/SampleTheme0.js +47 -47
  9. package/src/core/binary/BitImage2.d.ts +91 -0
  10. package/src/core/binary/BitImage2.d.ts.map +1 -0
  11. package/src/core/binary/BitImage2.js +242 -0
  12. package/src/core/color/YCoCg/rgb_to_ycocg.d.ts +17 -0
  13. package/src/core/color/YCoCg/rgb_to_ycocg.d.ts.map +1 -0
  14. package/src/core/color/YCoCg/rgb_to_ycocg.js +20 -0
  15. package/src/core/color/YCoCg/ycocg_to_rgb.d.ts +14 -0
  16. package/src/core/color/YCoCg/ycocg_to_rgb.d.ts.map +1 -0
  17. package/src/core/color/YCoCg/ycocg_to_rgb.js +17 -0
  18. package/src/core/geom/2d/oriented-box/min_area_rect_2d.d.ts +22 -0
  19. package/src/core/geom/2d/oriented-box/min_area_rect_2d.d.ts.map +1 -0
  20. package/src/core/geom/2d/oriented-box/min_area_rect_2d.js +69 -0
  21. package/src/core/geom/2d/packing/skyline.d.ts +116 -0
  22. package/src/core/geom/2d/packing/skyline.d.ts.map +1 -0
  23. package/src/core/geom/2d/packing/skyline.js +258 -0
  24. package/src/core/geom/2d/triangle/tri2_rasterize_conservative.d.ts +18 -0
  25. package/src/core/geom/2d/triangle/tri2_rasterize_conservative.d.ts.map +1 -0
  26. package/src/core/geom/2d/triangle/tri2_rasterize_conservative.js +86 -0
  27. package/src/core/geom/3d/atlas/ATLAS_PORT_PLAN.md +486 -0
  28. package/src/core/geom/3d/atlas/BFF_PLAN.md +174 -0
  29. package/src/core/geom/3d/atlas/Chart.d.ts +58 -0
  30. package/src/core/geom/3d/atlas/Chart.d.ts.map +1 -0
  31. package/src/core/geom/3d/atlas/Chart.js +77 -0
  32. package/src/core/geom/3d/atlas/REVIEW_02.md +392 -0
  33. package/src/core/geom/3d/atlas/atlas_bench_lib.d.ts +73 -0
  34. package/src/core/geom/3d/atlas/atlas_bench_lib.d.ts.map +1 -0
  35. package/src/core/geom/3d/atlas/atlas_bench_lib.js +315 -0
  36. package/src/core/geom/3d/atlas/atlas_chart_type.d.ts +17 -0
  37. package/src/core/geom/3d/atlas/atlas_chart_type.d.ts.map +1 -0
  38. package/src/core/geom/3d/atlas/atlas_chart_type.js +16 -0
  39. package/src/core/geom/3d/atlas/atlas_compute_charts.d.ts +25 -0
  40. package/src/core/geom/3d/atlas/atlas_compute_charts.d.ts.map +1 -0
  41. package/src/core/geom/3d/atlas/atlas_compute_charts.js +188 -0
  42. package/src/core/geom/3d/atlas/atlas_extract_chart.d.ts +17 -0
  43. package/src/core/geom/3d/atlas/atlas_extract_chart.d.ts.map +1 -0
  44. package/src/core/geom/3d/atlas/atlas_extract_chart.js +107 -0
  45. package/src/core/geom/3d/atlas/atlas_generate.d.ts +39 -0
  46. package/src/core/geom/3d/atlas/atlas_generate.d.ts.map +1 -0
  47. package/src/core/geom/3d/atlas/atlas_generate.js +43 -0
  48. package/src/core/geom/3d/atlas/atlas_test_fixtures.d.ts +84 -0
  49. package/src/core/geom/3d/atlas/atlas_test_fixtures.d.ts.map +1 -0
  50. package/src/core/geom/3d/atlas/atlas_test_fixtures.js +266 -0
  51. package/src/core/geom/3d/atlas/atlas_write_chart_uvs.d.ts +25 -0
  52. package/src/core/geom/3d/atlas/atlas_write_chart_uvs.d.ts.map +1 -0
  53. package/src/core/geom/3d/atlas/atlas_write_chart_uvs.js +36 -0
  54. package/src/core/geom/3d/atlas/data/atlas_build_edge_dihedrals.d.ts +22 -0
  55. package/src/core/geom/3d/atlas/data/atlas_build_edge_dihedrals.d.ts.map +1 -0
  56. package/src/core/geom/3d/atlas/data/atlas_build_edge_dihedrals.js +62 -0
  57. package/src/core/geom/3d/atlas/data/atlas_build_edge_lengths.d.ts +9 -0
  58. package/src/core/geom/3d/atlas/data/atlas_build_edge_lengths.d.ts.map +1 -0
  59. package/src/core/geom/3d/atlas/data/atlas_build_edge_lengths.js +33 -0
  60. package/src/core/geom/3d/atlas/data/atlas_build_face_areas.d.ts +9 -0
  61. package/src/core/geom/3d/atlas/data/atlas_build_face_areas.d.ts.map +1 -0
  62. package/src/core/geom/3d/atlas/data/atlas_build_face_areas.js +50 -0
  63. package/src/core/geom/3d/atlas/io/atlas_mesh_weld_colocals.d.ts +27 -0
  64. package/src/core/geom/3d/atlas/io/atlas_mesh_weld_colocals.d.ts.map +1 -0
  65. package/src/core/geom/3d/atlas/io/atlas_mesh_weld_colocals.js +39 -0
  66. package/src/core/geom/3d/atlas/io/bt_loop_uv.d.ts +22 -0
  67. package/src/core/geom/3d/atlas/io/bt_loop_uv.d.ts.map +1 -0
  68. package/src/core/geom/3d/atlas/io/bt_loop_uv.js +57 -0
  69. package/src/core/geom/3d/atlas/pack/ChartPlacement.d.ts +36 -0
  70. package/src/core/geom/3d/atlas/pack/ChartPlacement.d.ts.map +1 -0
  71. package/src/core/geom/3d/atlas/pack/ChartPlacement.js +46 -0
  72. package/src/core/geom/3d/atlas/pack/atlas_pack_charts.d.ts +62 -0
  73. package/src/core/geom/3d/atlas/pack/atlas_pack_charts.d.ts.map +1 -0
  74. package/src/core/geom/3d/atlas/pack/atlas_pack_charts.js +551 -0
  75. package/src/core/geom/3d/atlas/param/atlas_chart_param_validity.d.ts +22 -0
  76. package/src/core/geom/3d/atlas/param/atlas_chart_param_validity.d.ts.map +1 -0
  77. package/src/core/geom/3d/atlas/param/atlas_chart_param_validity.js +73 -0
  78. package/src/core/geom/3d/atlas/param/atlas_chart_parameterize_bff.d.ts +37 -0
  79. package/src/core/geom/3d/atlas/param/atlas_chart_parameterize_bff.d.ts.map +1 -0
  80. package/src/core/geom/3d/atlas/param/atlas_chart_parameterize_bff.js +270 -0
  81. package/src/core/geom/3d/atlas/param/atlas_chart_parameterize_lscm.d.ts +23 -0
  82. package/src/core/geom/3d/atlas/param/atlas_chart_parameterize_lscm.d.ts.map +1 -0
  83. package/src/core/geom/3d/atlas/param/atlas_chart_parameterize_lscm.js +224 -0
  84. package/src/core/geom/3d/atlas/param/atlas_chart_parameterize_ortho.d.ts +14 -0
  85. package/src/core/geom/3d/atlas/param/atlas_chart_parameterize_ortho.d.ts.map +1 -0
  86. package/src/core/geom/3d/atlas/param/atlas_chart_parameterize_ortho.js +38 -0
  87. package/src/core/geom/3d/atlas/param/atlas_chart_stretch_metric.d.ts +22 -0
  88. package/src/core/geom/3d/atlas/param/atlas_chart_stretch_metric.d.ts.map +1 -0
  89. package/src/core/geom/3d/atlas/param/atlas_chart_stretch_metric.js +86 -0
  90. package/src/core/geom/3d/atlas/param/atlas_piecewise_resegment.d.ts +20 -0
  91. package/src/core/geom/3d/atlas/param/atlas_piecewise_resegment.d.ts.map +1 -0
  92. package/src/core/geom/3d/atlas/param/atlas_piecewise_resegment.js +183 -0
  93. package/src/core/geom/3d/atlas/param/fit_plane_basis.d.ts +27 -0
  94. package/src/core/geom/3d/atlas/param/fit_plane_basis.d.ts.map +1 -0
  95. package/src/core/geom/3d/atlas/param/fit_plane_basis.js +66 -0
  96. package/src/core/geom/3d/atlas/segment/RegionGraph.d.ts +31 -0
  97. package/src/core/geom/3d/atlas/segment/RegionGraph.d.ts.map +1 -0
  98. package/src/core/geom/3d/atlas/segment/RegionGraph.js +40 -0
  99. package/src/core/geom/3d/atlas/segment/atlas_build_region_graph.d.ts +23 -0
  100. package/src/core/geom/3d/atlas/segment/atlas_build_region_graph.d.ts.map +1 -0
  101. package/src/core/geom/3d/atlas/segment/atlas_build_region_graph.js +136 -0
  102. package/src/core/geom/3d/atlas/segment/atlas_compute_planar_regions.d.ts +24 -0
  103. package/src/core/geom/3d/atlas/segment/atlas_compute_planar_regions.d.ts.map +1 -0
  104. package/src/core/geom/3d/atlas/segment/atlas_compute_planar_regions.js +77 -0
  105. package/src/core/geom/3d/atlas/segment/atlas_merge_charts.d.ts +27 -0
  106. package/src/core/geom/3d/atlas/segment/atlas_merge_charts.d.ts.map +1 -0
  107. package/src/core/geom/3d/atlas/segment/atlas_merge_charts.js +113 -0
  108. package/src/core/geom/3d/atlas/segment/atlas_segment_charts.d.ts +44 -0
  109. package/src/core/geom/3d/atlas/segment/atlas_segment_charts.d.ts.map +1 -0
  110. package/src/core/geom/3d/atlas/segment/atlas_segment_charts.js +275 -0
  111. package/src/core/geom/3d/atlas/segment/atlas_segment_charts_atomic.d.ts +22 -0
  112. package/src/core/geom/3d/atlas/segment/atlas_segment_charts_atomic.d.ts.map +1 -0
  113. package/src/core/geom/3d/atlas/segment/atlas_segment_charts_atomic.js +199 -0
  114. package/src/core/geom/3d/line/line3_compute_point_segment_point_distance_unfolded.d.ts +32 -0
  115. package/src/core/geom/3d/line/line3_compute_point_segment_point_distance_unfolded.d.ts.map +1 -0
  116. package/src/core/geom/3d/line/line3_compute_point_segment_point_distance_unfolded.js +64 -0
  117. package/src/core/geom/3d/mat4/m4_from_rotation_translation_scale.d.ts +20 -0
  118. package/src/core/geom/3d/mat4/m4_from_rotation_translation_scale.d.ts.map +1 -0
  119. package/src/core/geom/3d/mat4/m4_from_rotation_translation_scale.js +66 -0
  120. package/src/core/geom/3d/sphere/harmonics/sh3_dering_optimize_positive.d.ts.map +1 -1
  121. package/src/core/geom/3d/sphere/harmonics/sh3_dering_optimize_positive.js +13 -11
  122. package/src/core/geom/3d/sphere/sphere_compute_bounding_of_2_spheres.d.ts.map +1 -1
  123. package/src/core/geom/3d/sphere/sphere_compute_bounding_of_2_spheres.js +4 -3
  124. package/src/core/geom/3d/topology/simplify/decimate_edge_collapse_snap.d.ts.map +1 -1
  125. package/src/core/geom/3d/topology/simplify/decimate_edge_collapse_snap.js +4 -3
  126. package/src/core/geom/3d/topology/simplify/quadratic/Quadric3.d.ts.map +1 -1
  127. package/src/core/geom/3d/topology/simplify/quadratic/Quadric3.js +4 -3
  128. package/src/core/geom/3d/topology/simplify/quadratic/apply_border_penalty_to_vertex_quadrics.d.ts.map +1 -1
  129. package/src/core/geom/3d/topology/simplify/quadratic/apply_border_penalty_to_vertex_quadrics.js +10 -6
  130. package/src/core/geom/3d/topology/struct/TopoMesh.js +2 -2
  131. package/src/core/geom/3d/topology/struct/TopoTriangle.d.ts +0 -2
  132. package/src/core/geom/3d/topology/struct/TopoTriangle.d.ts.map +1 -1
  133. package/src/core/geom/3d/topology/struct/TopoTriangle.js +2 -2
  134. package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_face_find_path_polyanya.d.ts.map +1 -1
  135. package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_face_find_path_polyanya.js +8 -27
  136. package/src/core/geom/vec3/v3_cotangent.d.ts +20 -0
  137. package/src/core/geom/vec3/v3_cotangent.d.ts.map +1 -0
  138. package/src/core/geom/vec3/v3_cotangent.js +29 -0
  139. package/src/core/geom/vec3/v3_matrix3_multiply.d.ts +19 -0
  140. package/src/core/geom/vec3/v3_matrix3_multiply.d.ts.map +1 -0
  141. package/src/core/geom/vec3/v3_matrix3_multiply.js +30 -0
  142. package/src/core/geom/vec3/v3_multiply.d.ts +16 -0
  143. package/src/core/geom/vec3/v3_multiply.d.ts.map +1 -0
  144. package/src/core/geom/vec3/v3_multiply.js +19 -0
  145. package/src/core/math/linalg/cg/cg_solve.d.ts +24 -0
  146. package/src/core/math/linalg/cg/cg_solve.d.ts.map +1 -0
  147. package/src/core/math/linalg/cg/cg_solve.js +106 -0
  148. package/src/core/math/linalg/cg/cg_solve_normal_equations.d.ts +21 -0
  149. package/src/core/math/linalg/cg/cg_solve_normal_equations.d.ts.map +1 -0
  150. package/src/core/math/linalg/cg/cg_solve_normal_equations.js +59 -0
  151. package/src/core/math/linalg/eigen/matrix_symmetric_3x3_eigen.d.ts +19 -0
  152. package/src/core/math/linalg/eigen/matrix_symmetric_3x3_eigen.d.ts.map +1 -0
  153. package/src/core/math/linalg/eigen/matrix_symmetric_3x3_eigen.js +117 -0
  154. package/src/core/math/linalg/sparse/SparseMatrixCSR.d.ts +50 -0
  155. package/src/core/math/linalg/sparse/SparseMatrixCSR.d.ts.map +1 -0
  156. package/src/core/math/linalg/sparse/SparseMatrixCSR.js +88 -0
  157. package/src/core/math/linalg/sparse/spm_matvec.d.ts +9 -0
  158. package/src/core/math/linalg/sparse/spm_matvec.d.ts.map +1 -0
  159. package/src/core/math/linalg/sparse/spm_matvec.js +22 -0
  160. package/src/core/math/linalg/sparse/spm_matvec_transpose.d.ts +12 -0
  161. package/src/core/math/linalg/sparse/spm_matvec_transpose.d.ts.map +1 -0
  162. package/src/core/math/linalg/sparse/spm_matvec_transpose.js +29 -0
  163. package/src/core/math/physics/mie/MIE_PARTICLES_STANDARD_PRECOMPUTED.d.ts +39 -0
  164. package/src/core/math/physics/mie/MIE_PARTICLES_STANDARD_PRECOMPUTED.js +22 -1
  165. package/src/core/math/physics/mie/compute_mie_particle_properties_rgb.d.ts.map +1 -1
  166. package/src/core/math/physics/mie/compute_mie_particle_properties_rgb.js +32 -9
  167. package/src/core/math/physics/mie/compute_mie_phase.d.ts +2 -3
  168. package/src/core/math/physics/mie/compute_mie_phase.d.ts.map +1 -1
  169. package/src/core/math/physics/mie/compute_mie_phase.js +1 -3
  170. package/src/core/math/physics/mie/lorenz_mie_coefs.d.ts +0 -1
  171. package/src/core/math/physics/mie/lorenz_mie_coefs.d.ts.map +1 -1
  172. package/src/core/math/physics/mie/lorenz_mie_coefs.js +0 -7
  173. package/src/engine/REVIEW_2026_07_03.md +211 -0
  174. package/src/engine/animation/curve/actionProcessorOperations/curveActions.d.ts.map +1 -1
  175. package/src/engine/animation/curve/actionProcessorOperations/curveActions.js +3 -2
  176. package/src/engine/animation/curve/compression/sample_animation_curve_to_float_array.js +1 -1
  177. package/src/engine/animation/keyed2/AnimationTrackPlayback.d.ts.map +1 -1
  178. package/src/engine/animation/keyed2/AnimationTrackPlayback.js +3 -1
  179. package/src/engine/asset/loaders/image/png/filter/png_filter_unFilterNone.js +2 -2
  180. package/src/engine/asset/preloader/AssetPreloader.d.ts.map +1 -1
  181. package/src/engine/asset/preloader/AssetPreloader.js +6 -0
  182. package/src/engine/control/first-person/sensors/FirstPersonSensorsSystem.d.ts.map +1 -1
  183. package/src/engine/control/first-person/sensors/FirstPersonSensorsSystem.js +5 -2
  184. package/src/engine/ecs/Entity.js +1 -1
  185. package/src/engine/ecs/EntityComponentDataset.d.ts.map +1 -1
  186. package/src/engine/ecs/EntityComponentDataset.js +1 -0
  187. package/src/engine/ecs/EntityManager.js +1 -1
  188. package/src/engine/ecs/EntityObserver.js +1 -1
  189. package/src/engine/ecs/animation/AnimationClip.js +1 -1
  190. package/src/engine/ecs/attachment/AttachmentSystem.js +2 -2
  191. package/src/engine/ecs/attachment/TransformAttachmentBinding.d.ts.map +1 -1
  192. package/src/engine/ecs/attachment/TransformAttachmentBinding.js +14 -3
  193. package/src/engine/ecs/fow/FogOfWar.js +2 -2
  194. package/src/engine/ecs/fow/shader/screenSpaceFogOfWarShader.d.ts.map +1 -1
  195. package/src/engine/ecs/fow/shader/screenSpaceFogOfWarShader.js +8 -0
  196. package/src/engine/ecs/gui/hud/HeadsUpDisplaySystem.js +3 -3
  197. package/src/engine/ecs/gui/position/ViewportPosition.d.ts +3 -1
  198. package/src/engine/ecs/gui/position/ViewportPosition.d.ts.map +1 -1
  199. package/src/engine/ecs/gui/position/ViewportPosition.js +4 -1
  200. package/src/engine/ecs/storage/binary/BinarySerializationRegistry.d.ts +10 -0
  201. package/src/engine/ecs/storage/binary/BinarySerializationRegistry.d.ts.map +1 -1
  202. package/src/engine/ecs/storage/binary/BinarySerializationRegistry.js +43 -0
  203. package/src/engine/ecs/storage/binary/object-v2/BinaryObjectDeSerializer.d.ts +93 -0
  204. package/src/engine/ecs/storage/binary/object-v2/BinaryObjectDeSerializer.d.ts.map +1 -0
  205. package/src/engine/ecs/storage/binary/object-v2/BinaryObjectDeSerializer.js +315 -0
  206. package/src/engine/ecs/storage/binary/object-v2/BinaryObjectSerializer.d.ts +48 -0
  207. package/src/engine/ecs/storage/binary/object-v2/BinaryObjectSerializer.d.ts.map +1 -0
  208. package/src/engine/ecs/storage/binary/object-v2/BinaryObjectSerializer.js +331 -0
  209. package/src/engine/ecs/storage/binary/object-v2/DESIGN.md +199 -0
  210. package/src/engine/ecs/storage/binary/object-v2/ObjectBinaryFormat.d.ts +53 -0
  211. package/src/engine/ecs/storage/binary/object-v2/ObjectBinaryFormat.d.ts.map +1 -0
  212. package/src/engine/ecs/storage/binary/object-v2/ObjectBinaryFormat.js +57 -0
  213. package/src/engine/ecs/storage/binary/object-v2/ObjectSerializationAdapter.d.ts +53 -0
  214. package/src/engine/ecs/storage/binary/object-v2/ObjectSerializationAdapter.d.ts.map +1 -0
  215. package/src/engine/ecs/storage/binary/object-v2/ObjectSerializationAdapter.js +56 -0
  216. package/src/engine/ecs/storage/binary/object-v2/README.md +110 -0
  217. package/src/engine/ecs/storage/binary/object-v2/objectStringCodec.d.ts +13 -0
  218. package/src/engine/ecs/storage/binary/object-v2/objectStringCodec.d.ts.map +1 -0
  219. package/src/engine/ecs/storage/binary/object-v2/objectStringCodec.js +48 -0
  220. package/src/engine/ecs/storage/binary/object-v2/serializerTestHarness.d.ts +29 -0
  221. package/src/engine/ecs/storage/binary/object-v2/serializerTestHarness.d.ts.map +1 -0
  222. package/src/engine/ecs/storage/binary/object-v2/serializerTestHarness.js +44 -0
  223. package/src/engine/ecs/terrain/ecs/Terrain.d.ts.map +1 -1
  224. package/src/engine/ecs/terrain/ecs/Terrain.js +4 -3
  225. package/src/engine/ecs/terrain/tiles/TerrainTile.js +2 -2
  226. package/src/engine/ecs/terrain/tiles/TerrainTileManager.d.ts.map +1 -1
  227. package/src/engine/ecs/terrain/tiles/TerrainTileManager.js +9 -8
  228. package/src/engine/graphics/GraphicsEngine.d.ts.map +1 -1
  229. package/src/engine/graphics/GraphicsEngine.js +2 -1
  230. package/src/engine/graphics/camera/makeScreenScissorFrustum.d.ts.map +1 -1
  231. package/src/engine/graphics/camera/makeScreenScissorFrustum.js +11 -10
  232. package/src/engine/graphics/canvas/canvas2d_draw_linear_scale.d.ts.map +1 -1
  233. package/src/engine/graphics/canvas/canvas2d_draw_linear_scale.js +3 -1
  234. package/src/engine/graphics/ecs/animation/animator/graph/definition/serialization/readAnimationGraphDefinitionFromJSON.d.ts +1 -1
  235. package/src/engine/graphics/ecs/animation/animator/graph/definition/serialization/readAnimationGraphDefinitionFromJSON.d.ts.map +1 -1
  236. package/src/engine/graphics/ecs/animation/animator/graph/definition/serialization/readAnimationGraphDefinitionFromJSON.js +2 -2
  237. package/src/engine/graphics/ecs/animation/animator/graph/definition/serialization/writeAnimationGraphDefinitionToJSON.d.ts.map +1 -1
  238. package/src/engine/graphics/ecs/animation/animator/graph/definition/serialization/writeAnimationGraphDefinitionToJSON.js +2 -0
  239. package/src/engine/graphics/ecs/camera/Camera.d.ts.map +1 -1
  240. package/src/engine/graphics/ecs/camera/Camera.js +4 -0
  241. package/src/engine/graphics/ecs/camera/auto_set_camera_clipping_planes.d.ts.map +1 -1
  242. package/src/engine/graphics/ecs/camera/auto_set_camera_clipping_planes.js +7 -2
  243. package/src/engine/graphics/ecs/camera/set_camera_aspect_ratio.js +1 -1
  244. package/src/engine/graphics/ecs/decal/v2/FPDecalSystem.js +2 -2
  245. package/src/engine/graphics/ecs/decal/v2/prototypeDecalSystem.js +2 -2
  246. package/src/engine/graphics/ecs/highlight/system/ShadedGeometryHighlightSystem.d.ts.map +1 -1
  247. package/src/engine/graphics/ecs/highlight/system/ShadedGeometryHighlightSystem.js +4 -1
  248. package/src/engine/graphics/ecs/light/binding/LightBinding.js +2 -2
  249. package/src/engine/graphics/ecs/mesh/MeshSystem.js +1 -1
  250. package/src/engine/graphics/ecs/mesh/SkeletonUtils.js +1 -1
  251. package/src/engine/graphics/ecs/mesh-v2/ShadedGeometry.js +2 -2
  252. package/src/engine/graphics/ecs/mesh-v2/ShadedGeometrySystem.d.ts.map +1 -1
  253. package/src/engine/graphics/ecs/mesh-v2/ShadedGeometrySystem.js +0 -1
  254. package/src/engine/graphics/ecs/mesh-v2/sg_hierarchy_compute_bounding_box_via_parent_entity.js +1 -1
  255. package/src/engine/graphics/ecs/path/tube/build/computeFrenetFrames.d.ts.map +1 -1
  256. package/src/engine/graphics/ecs/path/tube/build/computeFrenetFrames.js +8 -7
  257. package/src/engine/graphics/ecs/water/WaterSystem.d.ts +6 -0
  258. package/src/engine/graphics/ecs/water/WaterSystem.d.ts.map +1 -1
  259. package/src/engine/graphics/ecs/water/WaterSystem.js +12 -1
  260. package/src/engine/graphics/geometry/MikkT/AvgTSpace.d.ts.map +1 -1
  261. package/src/engine/graphics/geometry/MikkT/AvgTSpace.js +11 -6
  262. package/src/engine/graphics/geometry/MikkT/BuildNeighborsFast.d.ts.map +1 -1
  263. package/src/engine/graphics/geometry/MikkT/BuildNeighborsFast.js +2 -3
  264. package/src/engine/graphics/geometry/MikkT/CalcTexArea.d.ts.map +1 -1
  265. package/src/engine/graphics/geometry/MikkT/CalcTexArea.js +3 -4
  266. package/src/engine/graphics/geometry/MikkT/DegenEpilogue.js +4 -4
  267. package/src/engine/graphics/geometry/MikkT/EvalTspace.d.ts.map +1 -1
  268. package/src/engine/graphics/geometry/MikkT/EvalTspace.js +11 -8
  269. package/src/engine/graphics/geometry/MikkT/GenerateSharedVerticesIndexList.d.ts.map +1 -1
  270. package/src/engine/graphics/geometry/MikkT/GenerateSharedVerticesIndexList.js +7 -8
  271. package/src/engine/graphics/geometry/MikkT/GenerateTSpaces.js +8 -8
  272. package/src/engine/graphics/geometry/MikkT/InitTriInfo.d.ts.map +1 -1
  273. package/src/engine/graphics/geometry/MikkT/InitTriInfo.js +30 -25
  274. package/src/engine/graphics/geometry/MikkT/MikkTSpace.js +7 -7
  275. package/src/engine/graphics/geometry/MikkT/NormalizeSafe.d.ts +0 -1
  276. package/src/engine/graphics/geometry/MikkT/NormalizeSafe.d.ts.map +1 -1
  277. package/src/engine/graphics/geometry/MikkT/NormalizeSafe.js +6 -4
  278. package/src/engine/graphics/geometry/MikkT/STSpace.d.ts +0 -2
  279. package/src/engine/graphics/geometry/MikkT/STSpace.d.ts.map +1 -1
  280. package/src/engine/graphics/geometry/MikkT/STSpace.js +3 -3
  281. package/src/engine/graphics/geometry/MikkT/v3_scale_dot_sub_normalize.d.ts +0 -2
  282. package/src/engine/graphics/geometry/MikkT/v3_scale_dot_sub_normalize.d.ts.map +1 -1
  283. package/src/engine/graphics/geometry/MikkT/v3_scale_dot_sub_normalize.js +0 -1
  284. package/src/engine/graphics/geometry/buffered/ensureGeometryBoundingSphere.js +1 -1
  285. package/src/engine/graphics/geometry/buffered/query/bvh32_geometry_nearest.d.ts.map +1 -1
  286. package/src/engine/graphics/geometry/buffered/query/bvh32_geometry_nearest.js +0 -15
  287. package/src/engine/graphics/geometry/instancing/InstancedMeshGroup.js +10 -10
  288. package/src/engine/graphics/geometry/optimization/merge/merge_geometry_hierarchy.js +1 -1
  289. package/src/engine/graphics/impostors/octahedral/ImpostorBaker.d.ts +0 -2
  290. package/src/engine/graphics/impostors/octahedral/ImpostorBaker.d.ts.map +1 -1
  291. package/src/engine/graphics/impostors/octahedral/ImpostorBaker.js +4 -3
  292. package/src/engine/graphics/impostors/octahedral/grid/HemiOctahedralUvEncoder.js +2 -2
  293. package/src/engine/graphics/impostors/octahedral/grid/UvEncoder.d.ts +17 -7
  294. package/src/engine/graphics/impostors/voxel/VoxelImpostorBaker.js +2 -2
  295. package/src/engine/graphics/material/SplatMaterial.js +1 -1
  296. package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitter.d.ts.map +1 -1
  297. package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitter.js +3 -2
  298. package/src/engine/graphics/particles/particular/engine/emitter/ParticlePool.js +1 -1
  299. package/src/engine/graphics/particles/particular/engine/utils/volume/ParticleVolume.js +3 -3
  300. package/src/engine/graphics/particles/particular/engine/utils/volume/prototypeParticleVolume.js +4 -3
  301. package/src/engine/graphics/particles/particular/group/ParticleGroup.d.ts.map +1 -1
  302. package/src/engine/graphics/particles/particular/group/ParticleGroup.js +3 -2
  303. package/src/engine/graphics/render/forward_plus/LightManager.js +2 -2
  304. package/src/engine/graphics/render/forward_plus/model/Decal.d.ts +0 -2
  305. package/src/engine/graphics/render/forward_plus/model/Decal.d.ts.map +1 -1
  306. package/src/engine/graphics/render/forward_plus/model/Decal.js +3 -3
  307. package/src/engine/graphics/render/forward_plus/plugin/ForwardPlusRenderingPlugin.js +1 -1
  308. package/src/engine/graphics/render/forward_plus/prototype/prototypeLightManager.js +4 -3
  309. package/src/engine/graphics/render/visibility/hiz/prototypeHiZ.js +6 -4
  310. package/src/engine/graphics/sh3/gi/material/MaterialTransformer.d.ts +1 -8
  311. package/src/engine/graphics/sh3/gi/material/MaterialTransformer.d.ts.map +1 -1
  312. package/src/engine/graphics/sh3/gi/material/MaterialTransformer.js +2 -14
  313. package/src/engine/graphics/sh3/gi/material/ProbeResolutionStage.d.ts +9 -0
  314. package/src/engine/graphics/sh3/gi/material/ProbeResolutionStage.d.ts.map +1 -0
  315. package/src/engine/graphics/sh3/gi/material/ProbeResolutionStage.js +14 -0
  316. package/src/engine/graphics/sh3/lightmap/ARTIFACTS_PLAN.md +146 -0
  317. package/src/engine/graphics/sh3/lightmap/CODE_REVIEW.md +121 -0
  318. package/src/engine/graphics/sh3/lightmap/LIGHTMAPPER_REVIEW.md +183 -0
  319. package/src/engine/graphics/sh3/lightmap/bake_lightmap_for_scene.d.ts +90 -0
  320. package/src/engine/graphics/sh3/lightmap/bake_lightmap_for_scene.d.ts.map +1 -0
  321. package/src/engine/graphics/sh3/lightmap/bake_lightmap_for_scene.js +681 -0
  322. package/src/engine/graphics/sh3/lightmap/lightmap_build_geometry.d.ts +32 -0
  323. package/src/engine/graphics/sh3/lightmap/lightmap_build_geometry.d.ts.map +1 -0
  324. package/src/engine/graphics/sh3/lightmap/lightmap_build_geometry.js +155 -0
  325. package/src/engine/graphics/sh3/lightmap/lightmap_denoise.d.ts +49 -0
  326. package/src/engine/graphics/sh3/lightmap/lightmap_denoise.d.ts.map +1 -0
  327. package/src/engine/graphics/sh3/lightmap/lightmap_denoise.js +136 -0
  328. package/src/engine/graphics/sh3/lightmap/lightmap_dilate.d.ts +19 -0
  329. package/src/engine/graphics/sh3/lightmap/lightmap_dilate.d.ts.map +1 -0
  330. package/src/engine/graphics/sh3/lightmap/lightmap_dilate.js +89 -0
  331. package/src/engine/graphics/sh3/lightmap/lightmap_gather.d.ts +54 -0
  332. package/src/engine/graphics/sh3/lightmap/lightmap_gather.d.ts.map +1 -0
  333. package/src/engine/graphics/sh3/lightmap/lightmap_gather.js +168 -0
  334. package/src/engine/graphics/sh3/lightmap/lightmap_rasterize_triangle.d.ts +30 -0
  335. package/src/engine/graphics/sh3/lightmap/lightmap_rasterize_triangle.d.ts.map +1 -0
  336. package/src/engine/graphics/sh3/lightmap/lightmap_rasterize_triangle.js +145 -0
  337. package/src/engine/graphics/sh3/lightmap/lightmap_seam_fix.d.ts +38 -0
  338. package/src/engine/graphics/sh3/lightmap/lightmap_seam_fix.d.ts.map +1 -0
  339. package/src/engine/graphics/sh3/lightmap/lightmap_seam_fix.js +152 -0
  340. package/src/engine/graphics/sh3/lightmap/prototypeLightmapBaker.d.ts +2 -0
  341. package/src/engine/graphics/sh3/lightmap/prototypeLightmapBaker.d.ts.map +1 -0
  342. package/src/engine/graphics/sh3/lightmap/prototypeLightmapBaker.js +186 -0
  343. package/src/engine/graphics/sh3/lpg/LightProbeGrid.d.ts +69 -0
  344. package/src/engine/graphics/sh3/lpg/LightProbeGrid.d.ts.map +1 -0
  345. package/src/engine/graphics/sh3/lpg/LightProbeGrid.js +173 -0
  346. package/src/engine/graphics/sh3/lpg/LightProbeGridBaker.d.ts +24 -0
  347. package/src/engine/graphics/sh3/lpg/LightProbeGridBaker.d.ts.map +1 -0
  348. package/src/engine/graphics/sh3/lpg/LightProbeGridBaker.js +88 -0
  349. package/src/engine/graphics/sh3/lpg/build_light_probe_grid_for_scene.d.ts +20 -0
  350. package/src/engine/graphics/sh3/lpg/build_light_probe_grid_for_scene.d.ts.map +1 -0
  351. package/src/engine/graphics/sh3/lpg/build_light_probe_grid_for_scene.js +79 -0
  352. package/src/engine/graphics/sh3/lpg/light_probe_grid_obtain_storage_cached.d.ts +11 -0
  353. package/src/engine/graphics/sh3/lpg/light_probe_grid_obtain_storage_cached.d.ts.map +1 -0
  354. package/src/engine/graphics/sh3/lpg/light_probe_grid_obtain_storage_cached.js +84 -0
  355. package/src/engine/graphics/sh3/lpg/light_probe_grid_textures.d.ts +29 -0
  356. package/src/engine/graphics/sh3/lpg/light_probe_grid_textures.d.ts.map +1 -0
  357. package/src/engine/graphics/sh3/lpg/light_probe_grid_textures.js +160 -0
  358. package/src/engine/graphics/sh3/lpg/material/LightProbeGridMaterialTransformer.d.ts +23 -0
  359. package/src/engine/graphics/sh3/lpg/material/LightProbeGridMaterialTransformer.d.ts.map +1 -0
  360. package/src/engine/graphics/sh3/lpg/material/LightProbeGridMaterialTransformer.js +228 -0
  361. package/src/engine/graphics/sh3/lpg/material/chunk_lpg_get_irradiance_at.d.ts +2 -0
  362. package/src/engine/graphics/sh3/lpg/material/chunk_lpg_get_irradiance_at.d.ts.map +1 -0
  363. package/src/engine/graphics/sh3/lpg/material/chunk_lpg_get_irradiance_at.js +24 -0
  364. package/src/engine/graphics/sh3/lpg/material/common.d.ts +3 -0
  365. package/src/engine/graphics/sh3/lpg/material/common.d.ts.map +1 -0
  366. package/src/engine/graphics/sh3/lpg/material/common.js +73 -0
  367. package/src/engine/graphics/sh3/lpg/material/space_fragment/build_fragment_shader.d.ts +6 -0
  368. package/src/engine/graphics/sh3/lpg/material/space_fragment/build_fragment_shader.d.ts.map +1 -0
  369. package/src/engine/graphics/sh3/lpg/material/space_fragment/build_fragment_shader.js +42 -0
  370. package/src/engine/graphics/sh3/lpg/material/space_fragment/build_vertex_shader.d.ts +6 -0
  371. package/src/engine/graphics/sh3/lpg/material/space_fragment/build_vertex_shader.d.ts.map +1 -0
  372. package/src/engine/graphics/sh3/lpg/material/space_fragment/build_vertex_shader.js +49 -0
  373. package/src/engine/graphics/sh3/lpg/material/space_fragment/space_fragment_transform_shader.d.ts +9 -0
  374. package/src/engine/graphics/sh3/lpg/material/space_fragment/space_fragment_transform_shader.d.ts.map +1 -0
  375. package/src/engine/graphics/sh3/lpg/material/space_fragment/space_fragment_transform_shader.js +12 -0
  376. package/src/engine/graphics/sh3/lpg/material/space_vertex/build_fragment_shader.d.ts +6 -0
  377. package/src/engine/graphics/sh3/lpg/material/space_vertex/build_fragment_shader.d.ts.map +1 -0
  378. package/src/engine/graphics/sh3/lpg/material/space_vertex/build_fragment_shader.js +30 -0
  379. package/src/engine/graphics/sh3/lpg/material/space_vertex/build_vertex_shader.d.ts +6 -0
  380. package/src/engine/graphics/sh3/lpg/material/space_vertex/build_vertex_shader.d.ts.map +1 -0
  381. package/src/engine/graphics/sh3/lpg/material/space_vertex/build_vertex_shader.js +41 -0
  382. package/src/engine/graphics/sh3/lpg/material/space_vertex/preamble.frag.d.ts +3 -0
  383. package/src/engine/graphics/sh3/lpg/material/space_vertex/preamble.frag.d.ts.map +1 -0
  384. package/src/engine/graphics/sh3/lpg/material/space_vertex/preamble.frag.js +15 -0
  385. package/src/engine/graphics/sh3/lpg/material/space_vertex/preamble.vert.d.ts +3 -0
  386. package/src/engine/graphics/sh3/lpg/material/space_vertex/preamble.vert.d.ts.map +1 -0
  387. package/src/engine/graphics/sh3/lpg/material/space_vertex/preamble.vert.js +9 -0
  388. package/src/engine/graphics/sh3/lpg/material/space_vertex/space_vertex_transform_shader.d.ts +9 -0
  389. package/src/engine/graphics/sh3/lpg/material/space_vertex/space_vertex_transform_shader.d.ts.map +1 -0
  390. package/src/engine/graphics/sh3/lpg/material/space_vertex/space_vertex_transform_shader.js +12 -0
  391. package/src/engine/graphics/sh3/lpg/serialization/LightProbeGridSerializationAdapter.d.ts +20 -0
  392. package/src/engine/graphics/sh3/lpg/serialization/LightProbeGridSerializationAdapter.d.ts.map +1 -0
  393. package/src/engine/graphics/sh3/lpg/serialization/LightProbeGridSerializationAdapter.js +59 -0
  394. package/src/engine/graphics/sh3/path_tracer/PathTracedMesh.d.ts.map +1 -1
  395. package/src/engine/graphics/sh3/path_tracer/PathTracedMesh.js +2 -2
  396. package/src/engine/graphics/sh3/path_tracer/PathTracer.js +2 -2
  397. package/src/engine/graphics/sh3/path_tracer/material/MaterialConverter.d.ts.map +1 -1
  398. package/src/engine/graphics/sh3/path_tracer/material/MaterialConverter.js +8 -0
  399. package/src/engine/graphics/sh3/path_tracer/prepare_scene_gltf.d.ts.map +1 -1
  400. package/src/engine/graphics/sh3/path_tracer/prepare_scene_gltf.js +6 -4
  401. package/src/engine/graphics/sh3/path_tracer/prototypePathTracer.js +3 -3
  402. package/src/engine/graphics/sh3/path_tracer/texture/sample_material.d.ts.map +1 -1
  403. package/src/engine/graphics/sh3/path_tracer/texture/sample_material.js +5 -4
  404. package/src/engine/graphics/sh3/prototypeLightProbeGrid.d.ts +2 -0
  405. package/src/engine/graphics/sh3/prototypeLightProbeGrid.d.ts.map +1 -0
  406. package/src/engine/graphics/sh3/prototypeLightProbeGrid.js +170 -0
  407. package/src/engine/graphics/sh3/sky/hosek/prototype_hosek.js +2 -2
  408. package/src/engine/graphics/texture/atlas/AtlasLookupTexture.js +1 -1
  409. package/src/engine/graphics/texture/atlas/CachingTextureAtlas.js +1 -1
  410. package/src/engine/graphics/texture/sampler/resize/sampler2d_scale_down_lanczos.js +1 -1
  411. package/src/engine/graphics/texture/sampler/sampler2d_copy_with_margins.js +3 -3
  412. package/src/engine/graphics/util/build_max_height_pyramid.d.ts.map +1 -1
  413. package/src/engine/graphics/util/build_max_height_pyramid.js +5 -2
  414. package/src/engine/grid/transform2grid/Transform2GridPositionSystem.js +1 -1
  415. package/src/engine/input/devices/KeyboardDevice.d.ts +61 -14
  416. package/src/engine/input/devices/KeyboardDevice.d.ts.map +1 -1
  417. package/src/engine/input/devices/KeyboardDevice.js +41 -15
  418. package/src/engine/input/devices/isHTMLElementFocusable.d.ts.map +1 -1
  419. package/src/engine/input/devices/isHTMLElementFocusable.js +2 -9
  420. package/src/engine/input/ecs/components/InputBinding.d.ts +7 -1
  421. package/src/engine/input/ecs/components/InputBinding.d.ts.map +1 -1
  422. package/src/engine/input/ecs/components/InputBinding.js +8 -1
  423. package/src/engine/input/ecs/systems/InputControllerSystem.js +1 -1
  424. package/src/engine/intelligence/behavior/decorator/OverrideContextBehavior.d.ts +2 -1
  425. package/src/engine/intelligence/behavior/decorator/OverrideContextBehavior.d.ts.map +1 -1
  426. package/src/engine/intelligence/behavior/decorator/OverrideContextBehavior.js +6 -2
  427. package/src/engine/intelligence/behavior/selector/WeightedElement.js +1 -1
  428. package/src/engine/knowledge/database/StaticKnowledgeDatabase.d.ts.map +1 -1
  429. package/src/engine/knowledge/database/StaticKnowledgeDatabase.js +2 -4
  430. package/src/engine/logging/elastic/ElasticSearchLogger.d.ts +1 -2
  431. package/src/engine/logging/elastic/ElasticSearchLogger.d.ts.map +1 -1
  432. package/src/engine/logging/elastic/ElasticSearchLogger.js +14 -10
  433. package/src/engine/navigation/ecs/path_following/PathFollower.js +1 -1
  434. package/src/engine/navigation/grid/find_path_on_grid_astar.d.ts.map +1 -1
  435. package/src/engine/navigation/grid/find_path_on_grid_astar.js +5 -2
  436. package/src/engine/network/orchestrator/ServerAuthoritativeServer.d.ts +1 -1
  437. package/src/engine/network/orchestrator/ServerAuthoritativeServer.d.ts.map +1 -1
  438. package/src/engine/network/orchestrator/ServerAuthoritativeServer.js +17 -0
  439. package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
  440. package/src/engine/physics/fluid/ecs/FluidSystem.d.ts +3 -3
  441. package/src/engine/scene/SceneManager.d.ts.map +1 -1
  442. package/src/engine/scene/SceneManager.js +4 -2
  443. package/src/engine/simulation/Ticker.d.ts.map +1 -1
  444. package/src/engine/simulation/Ticker.js +9 -0
  445. package/src/engine/sound/ecs/emitter/SoundEmitterSystem.d.ts.map +1 -1
  446. package/src/engine/sound/ecs/emitter/SoundEmitterSystem.js +6 -1
  447. package/src/engine/sound/material/concrete/json/serializeSoundMaterialToJSON.js +1 -1
  448. package/src/engine/sound/simulation/prototypeAcousticSolver.js +261 -143
  449. package/src/generation/theme/ThemeEngine.d.ts +9 -0
  450. package/src/generation/theme/ThemeEngine.d.ts.map +1 -1
  451. package/src/generation/theme/ThemeEngine.js +37 -2
@@ -1,4 +1,4 @@
1
- import { vec3 } from "gl-matrix";
1
+ import { v3_equals_array } from "../../../../core/geom/vec3/v3_equals_array.js";
2
2
  import { v3_allocate } from "../../../../core/geom/vec3/v3_allocate.js";
3
3
  import { DEG_TO_RAD } from "../../../../core/math/DEG_TO_RAD.js";
4
4
  import { Build4RuleGroups } from "./Build4RuleGroups.js";
@@ -194,9 +194,9 @@ export function genTangSpace(pContext, fAngularThreshold = 180) {
194
194
  const iTotTris = iNrTrianglesIn;
195
195
  let iDegenTriangles = 0;
196
196
 
197
- const p0 = vec3.create();
198
- const p1 = vec3.create();
199
- const p2 = vec3.create();
197
+ const p0 = new Float32Array(3);
198
+ const p1 = new Float32Array(3);
199
+ const p2 = new Float32Array(3);
200
200
 
201
201
  for (let t = 0; t < iTotTris; t++) {
202
202
 
@@ -211,9 +211,9 @@ export function genTangSpace(pContext, fAngularThreshold = 180) {
211
211
  GetPosition(p2, 0, pContext, i2);
212
212
 
213
213
  if (
214
- vec3.exactEquals(p0, p1) ||
215
- vec3.exactEquals(p0, p2) ||
216
- vec3.exactEquals(p1, p2)
214
+ v3_equals_array(p0, 0, p1, 0) ||
215
+ v3_equals_array(p0, 0, p2, 0) ||
216
+ v3_equals_array(p1, 0, p2, 0)
217
217
  ) {
218
218
  // degenerate
219
219
  pTriInfos[t].iFlag |= MARK_DEGENERATE;
@@ -4,5 +4,4 @@
4
4
  * @param {vec3} input
5
5
  */
6
6
  export function NormalizeSafe(out: vec3, input: vec3): void;
7
- import { vec3 } from "gl-matrix";
8
7
  //# sourceMappingURL=NormalizeSafe.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"NormalizeSafe.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/geometry/MikkT/NormalizeSafe.js"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,mCAHW,IAAI,SACJ,IAAI,QAcd;qBAnBoB,WAAW"}
1
+ {"version":3,"file":"NormalizeSafe.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/geometry/MikkT/NormalizeSafe.js"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,4DAYC"}
@@ -1,4 +1,6 @@
1
- import { vec3 } from "gl-matrix";
1
+ import { v3_length } from "../../../../core/geom/vec3/v3_length.js";
2
+ import { v3_scale } from "../../../../core/geom/vec3/v3_scale.js";
3
+ import { v3_copy_array } from "../../../../core/geom/vec3/v3_copy_array.js";
2
4
 
3
5
  /**
4
6
  *
@@ -7,14 +9,14 @@ import { vec3 } from "gl-matrix";
7
9
  */
8
10
  export function NormalizeSafe(out, input) {
9
11
 
10
- const len = vec3.length(input);
12
+ const len = v3_length(input[0], input[1], input[2]);
11
13
 
12
14
  if (len !== 0) {
13
15
  const m = 1 / len;
14
16
 
15
- vec3.scale(out, input, m)
17
+ v3_scale(out, 0, input[0], input[1], input[2], m);
16
18
 
17
19
  } else {
18
- vec3.copy(out, input);
20
+ v3_copy_array(out, 0, input, 0);
19
21
  }
20
22
  }
@@ -1,4 +1,3 @@
1
- /// <reference types="gl-matrix/index.js" />
2
1
  export class STSpace {
3
2
  /**
4
3
  *
@@ -20,5 +19,4 @@ export class STSpace {
20
19
  */
21
20
  copy(other: STSpace): void;
22
21
  }
23
- import { vec3 } from "gl-matrix";
24
22
  //# sourceMappingURL=STSpace.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"STSpace.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/geometry/MikkT/STSpace.js"],"names":[],"mappings":";AAGA;IACI;;;OAGG;IACH,KAFU,IAAI,GAAC,YAAY,CAEP;IACpB;;;OAGG;IACH,KAFU,IAAI,GAAC,YAAY,CAEP;IAEpB,cAAU;IACV,cAAU;IAEV,iBAAa;IACb,iBAAgB;IAEhB;;;OAGG;IACH,YAFW,OAAO,QASjB;CACJ;qBAjCoB,WAAW"}
1
+ {"version":3,"file":"STSpace.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/geometry/MikkT/STSpace.js"],"names":[],"mappings":"AAGA;IACI;;;OAGG;IACH,KAFU,OAAK,YAAY,CAEP;IACpB;;;OAGG;IACH,KAFU,OAAK,YAAY,CAEP;IAEpB,cAAU;IACV,cAAU;IAEV,iBAAa;IACb,iBAAgB;IAEhB;;;OAGG;IACH,YAFW,OAAO,QASjB;CACJ"}
@@ -1,5 +1,5 @@
1
- import { vec3 } from "gl-matrix";
2
1
  import { v3_allocate } from "../../../../core/geom/vec3/v3_allocate.js";
2
+ import { v3_copy_array } from "../../../../core/geom/vec3/v3_copy_array.js";
3
3
 
4
4
  export class STSpace {
5
5
  /**
@@ -24,9 +24,9 @@ export class STSpace {
24
24
  * @param {STSpace} other
25
25
  */
26
26
  copy(other) {
27
- vec3.copy(this.vOs, other.vOs);
27
+ v3_copy_array(this.vOs, 0, other.vOs, 0);
28
28
  this.fMagS = other.fMagS;
29
- vec3.copy(this.vOt, other.vOt);
29
+ v3_copy_array(this.vOt, 0, other.vOt, 0);
30
30
  this.fMagT = other.fMagT;
31
31
  this.iCounter = other.iCounter;
32
32
  this.bOrient = other.bOrient;
@@ -1,4 +1,3 @@
1
- /// <reference types="gl-matrix/index.js" />
2
1
  /**
3
2
  * executes following formula: v1 - v0*( dot(v0,v1) )
4
3
  * @param {vec3} out
@@ -6,5 +5,4 @@
6
5
  * @param {vec3} v1
7
6
  */
8
7
  export function v3_scale_dot_sub_normalize(out: vec3, v0: vec3, v1: vec3): void;
9
- import { vec3 } from "gl-matrix";
10
8
  //# sourceMappingURL=v3_scale_dot_sub_normalize.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"v3_scale_dot_sub_normalize.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/geometry/MikkT/v3_scale_dot_sub_normalize.js"],"names":[],"mappings":";AAIA;;;;;GAKG;AACH,gDAJW,IAAI,MACJ,IAAI,MACJ,IAAI,QA2Cd;qBAnDoB,WAAW"}
1
+ {"version":3,"file":"v3_scale_dot_sub_normalize.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/geometry/MikkT/v3_scale_dot_sub_normalize.js"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,gFAyCC"}
@@ -1,4 +1,3 @@
1
- import { vec3 } from "gl-matrix";
2
1
  import { v3_length } from "../../../../core/geom/vec3/v3_length.js";
3
2
  import { v3_dot } from "../../../../core/geom/vec3/v3_dot.js";
4
3
 
@@ -12,7 +12,7 @@ export function ensureGeometryBoundingSphere(geometry) {
12
12
  if (boundingSphere === null || boundingSphere === undefined) {
13
13
  //build up bounding sphere
14
14
  const vector4 = computeGeometryBoundingSphereMiniball(geometry);
15
- geometry.boundingSphere = new ThreeSphere(new ThreeVector3(vector4.x, vector4.y, vector4.z), vector4.w);
15
+ boundingSphere = geometry.boundingSphere = new ThreeSphere(new ThreeVector3(vector4.x, vector4.y, vector4.z), vector4.w);
16
16
  }
17
17
 
18
18
  return boundingSphere;
@@ -1 +1 @@
1
- {"version":3,"file":"bvh32_geometry_nearest.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/geometry/buffered/query/bvh32_geometry_nearest.js"],"names":[],"mappings":"AAoBA;;;;;;;;;;;;;;;GAeG;AACH,8FAXW,MAAM,EAAE,GAAC,UAAU,MAAM,CAAC,iBAC1B,MAAM,iBACN,MAAM,0BACN,OAAO,WACP,MAAM,EAAE,GAAC,UAAU,MAAM,CAAC,GAAC,SAAS,KACpC,MAAM,KACN,MAAM,KACN,MAAM,iBACN,MAAM,GACJ,OAAO,CAmOnB"}
1
+ {"version":3,"file":"bvh32_geometry_nearest.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/geometry/buffered/query/bvh32_geometry_nearest.js"],"names":[],"mappings":"AAoBA;;;;;;;;;;;;;;;GAeG;AACH,8FAXW,MAAM,EAAE,GAAC,UAAU,MAAM,CAAC,iBAC1B,MAAM,iBACN,MAAM,0BACN,OAAO,WACP,MAAM,EAAE,GAAC,UAAU,MAAM,CAAC,GAAC,SAAS,KACpC,MAAM,KACN,MAAM,KACN,MAAM,iBACN,MAAM,GACJ,OAAO,CAoNnB"}
@@ -200,21 +200,6 @@ export function bvh32_geometry_nearest(
200
200
  cz = typed_array_value_denormalize(cz, vertices);
201
201
  }
202
202
 
203
- // denormalize if necessary
204
- if (vertex_data_normalized) {
205
- ax = typed_array_value_denormalize(ax, vertices);
206
- ay = typed_array_value_denormalize(ay, vertices);
207
- az = typed_array_value_denormalize(az, vertices);
208
-
209
- bx = typed_array_value_denormalize(bx, vertices);
210
- by = typed_array_value_denormalize(by, vertices);
211
- bz = typed_array_value_denormalize(bz, vertices);
212
-
213
- cx = typed_array_value_denormalize(cx, vertices);
214
- cy = typed_array_value_denormalize(cy, vertices);
215
- cz = typed_array_value_denormalize(cz, vertices);
216
- }
217
-
218
203
  tri3_closest_point_barycentric(
219
204
  v3_scratch_0, 0,
220
205
  x, y, z,
@@ -544,14 +544,15 @@ export class InstancedMeshGroup {
544
544
  if (this.__attributeTransform !== null) {
545
545
  const oldTransformArray = this.__attributeTransform.array;
546
546
  typed_array_copy(oldTransformArray, newTransformArray);
547
-
548
- if (newTransformArray.length > oldTransformArray.length) {
549
- //fill the rest of the array with 0s
550
- // TODO consider writing identity matrix instead
551
- newTransformArray.fill(0, oldTransformArray.length);
552
- }
553
547
  }
554
548
 
549
+ //reset the unused slots [count, capacity) to defaults on every rebuild,
550
+ //not only when growing — otherwise a shrink/regrow (or growing past a slot
551
+ //that was valid before) leaves stale data that a later transform-only add()
552
+ //would surface
553
+ // TODO consider writing identity matrix instead of 0
554
+ newTransformArray.fill(0, this.count * 16);
555
+
555
556
  //rewrite old attributes
556
557
  this.__attributeTransformArray = newTransformArray;
557
558
  this.__attributeTransform = new InstancedBufferAttribute(newTransformArray, 16);
@@ -568,12 +569,11 @@ export class InstancedMeshGroup {
568
569
  if (this.__attributeColor !== null) {
569
570
  const oldColorArray = this.__attributeColor.array;
570
571
  typed_array_copy(oldColorArray, newColorArray);
571
-
572
- if (newColorArray.length > oldColorArray.length) {
573
- newColorArray.fill(255, oldColorArray.length);
574
- }
575
572
  }
576
573
 
574
+ //reset unused colour slots [count, capacity) to the default every rebuild
575
+ newColorArray.fill(255, this.count * 4);
576
+
577
577
  this.__attributeColorArray = newColorArray;
578
578
  this.__attributeColor = new InstancedBufferAttribute(newColorArray, 4);
579
579
  this.__attributeColor.normalized = true;
@@ -89,7 +89,7 @@ function equal_attribute_structure(a, b) {
89
89
  const b_attribute_index = b_attribute_names.indexOf(a_key);
90
90
 
91
91
  if (b_attribute_index === -1) {
92
- return -1;
92
+ return false;
93
93
  }
94
94
 
95
95
  const a_attribute = a.attributes[a_key];
@@ -1,4 +1,3 @@
1
- /// <reference types="gl-matrix/index.js" />
2
1
  export class ImpostorBaker {
3
2
  /**
4
3
  *
@@ -34,5 +33,4 @@ export class ImpostorBaker {
34
33
  }[]): ImpostorDescription;
35
34
  }
36
35
  import { ImpostorDescription } from "./ImpostorDescription.js";
37
- import { mat4 } from "gl-matrix";
38
36
  //# sourceMappingURL=ImpostorBaker.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ImpostorBaker.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/impostors/octahedral/ImpostorBaker.js"],"names":[],"mappings":";AAqBA;IAEI;;;;OAIG;IACH,kBAAiB;IAEjB;;;OAGG;IACH,iDAEC;IAGD;;;;;;;OAOG;IACH,yEANW,MAAM,EAAE,OAAK,uBAgPvB;IAED;;;;;;;OAOG;IACH,4CANW;QAAC,IAAI,iBAAgB;QAAC,SAAS,EAAC,IAAI,CAAA;KAAC,EAAE,GAIrC,mBAAmB,CA4E/B;CACJ;oCA7VmC,0BAA0B;qBAjBnC,WAAW"}
1
+ {"version":3,"file":"ImpostorBaker.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/impostors/octahedral/ImpostorBaker.js"],"names":[],"mappings":"AAsBA;IAEI;;;;OAIG;IACH,kBAAiB;IAEjB;;;OAGG;IACH,iDAEC;IAGD;;;;;;;OAOG;IACH,yEANW,MAAM,EAAE,OAAK,uBAgPvB;IAED;;;;;;;OAOG;IACH,4CANW;QAAC,IAAI,iBAAgB;QAAC,SAAS,OAAK;KAAC,EAAE,GAIrC,mBAAmB,CA4E/B;CACJ;oCA7VmC,0BAA0B"}
@@ -1,5 +1,6 @@
1
- import { mat4, vec3 } from "gl-matrix";
2
1
  import { Mesh, OrthographicCamera, Scene, Vector4, WebGLMultipleRenderTargets } from "three";
2
+ import { v3_copy_array } from "../../../../core/geom/vec3/v3_copy_array.js";
3
+ import { array_copy } from "../../../../core/collection/array/array_copy.js";
3
4
  import { assert } from "../../../../core/assert.js";
4
5
  import { collectIteratorValueToArray } from "../../../../core/collection/collectIteratorValueToArray.js";
5
6
  import { HashMap } from "../../../../core/collection/map/HashMap.js";
@@ -170,7 +171,7 @@ export class ImpostorBaker {
170
171
  mesh.matrixWorldNeedsUpdate = false;
171
172
  mesh.frustumCulled = false;
172
173
 
173
- mat4.copy(mesh.matrixWorld.elements, object.transform);
174
+ array_copy(object.transform, 0, mesh.matrixWorld.elements, 0, 16);
174
175
 
175
176
  scene.add(mesh);
176
177
 
@@ -276,7 +277,7 @@ export class ImpostorBaker {
276
277
 
277
278
 
278
279
  id.sphere_radius = bounding_sphere[3];
279
- vec3.copy(id.offset, bounding_sphere);
280
+ v3_copy_array(id.offset, 0, bounding_sphere, 0);
280
281
 
281
282
  return id;
282
283
  }
@@ -1,5 +1,5 @@
1
1
  import { UvEncoder } from "./UvEncoder.js";
2
- import { vec3 } from "gl-matrix";
2
+ import { v3_normalize_array } from "../../../../../core/geom/vec3/v3_normalize_array.js";
3
3
 
4
4
  export class HemiOctahedralUvEncoder extends UvEncoder {
5
5
  uv_to_unit(output, input) {
@@ -15,6 +15,6 @@ export class HemiOctahedralUvEncoder extends UvEncoder {
15
15
  output[1] = r_y;
16
16
  output[2] = pz;
17
17
 
18
- vec3.normalize(output, output);
18
+ v3_normalize_array(output, 0, output, 0);
19
19
  }
20
20
  }
@@ -1,7 +1,17 @@
1
- import {vec2, vec3} from "gl-matrix";
2
-
3
- export declare class UvEncoder {
4
- uv_to_unit(output: vec3, input: vec2): void
5
-
6
- unit_to_uv(output: vec2, inout: vec3): void
7
- }
1
+ export class UvEncoder {
2
+ /**
3
+ *
4
+ * @param {number[]|vec3} output
5
+ * @param {number[]|vec2} input
6
+ * @returns {void}
7
+ */
8
+ uv_to_unit(output: number[] | vec3, input: number[] | vec2): void;
9
+ /**
10
+ *
11
+ * @param {number[]|vec2} output
12
+ * @param {number[]|vec3} input
13
+ * @returns {void}
14
+ */
15
+ unit_to_uv(output: number[] | vec2, input: number[] | vec3): void;
16
+ }
17
+ //# sourceMappingURL=UvEncoder.d.ts.map
@@ -1,4 +1,4 @@
1
- import { vec3 } from "gl-matrix";
1
+ import { v3_copy_array } from "../../../../core/geom/vec3/v3_copy_array.js";
2
2
  import { assert } from "../../../../core/assert.js";
3
3
  import { ImpostorBaker } from "../octahedral/ImpostorBaker.js";
4
4
  import { ImpostorCaptureType } from "../octahedral/ImpostorCaptureType.js";
@@ -349,7 +349,7 @@ export class VoxelImpostorBaker {
349
349
 
350
350
  result.capture_type = capture_type;
351
351
  result.sphere_radius = bake_result.sphere_radius;
352
- vec3.copy(result.offset, bake_result.offset);
352
+ v3_copy_array(result.offset, 0, bake_result.offset, 0);
353
353
 
354
354
  result.points = bake_result.voxelised.points;
355
355
  result.point_count = bake_result.voxelised.point_count;
@@ -129,7 +129,7 @@ export function SplatMaterial(
129
129
  splatMap.wrapS = splatMap.wrapT = ClampToEdgeWrapping;
130
130
  splatMap.minFilter = LinearFilter;
131
131
  splatMap.magFilter = LinearFilter;
132
- uniforms.splatMap.value = splatMap;
132
+ uniforms.splatWeightMap.value = splatMap;
133
133
  }
134
134
 
135
135
  if (diffuseMaps !== void 0) {
@@ -1 +1 @@
1
- {"version":3,"file":"ParticleEmitter.d.ts","sourceRoot":"","sources":["../../../../../../../../src/engine/graphics/particles/particular/engine/emitter/ParticleEmitter.js"],"names":[],"mappings":"AA2FA;IAyiCI;;;;OAIG;IACH,4BAFa,eAAe,CAM3B;IAjjCD;;OAEG;IACH,IAFU,MAAM,CAEE;IAElB;;;;OAIG;IACH,wBAAoB;IAEpB;;;OAGG;IACH,UAFU,OAAO,CAEe;IAChC,eAA6B;IAC7B,qBAAsC;IAEtC;;;;;OAKG;IACH,qCAA2C;IAE3C;;;;OAIG;IACH,WAFU,MAAM,CAEF;IAEd;;;OAGG;IACH,cAFU,YAAY,GAAC,MAAM,CAEM;IAEnC;;;OAGG;IACH,WAFU,YAAY,GAAC,IAAI,CAEV;IAEjB;;;OAGG;IACH,MAFU,WAAS,IAAI,CAEX;IAEZ;;;OAGG;IACH,mBAFU,SAAS,CAEQ;IAG3B;;;;OAIG;IACH,yBAFU,KAAK,CAE2E;IAE1F;;;OAGG;IACH,yBAFU,KAAK,CAE8B;IAG7C;;;OAGG;IACH,OAFU,MAAM,CAE6F;IAE7G;;;;OAIG;IACH,eAAW;IAGX;;;OAGG;IACH,qBAFU,YAAY,CAEU;IAWhC,wBAIC;IAED;;;;OAIG;IACH,cAHW,MAAM,GAAC,mBAAmB,GACxB,IAAI,CAIhB;IAED;;;;OAIG;IACH,gBAHW,MAAM,GAAC,mBAAmB,GACxB,IAAI,CAIhB;IAED;;;;OAIG;IACH,gBAHW,MAAM,GAAC,mBAAmB,SAC1B,OAAO,QAQjB;IAED;;;;OAIG;IACH,cAHW,MAAM,GAAC,mBAAmB,GACxB,OAAO,CAInB;IAED;;OAEG;IACH,gCAaC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;MAeC;IAED,0BAkEC;IAGD;;;OAGG;IACH,gBAFW,aAAa,QASvB;IAED;;;;OAIG;IACH,kDAUC;IAED;;;;OAIG;IACH,iCAHW,aAAa,GACZ,MAAM,CA2CjB;IAED,8BA0DC;IAED,8BAmBC;IAED,2BAmBC;IAED,6BAkBC;IAED;;;OAGG;IACH,uCAHW,MAAM,GACJ,MAAM,CA+BlB;IAED,cAuCC;IAED,mBA6BC;IAuBD,eAOC;IAED;;;;OAIG;IACH,cAHW,eAAe,GACb,OAAO,CAQnB;IAED;;;;OAIG;IACH,qCA2FC;IAED,eAOC;IAED;;;OAGG;IACH,4BAFY,MAAM,CAejB;IAED;;;OAGG;IACH,mBAFW,MAAM,QAMhB;IAiCD;;;;OAIG;IACH,sCA+GC;IAED;;;;OAIG;IACH,qCA6GC;IAED;;;OAGG;IACH,aA4CC;IAGD;;OAEG;IACH,gBAIC;;CAYJ;;;;;;;;;;;;;;;;oBAloCmB,wCAAwC;uBAFrC,2CAA2C;6BAOrC,6CAA6C;6BAqB7C,mBAAmB;0BApCtB,+CAA+C;sBAInD,8CAA8C;6BAYvC,8BAA8B;oCAiBvB,0BAA0B;8BAChC,oBAAoB;uCAF3C,0BAA0B;6CAA1B,0BAA0B;kDAA1B,0BAA0B;4CAA1B,0BAA0B;4CAA1B,0BAA0B;kDAA1B,0BAA0B;wCAA1B,0BAA0B;sCAA1B,0BAA0B;4CAA1B,0BAA0B;AAWjC,yCAKC"}
1
+ {"version":3,"file":"ParticleEmitter.d.ts","sourceRoot":"","sources":["../../../../../../../../src/engine/graphics/particles/particular/engine/emitter/ParticleEmitter.js"],"names":[],"mappings":"AA2FA;IA0iCI;;;;OAIG;IACH,4BAFa,eAAe,CAM3B;IAljCD;;OAEG;IACH,IAFU,MAAM,CAEE;IAElB;;;;OAIG;IACH,wBAAoB;IAEpB;;;OAGG;IACH,UAFU,OAAO,CAEe;IAChC,eAA6B;IAC7B,qBAAsC;IAEtC;;;;;OAKG;IACH,qCAA2C;IAE3C;;;;OAIG;IACH,WAFU,MAAM,CAEF;IAEd;;;OAGG;IACH,cAFU,YAAY,GAAC,MAAM,CAEM;IAEnC;;;OAGG;IACH,WAFU,YAAY,GAAC,IAAI,CAEV;IAEjB;;;OAGG;IACH,MAFU,WAAS,IAAI,CAEX;IAEZ;;;OAGG;IACH,mBAFU,SAAS,CAEQ;IAG3B;;;;OAIG;IACH,yBAFU,KAAK,CAE2E;IAE1F;;;OAGG;IACH,yBAFU,KAAK,CAE8B;IAG7C;;;OAGG;IACH,OAFU,MAAM,CAE6F;IAE7G;;;;OAIG;IACH,eAAW;IAGX;;;OAGG;IACH,qBAFU,YAAY,CAEU;IAWhC,wBAIC;IAED;;;;OAIG;IACH,cAHW,MAAM,GAAC,mBAAmB,GACxB,IAAI,CAIhB;IAED;;;;OAIG;IACH,gBAHW,MAAM,GAAC,mBAAmB,GACxB,IAAI,CAIhB;IAED;;;;OAIG;IACH,gBAHW,MAAM,GAAC,mBAAmB,SAC1B,OAAO,QAQjB;IAED;;;;OAIG;IACH,cAHW,MAAM,GAAC,mBAAmB,GACxB,OAAO,CAInB;IAED;;OAEG;IACH,gCAaC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;MAeC;IAED,0BAkEC;IAGD;;;OAGG;IACH,gBAFW,aAAa,QASvB;IAED;;;;OAIG;IACH,kDAUC;IAED;;;;OAIG;IACH,iCAHW,aAAa,GACZ,MAAM,CA2CjB;IAED,8BA0DC;IAED,8BAmBC;IAED,2BAmBC;IAED,6BAkBC;IAED;;;OAGG;IACH,uCAHW,MAAM,GACJ,MAAM,CA+BlB;IAED,cAuCC;IAED,mBA6BC;IAuBD,eAOC;IAED;;;;OAIG;IACH,cAHW,eAAe,GACb,OAAO,CASnB;IAED;;;;OAIG;IACH,qCA2FC;IAED,eAOC;IAED;;;OAGG;IACH,4BAFY,MAAM,CAejB;IAED;;;OAGG;IACH,mBAFW,MAAM,QAMhB;IAiCD;;;;OAIG;IACH,sCA+GC;IAED;;;;OAIG;IACH,qCA6GC;IAED;;;OAGG;IACH,aA4CC;IAGD;;OAEG;IACH,gBAIC;;CAYJ;;;;;;;;;;;;;;;;oBAnoCmB,wCAAwC;uBAFrC,2CAA2C;6BAOrC,6CAA6C;6BAqB7C,mBAAmB;0BApCtB,+CAA+C;sBAInD,8CAA8C;6BAYvC,8BAA8B;oCAiBvB,0BAA0B;8BAChC,oBAAoB;uCAF3C,0BAA0B;6CAA1B,0BAA0B;kDAA1B,0BAA0B;4CAA1B,0BAA0B;4CAA1B,0BAA0B;kDAA1B,0BAA0B;wCAA1B,0BAA0B;sCAA1B,0BAA0B;4CAA1B,0BAA0B;AAWjC,yCAKC"}
@@ -689,8 +689,9 @@ export class ParticleEmitter {
689
689
  return this.blendingMode === other.blendingMode
690
690
  && this.parameters.equals(other.parameters)
691
691
  && this.layers.equals(other.layers)
692
- && this.getFlag(ParticleEmitterFlag.DepthSorting) === other.getFlag(ParticleEmitterFlag.DepthSorting)
693
- && this.getFlag(ParticleEmitterFlag.PreWarm) === other.getFlag(ParticleEmitterFlag.PreWarm);
692
+ // compare the same flag set that #computeHash folds in, otherwise
693
+ // equal objects can hash differently
694
+ && (this.flags & SERIALIZABLE_FLAGS) === (other.flags & SERIALIZABLE_FLAGS);
694
695
  }
695
696
 
696
697
  /**
@@ -504,7 +504,7 @@ export class ParticlePool {
504
504
 
505
505
  // mark for update
506
506
  attribute.needsUpdate = true;
507
- attribute.updateRange.count = n;
507
+ attribute.updateRange.count = n * itemSize;
508
508
  attribute.updateRange.offset = 0;
509
509
  }
510
510
 
@@ -6,7 +6,7 @@ import Quaternion from "../../../../../../../core/geom/Quaternion.js";
6
6
  import { ParticleEmitter } from "../../emitter/ParticleEmitter.js";
7
7
  import { Transform } from "../../../../../../ecs/transform/Transform.js";
8
8
  import Entity from "../../../../../../ecs/Entity.js";
9
- import { vec3 } from "gl-matrix";
9
+ import { v3_matrix4_multiply } from "../../../../../../../core/geom/vec3/v3_matrix4_multiply.js";
10
10
  import { AttributeValue } from "./AttributeValue.js";
11
11
  import { PARTICULAR_PARTICLE_SPECIFICATION } from "../../emitter/PARTICULAR_PARTICLE_SPECIFICATION.js";
12
12
  import { SerializationMetadata } from "../../../../../../ecs/components/SerializationMetadata.js";
@@ -443,7 +443,7 @@ export class ParticleVolume {
443
443
 
444
444
  if (ts.contains_point(v3_position)) {
445
445
 
446
- vec3.transformMat4(v3_position, v3_position, matrix_elements);
446
+ v3_matrix4_multiply(v3_position, 0, v3_position, 0, matrix_elements);
447
447
 
448
448
  particles.writeAttributeVector3(particle_index, PARTICLE_ATTRIBUTE_POSITION, v3_position[0], v3_position[1], v3_position[2]);
449
449
 
@@ -521,7 +521,7 @@ export class ParticleVolume {
521
521
  for (let i = 0; i < particle_count; i++) {
522
522
  shape.sample_random_point_in_volume(v3_position, 0, random);
523
523
 
524
- vec3.transformMat4(v3_position, v3_position, matrix_elements);
524
+ v3_matrix4_multiply(v3_position, 0, v3_position, 0, matrix_elements);
525
525
 
526
526
  particles.writeAttributeVector3(i, PARTICLE_ATTRIBUTE_POSITION, v3_position[0], v3_position[1], v3_position[2]);
527
527
  }
@@ -1,4 +1,5 @@
1
- import { mat4 } from "gl-matrix";
1
+ import { m4_allocate } from "../../../../../../../core/geom/3d/mat4/m4_allocate.js";
2
+ import { m4_from_rotation_translation_scale } from "../../../../../../../core/geom/3d/mat4/m4_from_rotation_translation_scale.js";
2
3
  import { LineBasicMaterial } from "three";
3
4
  import { TransformControls } from "three/examples/jsm/controls/TransformControls.js";
4
5
  import { makeEngineOptionsModel } from "../../../../../../../../../model/game/options/makeEngineOptionsModel.js";
@@ -243,9 +244,9 @@ function make_shape_vis_toggle(engine) {
243
244
  }
244
245
 
245
246
  function mat_from_aabb3(aabb3) {
246
- const m4 = mat4.create();
247
+ const m4 = m4_allocate();
247
248
 
248
- mat4.fromRotationTranslationScale(m4, [0, 0, 0, 1], [(aabb3.x0 + aabb3.x1) / 2, (aabb3.y0 + aabb3.y1) / 2, (aabb3.z0 + aabb3.z1) / 2], [aabb3.getExtentsX(), aabb3.getExtentsY(), aabb3.getExtentsZ()]);
249
+ m4_from_rotation_translation_scale(m4, [0, 0, 0, 1], [(aabb3.x0 + aabb3.x1) / 2, (aabb3.y0 + aabb3.y1) / 2, (aabb3.z0 + aabb3.z1) / 2], [aabb3.getExtentsX(), aabb3.getExtentsY(), aabb3.getExtentsZ()]);
249
250
 
250
251
  return m4;
251
252
  }
@@ -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,QA+ErB;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;0BAzmByB,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,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"}
@@ -462,8 +462,9 @@ export class ParticleGroup {
462
462
  const oldSize = this.size;
463
463
  const newSize = oldSize - deleteCount;
464
464
 
465
- //sort indices
466
- indices.sort();
465
+ //sort indices ascending numerically (the compaction below walks the
466
+ //deleted tail block and assumes ascending numeric order)
467
+ indices.sort((a, b) => a - b);
467
468
 
468
469
  const specAttributes = this.spec.attributes;
469
470
  const numAttributes = specAttributes.length;
@@ -1,4 +1,4 @@
1
- import { mat4 } from "gl-matrix";
1
+ import { m4_multiply } from "../../../../core/geom/3d/mat4/m4_multiply.js";
2
2
  import {
3
3
  ClampToEdgeWrapping,
4
4
  DataTexture,
@@ -1079,7 +1079,7 @@ export class LightManager {
1079
1079
  camera.matrixWorldInverse.invert();
1080
1080
 
1081
1081
  // this.__projection_matrix.set(camera.matrixWorldInverse.elements);
1082
- mat4.multiply(this.__projection_matrix, camera.projectionMatrix.elements, camera.matrixWorldInverse.elements);
1082
+ m4_multiply(this.__projection_matrix, camera.projectionMatrix.elements, camera.matrixWorldInverse.elements);
1083
1083
 
1084
1084
  // console.time('__build_view_frustum');
1085
1085
  this.__build_view_frustum(camera);
@@ -1,4 +1,3 @@
1
- /// <reference types="gl-matrix/index.js" />
2
1
  export class Decal extends AbstractLight {
3
2
  /**
4
3
  * Transform matrix, initial volume is a unit cube
@@ -41,6 +40,5 @@ export class Decal extends AbstractLight {
41
40
  ENCODED_SLOT_COUNT: number;
42
41
  }
43
42
  import { AbstractLight } from "./AbstractLight.js";
44
- import { mat4 } from "gl-matrix";
45
43
  import Signal from "../../../../../core/events/signal/Signal.js";
46
44
  //# sourceMappingURL=Decal.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Decal.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/render/forward_plus/model/Decal.js"],"names":[],"mappings":";AASA;IAIQ;;;OAGG;IACH,WAFU,MAAM,EAAE,GAAC,YAAY,GAAC,IAAI,EAAE,CAED;IACrC,gCAA6C;IAC7C,iBAA6B;IAE7B,oBAAgC;IAKhC;;;OAGG;IACH,2BAA2B;IAE3B;;;;OAIG;IACH,eAFU,MAAM,CAEM;IAEtB,0EAA6C;IAGjD;;;OAGG;IACH,gBAFW,MAAM,EAAE,GAAC,YAAY,GAAC,UAAU,MAAM,CAAC,QAOjD;IAED,6CAGC;IAED,yCAGC;IAED,4BAUC;IAED,+CAGC;IAED,gDAGC;IAED,6BAKC;IAED,2BAIC;IAED,gDAcC;IAGL;;;OAGG;IACH,kBAFU,OAAO,CAEM;IAEvB,2BAAkC;CARjC;8BAjH6B,oBAAoB;qBAI7B,WAAW;mBACb,6CAA6C"}
1
+ {"version":3,"file":"Decal.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/render/forward_plus/model/Decal.js"],"names":[],"mappings":"AASA;IAIQ;;;OAGG;IACH,WAFU,MAAM,EAAE,GAAC,YAAY,GAAC,MAAM,CAED;IACrC,gCAA6C;IAC7C,iBAA6B;IAE7B,oBAAgC;IAKhC;;;OAGG;IACH,2BAA2B;IAE3B;;;;OAIG;IACH,eAFU,MAAM,CAEM;IAEtB,0EAA6C;IAGjD;;;OAGG;IACH,gBAFW,MAAM,EAAE,GAAC,YAAY,GAAC,UAAU,MAAM,CAAC,QAOjD;IAED,6CAGC;IAED,yCAGC;IAED,4BAUC;IAED,+CAGC;IAED,gDAGC;IAED,6BAKC;IAED,2BAIC;IAED,gDAcC;IAGL;;;OAGG;IACH,kBAFU,OAAO,CAEM;IAEvB,2BAAkC;CARjC;8BAjH6B,oBAAoB;mBAK/B,6CAA6C"}
@@ -2,7 +2,7 @@ import { AbstractLight } from "./AbstractLight.js";
2
2
  import { aabb3_matrix4_project_by_corners } from "../../../../../core/geom/3d/aabb/aabb3_matrix4_project_by_corners.js";
3
3
  import { aabb3_build_corners } from "../../../../../core/geom/3d/aabb/aabb3_build_corners.js";
4
4
  import { array_copy } from "../../../../../core/collection/array/array_copy.js";
5
- import { mat4 } from "gl-matrix";
5
+ import { m4_invert } from "../../../../../core/geom/3d/mat4/m4_invert.js";
6
6
  import Signal from "../../../../../core/events/signal/Signal.js";
7
7
 
8
8
  const corners = [];
@@ -45,8 +45,8 @@ export class Decal extends AbstractLight {
45
45
  * @param {number[]|Float32Array|ArrayLike<number>} m
46
46
  */
47
47
  setTransform(m) {
48
- mat4.copy(this.transform, m);
49
- mat4.invert(this.transform_inverse, this.transform);
48
+ array_copy(m, 0, this.transform, 0, 16);
49
+ m4_invert(this.transform_inverse, this.transform);
50
50
 
51
51
  this.__signal_transfom_changed.send0();
52
52
  }
@@ -77,7 +77,7 @@ export class ForwardPlusRenderingPlugin extends EnginePlugin {
77
77
  graphics.viewport.size.onChanged.remove(this.updateResolution, this);
78
78
  graphics.pixelRatio.onChanged.remove(this.updateResolution, this);
79
79
 
80
- graphics.on.preRender.remove(this.__prepare_for_render, this);
80
+ graphics.main_view.on.preRender.remove(this.__prepare_for_render, this);
81
81
 
82
82
  // release memory
83
83
  this.__light_manager.dispose();
@@ -1,4 +1,5 @@
1
- import { mat4 } from "gl-matrix";
1
+ import { m4_from_rotation_translation_scale } from "../../../../../core/geom/3d/mat4/m4_from_rotation_translation_scale.js";
2
+ import { m4_invert } from "../../../../../core/geom/3d/mat4/m4_invert.js";
2
3
  import SimplexNoise from "simplex-noise";
3
4
  import {
4
5
  AmbientLight,
@@ -388,8 +389,8 @@ function addDecal({
388
389
  }) {
389
390
  const decal = new Decal();
390
391
 
391
- mat4.fromRotationTranslationScale(decal.transform, rotation, position, scale);
392
- mat4.invert(decal.transform_inverse, decal.transform);
392
+ m4_from_rotation_translation_scale(decal.transform, rotation, position, scale);
393
+ m4_invert(decal.transform_inverse, decal.transform);
393
394
 
394
395
  decal.texture_diffuse = sampler;
395
396
 
@@ -1,4 +1,6 @@
1
- import { mat4 } from "gl-matrix";
1
+ import { m4_allocate } from "../../../../../core/geom/3d/mat4/m4_allocate.js";
2
+ import { m4_multiply } from "../../../../../core/geom/3d/mat4/m4_multiply.js";
3
+ import { array_copy } from "../../../../../core/collection/array/array_copy.js";
2
4
  import FacingDirectionSystem from "../../../../../../../model/game/ecs/system/FacingDirectionSystem.js";
3
5
  import { initializeEditor } from "../../../../../../../model/game/initializeEditor.js";
4
6
  import { makeEngineOptionsModel } from "../../../../../../../model/game/options/makeEngineOptionsModel.js";
@@ -208,12 +210,12 @@ function prepare_query_test(hiz, graphics, ecd) {
208
210
 
209
211
  const camera = graphics.camera;
210
212
 
211
- const projection = mat4.create();
213
+ const projection = m4_allocate();
212
214
  const world_inverse = camera.matrixWorldInverse.elements;
213
215
  const camera_projection = camera.projectionMatrix.elements;
214
216
 
215
- mat4.copy(projection, world_inverse);
216
- mat4.multiply(projection, camera_projection, projection);
217
+ array_copy(world_inverse, 0, projection, 0, 16);
218
+ m4_multiply(projection, camera_projection, projection);
217
219
  const aabb = new AABB3();
218
220
 
219
221
  const query_size = query.getSize();
@@ -1,11 +1,4 @@
1
- /**
2
- * Where should probes be resolved?
3
- */
4
- export type ProbeResolutionStage = number;
5
- export namespace ProbeResolutionStage {
6
- let Vertex: number;
7
- let Fragment: number;
8
- }
1
+ export { ProbeResolutionStage } from "./ProbeResolutionStage.js";
9
2
  export class MaterialTransformer extends AbstractMaterialTransformer {
10
3
  /**
11
4
  *
@@ -1 +1 @@
1
- {"version":3,"file":"MaterialTransformer.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/sh3/gi/material/MaterialTransformer.js"],"names":[],"mappings":";;;mCAqBU,MAAM;;;;;AAchB;IA+II;;;;OAIG;IACH,kDAaC;IA3BD;;;OAGG;IACH,2BAEC;IAdD;;;OAGG;IACH,wBAEC;IA+BD,sBAIC;IAED,sBAiDC;IAED,eAgDC;IAED,4BA2BC;;CACJ;4CAtU2C,0DAA0D"}
1
+ {"version":3,"file":"MaterialTransformer.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/sh3/gi/material/MaterialTransformer.js"],"names":[],"mappings":";AAuBA;IA+II;;;;OAIG;IACH,kDAaC;IA3BD;;;OAGG;IACH,2BAEC;IAdD;;;OAGG;IACH,wBAEC;IA+BD,sBAIC;IAED,sBAiDC;IAED,eAgDC;IAED,4BA2BC;;CACJ;4CA1T2C,0DAA0D"}
@@ -12,25 +12,13 @@ import { octahedral_depth_to_atlas, vector_buffer_to_attribute_texture } from ".
12
12
  import { tetrahedral_mesh_to_texture } from "../tetrahedral_mesh_to_texture.js";
13
13
  import { makeLookupTexture3D } from "./makeLookupTexture3D.js";
14
14
  import { makeOctahedralDepthAtlas } from "./makeOctahedralDepthAtlas.js";
15
+ import { ProbeResolutionStage } from "./ProbeResolutionStage.js";
15
16
  import { space_fragment_transform_shader } from "./space_fragment/space_fragment_transform_shader.js";
16
17
  import { space_vertex_transform_shader } from "./space_vertex/space_vertex_transform_shader.js";
17
18
 
18
19
  const PROPERTY_TRANSFORMER_MARKER = '@light-probe-volume-material-transformer';
19
20
 
20
- /**
21
- * Where should probes be resolved?
22
- * @enum {number}
23
- */
24
- export const ProbeResolutionStage = {
25
- /**
26
- * Cheaper, but less precise
27
- */
28
- Vertex: 0,
29
- /**
30
- * More expensive, necessary for large geometries with few vertices
31
- */
32
- Fragment: 1
33
- };
21
+ export { ProbeResolutionStage } from "./ProbeResolutionStage.js";
34
22
 
35
23
 
36
24
  export class MaterialTransformer extends AbstractMaterialTransformer {
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Where should probes be resolved?
3
+ */
4
+ export type ProbeResolutionStage = number;
5
+ export namespace ProbeResolutionStage {
6
+ let Vertex: number;
7
+ let Fragment: number;
8
+ }
9
+ //# sourceMappingURL=ProbeResolutionStage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProbeResolutionStage.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/sh3/gi/material/ProbeResolutionStage.js"],"names":[],"mappings":";;;mCAEU,MAAM"}