@woosh/meep-engine 3.78.2 → 3.78.4

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 (278) hide show
  1. package/CHANGELOG.md +46 -13
  2. package/editor/view/node-graph/NodeGraphView.d.ts +1 -1
  3. package/editor/view/node-graph/NodeGraphView.js +1 -1
  4. package/package.json +1 -1
  5. package/src/core/math/physics/brdf/fresnel_Schlick_optimized.d.ts +2 -1
  6. package/src/core/math/physics/brdf/fresnel_Schlick_optimized.d.ts.map +1 -1
  7. package/src/core/math/physics/brdf/fresnel_Schlick_optimized.js +2 -1
  8. package/src/core/math/snap_to_integer.d.ts +13 -0
  9. package/src/core/math/snap_to_integer.d.ts.map +1 -0
  10. package/src/core/math/snap_to_integer.js +20 -0
  11. package/src/core/model/node-graph/NodeGraph.d.ts +0 -1
  12. package/src/core/model/node-graph/NodeGraph.d.ts.map +1 -1
  13. package/src/core/model/node-graph/NodeGraph.js +0 -1
  14. package/src/engine/asset/loaders/GroomAssetLoader.d.ts.map +1 -1
  15. package/src/engine/asset/loaders/GroomAssetLoader.js +2 -1
  16. package/src/engine/graphics/hair/Groom.d.ts +30 -0
  17. package/src/engine/graphics/hair/Groom.d.ts.map +1 -1
  18. package/src/engine/graphics/hair/Groom.js +35 -0
  19. package/src/engine/graphics/hair/GroomSerializationAdapter.d.ts +18 -2
  20. package/src/engine/graphics/hair/GroomSerializationAdapter.d.ts.map +1 -1
  21. package/src/engine/graphics/hair/GroomSerializationAdapter.js +36 -6
  22. package/src/engine/graphics/hair/GroomSerializationUpgrader_1_2.d.ts +8 -0
  23. package/src/engine/graphics/hair/GroomSerializationUpgrader_1_2.d.ts.map +1 -0
  24. package/src/engine/graphics/hair/GroomSerializationUpgrader_1_2.js +44 -0
  25. package/src/engine/graphics/hair/groom_bake_shelter.d.ts +33 -0
  26. package/src/engine/graphics/hair/groom_bake_shelter.d.ts.map +1 -0
  27. package/src/engine/graphics/hair/groom_bake_shelter.js +288 -0
  28. package/src/engine/graphics/hair/groom_bind_to_mesh.d.ts +1 -1
  29. package/src/engine/graphics/hair/groom_bind_to_mesh.js +1 -1
  30. package/src/engine/graphics/hair/groom_build_group.d.ts +10 -2
  31. package/src/engine/graphics/hair/groom_build_group.d.ts.map +1 -1
  32. package/src/engine/graphics/hair/groom_build_group.js +8 -2
  33. package/src/engine/graphics/hair/groom_build_guides.d.ts +1 -1
  34. package/src/engine/graphics/hair/groom_build_guides.js +1 -1
  35. package/src/engine/graphics/impostors/voxel/README.md +11 -11
  36. package/src/engine/physics/cloth/collider/ClothColliderKind.js +1 -1
  37. package/src/engine/physics/cloth/ecs/cloth_geodesic.d.ts +1 -1
  38. package/src/engine/physics/cloth/ecs/cloth_geodesic.js +1 -1
  39. package/src/engine/physics/cloth/solver/constraint/cloth_backstop_row.d.ts +2 -3
  40. package/src/engine/physics/cloth/solver/constraint/cloth_backstop_row.d.ts.map +1 -1
  41. package/src/engine/physics/cloth/solver/constraint/cloth_backstop_row.js +2 -3
  42. package/src/generation/filtering/numeric/sampling/AbstractCellFilterSampleGridLayer.d.ts +0 -2
  43. package/src/generation/filtering/numeric/sampling/AbstractCellFilterSampleGridLayer.d.ts.map +1 -1
  44. package/src/generation/filtering/numeric/sampling/AbstractCellFilterSampleGridLayer.js +0 -5
  45. package/src/generation/filtering/numeric/sampling/CellFilterSampleLayerCubic.d.ts.map +1 -1
  46. package/src/generation/filtering/numeric/sampling/CellFilterSampleLayerCubic.js +5 -3
  47. package/src/generation/filtering/numeric/sampling/CellFilterSampleLayerLinear.d.ts.map +1 -1
  48. package/src/generation/filtering/numeric/sampling/CellFilterSampleLayerLinear.js +5 -3
  49. package/src/generation/grid/coords/grid_to_texel.d.ts +7 -1
  50. package/src/generation/grid/coords/grid_to_texel.d.ts.map +1 -1
  51. package/src/generation/grid/coords/grid_to_texel.js +11 -1
  52. package/src/generation/grid/coords/grid_to_texel_span.d.ts +15 -0
  53. package/src/generation/grid/coords/grid_to_texel_span.d.ts.map +1 -0
  54. package/src/generation/grid/coords/grid_to_texel_span.js +38 -0
  55. package/src/generation/grid/coords/texel_to_grid.d.ts +2 -1
  56. package/src/generation/grid/coords/texel_to_grid.d.ts.map +1 -1
  57. package/src/generation/grid/coords/texel_to_grid.js +6 -1
  58. package/src/generation/grid/generation/discrete/GridTaskWaveFunctionCollapse.d.ts +32 -1
  59. package/src/generation/grid/generation/discrete/GridTaskWaveFunctionCollapse.d.ts.map +1 -1
  60. package/src/generation/grid/generation/discrete/GridTaskWaveFunctionCollapse.js +114 -9
  61. package/src/generation/grid/generation/discrete/layer/GridTaskBuildSourceDistanceMap.d.ts +8 -0
  62. package/src/generation/grid/generation/discrete/layer/GridTaskBuildSourceDistanceMap.d.ts.map +1 -1
  63. package/src/generation/grid/generation/discrete/layer/GridTaskBuildSourceDistanceMap.js +91 -29
  64. package/src/generation/grid/layers/GridDataLayer.d.ts +21 -2
  65. package/src/generation/grid/layers/GridDataLayer.d.ts.map +1 -1
  66. package/src/generation/grid/layers/GridDataLayer.js +43 -4
  67. package/src/generation/placement/action/GridCellActionPlaceTags.d.ts +7 -1
  68. package/src/generation/placement/action/GridCellActionPlaceTags.d.ts.map +1 -1
  69. package/src/generation/placement/action/GridCellActionPlaceTags.js +42 -16
  70. package/src/generation/placement/action/GridCellActionWriteFilterToLayer.d.ts +5 -0
  71. package/src/generation/placement/action/GridCellActionWriteFilterToLayer.d.ts.map +1 -1
  72. package/src/generation/placement/action/GridCellActionWriteFilterToLayer.js +32 -9
  73. package/src/generation/rules/CellMatcherLayerBitMaskTest.d.ts.map +1 -1
  74. package/src/generation/rules/CellMatcherLayerBitMaskTest.js +6 -2
  75. package/src/generation/wfc/GridWFCCompiledTileSet.d.ts +4 -2
  76. package/src/generation/wfc/GridWFCCompiledTileSet.d.ts.map +1 -1
  77. package/src/generation/wfc/GridWFCCompiledTileSet.js +2 -2
  78. package/src/generation/wfc/GridWFCTileSet.d.ts +16 -7
  79. package/src/generation/wfc/GridWFCTileSet.d.ts.map +1 -1
  80. package/src/generation/wfc/GridWFCTileSet.js +32 -8
  81. package/src/shade/playground/contact_shadows/shader_contact_lab_composite.js +2 -2
  82. package/src/shade/playground/particle_editor/README.md +2 -2
  83. package/src/shade/playground/probe_clipmap/index.html +1 -1
  84. package/src/shade/playground/screen_probes/README.md +5 -5
  85. package/src/shade/playground/screen_probes/main.js +1 -1
  86. package/src/shade/playground/tonemap_sdr/README.md +3 -2
  87. package/src/shade/playground/vgeo_scene/README.md +1 -3
  88. package/src/shade/playground/vgeo_scene/main.js +3 -3
  89. package/src/shade/renderer/Renderer.d.ts +3 -3
  90. package/src/shade/renderer/Renderer.js +4 -4
  91. package/src/shade/renderer/ShadeIndirectLightingMode.js +1 -1
  92. package/src/shade/renderer/camera/PerspectiveCamera.js +1 -1
  93. package/src/shade/renderer/deferred/tonemap/ColorGrade.d.ts +11 -13
  94. package/src/shade/renderer/deferred/tonemap/ColorGrade.d.ts.map +1 -1
  95. package/src/shade/renderer/deferred/tonemap/ColorGrade.js +11 -13
  96. package/src/shade/renderer/deferred/tonemap/TONE_MAP_OPERATOR_ACES.d.ts.map +1 -1
  97. package/src/shade/renderer/deferred/tonemap/TONE_MAP_OPERATOR_ACES.js +6 -7
  98. package/src/shade/renderer/deferred/tonemap/ToneMapper.d.ts +1 -1
  99. package/src/shade/renderer/deferred/tonemap/ToneMapper.js +1 -1
  100. package/src/shade/renderer/deferred/tonemap/m3_white_balance_rec709.d.ts +6 -8
  101. package/src/shade/renderer/deferred/tonemap/m3_white_balance_rec709.d.ts.map +1 -1
  102. package/src/shade/renderer/deferred/tonemap/m3_white_balance_rec709.js +7 -10
  103. package/src/shade/renderer/geometry/sdf/MESH_SDF.d.ts +1 -1
  104. package/src/shade/renderer/geometry/sdf/MESH_SDF.js +1 -1
  105. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_classify.d.ts +1 -1
  106. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_classify.js +1 -1
  107. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_evaluate.d.ts +1 -1
  108. package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_evaluate.js +1 -1
  109. package/src/shade/renderer/geometry/sdf/chunk_blas_query_band_sdf.d.ts +1 -2
  110. package/src/shade/renderer/geometry/sdf/chunk_blas_query_band_sdf.d.ts.map +1 -1
  111. package/src/shade/renderer/geometry/sdf/chunk_blas_query_band_sdf.js +1 -2
  112. package/src/shade/renderer/geometry/sdf/chunk_scene_point_query_volume_sign.d.ts.map +1 -1
  113. package/src/shade/renderer/geometry/sdf/chunk_scene_point_query_volume_sign.js +2 -1
  114. package/src/shade/renderer/geometry/sdf/surface/MESH_SURFACE_BAKE.d.ts +1 -1
  115. package/src/shade/renderer/geometry/sdf/surface/MESH_SURFACE_BAKE.js +1 -1
  116. package/src/shade/renderer/geometry/virtual/build/level/vgeo_build_cluster_graph.js +1 -1
  117. package/src/shade/renderer/geometry/virtual/format/page/VGEO_DEFAULT_PAGE_SIZE.d.ts +2 -2
  118. package/src/shade/renderer/geometry/virtual/format/page/VGEO_DEFAULT_PAGE_SIZE.js +2 -2
  119. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_access.d.ts +2 -2
  120. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_access.js +4 -4
  121. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_instance.d.ts +1 -1
  122. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_instance.js +1 -1
  123. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_collect.js +1 -1
  124. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_INSTANCE_OFFSET.d.ts +3 -3
  125. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_INSTANCE_OFFSET.js +3 -3
  126. package/src/shade/renderer/global_illumination/brick4/README.md +2 -1
  127. package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.d.ts +4 -6
  128. package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.d.ts.map +1 -1
  129. package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.js +4 -6
  130. package/src/shade/renderer/global_illumination/probe_clipmap/brick/BRICK_MOVERS.d.ts +1 -1
  131. package/src/shade/renderer/global_illumination/probe_clipmap/brick/BRICK_MOVERS.js +1 -1
  132. package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap_trace.d.ts +1 -1
  133. package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap_trace.js +2 -2
  134. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/chunk_mesh_brick_texel.d.ts +1 -1
  135. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/chunk_mesh_brick_texel.js +1 -1
  136. package/src/shade/renderer/global_illumination/screen_probe/GPUScreenProbeGI.d.ts +1 -1
  137. package/src/shade/renderer/global_illumination/screen_probe/GPUScreenProbeGI.js +1 -1
  138. package/src/shade/renderer/global_illumination/screen_probe/SCREEN_PROBE.d.ts +28 -35
  139. package/src/shade/renderer/global_illumination/screen_probe/SCREEN_PROBE.d.ts.map +1 -1
  140. package/src/shade/renderer/global_illumination/screen_probe/SCREEN_PROBE.js +28 -35
  141. package/src/shade/renderer/global_illumination/screen_probe/ScreenProbeSettings.d.ts +21 -24
  142. package/src/shade/renderer/global_illumination/screen_probe/ScreenProbeSettings.d.ts.map +1 -1
  143. package/src/shade/renderer/global_illumination/screen_probe/ScreenProbeSettings.js +21 -24
  144. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe.d.ts +8 -8
  145. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe.js +8 -8
  146. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_brdf_density.d.ts +4 -4
  147. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_brdf_density.js +4 -4
  148. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_interpolate.d.ts +3 -5
  149. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_interpolate.d.ts.map +1 -1
  150. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_interpolate.js +3 -5
  151. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_lighting_history.d.ts +4 -4
  152. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_lighting_history.js +4 -4
  153. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_rough_specular.d.ts +2 -3
  154. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_rough_specular.d.ts.map +1 -1
  155. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_rough_specular.js +2 -3
  156. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_screen_march.d.ts +4 -4
  157. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_screen_march.js +4 -4
  158. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_surface.d.ts +2 -4
  159. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_surface.d.ts.map +1 -1
  160. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_surface.js +2 -4
  161. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_brick.d.ts +2 -4
  162. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_brick.d.ts.map +1 -1
  163. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_brick.js +2 -4
  164. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_gather.d.ts +13 -17
  165. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_gather.d.ts.map +1 -1
  166. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_gather.js +13 -17
  167. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_importance.d.ts +11 -14
  168. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_importance.d.ts.map +1 -1
  169. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_importance.js +11 -14
  170. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_pick.d.ts +2 -2
  171. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_pick.js +2 -2
  172. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_place.d.ts +9 -9
  173. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_place.js +9 -9
  174. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_resolve.d.ts +15 -18
  175. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_resolve.d.ts.map +1 -1
  176. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_resolve.js +16 -19
  177. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_trace_screen.d.ts +10 -11
  178. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_trace_screen.d.ts.map +1 -1
  179. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_trace_screen.js +11 -12
  180. package/src/shade/renderer/hair/GPUHairSystem.d.ts.map +1 -1
  181. package/src/shade/renderer/hair/GPUHairSystem.js +27 -2
  182. package/src/shade/renderer/hair/HAIR_DATABASE_SPEC.d.ts.map +1 -1
  183. package/src/shade/renderer/hair/HAIR_DATABASE_SPEC.js +4 -0
  184. package/src/shade/renderer/hair/HAIR_SIMULATION.d.ts +27 -6
  185. package/src/shade/renderer/hair/HAIR_SIMULATION.d.ts.map +1 -1
  186. package/src/shade/renderer/hair/HAIR_SIMULATION.js +33 -6
  187. package/src/shade/renderer/hair/chunk_hair_bsdf.d.ts +9 -8
  188. package/src/shade/renderer/hair/chunk_hair_bsdf.d.ts.map +1 -1
  189. package/src/shade/renderer/hair/chunk_hair_bsdf.js +10 -9
  190. package/src/shade/renderer/hair/chunk_hair_dual_scattering.d.ts +5 -6
  191. package/src/shade/renderer/hair/chunk_hair_dual_scattering.d.ts.map +1 -1
  192. package/src/shade/renderer/hair/chunk_hair_dual_scattering.js +5 -6
  193. package/src/shade/renderer/hair/chunk_hair_guide.d.ts +9 -2
  194. package/src/shade/renderer/hair/chunk_hair_guide.d.ts.map +1 -1
  195. package/src/shade/renderer/hair/chunk_hair_guide.js +30 -2
  196. package/src/shade/renderer/hair/hair_lighting.d.ts +3 -3
  197. package/src/shade/renderer/hair/hair_lighting.d.ts.map +1 -1
  198. package/src/shade/renderer/hair/hair_lighting.js +4 -5
  199. package/src/shade/renderer/hair/hair_scattering_lut.d.ts +5 -5
  200. package/src/shade/renderer/hair/hair_scattering_lut.js +5 -5
  201. package/src/shade/renderer/hair/shader_hair_roots.d.ts +2 -2
  202. package/src/shade/renderer/hair/shader_hair_roots.js +2 -2
  203. package/src/shade/renderer/hair/shader_hair_simulate.d.ts +5 -2
  204. package/src/shade/renderer/hair/shader_hair_simulate.d.ts.map +1 -1
  205. package/src/shade/renderer/hair/shader_hair_simulate.js +23 -5
  206. package/src/shade/renderer/light/environment/DEFINES.d.ts +1 -1
  207. package/src/shade/renderer/light/environment/DEFINES.js +1 -1
  208. package/src/shade/renderer/light/environment/shader_convolve_reflection_map_from_blurred.js +2 -2
  209. package/src/shade/renderer/material/dispatch/MaterialDispatch.d.ts +1 -2
  210. package/src/shade/renderer/material/dispatch/MaterialDispatch.d.ts.map +1 -1
  211. package/src/shade/renderer/material/dispatch/MaterialDispatch.js +1 -2
  212. package/src/shade/renderer/material/standard/fragment_gbuffer.d.ts.map +1 -1
  213. package/src/shade/renderer/material/standard/fragment_gbuffer.js +2 -1
  214. package/src/shade/renderer/material/util/dielectric_specular_color.d.ts +1 -1
  215. package/src/shade/renderer/material/util/dielectric_specular_color.js +1 -1
  216. package/src/shade/renderer/postprocess/dof/gather/DOF2_CONFIG.d.ts +1 -1
  217. package/src/shade/renderer/postprocess/dof/gather/DOF2_CONFIG.js +1 -1
  218. package/src/shade/renderer/postprocess/dof/gather/DOF2_PRESETS.js +1 -1
  219. package/src/shade/renderer/postprocess/dof/gather/DOF2_SETTINGS_STRUCT.d.ts +1 -1
  220. package/src/shade/renderer/postprocess/dof/gather/DOF2_SETTINGS_STRUCT.js +1 -1
  221. package/src/shade/renderer/postprocess/dof/gather/DOF2_TEXTURE_FORMAT.d.ts +1 -1
  222. package/src/shade/renderer/postprocess/dof/gather/DOF2_TEXTURE_FORMAT.js +1 -1
  223. package/src/shade/renderer/postprocess/dof/gather/DepthOfFieldU.d.ts +3 -4
  224. package/src/shade/renderer/postprocess/dof/gather/DepthOfFieldU.d.ts.map +1 -1
  225. package/src/shade/renderer/postprocess/dof/gather/DepthOfFieldU.js +3 -4
  226. package/src/shade/renderer/postprocess/dof/gather/graph_postprocess_dof2.d.ts +1 -1
  227. package/src/shade/renderer/postprocess/dof/gather/graph_postprocess_dof2.js +1 -1
  228. package/src/shade/renderer/postprocess/eye/GPUCameraExposureManager.d.ts +1 -1
  229. package/src/shade/renderer/postprocess/eye/GPUCameraExposureManager.js +1 -1
  230. package/src/shade/renderer/postprocess/gtao/ao_reproject_shader.d.ts.map +1 -1
  231. package/src/shade/renderer/postprocess/gtao/ao_reproject_shader.js +2 -3
  232. package/src/shade/renderer/postprocess/motion_blur/MOTION_BLUR_CONFIG.d.ts +1 -2
  233. package/src/shade/renderer/postprocess/motion_blur/MOTION_BLUR_CONFIG.d.ts.map +1 -1
  234. package/src/shade/renderer/postprocess/motion_blur/MOTION_BLUR_CONFIG.js +1 -2
  235. package/src/shade/renderer/postprocess/taa/chunk_fsr2_compute_depth_clip.d.ts +2 -3
  236. package/src/shade/renderer/postprocess/taa/chunk_fsr2_compute_depth_clip.d.ts.map +1 -1
  237. package/src/shade/renderer/postprocess/taa/chunk_fsr2_compute_depth_clip.js +2 -3
  238. package/src/shade/renderer/postprocess/taa/filter_blackman_harris.d.ts +1 -1
  239. package/src/shade/renderer/postprocess/taa/filter_blackman_harris.js +1 -1
  240. package/src/shade/renderer/rasterize/native/depth/shadow_cascade_rasterization_pass_descriptor.d.ts +1 -1
  241. package/src/shade/renderer/rasterize/native/depth/shadow_cascade_rasterization_pass_descriptor.js +1 -1
  242. package/src/shade/renderer/rasterize/native/depth/shadow_rasterization_alpha_tested_pass_descriptor.js +1 -1
  243. package/src/shade/renderer/restir/di/ReSTIRDI.d.ts +3 -3
  244. package/src/shade/renderer/restir/di/ReSTIRDI.js +3 -3
  245. package/src/shade/renderer/restir/di/chunk_restir_trace_visibility.d.ts +1 -1
  246. package/src/shade/renderer/restir/di/chunk_restir_trace_visibility.js +1 -1
  247. package/src/shade/renderer/shader/chunk/brdf/chunk_MIN_DIELECTRICS_F0.d.ts +1 -1
  248. package/src/shade/renderer/shader/chunk/brdf/chunk_MIN_DIELECTRICS_F0.js +1 -1
  249. package/src/shade/renderer/shader/chunk/brdf/chunk_shadowed_F90.d.ts +1 -2
  250. package/src/shade/renderer/shader/chunk/brdf/chunk_shadowed_F90.d.ts.map +1 -1
  251. package/src/shade/renderer/shader/chunk/brdf/chunk_shadowed_F90.js +1 -2
  252. package/src/shade/renderer/shader/chunk/color/conversion/chunk_CRM_REC709_AP1.d.ts +4 -5
  253. package/src/shade/renderer/shader/chunk/color/conversion/chunk_CRM_REC709_AP1.d.ts.map +1 -1
  254. package/src/shade/renderer/shader/chunk/color/conversion/chunk_CRM_REC709_AP1.js +4 -5
  255. package/src/shade/renderer/shader/chunk/color/grade/chunk_color_grade.js +2 -2
  256. package/src/shade/renderer/shader/chunk/color/tonemap/aces/chunk_aces_ue_matrices.d.ts +2 -2
  257. package/src/shade/renderer/shader/chunk/color/tonemap/aces/chunk_aces_ue_matrices.js +2 -2
  258. package/src/shade/renderer/shader/chunk/color/tonemap/aces/chunk_tonemap_ue_filmic.d.ts +14 -17
  259. package/src/shade/renderer/shader/chunk/color/tonemap/aces/chunk_tonemap_ue_filmic.d.ts.map +1 -1
  260. package/src/shade/renderer/shader/chunk/color/tonemap/aces/chunk_tonemap_ue_filmic.js +18 -21
  261. package/src/shade/renderer/shader/chunk/filter/chunk_filter_blackman_harris.d.ts +1 -1
  262. package/src/shade/renderer/shader/chunk/filter/chunk_filter_blackman_harris.js +1 -1
  263. package/src/shade/renderer/shader/chunk/filter/chunk_filter_blackman_harris229.d.ts +1 -1
  264. package/src/shade/renderer/shader/chunk/filter/chunk_filter_blackman_harris229.js +1 -1
  265. package/src/shade/renderer/shader/chunk/filter/chunk_multiscale_mean.d.ts +3 -4
  266. package/src/shade/renderer/shader/chunk/filter/chunk_multiscale_mean.d.ts.map +1 -1
  267. package/src/shade/renderer/shader/chunk/filter/chunk_multiscale_mean.js +3 -4
  268. package/src/shade/renderer/shader/chunk/material/chunk_re_direct_multiscatter.d.ts +1 -1
  269. package/src/shade/renderer/shader/chunk/material/chunk_re_direct_multiscatter.js +1 -1
  270. package/src/shade/renderer/shadow/map/GPUSceneShadowmapContext.js +3 -3
  271. package/src/shade/renderer/shadow/map/shader/chunk_sample_shadowmap_cascade.d.ts +6 -8
  272. package/src/shade/renderer/shadow/map/shader/chunk_sample_shadowmap_cascade.d.ts.map +1 -1
  273. package/src/shade/renderer/shadow/map/shader/chunk_sample_shadowmap_cascade.js +8 -10
  274. package/src/shade/renderer/shadow/map/shader/chunk_shadow_caster_depth_bias.d.ts +5 -7
  275. package/src/shade/renderer/shadow/map/shader/chunk_shadow_caster_depth_bias.d.ts.map +1 -1
  276. package/src/shade/renderer/shadow/map/shader/chunk_shadow_caster_depth_bias.js +5 -7
  277. package/src/shade/renderer/texture/virtual/README.md +257 -257
  278. package/src/shade/renderer/volumetrics/shader_volumetrics_build_lighting.js +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"GridDataLayer.d.ts","sourceRoot":"","sources":["../../../../../src/generation/grid/layers/GridDataLayer.js"],"names":[],"mappings":"AAQA;IAyBI;;;;;;OAMG;IACH,gBALW,MAAM,QACN,cAAc,eACd,MAAM,GACJ,aAAa,CAsBzB;IAnDD;;;OAGG;IACH,IAFU,MAAM,CAER;IAER;;;OAGG;IACH,YAFU,MAAM,CAED;IAEf;;;OAGG;IACH,SAFU,SAAS,CAEkB;IAErC;;;OAGG;IACH,MAFU,OAAO,CAEQ;IA+BzB;;;;OAIG;IACH,UAHW,MAAM,KACN,MAAM,QAWhB;IAIL;;;OAGG;IACH,0BAFU,OAAO,CAEsB;CANtC;0BAxEyB,uDAAuD;oBAD7D,+BAA+B;+BAJpB,6CAA6C"}
1
+ {"version":3,"file":"GridDataLayer.d.ts","sourceRoot":"","sources":["../../../../../src/generation/grid/layers/GridDataLayer.js"],"names":[],"mappings":"AAqBA;IA4CI;;;;;;;OAOG;IACH,gBANW,MAAM,QACN,cAAc,eACd,MAAM,YACN,OAAO,GACL,aAAa,CAwBzB;IAzED;;;OAGG;IACH,IAFU,MAAM,CAER;IAER;;;OAGG;IACH,YAFU,MAAM,CAED;IAEf;;;;;;;;;;;;;;;;OAgBG;IACH,SAFU,OAAO,CAED;IAEhB;;;OAGG;IACH,SAFU,SAAS,CAEkB;IAErC;;;OAGG;IACH,MAFU,OAAO,CAEQ;IAkCzB;;;;OAIG;IACH,UAHW,MAAM,KACN,MAAM,QAehB;IAIL;;;OAGG;IACH,0BAFU,OAAO,CAEsB;CANtC;0BA9GyB,uDAAuD;oBAF7D,+BAA+B;+BAJpB,6CAA6C"}
@@ -4,8 +4,21 @@ import {
4
4
  DataType2TypedArrayConstructorMapping
5
5
  } from "../../../core/binary/type/DataType2TypedArrayConstructorMapping.js";
6
6
  import Vector2 from "../../../core/geom/Vector2.js";
7
+ import { snap_to_integer } from "../../../core/math/snap_to_integer.js";
7
8
  import { Sampler2D } from "../../../engine/graphics/texture/sampler/Sampler2D.js";
8
9
 
10
+ /**
11
+ * Texels of `1 / resolution` cells it takes to cover `cells` cells from the first: `ceil(cells · resolution)` of the
12
+ * product meant, so 525 cells at 1/75 are seven texels, not eight.
13
+ *
14
+ * @param {number} cells
15
+ * @param {number} resolution
16
+ * @returns {number}
17
+ */
18
+ function texels_covering(cells, resolution) {
19
+ return Math.ceil(snap_to_integer(cells * resolution));
20
+ }
21
+
9
22
  export class GridDataLayer {
10
23
  /**
11
24
  * Unique ID to reference the layer
@@ -19,6 +32,25 @@ export class GridDataLayer {
19
32
  */
20
33
  resolution = 1;
21
34
 
35
+ /**
36
+ * Whether a texel is stretched over the cells it stands for, laid from the grid's first corner, rather than
37
+ * centred on a point.
38
+ *
39
+ * Unstretched, texel `t` is centred on grid position `t / resolution` (`texel = grid · resolution`, see
40
+ * `generation/COORDINATES.md`), and the grid must be a whole number of texels across. At resolution 0.5 that puts
41
+ * texel 0 on cell 0, texel 1 on cell 2, and a cell between them half way.
42
+ *
43
+ * Stretched, texel `t` covers the cells from `t / resolution` up to `(t + 1) / resolution`, counted from the grid's
44
+ * first corner: at resolution 0.5, cells `2t` and `2t + 1`; at 2, a cell is two texels across. The layer has as
45
+ * many texels as covering the grid takes, so any grid size will do; on one that is not a whole number of texels
46
+ * across, the last row and column reach past the grid's far edge.
47
+ *
48
+ * At resolution 1 the two are the same. Set it before the layer is added to a grid.
49
+ *
50
+ * @type {boolean}
51
+ */
52
+ stretch = false;
53
+
22
54
  /**
23
55
  *
24
56
  * @type {Sampler2D}
@@ -26,22 +58,24 @@ export class GridDataLayer {
26
58
  sampler = new Sampler2D([], 1, 0, 0);
27
59
 
28
60
  /**
29
- *
61
+ * Size of the grid the sampler was last sized for, in cells; the empty sampler a layer starts with is for none
30
62
  * @type {Vector2}
31
63
  */
32
- size = new Vector2(1, 1);
64
+ size = new Vector2(0, 0);
33
65
 
34
66
  /**
35
67
  *
36
68
  * @param {string} id
37
69
  * @param {BinaryDataType} type
38
70
  * @param {number} [resolution=1]
71
+ * @param {boolean} [stretch=false] see {@link GridDataLayer#stretch}
39
72
  * @returns {GridDataLayer}
40
73
  */
41
- static from(id, type, resolution = 1) {
74
+ static from(id, type, resolution = 1, stretch = false) {
42
75
  assert.isString(id, 'id');
43
76
  assert.enum(type, BinaryDataType, 'type');
44
77
  assert.isNumber(resolution, 'resolution');
78
+ assert.isBoolean(stretch, 'stretch');
45
79
 
46
80
  const TypedArrayConstructor = DataType2TypedArrayConstructorMapping[type];
47
81
 
@@ -54,6 +88,7 @@ export class GridDataLayer {
54
88
  layer.sampler.data = new TypedArrayConstructor();
55
89
 
56
90
  layer.resolution = resolution;
91
+ layer.stretch = stretch;
57
92
 
58
93
  layer.id = id;
59
94
 
@@ -73,7 +108,11 @@ export class GridDataLayer {
73
108
 
74
109
  this.size.set(x, y);
75
110
 
76
- this.sampler.resize(x * this.resolution, y * this.resolution);
111
+ if (this.stretch) {
112
+ this.sampler.resize(texels_covering(x, this.resolution), texels_covering(y, this.resolution));
113
+ } else {
114
+ this.sampler.resize(x * this.resolution, y * this.resolution);
115
+ }
77
116
  }
78
117
 
79
118
  }
@@ -40,7 +40,13 @@ export class GridCellActionPlaceTags extends GridCellAction {
40
40
  */
41
41
  resize(x: number, y: number): void;
42
42
  /**
43
- * Write placement tags into the grid at a given position, the tag pattern will be rotated as specified
43
+ * Write placement tags into the grid at a given position, the tag pattern will be rotated as specified.
44
+ *
45
+ * Each cell of the pattern lands on a grid cell, and goes into that cell's texels as a write at the cell would
46
+ * ({@link grid_to_texel_span}): the texel a {@link CellMatcherLayerBitMaskTest} reads at that cell, all of the
47
+ * cell's texels on a stretched layer finer than the grid, and on a coarser layer the texel holding the cell, where
48
+ * it is combined by {@link operation} with whatever else the pattern put there. A pattern cell off the grid writes
49
+ * nothing, though a texel of a coarse layer may reach there.
44
50
  */
45
51
  execute(data: any, x: any, y: any, rotation: any): void;
46
52
  }
@@ -1 +1 @@
1
- {"version":3,"file":"GridCellActionPlaceTags.d.ts","sourceRoot":"","sources":["../../../../../src/generation/placement/action/GridCellActionPlaceTags.js"],"names":[],"mappings":"AAYA;IA0CI;;;;;OAKG;IACH,mBAJW,MAAM,SACN,MAAM,GACJ,uBAAuB,CAcnC;IA1DD;;;OAGG;IACH,kBAFmB,MAAM,QAAE,MAAM,KAAG,MAAM,CAEpB;IAEtB;;;OAGG;IACH,MAFU,SAAS,CAEc;IAEjC;;;OAGG;IACH,SAFU,MAAM,CAED;IAEf;;;;OAIG;IACH,gBAAe;IAOf,uCAQC;IAsBD;;;OAGG;IACH,WAFW,MAAM,QAMhB;IAED;;;;OAIG;IACH,UAHW,MAAM,KACN,MAAM,QAIhB;IAED;;OAEG;IACH,wDA0CC;CACJ;+BAvI8B,qBAAqB;0BAD1B,uDAAuD"}
1
+ {"version":3,"file":"GridCellActionPlaceTags.d.ts","sourceRoot":"","sources":["../../../../../src/generation/placement/action/GridCellActionPlaceTags.js"],"names":[],"mappings":"AAsBA;IA0CI;;;;;OAKG;IACH,mBAJW,MAAM,SACN,MAAM,GACJ,uBAAuB,CAcnC;IA1DD;;;OAGG;IACH,kBAFmB,MAAM,QAAE,MAAM,KAAG,MAAM,CAEpB;IAEtB;;;OAGG;IACH,MAFU,SAAS,CAEc;IAEjC;;;OAGG;IACH,SAFU,MAAM,CAED;IAEf;;;;OAIG;IACH,gBAAe;IAOf,uCAQC;IAsBD;;;OAGG;IACH,WAFW,MAAM,QAMhB;IAED;;;;OAIG;IACH,UAHW,MAAM,KACN,MAAM,QAIhB;IAED;;;;;;;;OAQG;IACH,wDAoDC;CACJ;+BA9J8B,qBAAqB;0BAF1B,uDAAuD"}
@@ -1,7 +1,10 @@
1
1
  import { assert } from "../../../core/assert.js";
2
2
  import { bitwiseOr } from "../../../core/binary/operations/bitwiseOr.js";
3
3
  import { v2_rotate_cos_sin } from "../../../core/geom/vec2/v2_rotate_cos_sin.js";
4
+ import { max2 } from "../../../core/math/max2.js";
5
+ import { min2 } from "../../../core/math/min2.js";
4
6
  import { Sampler2D } from "../../../engine/graphics/texture/sampler/Sampler2D.js";
7
+ import { grid_to_texel_span } from "../../grid/coords/grid_to_texel_span.js";
5
8
  import { GridCellAction } from "./GridCellAction.js";
6
9
 
7
10
  /**
@@ -10,6 +13,13 @@ import { GridCellAction } from "./GridCellAction.js";
10
13
  */
11
14
  const scratch_offset = new Float64Array(2);
12
15
 
16
+ /**
17
+ * The texels a pattern cell covers along each axis, `[first, last]`; read out before the next cell
18
+ * @type {Int32Array}
19
+ */
20
+ const scratch_span_x = new Int32Array(2);
21
+ const scratch_span_y = new Int32Array(2);
22
+
13
23
  export class GridCellActionPlaceTags extends GridCellAction {
14
24
 
15
25
  /**
@@ -92,7 +102,13 @@ export class GridCellActionPlaceTags extends GridCellAction {
92
102
  }
93
103
 
94
104
  /**
95
- * Write placement tags into the grid at a given position, the tag pattern will be rotated as specified
105
+ * Write placement tags into the grid at a given position, the tag pattern will be rotated as specified.
106
+ *
107
+ * Each cell of the pattern lands on a grid cell, and goes into that cell's texels as a write at the cell would
108
+ * ({@link grid_to_texel_span}): the texel a {@link CellMatcherLayerBitMaskTest} reads at that cell, all of the
109
+ * cell's texels on a stretched layer finer than the grid, and on a coarser layer the texel holding the cell, where
110
+ * it is combined by {@link operation} with whatever else the pattern put there. A pattern cell off the grid writes
111
+ * nothing, though a texel of a coarse layer may reach there.
96
112
  */
97
113
  execute(data, x, y, rotation) {
98
114
  const sin = Math.sin(rotation);
@@ -103,7 +119,8 @@ export class GridCellActionPlaceTags extends GridCellAction {
103
119
  const height = tags.height;
104
120
  const width = tags.width;
105
121
 
106
- const sampler = this.__layer.sampler;
122
+ const layer = this.__layer;
123
+ const sampler = layer.sampler;
107
124
 
108
125
  for (let local_y = 0; local_y < height; local_y++) {
109
126
  for (let local_x = 0; local_x < width; local_x++) {
@@ -112,28 +129,37 @@ export class GridCellActionPlaceTags extends GridCellAction {
112
129
  //rotate rule position
113
130
  v2_rotate_cos_sin(scratch_offset, 0, local_x, local_y, cos, sin);
114
131
 
115
- //
116
- const target_x = Math.round(scratch_offset[0] + x);
117
- const target_y = Math.round(scratch_offset[1] + y);
118
-
119
- if (
120
- target_x < 0
121
- || target_x >= sampler.width
122
- || target_y < 0
123
- || target_y >= sampler.height
124
- ) {
125
- // out of bounds
132
+ // the cell the pattern cell lands on; rounded before it is mapped, so that the residue of a turn
133
+ // cannot tip it onto the other side of a texel boundary from where a matcher reads the cell
134
+ const cell_x = Math.round(scratch_offset[0] + x);
135
+ const cell_y = Math.round(scratch_offset[1] + y);
136
+
137
+ if (cell_x < 0 || cell_x >= data.width || cell_y < 0 || cell_y >= data.height) {
138
+ // off the grid
126
139
  continue;
127
140
  }
128
141
 
142
+ grid_to_texel_span(scratch_span_x, cell_x, layer.resolution, layer.stretch);
143
+ grid_to_texel_span(scratch_span_y, cell_y, layer.resolution, layer.stretch);
144
+
145
+ // out of the layer
146
+ const x0 = max2(scratch_span_x[0], 0);
147
+ const x1 = min2(scratch_span_x[1], sampler.width - 1);
148
+ const y0 = max2(scratch_span_y[0], 0);
149
+ const y1 = min2(scratch_span_y[1], sampler.height - 1);
150
+
129
151
  //read the tag value
130
152
  const cell_tags = tags.readChannel(local_x, local_y, 0);
131
153
 
132
- const source = sampler.readChannel(target_x, target_y, 0);
154
+ for (let target_y = y0; target_y <= y1; target_y++) {
155
+ for (let target_x = x0; target_x <= x1; target_x++) {
156
+ const source = sampler.readChannel(target_x, target_y, 0);
133
157
 
134
- const result = this.operation(source, cell_tags);
158
+ const result = this.operation(source, cell_tags);
135
159
 
136
- sampler.writeChannel(target_x, target_y, 0, result);
160
+ sampler.writeChannel(target_x, target_y, 0, result);
161
+ }
162
+ }
137
163
  }
138
164
  }
139
165
  }
@@ -22,6 +22,11 @@ export class GridCellActionWriteFilterToLayer extends GridCellAction {
22
22
  */
23
23
  private __layer;
24
24
  initialize(data: any, seed: any): void;
25
+ /**
26
+ * Writes the filter's value at grid position (x, y): into the texel nearest it, or on a stretched layer into the
27
+ * texels of the cell holding it ({@link grid_to_texel_span}). A position off the grid writes nothing, though a
28
+ * texel of a coarse layer may reach there.
29
+ */
25
30
  execute(data: any, x: any, y: any, rotation: any): void;
26
31
  }
27
32
  import { GridCellAction } from "./GridCellAction.js";
@@ -1 +1 @@
1
- {"version":3,"file":"GridCellActionWriteFilterToLayer.d.ts","sourceRoot":"","sources":["../../../../../src/generation/placement/action/GridCellActionWriteFilterToLayer.js"],"names":[],"mappings":"AAIA;IAqBI;;;;OAIG;IACH,mBAHW,MAAM,wDAahB;IAlCD;;;OAGG;IACH,mBAAc;IAEd;;;OAGG;IACH,SAFU,MAAM,CAED;IAEf;;;;OAIG;IACH,gBAAe;IAuBf,uCAoBC;IAED,wDA0BC;CACJ;+BA7F8B,qBAAqB"}
1
+ {"version":3,"file":"GridCellActionWriteFilterToLayer.d.ts","sourceRoot":"","sources":["../../../../../src/generation/placement/action/GridCellActionWriteFilterToLayer.js"],"names":[],"mappings":"AAaA;IAqBI;;;;OAIG;IACH,mBAHW,MAAM,wDAahB;IAlCD;;;OAGG;IACH,mBAAc;IAEd;;;OAGG;IACH,SAFU,MAAM,CAED;IAEf;;;;OAIG;IACH,gBAAe;IAuBf,uCAoBC;IAED;;;;OAIG;IACH,wDAmCC;CACJ;+BAlH8B,qBAAqB"}
@@ -1,7 +1,16 @@
1
1
  import { assert } from "../../../core/assert.js";
2
- import { grid_to_texel } from "../../grid/coords/grid_to_texel.js";
2
+ import { max2 } from "../../../core/math/max2.js";
3
+ import { min2 } from "../../../core/math/min2.js";
4
+ import { grid_to_texel_span } from "../../grid/coords/grid_to_texel_span.js";
3
5
  import { GridCellAction } from "./GridCellAction.js";
4
6
 
7
+ /**
8
+ * The texels a write covers along each axis, `[first, last]`; read out before the next write
9
+ * @type {Int32Array}
10
+ */
11
+ const scratch_span_x = new Int32Array(2);
12
+ const scratch_span_y = new Int32Array(2);
13
+
5
14
  export class GridCellActionWriteFilterToLayer extends GridCellAction {
6
15
 
7
16
  /**
@@ -66,10 +75,20 @@ export class GridCellActionWriteFilterToLayer extends GridCellAction {
66
75
  this.filter.ensureInitialized(data, seed);
67
76
  }
68
77
 
78
+ /**
79
+ * Writes the filter's value at grid position (x, y): into the texel nearest it, or on a stretched layer into the
80
+ * texels of the cell holding it ({@link grid_to_texel_span}). A position off the grid writes nothing, though a
81
+ * texel of a coarse layer may reach there.
82
+ */
69
83
  execute(data, x, y, rotation) {
70
84
 
71
85
  const value = this.filter.execute(data, x, y, rotation);
72
86
 
87
+ if (x < -0.5 || x >= data.width - 0.5 || y < -0.5 || y >= data.height - 0.5) {
88
+ // off the grid, write is discarded
89
+ return;
90
+ }
91
+
73
92
  /**
74
93
  *
75
94
  * @type {GridDataLayer}
@@ -82,15 +101,19 @@ export class GridCellActionWriteFilterToLayer extends GridCellAction {
82
101
  */
83
102
  const sampler = layer.sampler;
84
103
 
85
- // round the coordinates to the nearest texel
86
- const iX = Math.round(grid_to_texel(x, layer.resolution));
87
- const iY = Math.round(grid_to_texel(y, layer.resolution));
104
+ grid_to_texel_span(scratch_span_x, x, layer.resolution, layer.stretch);
105
+ grid_to_texel_span(scratch_span_y, y, layer.resolution, layer.stretch);
88
106
 
89
- if (iX < 0 || iX >= sampler.width || iY < 0 || iY >= sampler.height) {
90
- // out of bounds, write is discarded
91
- return;
92
- }
107
+ // out of the layer, write is discarded
108
+ const x0 = max2(scratch_span_x[0], 0);
109
+ const x1 = min2(scratch_span_x[1], sampler.width - 1);
110
+ const y0 = max2(scratch_span_y[0], 0);
111
+ const y1 = min2(scratch_span_y[1], sampler.height - 1);
93
112
 
94
- sampler.writeChannel(iX, iY, 0, value);
113
+ for (let texel_y = y0; texel_y <= y1; texel_y++) {
114
+ for (let texel_x = x0; texel_x <= x1; texel_x++) {
115
+ sampler.writeChannel(texel_x, texel_y, 0, value);
116
+ }
117
+ }
95
118
  }
96
119
  }
@@ -1 +1 @@
1
- {"version":3,"file":"CellMatcherLayerBitMaskTest.d.ts","sourceRoot":"","sources":["../../../../src/generation/rules/CellMatcherLayerBitMaskTest.js"],"names":[],"mappings":"AAIA;IA4BI;;;;;OAKG;IACH,kBAJW,MAAM,SACN,MAAM,GACL,2BAA2B,CAYtC;IA1CD;;;OAGG;IACH,MAFU,MAAM,CAEP;IAGT,yDAiBC;CAmBJ;qCA/CoC,2BAA2B"}
1
+ {"version":3,"file":"CellMatcherLayerBitMaskTest.d.ts","sourceRoot":"","sources":["../../../../src/generation/rules/CellMatcherLayerBitMaskTest.js"],"names":[],"mappings":"AAIA;IAgCI;;;;;OAKG;IACH,kBAJW,MAAM,SACN,MAAM,GACL,2BAA2B,CAYtC;IA9CD;;;OAGG;IACH,MAFU,MAAM,CAEP;IAGT,yDAqBC;CAmBJ;qCAnDoC,2BAA2B"}
@@ -13,12 +13,16 @@ export class CellMatcherLayerBitMaskTest extends GridLayerCellMatcher {
13
13
 
14
14
  match(grid, x, y, rotation) {
15
15
 
16
+ if (x < -0.5 || x >= grid.width - 0.5 || y < -0.5 || y >= grid.height - 0.5) {
17
+ // off the grid matches nothing, though a texel of a coarse layer may reach there
18
+ return false;
19
+ }
16
20
 
17
21
  const layer = this.__layer;
18
22
  const sampler = layer.sampler;
19
23
 
20
- const _x = Math.round(grid_to_texel(x, layer.resolution));
21
- const _y = Math.round(grid_to_texel(y, layer.resolution));
24
+ const _x = Math.round(grid_to_texel(x, layer.resolution, layer.stretch));
25
+ const _y = Math.round(grid_to_texel(y, layer.resolution, layer.stretch));
22
26
 
23
27
  if (_x < 0 || _x >= sampler.width || _y < 0 || _y >= sampler.height) {
24
28
  // out of bounds matches nothing; probing off-map must not match border cells
@@ -6,7 +6,7 @@
6
6
  */
7
7
  export class GridWFCCompiledTileSet {
8
8
  /**
9
- * @param {{name:string, edges:string[], weight:number, rotations:number, tags:string[], action:(GridCellAction|null)}[]} prototypes
9
+ * @param {{name:string, edges:string[], weight:number, rotations:number, tags:string[], value:number, action:(GridCellAction|null)}[]} prototypes
10
10
  */
11
11
  constructor(prototypes: {
12
12
  name: string;
@@ -14,10 +14,11 @@ export class GridWFCCompiledTileSet {
14
14
  weight: number;
15
15
  rotations: number;
16
16
  tags: string[];
17
+ value: number;
17
18
  action: (GridCellAction | null);
18
19
  }[]);
19
20
  /**
20
- * @type {{name:string, edges:string[], weight:number, rotations:number, tags:string[], action:(GridCellAction|null)}[]}
21
+ * @type {{name:string, edges:string[], weight:number, rotations:number, tags:string[], value:number, action:(GridCellAction|null)}[]}
21
22
  */
22
23
  prototypes: {
23
24
  name: string;
@@ -25,6 +26,7 @@ export class GridWFCCompiledTileSet {
25
26
  weight: number;
26
27
  rotations: number;
27
28
  tags: string[];
29
+ value: number;
28
30
  action: (GridCellAction | null);
29
31
  }[];
30
32
  /** @type {number} */
@@ -1 +1 @@
1
- {"version":3,"file":"GridWFCCompiledTileSet.d.ts","sourceRoot":"","sources":["../../../../src/generation/wfc/GridWFCCompiledTileSet.js"],"names":[],"mappings":"AA2CA;;;;;GAKG;AACH;IACI;;OAEG;IACH,wBAFW;QAAC,IAAI,EAAC,MAAM,CAAC;QAAC,KAAK,EAAC,MAAM,EAAE,CAAC;QAAC,MAAM,EAAC,MAAM,CAAC;QAAC,SAAS,EAAC,MAAM,CAAC;QAAC,IAAI,EAAC,MAAM,EAAE,CAAC;QAAC,MAAM,EAAC,CAAC,iBAAe,IAAI,CAAC,CAAA;KAAC,EAAE,EAiHvH;IA1GG;;OAEG;IACH,YAFU;QAAC,IAAI,EAAC,MAAM,CAAC;QAAC,KAAK,EAAC,MAAM,EAAE,CAAC;QAAC,MAAM,EAAC,MAAM,CAAC;QAAC,SAAS,EAAC,MAAM,CAAC;QAAC,IAAI,EAAC,MAAM,EAAE,CAAC;QAAC,MAAM,EAAC,CAAC,iBAAe,IAAI,CAAC,CAAA;KAAC,EAAE,CAEnF;IAuCpC,qBAAqB;IACrB,YADW,MAAM,CACW;IAC5B,0BAA0B;IAC1B,gBADW,WAAW,CACgC;IACtD,6CAA6C;IAC7C,YAD+B,UAAU,CACI;IAC7C,uBAAuB;IACvB,YADW,MAAM,EAAE,CACS;IAyC5B,2BAA2B;IAC3B,OADW,YAAY,CACL;IAClB,6BAA6B;IAC7B,SADW,cAAc,CACiB;IAE1C;;;OAGG;IACH,oBAA4B;IAE5B;;;OAGG;IACH,oBAA4B;IAGhC;;;;;OAKG;IACH,mBAHW,WAAW,GACT,MAAM,CAIlB;IAED;;;OAGG;IACH,sBAHW,MAAM,GACJ,MAAM,CAIlB;IAED;;;;OAIG;IACH,mBAJW,MAAM,OACN,MAAM,GACJ,OAAO,CAInB;IAED;;;;;OAKG;IACH,iBAHW,MAAM,GACJ,WAAW,CAoBvB;IAED;;;;;;;;;;OAUG;IACH,eAJW,MAAM,OACN,MAAM,GACJ,MAAM,EAAE,CAoCpB;IAED;;;;;;;;;;;OAWG;IACH,qBAHW,MAAM,GAAC,IAAI,GACT,WAAW,CAuBvB;IAED;;;;;;;;;;OAUG;IACH,QAFa,MAAM,EAAE,CAiCpB;IAED;;;OAGG;IACH,eAHW,MAAM,GACJ,MAAM,CAMlB;CACJ;6BAjW4B,gCAAgC;+BAC9B,kCAAkC;4BAGrC,kBAAkB"}
1
+ {"version":3,"file":"GridWFCCompiledTileSet.d.ts","sourceRoot":"","sources":["../../../../src/generation/wfc/GridWFCCompiledTileSet.js"],"names":[],"mappings":"AA2CA;;;;;GAKG;AACH;IACI;;OAEG;IACH,wBAFW;QAAC,IAAI,EAAC,MAAM,CAAC;QAAC,KAAK,EAAC,MAAM,EAAE,CAAC;QAAC,MAAM,EAAC,MAAM,CAAC;QAAC,SAAS,EAAC,MAAM,CAAC;QAAC,IAAI,EAAC,MAAM,EAAE,CAAC;QAAC,KAAK,EAAC,MAAM,CAAC;QAAC,MAAM,EAAC,CAAC,iBAAe,IAAI,CAAC,CAAA;KAAC,EAAE,EAiHrI;IA1GG;;OAEG;IACH,YAFU;QAAC,IAAI,EAAC,MAAM,CAAC;QAAC,KAAK,EAAC,MAAM,EAAE,CAAC;QAAC,MAAM,EAAC,MAAM,CAAC;QAAC,SAAS,EAAC,MAAM,CAAC;QAAC,IAAI,EAAC,MAAM,EAAE,CAAC;QAAC,KAAK,EAAC,MAAM,CAAC;QAAC,MAAM,EAAC,CAAC,iBAAe,IAAI,CAAC,CAAA;KAAC,EAAE,CAEjG;IAuCpC,qBAAqB;IACrB,YADW,MAAM,CACW;IAC5B,0BAA0B;IAC1B,gBADW,WAAW,CACgC;IACtD,6CAA6C;IAC7C,YAD+B,UAAU,CACI;IAC7C,uBAAuB;IACvB,YADW,MAAM,EAAE,CACS;IAyC5B,2BAA2B;IAC3B,OADW,YAAY,CACL;IAClB,6BAA6B;IAC7B,SADW,cAAc,CACiB;IAE1C;;;OAGG;IACH,oBAA4B;IAE5B;;;OAGG;IACH,oBAA4B;IAGhC;;;;;OAKG;IACH,mBAHW,WAAW,GACT,MAAM,CAIlB;IAED;;;OAGG;IACH,sBAHW,MAAM,GACJ,MAAM,CAIlB;IAED;;;;OAIG;IACH,mBAJW,MAAM,OACN,MAAM,GACJ,OAAO,CAInB;IAED;;;;;OAKG;IACH,iBAHW,MAAM,GACJ,WAAW,CAoBvB;IAED;;;;;;;;;;OAUG;IACH,eAJW,MAAM,OACN,MAAM,GACJ,MAAM,EAAE,CAoCpB;IAED;;;;;;;;;;;OAWG;IACH,qBAHW,MAAM,GAAC,IAAI,GACT,WAAW,CAuBvB;IAED;;;;;;;;;;OAUG;IACH,QAFa,MAAM,EAAE,CAiCpB;IAED;;;OAGG;IACH,eAHW,MAAM,GACJ,MAAM,CAMlB;CACJ;6BAjW4B,gCAAgC;+BAC9B,kCAAkC;4BAGrC,kBAAkB"}
@@ -49,7 +49,7 @@ EDGE_TO_DIRECTION[GridWFCEdge.PositiveY] = 1;
49
49
  */
50
50
  export class GridWFCCompiledTileSet {
51
51
  /**
52
- * @param {{name:string, edges:string[], weight:number, rotations:number, tags:string[], action:(GridCellAction|null)}[]} prototypes
52
+ * @param {{name:string, edges:string[], weight:number, rotations:number, tags:string[], value:number, action:(GridCellAction|null)}[]} prototypes
53
53
  */
54
54
  constructor(prototypes) {
55
55
  if (prototypes.length === 0) {
@@ -57,7 +57,7 @@ export class GridWFCCompiledTileSet {
57
57
  }
58
58
 
59
59
  /**
60
- * @type {{name:string, edges:string[], weight:number, rotations:number, tags:string[], action:(GridCellAction|null)}[]}
60
+ * @type {{name:string, edges:string[], weight:number, rotations:number, tags:string[], value:number, action:(GridCellAction|null)}[]}
61
61
  */
62
62
  this.prototypes = prototypes.slice();
63
63
 
@@ -24,7 +24,7 @@ export class GridWFCTileSet {
24
24
  /**
25
25
  * Tiles as they were added — one per {@link add} call, one per cell of an {@link add_piece}.
26
26
  *
27
- * @type {{name:string, edges:string[], weight:number, rotations:number, tags:string[], action:(GridCellAction|null)}[]}
27
+ * @type {{name:string, edges:string[], weight:number, rotations:number, tags:string[], value:number, action:(GridCellAction|null)}[]}
28
28
  */
29
29
  prototypes: {
30
30
  name: string;
@@ -32,6 +32,7 @@ export class GridWFCTileSet {
32
32
  weight: number;
33
33
  rotations: number;
34
34
  tags: string[];
35
+ value: number;
35
36
  action: (GridCellAction | null);
36
37
  }[];
37
38
  /**
@@ -55,16 +56,19 @@ export class GridWFCTileSet {
55
56
  * that looks the same turned any way, 2 for one with a half-turn symmetry (a straight
56
57
  * wall), 4 for one with none (a bend)
57
58
  * @param {string[]} [options.tags] what the tile is, for restricting cells to a kind of tile
59
+ * @param {number} [options.value] what the grid task writes into its layer where the tile lands,
60
+ * however it is turned; the index of the prototype unless given
58
61
  * @param {GridCellAction|null} [options.action] run on the cell the tile lands in, with the
59
62
  * tile's rotation in radians
60
63
  * @returns {number} index of the prototype
61
64
  */
62
- add({ name, edges, weight, rotations, tags, action }: {
65
+ add({ name, edges, weight, rotations, tags, value, action }: {
63
66
  name: string;
64
67
  edges: string[];
65
68
  weight?: number;
66
69
  rotations?: number;
67
70
  tags?: string[];
71
+ value?: number;
68
72
  action?: GridCellAction | null;
69
73
  }): number;
70
74
  /**
@@ -76,35 +80,40 @@ export class GridWFCTileSet {
76
80
  *
77
81
  * @param {Object} options
78
82
  * @param {string} options.name
79
- * @param {{x:number, y:number, edges?:string[], tags?:string[], action?:(GridCellAction|null)}[]} options.cells
83
+ * @param {{x:number, y:number, edges?:string[], tags?:string[], value?:number, action?:(GridCellAction|null)}[]} options.cells
80
84
  * offsets of the piece's cells at rotation 0, every cell sharing an edge with another —
81
85
  * cells that only touch at a corner, or not at all, would be placed apart, so they are an
82
86
  * error. `edges` gives a cell's OUTWARD-facing
83
87
  * sockets (entries for edges that face another cell of the piece are ignored) and
84
- * defaults to `edge` all round. `action` usually sits on one cell only — the one the
85
- * piece's model stands on.
88
+ * defaults to `edge` all round. `value` is the cell's own, in place of the piece's.
89
+ * `action` usually sits on one cell only — the one the piece's model stands on.
86
90
  * @param {string} [options.edge] socket of every outward-facing edge a cell does not name
87
91
  * @param {number} [options.weight=1]
88
92
  * @param {number} [options.rotations=1]
89
93
  * @param {string[]} [options.tags] carried by every cell of the piece, with the cell's own
94
+ * @param {number} [options.value] what the grid task writes into its layer under every cell of
95
+ * the piece that names no value of its own; with neither, a cell writes the index of its
96
+ * prototype
90
97
  * @returns {number[]} index of each cell's prototype, in the order of `cells`
91
98
  */
92
- add_piece({ name, cells, edge, weight, rotations, tags }: {
99
+ add_piece({ name, cells, edge, weight, rotations, tags, value }: {
93
100
  name: string;
94
101
  cells: {
95
102
  x: number;
96
103
  y: number;
97
104
  edges?: string[];
98
105
  tags?: string[];
106
+ value?: number;
99
107
  action?: (GridCellAction | null);
100
108
  }[];
101
109
  edge?: string;
102
110
  weight?: number;
103
111
  rotations?: number;
104
112
  tags?: string[];
113
+ value?: number;
105
114
  }): number[];
106
115
  /**
107
- * @param {{name:string, edges:string[], weight:number, rotations:number, tags:string[], action:(GridCellAction|null)}} prototype
116
+ * @param {{name:string, edges:string[], weight:number, rotations:number, tags:string[], value:number, action:(GridCellAction|null)}} prototype
108
117
  * @returns {number}
109
118
  * @private
110
119
  */
@@ -1 +1 @@
1
- {"version":3,"file":"GridWFCTileSet.d.ts","sourceRoot":"","sources":["../../../../src/generation/wfc/GridWFCTileSet.js"],"names":[],"mappings":"AA+DA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH;IAEI;;;;OAIG;IACH,YAFU;QAAC,IAAI,EAAC,MAAM,CAAC;QAAC,KAAK,EAAC,MAAM,EAAE,CAAC;QAAC,MAAM,EAAC,MAAM,CAAC;QAAC,SAAS,EAAC,MAAM,CAAC;QAAC,IAAI,EAAC,MAAM,EAAE,CAAC;QAAC,MAAM,EAAC,CAAC,iBAAe,IAAI,CAAC,CAAA;KAAC,EAAE,CAEvG;IAEhB;;;OAGG;IACH,sBAAkB;IAElB;;;OAGG;IACH,mBAAkB;IAElB;;;;;;;;;;;;;;OAcG;IACH;QAX2B,IAAI,EAApB,MAAM;QACY,KAAK,EAAvB,MAAM,EAAE;QACS,MAAM,GAAvB,MAAM;QACW,SAAS,GAA1B,MAAM;QAGa,IAAI,GAAvB,MAAM,EAAE;QACsB,MAAM,GAApC,iBAAe,IAAI;QAEjB,MAAM,CASlB;IAED;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH;QAd2B,IAAI,EAApB,MAAM;QAC0F,KAAK,EAArG;YAAC,CAAC,EAAC,MAAM,CAAC;YAAC,CAAC,EAAC,MAAM,CAAC;YAAC,KAAK,CAAC,EAAC,MAAM,EAAE,CAAC;YAAC,IAAI,CAAC,EAAC,MAAM,EAAE,CAAC;YAAC,MAAM,CAAC,EAAC,CAAC,iBAAe,IAAI,CAAC,CAAA;SAAC,EAAE;QAOrE,IAAI,GAArB,MAAM;QACW,MAAM,GAAvB,MAAM;QACW,SAAS,GAA1B,MAAM;QACa,IAAI,GAAvB,MAAM,EAAE;QACN,MAAM,EAAE,CAkGpB;IAED;;;;OAIG;IACH,eAKC;IAED;;;;OAIG;IACH,WAFa,sBAAsB,CAQlC;CACJ;uCAhRsC,6BAA6B"}
1
+ {"version":3,"file":"GridWFCTileSet.d.ts","sourceRoot":"","sources":["../../../../src/generation/wfc/GridWFCTileSet.js"],"names":[],"mappings":"AAwEA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH;IAEI;;;;OAIG;IACH,YAFU;QAAC,IAAI,EAAC,MAAM,CAAC;QAAC,KAAK,EAAC,MAAM,EAAE,CAAC;QAAC,MAAM,EAAC,MAAM,CAAC;QAAC,SAAS,EAAC,MAAM,CAAC;QAAC,IAAI,EAAC,MAAM,EAAE,CAAC;QAAC,KAAK,EAAC,MAAM,CAAC;QAAC,MAAM,EAAC,CAAC,iBAAe,IAAI,CAAC,CAAA;KAAC,EAAE,CAErH;IAEhB;;;OAGG;IACH,sBAAkB;IAElB;;;OAGG;IACH,mBAAkB;IAElB;;;;;;;;;;;;;;;;OAgBG;IACH;QAb2B,IAAI,EAApB,MAAM;QACY,KAAK,EAAvB,MAAM,EAAE;QACS,MAAM,GAAvB,MAAM;QACW,SAAS,GAA1B,MAAM;QAGa,IAAI,GAAvB,MAAM,EAAE;QACS,KAAK,GAAtB,MAAM;QAEwB,MAAM,GAApC,iBAAe,IAAI;QAEjB,MAAM,CAUlB;IAED;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH;QAjB2B,IAAI,EAApB,MAAM;QACyG,KAAK,EAApH;YAAC,CAAC,EAAC,MAAM,CAAC;YAAC,CAAC,EAAC,MAAM,CAAC;YAAC,KAAK,CAAC,EAAC,MAAM,EAAE,CAAC;YAAC,IAAI,CAAC,EAAC,MAAM,EAAE,CAAC;YAAC,KAAK,CAAC,EAAC,MAAM,CAAC;YAAC,MAAM,CAAC,EAAC,CAAC,iBAAe,IAAI,CAAC,CAAA;SAAC,EAAE;QAOpF,IAAI,GAArB,MAAM;QACW,MAAM,GAAvB,MAAM;QACW,SAAS,GAA1B,MAAM;QACa,IAAI,GAAvB,MAAM,EAAE;QACS,KAAK,GAAtB,MAAM;QAGJ,MAAM,EAAE,CA2GpB;IAED;;;;OAIG;IACH,eAKC;IAED;;;;OAIG;IACH,WAFa,sBAAsB,CAQlC;CACJ;uCAxSsC,6BAA6B"}
@@ -40,6 +40,15 @@ function assert_tile_options(weight, rotations, tags) {
40
40
  assert.isArray(tags, 'tags');
41
41
  }
42
42
 
43
+ /**
44
+ * @param {number} value
45
+ * @param {string} what
46
+ */
47
+ function assert_value(value, what) {
48
+ assert.isNumber(value, what);
49
+ assert.isFinite(value, what);
50
+ }
51
+
43
52
  /**
44
53
  * @param {GridCellAction|null} action
45
54
  * @param {string} what
@@ -88,7 +97,7 @@ export class GridWFCTileSet {
88
97
  /**
89
98
  * Tiles as they were added — one per {@link add} call, one per cell of an {@link add_piece}.
90
99
  *
91
- * @type {{name:string, edges:string[], weight:number, rotations:number, tags:string[], action:(GridCellAction|null)}[]}
100
+ * @type {{name:string, edges:string[], weight:number, rotations:number, tags:string[], value:number, action:(GridCellAction|null)}[]}
92
101
  */
93
102
  prototypes = [];
94
103
 
@@ -115,17 +124,20 @@ export class GridWFCTileSet {
115
124
  * that looks the same turned any way, 2 for one with a half-turn symmetry (a straight
116
125
  * wall), 4 for one with none (a bend)
117
126
  * @param {string[]} [options.tags] what the tile is, for restricting cells to a kind of tile
127
+ * @param {number} [options.value] what the grid task writes into its layer where the tile lands,
128
+ * however it is turned; the index of the prototype unless given
118
129
  * @param {GridCellAction|null} [options.action] run on the cell the tile lands in, with the
119
130
  * tile's rotation in radians
120
131
  * @returns {number} index of the prototype
121
132
  */
122
- add({ name, edges, weight = 1, rotations = 1, tags = [], action = null }) {
133
+ add({ name, edges, weight = 1, rotations = 1, tags = [], value = this.prototypes.length, action = null }) {
123
134
  assert.isString(name, 'name');
124
135
  assert_edges(edges, 'edges');
125
136
  assert_tile_options(weight, rotations, tags);
137
+ assert_value(value, 'value');
126
138
  assert_action(action, 'action');
127
139
 
128
- return this.__push({ name, edges: edges.slice(), weight, rotations, tags: tags.slice(), action });
140
+ return this.__push({ name, edges: edges.slice(), weight, rotations, tags: tags.slice(), value, action });
129
141
  }
130
142
 
131
143
  /**
@@ -137,20 +149,23 @@ export class GridWFCTileSet {
137
149
  *
138
150
  * @param {Object} options
139
151
  * @param {string} options.name
140
- * @param {{x:number, y:number, edges?:string[], tags?:string[], action?:(GridCellAction|null)}[]} options.cells
152
+ * @param {{x:number, y:number, edges?:string[], tags?:string[], value?:number, action?:(GridCellAction|null)}[]} options.cells
141
153
  * offsets of the piece's cells at rotation 0, every cell sharing an edge with another —
142
154
  * cells that only touch at a corner, or not at all, would be placed apart, so they are an
143
155
  * error. `edges` gives a cell's OUTWARD-facing
144
156
  * sockets (entries for edges that face another cell of the piece are ignored) and
145
- * defaults to `edge` all round. `action` usually sits on one cell only — the one the
146
- * piece's model stands on.
157
+ * defaults to `edge` all round. `value` is the cell's own, in place of the piece's.
158
+ * `action` usually sits on one cell only — the one the piece's model stands on.
147
159
  * @param {string} [options.edge] socket of every outward-facing edge a cell does not name
148
160
  * @param {number} [options.weight=1]
149
161
  * @param {number} [options.rotations=1]
150
162
  * @param {string[]} [options.tags] carried by every cell of the piece, with the cell's own
163
+ * @param {number} [options.value] what the grid task writes into its layer under every cell of
164
+ * the piece that names no value of its own; with neither, a cell writes the index of its
165
+ * prototype
151
166
  * @returns {number[]} index of each cell's prototype, in the order of `cells`
152
167
  */
153
- add_piece({ name, cells, edge, weight = 1, rotations = 1, tags = [] }) {
168
+ add_piece({ name, cells, edge, weight = 1, rotations = 1, tags = [], value }) {
154
169
  assert.isString(name, 'name');
155
170
  assert.isArray(cells, 'cells');
156
171
  assert.greaterThan(cells.length, 0, 'cells.length');
@@ -160,6 +175,10 @@ export class GridWFCTileSet {
160
175
  assert_socket(edge, 'edge');
161
176
  }
162
177
 
178
+ if (value !== undefined) {
179
+ assert_value(value, 'value');
180
+ }
181
+
163
182
  const at = new Map();
164
183
 
165
184
  for (let i = 0; i < cells.length; i++) {
@@ -218,6 +237,10 @@ export class GridWFCTileSet {
218
237
  assert.isArray(cell.tags, `cells[${i}].tags`);
219
238
  }
220
239
 
240
+ if (cell.value !== undefined) {
241
+ assert_value(cell.value, `cells[${i}].value`);
242
+ }
243
+
221
244
  assert_action(cell_action, `cells[${i}].action`);
222
245
 
223
246
  const edges = [];
@@ -241,6 +264,7 @@ export class GridWFCTileSet {
241
264
  weight,
242
265
  rotations,
243
266
  tags: tags.concat(cell.tags ?? []),
267
+ value: cell.value ?? value ?? this.prototypes.length,
244
268
  action: cell_action
245
269
  }));
246
270
  }
@@ -249,7 +273,7 @@ export class GridWFCTileSet {
249
273
  }
250
274
 
251
275
  /**
252
- * @param {{name:string, edges:string[], weight:number, rotations:number, tags:string[], action:(GridCellAction|null)}} prototype
276
+ * @param {{name:string, edges:string[], weight:number, rotations:number, tags:string[], value:number, action:(GridCellAction|null)}} prototype
253
277
  * @returns {number}
254
278
  * @private
255
279
  */
@@ -32,9 +32,9 @@ import { VIEW_UNIFORM_STRUCT } from "../../renderer/view/VIEW_UNIFORM_STRUCT.js"
32
32
  * @enum {number}
33
33
  */
34
34
  export const ContactCombine = {
35
- /** visibility = shadow map × contact: what UE's desktop path and Filament/Bevy do */
35
+ /** visibility = shadow map × contact: what Filament/Bevy do */
36
36
  Multiply: 0,
37
- /** visibility = min(shadow map, contact): what Godot and UE's mobile path do */
37
+ /** visibility = min(shadow map, contact): what Godot does */
38
38
  Min: 1,
39
39
  /**
40
40
  * visibility = 0: takes the whole sun term back out. Only for checking the composite, against a
@@ -27,8 +27,8 @@ edits it at both altitudes.
27
27
  was selected, `Ctrl` toggles what the box covers, and the box says which of the three it is
28
28
  while you are still holding it. Which button began the press decides which gesture it is, and
29
29
  how far it travelled decides whether it was a press or a drag — so a right press that stays put
30
- is the menu below and one that moves is a pan, the way Unreal's Blueprint canvas arranges the
31
- same three gestures.
30
+ is the menu below and one that moves is a pan, the way graph editors of this kind have long
31
+ arranged the same three gestures.
32
32
  - **Right-click the canvas** to add a node. The library opens under the cursor with the caret
33
33
  already in a search field and the first match already chosen: type a few letters, press Enter, and
34
34
  the node lands at the point that was clicked with the defaults its type declares, so it compiles
@@ -89,7 +89,7 @@
89
89
  <span>Indirect light</span>
90
90
  <select id="indirect">
91
91
  <option value="ProbeClipmap" selected>Probe clipmap</option>
92
- <option value="ScreenProbes">Screen probes — Lumen's gather over the clipmap's world</option>
92
+ <option value="ScreenProbes">Screen probes — screen-space probe gather over the clipmap's world</option>
93
93
  <option value="IBL">IBL</option>
94
94
  </select>
95
95
  </label>