@woosh/meep-engine 3.29.0 → 3.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (226) hide show
  1. package/build/bundle-worker-image-decoder.js +1 -1
  2. package/build/bundle-worker-terrain.js +1 -1
  3. package/package.json +1 -1
  4. package/src/core/binary/BinaryBuffer.d.ts.map +1 -1
  5. package/src/core/binary/BinaryBuffer.js +14 -2
  6. package/src/core/bvh2/bvh3/BVH.d.ts.map +1 -1
  7. package/src/core/bvh2/bvh3/BVH.js +14 -1
  8. package/src/core/cache/FrequencySketch.d.ts +3 -1
  9. package/src/core/cache/FrequencySketch.d.ts.map +1 -1
  10. package/src/core/cache/FrequencySketch.js +10 -4
  11. package/src/core/cache/wtinylfu/CacheWTinylfu.d.ts.map +1 -1
  12. package/src/core/cache/wtinylfu/CacheWTinylfu.js +24 -2
  13. package/src/core/geom/3d/topology/struct/binary/io/bt_mesh_compute_vertex_quadrics.d.ts +20 -0
  14. package/src/core/geom/3d/topology/struct/binary/io/bt_mesh_compute_vertex_quadrics.d.ts.map +1 -1
  15. package/src/core/geom/3d/topology/struct/binary/io/bt_mesh_compute_vertex_quadrics.js +69 -4
  16. package/src/core/geom/3d/topology/struct/binary/io/bt_mesh_simplify.d.ts +48 -18
  17. package/src/core/geom/3d/topology/struct/binary/io/bt_mesh_simplify.d.ts.map +1 -1
  18. package/src/core/geom/3d/topology/struct/binary/io/bt_mesh_simplify.js +262 -70
  19. package/src/core/geom/3d/topology/struct/binary/query/bt_edge_collapse_fold_limit.d.ts +25 -0
  20. package/src/core/geom/3d/topology/struct/binary/query/bt_edge_collapse_fold_limit.d.ts.map +1 -0
  21. package/src/core/geom/3d/topology/struct/binary/query/bt_edge_collapse_fold_limit.js +228 -0
  22. package/src/core/geom/3d/topology/struct/binary/query/bt_edge_collapse_would_fold.d.ts +13 -0
  23. package/src/core/geom/3d/topology/struct/binary/query/bt_edge_collapse_would_fold.d.ts.map +1 -1
  24. package/src/core/geom/3d/topology/struct/binary/query/bt_edge_collapse_would_fold.js +10 -128
  25. package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_build_face_bvh.d.ts.map +1 -1
  26. package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_build_face_bvh.js +11 -1
  27. package/src/core/graph/mn_graph_collapse_weighted_edge.js +6 -6
  28. package/src/core/math/lookup/ParameterLookupTable.d.ts.map +1 -1
  29. package/src/core/math/lookup/ParameterLookupTable.js +10 -5
  30. package/src/core/math/noise/sdnoise.d.ts.map +1 -1
  31. package/src/core/math/noise/sdnoise.js +16 -10
  32. package/src/core/model/object/ImmutableObjectPool.d.ts.map +1 -1
  33. package/src/core/model/object/ImmutableObjectPool.js +17 -7
  34. package/src/core/process/executor/ConcurrentExecutor.d.ts +1 -5
  35. package/src/core/process/executor/ConcurrentExecutor.d.ts.map +1 -1
  36. package/src/core/process/executor/ConcurrentExecutor.js +95 -1
  37. package/src/core/process/task/task_find_dependency_cycle.d.ts +17 -0
  38. package/src/core/process/task/task_find_dependency_cycle.d.ts.map +1 -0
  39. package/src/core/process/task/task_find_dependency_cycle.js +81 -0
  40. package/src/core/wfc/WFCCellChoice.d.ts +17 -0
  41. package/src/core/wfc/WFCCellChoice.d.ts.map +1 -0
  42. package/src/core/wfc/WFCCellChoice.js +36 -0
  43. package/src/core/wfc/WFCLattice.d.ts +105 -0
  44. package/src/core/wfc/WFCLattice.d.ts.map +1 -0
  45. package/src/core/wfc/WFCLattice.js +235 -0
  46. package/src/core/wfc/WFCRuleTable.d.ts +172 -0
  47. package/src/core/wfc/WFCRuleTable.d.ts.map +1 -0
  48. package/src/core/wfc/WFCRuleTable.js +334 -0
  49. package/src/core/wfc/WFCState.d.ts +273 -0
  50. package/src/core/wfc/WFCState.d.ts.map +1 -0
  51. package/src/core/wfc/WFCState.js +552 -0
  52. package/src/core/wfc/WFCStatus.d.ts +11 -0
  53. package/src/core/wfc/WFCStatus.d.ts.map +1 -0
  54. package/src/core/wfc/WFCStatus.js +28 -0
  55. package/src/core/wfc/WFCTileWeights.d.ts +48 -0
  56. package/src/core/wfc/WFCTileWeights.d.ts.map +1 -0
  57. package/src/core/wfc/WFCTileWeights.js +86 -0
  58. package/src/core/wfc/WFC_UNRESOLVED.d.ts +12 -0
  59. package/src/core/wfc/WFC_UNRESOLVED.d.ts.map +1 -0
  60. package/src/core/wfc/WFC_UNRESOLVED.js +11 -0
  61. package/src/core/wfc/wfc_estimate_bytes.d.ts +24 -0
  62. package/src/core/wfc/wfc_estimate_bytes.d.ts.map +1 -0
  63. package/src/core/wfc/wfc_estimate_bytes.js +47 -0
  64. package/src/core/wfc/wfc_rule_table_tile_components.d.ts +27 -0
  65. package/src/core/wfc/wfc_rule_table_tile_components.d.ts.map +1 -0
  66. package/src/core/wfc/wfc_rule_table_tile_components.js +80 -0
  67. package/src/core/wfc/wfc_solve.d.ts +21 -0
  68. package/src/core/wfc/wfc_solve.d.ts.map +1 -0
  69. package/src/core/wfc/wfc_solve.js +154 -0
  70. package/src/core/wfc/wfc_state_apply_boundary.d.ts +18 -0
  71. package/src/core/wfc/wfc_state_apply_boundary.d.ts.map +1 -0
  72. package/src/core/wfc/wfc_state_apply_boundary.js +61 -0
  73. package/src/core/wfc/wfc_state_assign.d.ts +11 -0
  74. package/src/core/wfc/wfc_state_assign.d.ts.map +1 -0
  75. package/src/core/wfc/wfc_state_assign.js +36 -0
  76. package/src/core/wfc/wfc_state_ban_bits.d.ts +17 -0
  77. package/src/core/wfc/wfc_state_ban_bits.d.ts.map +1 -0
  78. package/src/core/wfc/wfc_state_ban_bits.js +81 -0
  79. package/src/core/wfc/wfc_state_collapse.d.ts +12 -0
  80. package/src/core/wfc/wfc_state_collapse.d.ts.map +1 -0
  81. package/src/core/wfc/wfc_state_collapse.js +73 -0
  82. package/src/core/wfc/wfc_state_flush_dirty.d.ts +12 -0
  83. package/src/core/wfc/wfc_state_flush_dirty.d.ts.map +1 -0
  84. package/src/core/wfc/wfc_state_flush_dirty.js +39 -0
  85. package/src/core/wfc/wfc_state_propagate.d.ts +14 -0
  86. package/src/core/wfc/wfc_state_propagate.d.ts.map +1 -0
  87. package/src/core/wfc/wfc_state_propagate.js +155 -0
  88. package/src/core/wfc/wfc_state_read.d.ts +11 -0
  89. package/src/core/wfc/wfc_state_read.d.ts.map +1 -0
  90. package/src/core/wfc/wfc_state_read.js +38 -0
  91. package/src/core/wfc/wfc_state_restrict.d.ts +18 -0
  92. package/src/core/wfc/wfc_state_restrict.d.ts.map +1 -0
  93. package/src/core/wfc/wfc_state_restrict.js +39 -0
  94. package/src/core/wfc/wfc_state_set_eligible.d.ts +24 -0
  95. package/src/core/wfc/wfc_state_set_eligible.d.ts.map +1 -0
  96. package/src/core/wfc/wfc_state_set_eligible.js +49 -0
  97. package/src/core/wfc/wfc_state_undo_to.d.ts +13 -0
  98. package/src/core/wfc/wfc_state_undo_to.d.ts.map +1 -0
  99. package/src/core/wfc/wfc_state_undo_to.js +84 -0
  100. package/src/core/wfc/wfc_words_per_cell.d.ts +11 -0
  101. package/src/core/wfc/wfc_words_per_cell.d.ts.map +1 -0
  102. package/src/core/wfc/wfc_words_per_cell.js +16 -0
  103. package/src/engine/ecs/EntityComponentDataset.d.ts +8 -0
  104. package/src/engine/ecs/EntityComponentDataset.d.ts.map +1 -1
  105. package/src/engine/ecs/EntityComponentDataset.js +37 -14
  106. package/src/engine/ecs/fow/FogOfWarRevealerSystem.d.ts +8 -1
  107. package/src/engine/ecs/fow/FogOfWarRevealerSystem.d.ts.map +1 -1
  108. package/src/engine/ecs/fow/FogOfWarRevealerSystem.js +37 -2
  109. package/src/engine/ecs/guid/UUID.d.ts.map +1 -1
  110. package/src/engine/ecs/guid/UUID.js +45 -17
  111. package/src/engine/ecs/ik/OneBoneSurfaceAlignmentSolver.d.ts.map +1 -1
  112. package/src/engine/ecs/ik/OneBoneSurfaceAlignmentSolver.js +3 -1
  113. package/src/engine/ecs/terrain/ecs/cling/ClingToTerrainSystem.d.ts.map +1 -1
  114. package/src/engine/ecs/terrain/ecs/cling/ClingToTerrainSystem.js +366 -360
  115. package/src/engine/graphics/texture/sampler/resize/sampler2d_scale_down_linear.d.ts.map +1 -1
  116. package/src/engine/graphics/texture/sampler/resize/sampler2d_scale_down_linear.js +24 -10
  117. package/src/engine/grid/grid2transform/GridPosition2TransformSystem.d.ts.map +1 -1
  118. package/src/engine/grid/grid2transform/GridPosition2TransformSystem.js +24 -5
  119. package/src/engine/interpolation/Interpoland.d.ts +7 -1
  120. package/src/engine/interpolation/Interpoland.d.ts.map +1 -1
  121. package/src/engine/interpolation/Interpoland.js +8 -1
  122. package/src/engine/interpolation/InterpolationSystem.d.ts.map +1 -1
  123. package/src/engine/interpolation/InterpolationSystem.js +3 -0
  124. package/src/engine/interpolation/TransformPoseSerializationAdapter.d.ts +5 -3
  125. package/src/engine/interpolation/TransformPoseSerializationAdapter.d.ts.map +1 -1
  126. package/src/engine/interpolation/TransformPoseSerializationAdapter.js +14 -3
  127. package/src/engine/interpolation/pose_interpoland.d.ts.map +1 -1
  128. package/src/engine/interpolation/pose_interpoland.js +2 -0
  129. package/src/engine/network/orchestrator/NetworkPeer.d.ts.map +1 -1
  130. package/src/engine/network/orchestrator/NetworkPeer.js +15 -10
  131. package/src/engine/physics/cloth/ecs/ClothWorld.d.ts.map +1 -1
  132. package/src/engine/physics/cloth/ecs/ClothWorld.js +17 -0
  133. package/src/engine/physics/mls-mpm/MLS_MPM.d.ts.map +1 -1
  134. package/src/engine/physics/mls-mpm/MLS_MPM.js +14 -0
  135. package/src/engine/sound/sopra/definition/clip/AbstractAudioClip.d.ts +2 -1
  136. package/src/engine/sound/sopra/definition/clip/AbstractAudioClip.d.ts.map +1 -1
  137. package/src/engine/sound/sopra/definition/clip/AbstractAudioClip.js +1 -1
  138. package/src/engine/sound/sopra/definition/clip/BlendContainerAudioClip.d.ts +1 -0
  139. package/src/engine/sound/sopra/definition/clip/BlendContainerAudioClip.d.ts.map +1 -1
  140. package/src/engine/sound/sopra/definition/clip/RandomContainerAudioClip.d.ts +1 -0
  141. package/src/engine/sound/sopra/definition/clip/RandomContainerAudioClip.d.ts.map +1 -1
  142. package/src/engine/sound/sopra/definition/clip/SampleAudioClip.d.ts +2 -1
  143. package/src/engine/sound/sopra/definition/clip/SampleAudioClip.d.ts.map +1 -1
  144. package/src/engine/sound/sopra/definition/clip/SampleAudioClip.js +12 -3
  145. package/src/engine/sound/sopra/definition/clip/SequenceContainerAudioClip.d.ts +1 -0
  146. package/src/engine/sound/sopra/definition/clip/SequenceContainerAudioClip.d.ts.map +1 -1
  147. package/src/engine/sound/sopra/definition/clip/SwitchContainerAudioClip.d.ts +1 -0
  148. package/src/engine/sound/sopra/definition/clip/SwitchContainerAudioClip.d.ts.map +1 -1
  149. package/src/engine/sound/sopra/runtime/EventInstance.d.ts.map +1 -1
  150. package/src/engine/sound/sopra/runtime/EventInstance.js +4 -1
  151. package/src/format/image/avif/av1/decode/decode_coefficients.d.ts.map +1 -1
  152. package/src/format/image/avif/av1/decode/decode_coefficients.js +248 -259
  153. package/src/format/image/avif/av1/decode/read_golomb.d.ts +21 -0
  154. package/src/format/image/avif/av1/decode/read_golomb.d.ts.map +1 -0
  155. package/src/format/image/avif/av1/decode/read_golomb.js +49 -0
  156. package/src/format/image/avif/av1/filter/loop_restoration.js +461 -451
  157. package/src/format/image/avif/av1/util/round2.d.ts +19 -2
  158. package/src/format/image/avif/av1/util/round2.d.ts.map +1 -1
  159. package/src/format/image/avif/av1/util/round2.js +51 -27
  160. package/src/format/image/avif/heif/parse_avif_file.js +24 -0
  161. package/src/shade/renderer/buffer/table/GPUTypedTable.d.ts.map +1 -1
  162. package/src/shade/renderer/buffer/table/GPUTypedTable.js +14 -0
  163. package/src/shade/renderer/geometry/virtual/VIRTUAL_GEOMETRY_DESIGN.md +46 -3
  164. package/src/shade/renderer/geometry/virtual/WEDGE_PLAN_2026_09_18.md +91 -1
  165. package/src/shade/renderer/geometry/virtual/build/VGeoBuildOptions.d.ts +0 -13
  166. package/src/shade/renderer/geometry/virtual/build/VGeoBuildOptions.d.ts.map +1 -1
  167. package/src/shade/renderer/geometry/virtual/build/VGeoBuildOptions.js +0 -15
  168. package/src/shade/renderer/geometry/virtual/build/level/vgeo_build_group_step.js +5 -5
  169. package/src/shade/renderer/geometry/virtual/build/mesh/VGEO_DEFAULT_ATTRIBUTE_WEIGHT_RATIOS.d.ts +11 -1
  170. package/src/shade/renderer/geometry/virtual/build/mesh/VGEO_DEFAULT_ATTRIBUTE_WEIGHT_RATIOS.d.ts.map +1 -1
  171. package/src/shade/renderer/geometry/virtual/build/mesh/VGEO_DEFAULT_ATTRIBUTE_WEIGHT_RATIOS.js +11 -1
  172. package/src/shade/renderer/geometry/virtual/build/mesh/vgeo_compute_vertex_normals.d.ts +18 -9
  173. package/src/shade/renderer/geometry/virtual/build/mesh/vgeo_compute_vertex_normals.d.ts.map +1 -1
  174. package/src/shade/renderer/geometry/virtual/build/mesh/vgeo_compute_vertex_normals.js +20 -26
  175. package/src/shade/renderer/geometry/virtual/build/mesh/vgeo_normalize_source.d.ts +1 -3
  176. package/src/shade/renderer/geometry/virtual/build/mesh/vgeo_normalize_source.d.ts.map +1 -1
  177. package/src/shade/renderer/geometry/virtual/build/mesh/vgeo_normalize_source.js +2 -5
  178. package/src/shade/renderer/geometry/virtual/build/vgeo_build.js +1 -1
  179. package/src/shade/renderer/geometry/virtual/runtime/VGeoResidency.d.ts.map +1 -1
  180. package/src/shade/renderer/geometry/virtual/runtime/VGeoResidency.js +14 -1
  181. package/src/shade/renderer/global_illumination/probe/octahedral/GPUProbeAtlas.d.ts.map +1 -1
  182. package/src/shade/renderer/global_illumination/probe/octahedral/GPUProbeAtlas.js +12 -3
  183. package/src/shade/renderer/light/environment/rgbe/RGBE_ReadPixels_RLE.d.ts.map +1 -1
  184. package/src/shade/renderer/light/environment/rgbe/RGBE_ReadPixels_RLE.js +7 -1
  185. package/src/shade/renderer/lightmap/GPULightMap.d.ts.map +1 -1
  186. package/src/shade/renderer/lightmap/GPULightMap.js +349 -336
  187. package/src/shade/renderer/loader/gltf/load_gltf.d.ts.map +1 -1
  188. package/src/shade/renderer/loader/gltf/load_gltf.js +1137 -1128
  189. package/src/shade/renderer/particles/DESIGN.md +14 -5
  190. package/src/shade/renderer/particles/GPUParticleSystem.d.ts +25 -10
  191. package/src/shade/renderer/particles/GPUParticleSystem.d.ts.map +1 -1
  192. package/src/shade/renderer/particles/GPUParticleSystem.js +182 -38
  193. package/src/shade/renderer/particles/graph/groups/simplex_reference.d.ts.map +1 -1
  194. package/src/shade/renderer/particles/graph/groups/simplex_reference.js +16 -10
  195. package/src/shade/renderer/particles/graph_particles.d.ts +4 -2
  196. package/src/shade/renderer/particles/graph_particles.d.ts.map +1 -1
  197. package/src/shade/renderer/particles/graph_particles.js +8 -2
  198. package/src/shade/renderer/particles/optimizer/particle_vm_semantics.d.ts.map +1 -1
  199. package/src/shade/renderer/particles/optimizer/particle_vm_semantics.js +8 -2
  200. package/src/shade/renderer/particles/optimizer/pass_fold_constants.d.ts.map +1 -1
  201. package/src/shade/renderer/particles/optimizer/pass_fold_constants.js +10 -4
  202. package/src/shade/renderer/particles/shaders/shader_particle_init_free_list.d.ts +31 -0
  203. package/src/shade/renderer/particles/shaders/shader_particle_init_free_list.d.ts.map +1 -0
  204. package/src/shade/renderer/particles/shaders/shader_particle_init_free_list.js +62 -0
  205. package/src/shade/renderer/particles/vm/ParticleVMReference.d.ts +13 -0
  206. package/src/shade/renderer/particles/vm/ParticleVMReference.d.ts.map +1 -1
  207. package/src/shade/renderer/particles/vm/ParticleVMReference.js +95 -17
  208. package/src/shade/renderer/rasterize/bucket/rasterization_has_opaque_bucket.d.ts +21 -0
  209. package/src/shade/renderer/rasterize/bucket/rasterization_has_opaque_bucket.d.ts.map +1 -0
  210. package/src/shade/renderer/rasterize/bucket/rasterization_has_opaque_bucket.js +28 -0
  211. package/src/shade/renderer/rasterize/fast/graph_rasterize_scene_fast.d.ts.map +1 -1
  212. package/src/shade/renderer/rasterize/fast/graph_rasterize_scene_fast.js +19 -2
  213. package/src/shade/renderer/rasterize/standard/graph_rasterize_scene.d.ts.map +1 -1
  214. package/src/shade/renderer/rasterize/standard/graph_rasterize_scene.js +19 -2
  215. package/src/shade/renderer/shader/type/WebGPUStruct.d.ts.map +1 -1
  216. package/src/shade/renderer/shader/type/WebGPUStruct.js +12 -0
  217. package/src/shade/renderer/texture/mipmaps/WebGPUMipmapGenerator.d.ts +8 -2
  218. package/src/shade/renderer/texture/mipmaps/WebGPUMipmapGenerator.d.ts.map +1 -1
  219. package/src/shade/renderer/texture/mipmaps/WebGPUMipmapGenerator.js +41 -6
  220. package/src/shade/wgsl/emulator/WGSLJavaScriptCompiler.js +2383 -2356
  221. package/src/view/tooltip/DomTooltipManager.d.ts +7 -0
  222. package/src/view/tooltip/DomTooltipManager.d.ts.map +1 -1
  223. package/src/view/tooltip/DomTooltipManager.js +22 -0
  224. package/src/view/tooltip/DomTooltipObserver.d.ts.map +1 -1
  225. package/src/view/tooltip/DomTooltipObserver.js +13 -3
  226. package/src/shade/renderer/geometry/virtual/build/mesh/VGEO_CREASE_ANGLE.js +0 -45
@@ -6,7 +6,6 @@ import {
6
6
  bt_face_compute_newell_normal
7
7
  } from "../../../../../../core/geom/3d/topology/struct/binary/query/bt_face_compute_newell_normal.js";
8
8
  import { VGEO_ATTRIBUTE } from "../../format/attribute/VGEO_ATTRIBUTE.js";
9
- import { VGEO_CREASE_ANGLE } from "./VGEO_CREASE_ANGLE.js";
10
9
 
11
10
  /**
12
11
  * One corner's normal, on its way into the format's channel.
@@ -25,18 +24,28 @@ const scratch_normal = new Float32Array(3);
25
24
  const scratch_face = new Float32Array(3);
26
25
 
27
26
  /**
28
- * Area-weighted normals of a mesh, split at its creases, written into its normal channel.
27
+ * Area-weighted normals of a mesh, written into its normal channel, one per corner.
29
28
  *
30
29
  * The geometry a mesh actually has is the answer for that mesh: carrying a surviving vertex's
31
30
  * original normal through a dozen collapses shades a coarse level by whichever vertices happened to
32
31
  * win, which is visibly wrong.
33
32
  *
34
- * **Per corner group, not per vertex.** Averaging every face around a vertex is right for a surface
35
- * and wrong for a corner. Two faces sharing an edge belong to the same group when the surface turns
36
- * less than {@link VGEO_CREASE_ANGLE} across it; groups are the connected components that leaves,
37
- * and each gets its own area-weighted average. A vertex on a smooth surface has exactly one, and
38
- * this is then the pass it has always been. A box corner has three, and the eight vertices of a cube
39
- * stop carrying a normal that is ninety degrees wrong for every face using it.
33
+ * **It does not invent a crease.** An earlier version of this split a vertex wherever the surface
34
+ * turned more than a threshold, so that a synthesized cube got three normals at each corner instead
35
+ * of one that is ninety degrees wrong for every face using it. That is a real improvement to look
36
+ * at and it did not survive measurement: against a true LOD 0 reference in pixels it bought nothing
37
+ * on any object tested, and on high-frequency relief it *cost*, because the attribute quadric's
38
+ * least-squares fit lands near the neighbourhood's mean normal -- the right filtered answer for a
39
+ * Lambertian surface -- and bucketing each tile face on its own returns that one face's normal
40
+ * exactly instead. So the threshold is gone, and with it the one number in this work that was a
41
+ * judgement about content rather than a consequence of arithmetic.
42
+ *
43
+ * **Corners still group, by connectivity rather than by angle.** Two corners join when a manifold
44
+ * edge joins their faces, so a manifold vertex has exactly one group and this is the pass it has
45
+ * always been, arithmetic included. What the per-corner shape is *for* is the case this pass is not
46
+ * reached in at all: a source that authored its own shading frame, whose distinct corner values the
47
+ * weld would otherwise destroy. That is where wedges are worth their bytes, and it needs no
48
+ * threshold to decide anything.
40
49
  *
41
50
  * Area weighting falls out of the arithmetic rather than being applied: Newell's normal *is* the
42
51
  * face normal scaled by twice the area, so summing the raw face normals is the area-weighted sum.
@@ -62,12 +71,11 @@ const scratch_face = new Float32Array(3);
62
71
  * slot for every live corner by construction
63
72
  * @param {Set<number>} pinned vertex ids to leave exactly as they are; empty for a mesh nothing has
64
73
  * locked yet
65
- * @param {number} [crease_angle] degrees; see {@link VGEO_CREASE_ANGLE}
66
74
  *
67
75
  * @author Alex Goldring
68
76
  * @copyright Company Named Limited (c) 2026
69
77
  */
70
- export function vgeo_compute_vertex_normals(mesh, pinned, crease_angle = VGEO_CREASE_ANGLE) {
78
+ export function vgeo_compute_vertex_normals(mesh, pinned) {
71
79
  const normals = mesh.layers[VGEO_ATTRIBUTE.NORMAL];
72
80
 
73
81
  assert.notNull(normals, 'mesh normal channel');
@@ -84,7 +92,8 @@ export function vgeo_compute_vertex_normals(mesh, pinned, crease_angle = VGEO_CR
84
92
  const face_normal = new Float64Array(face_pool.size * 3);
85
93
 
86
94
  /**
87
- * Its length, so the angle test does not recompute one.
95
+ * Its length, which is twice the face's area, and so zero exactly where the face has none. Only
96
+ * the liveness test reads it now that nothing measures an angle.
88
97
  * @type {Float64Array}
89
98
  */
90
99
  const face_length = new Float64Array(face_pool.size);
@@ -122,8 +131,6 @@ export function vgeo_compute_vertex_normals(mesh, pinned, crease_angle = VGEO_CR
122
131
  group[loop] = loop;
123
132
  }
124
133
 
125
- const smooth_cosine = Math.cos((crease_angle * Math.PI) / 180);
126
-
127
134
  const edge_pool = topology.edges;
128
135
 
129
136
  for (let edge = 0; edge < edge_pool.size; edge++) {
@@ -163,19 +170,6 @@ export function vgeo_compute_vertex_normals(mesh, pinned, crease_angle = VGEO_CR
163
170
  continue;
164
171
  }
165
172
 
166
- const left_face = topology.loop_read_face(left);
167
- const right_face = topology.loop_read_face(right);
168
-
169
- const cosine = (
170
- face_normal[left_face * 3] * face_normal[right_face * 3]
171
- + face_normal[left_face * 3 + 1] * face_normal[right_face * 3 + 1]
172
- + face_normal[left_face * 3 + 2] * face_normal[right_face * 3 + 2]
173
- ) / (face_length[left_face] * face_length[right_face]);
174
-
175
- if (cosine < smooth_cosine) {
176
- continue;
177
- }
178
-
179
173
  /*
180
174
  A loop's edge runs from its own vertex to the next loop's, so on an edge's loop those two
181
175
  are the edge's endpoints. Matching them up by vertex is what pairs the corner of one face
@@ -42,12 +42,10 @@
42
42
  * @param {VirtualGeometryMesh} mesh mutated in place
43
43
  * @param {number} weld_ratio fraction of the bounding-box diagonal; see
44
44
  * {@link VGeoBuildOptions#weld_ratio}
45
- * @param {number} [crease_angle] degrees; see {@link VGeoBuildOptions#crease_angle}. Only reaches a
46
- * channel the source did not author.
47
45
  * @returns {number} the object-space distance the ratio came to for this mesh
48
46
  *
49
47
  * @author Alex Goldring
50
48
  * @copyright Company Named Limited (c) 2026
51
49
  */
52
- export function vgeo_normalize_source(mesh: VirtualGeometryMesh, weld_ratio: number, crease_angle?: number): number;
50
+ export function vgeo_normalize_source(mesh: VirtualGeometryMesh, weld_ratio: number): number;
53
51
  //# sourceMappingURL=vgeo_normalize_source.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"vgeo_normalize_source.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shade/renderer/geometry/virtual/build/mesh/vgeo_normalize_source.js"],"names":[],"mappings":"AAiCA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,6EATW,MAAM,iBAEN,MAAM,GAEJ,MAAM,CA+ClB"}
1
+ {"version":3,"file":"vgeo_normalize_source.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shade/renderer/geometry/virtual/build/mesh/vgeo_normalize_source.js"],"names":[],"mappings":"AAgCA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,6EAPW,MAAM,GAEJ,MAAM,CA+ClB"}
@@ -20,7 +20,6 @@ import {
20
20
  import { bt_mesh_validate } from "../../../../../../core/geom/3d/topology/struct/binary/query/bt_mesh_validate.js";
21
21
  import { VGEO_ATTRIBUTE } from "../../format/attribute/VGEO_ATTRIBUTE.js";
22
22
  import { vgeo_mesh_wedges } from "../../format/attribute/vgeo_mesh_wedges.js";
23
- import { VGEO_CREASE_ANGLE } from "./VGEO_CREASE_ANGLE.js";
24
23
  import { vgeo_compute_vertex_normals } from "./vgeo_compute_vertex_normals.js";
25
24
  import { vgeo_compute_vertex_tangents } from "./vgeo_compute_vertex_tangents.js";
26
25
 
@@ -75,14 +74,12 @@ const NOTHING_PINNED = new Set();
75
74
  * @param {VirtualGeometryMesh} mesh mutated in place
76
75
  * @param {number} weld_ratio fraction of the bounding-box diagonal; see
77
76
  * {@link VGeoBuildOptions#weld_ratio}
78
- * @param {number} [crease_angle] degrees; see {@link VGeoBuildOptions#crease_angle}. Only reaches a
79
- * channel the source did not author.
80
77
  * @returns {number} the object-space distance the ratio came to for this mesh
81
78
  *
82
79
  * @author Alex Goldring
83
80
  * @copyright Company Named Limited (c) 2026
84
81
  */
85
- export function vgeo_normalize_source(mesh, weld_ratio, crease_angle = VGEO_CREASE_ANGLE) {
82
+ export function vgeo_normalize_source(mesh, weld_ratio) {
86
83
  const topology = mesh.topology;
87
84
 
88
85
  const weld_distance = bt_mesh_relative_merge_distance(topology, weld_ratio);
@@ -110,7 +107,7 @@ export function vgeo_normalize_source(mesh, weld_ratio, crease_angle = VGEO_CREA
110
107
  // Normals first: the tangent solve reads them, and a synthesized normal beside an authored
111
108
  // tangent is still the pair the frame is built from.
112
109
  if (mesh.synthesized[VGEO_ATTRIBUTE.NORMAL]) {
113
- vgeo_compute_vertex_normals(mesh, NOTHING_PINNED, crease_angle);
110
+ vgeo_compute_vertex_normals(mesh, NOTHING_PINNED);
114
111
  }
115
112
 
116
113
  /*
@@ -137,7 +137,7 @@ export async function vgeo_build(geometry, options) {
137
137
 
138
138
  const mesh = VirtualGeometryMesh.from_geometry(geometry);
139
139
 
140
- const weld_distance = vgeo_normalize_source(mesh, options.weld_ratio, options.crease_angle);
140
+ const weld_distance = vgeo_normalize_source(mesh, options.weld_ratio);
141
141
 
142
142
  const source_face_count = mesh.topology.faces.count();
143
143
  const source_vertex_count = mesh.topology.vertices.count();
@@ -1 +1 @@
1
- {"version":3,"file":"VGeoResidency.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/geometry/virtual/runtime/VGeoResidency.js"],"names":[],"mappings":"AA2GA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH;IAiKI;;;;;;;OAOG;IACH;QAN2C,IAAI,EAApC,sBAAsB;QACS,OAAO,GAAtC,oBAAoB;QACM,IAAI,GAA9B,eAAe;QACW,OAAO,GAAjC,eAAe;OA8BzB;IAID;;OAEG;IACH,oCAEC;IAED;;OAEG;IACH,4BAEC;IAED;;OAEG;IACH,+BAEC;IAED;;OAEG;IACH,yEAEC;IAED;;;;OAIG;IACH,oBAEC;IAED;;;;OAIG;IACH,gCAGC;IAED,+BAEC;IAED,iCAEC;IAED,6BAEC;IAED,2BAEC;IAED,iCAEC;IAED,gCAEC;IAED;;;;OAIG;IACH,oCAEC;IAED;;;OAGG;IACH,kCAEC;IAED;;;OAGG;IACH,kCAEC;IAED;;;OAGG;IACH,iCAEC;IAED;;;OAGG;IACH,iCAEC;IAED;;;OAGG;IACH,gCAEC;IAED;;;;;OAKG;IACH,gCAEC;IAED;;;OAGG;IACH,iCAEC;IAED,gCAEC;IAED,+BAEC;IAED,8BAEC;IAED;;OAEG;IACH,qCAQC;IAID;;;;;;;;;;OAUG;IACH,iBAHW,mBAAmB,GACjB,MAAM,CA8ClB;IAED;;;;;;OAMG;IACH,mBAHW,mBAAmB,GACjB,OAAO,CAgBnB;IAED;;;OAGG;IACH,sBAHW,mBAAmB,GACjB,OAAO,CAInB;IAED;;;;;;OAMG;IACH,cAJW,mBAAmB,cACnB,MAAM,GACJ,QAAQ,GAAC,UAAU,GAAC,aAAa,GAAC,KAAK,GAAC,MAAM,GAAC,cAAc,CAqBzE;IAgCD;;;;OAIG;IACH,SAFa,IAAI,CAOhB;IAED;;;;OAIG;IACH,WAFa,IAAI,CAUhB;IAED;;;;OAIG;IACH,qBAFa,MAAM,CAkBlB;IAID;;;;;;;;;OASG;IACH,aANW,WAAW,UACX;QAAC,eAAe,EAAE,MAAM,CAAC;QAAC,gBAAgB,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAChF,UAAgB,EAAE,MAAM,CAAA;KAAC,iBACf,MAAM,GACJ,IAAI,CA6HhB;IA2FD;;;;;;OAMG;IACH,yBAHW,MAAM,GACJ,OAAO,CAgBnB;IAED;;;;;;OAMG;IACH,oBAHW,MAAM,GACJ,OAAO,CAoCnB;;CAqXJ;kCAr1CY,OAAO,uCAAuC,EAAE,mBAAmB;uBACnE,OAAO,4BAA4B,EAAE,QAAQ;qCAC7C,OAAO,6BAA6B,EAAE,sBAAsB;qCALpC,2BAA2B;gCALhC,gDAAgD;gCAIhD,sBAAsB"}
1
+ {"version":3,"file":"VGeoResidency.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/geometry/virtual/runtime/VGeoResidency.js"],"names":[],"mappings":"AA2GA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH;IAiKI;;;;;;;OAOG;IACH;QAN2C,IAAI,EAApC,sBAAsB;QACS,OAAO,GAAtC,oBAAoB;QACM,IAAI,GAA9B,eAAe;QACW,OAAO,GAAjC,eAAe;OA8BzB;IAID;;OAEG;IACH,oCAEC;IAED;;OAEG;IACH,4BAEC;IAED;;OAEG;IACH,+BAEC;IAED;;OAEG;IACH,yEAEC;IAED;;;;OAIG;IACH,oBAEC;IAED;;;;OAIG;IACH,gCAGC;IAED,+BAEC;IAED,iCAEC;IAED,6BAEC;IAED,2BAEC;IAED,iCAEC;IAED,gCAEC;IAED;;;;OAIG;IACH,oCAEC;IAED;;;OAGG;IACH,kCAEC;IAED;;;OAGG;IACH,kCAEC;IAED;;;OAGG;IACH,iCAEC;IAED;;;OAGG;IACH,iCAEC;IAED;;;OAGG;IACH,gCAEC;IAED;;;;;OAKG;IACH,gCAEC;IAED;;;OAGG;IACH,iCAEC;IAED,gCAEC;IAED,+BAEC;IAED,8BAEC;IAED;;OAEG;IACH,qCAQC;IAID;;;;;;;;;;OAUG;IACH,iBAHW,mBAAmB,GACjB,MAAM,CA8ClB;IAED;;;;;;OAMG;IACH,mBAHW,mBAAmB,GACjB,OAAO,CAgBnB;IAED;;;OAGG;IACH,sBAHW,mBAAmB,GACjB,OAAO,CAInB;IAED;;;;;;OAMG;IACH,cAJW,mBAAmB,cACnB,MAAM,GACJ,QAAQ,GAAC,UAAU,GAAC,aAAa,GAAC,KAAK,GAAC,MAAM,GAAC,cAAc,CAqBzE;IA6CD;;;;OAIG;IACH,SAFa,IAAI,CAOhB;IAED;;;;OAIG;IACH,WAFa,IAAI,CAUhB;IAED;;;;OAIG;IACH,qBAFa,MAAM,CAkBlB;IAID;;;;;;;;;OASG;IACH,aANW,WAAW,UACX;QAAC,eAAe,EAAE,MAAM,CAAC;QAAC,gBAAgB,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAChF,UAAgB,EAAE,MAAM,CAAA;KAAC,iBACf,MAAM,GACJ,IAAI,CA6HhB;IA2FD;;;;;;OAMG;IACH,yBAHW,MAAM,GACJ,OAAO,CAgBnB;IAED;;;;;;OAMG;IACH,oBAHW,MAAM,GACJ,OAAO,CAoCnB;;CAqXJ;kCAl2CY,OAAO,uCAAuC,EAAE,mBAAmB;uBACnE,OAAO,4BAA4B,EAAE,QAAQ;qCAC7C,OAAO,6BAA6B,EAAE,sBAAsB;qCALpC,2BAA2B;gCALhC,gDAAgD;gCAIhD,sBAAsB"}
@@ -645,7 +645,20 @@ export class VGeoResidency {
645
645
  this.#vram_last_used[row] = 0;
646
646
  }
647
647
 
648
- if (tag === TAG_VRAM || tag === TAG_RAM) {
648
+ /**
649
+ * TAG_PENDING too. `#fetch` reserves the slot and charges its bytes before the read goes
650
+ * out, and a fetching page is TAG_PENDING — so leaving it out here meant the slot and
651
+ * its reserved bytes were never given back: both settle handlers return on
652
+ * `#geometries.get(reader) !== geometry` before they would free it, and `unregister`
653
+ * drops the geometry synchronously right after cancelling, so that is the branch that
654
+ * always runs. A scene that swaps assets leaked a slot per fetch on the wire until
655
+ * `#make_ram_room` refused everything, while `ram_resident_bytes` and `ram_page_count`
656
+ * both went on reporting the tier as empty.
657
+ *
658
+ * `#free_ram_slot` is a no-op for NO_SLOT and for a slot already given back, so the
659
+ * quarantined half of TAG_PENDING costs nothing here.
660
+ */
661
+ if (tag === TAG_VRAM || tag === TAG_RAM || tag === TAG_PENDING) {
649
662
  this.#free_ram_slot(geometry.slot[page_index]);
650
663
  }
651
664
 
@@ -1 +1 @@
1
- {"version":3,"file":"GPUProbeAtlas.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe/octahedral/GPUProbeAtlas.js"],"names":[],"mappings":"AAuBA;;;GAGG;AAEH;;GAEG;AAIH;IAyEI;;;OAGG;IACH,+BAgBC;IAtFD;;;OAGG;IACH,0CAEC;IAGD;;;OAGG;IACH,2BAUC;IAQD;;;OAGG;IACH,uCAEC;IAED;;;OAGG;IACH,kBAFU,MAAM,CAEM;IAEtB;;;OAGG;IACH,sCAGC;IAED;;;OAGG;IACH,QAFU,MAAM,MAAM,CAEM;IAgC5B;;;;OAIG;IACH,6BAFW,MAAM,QAiChB;IAED;;;;;;;;OAQG;IACH;QAHsC,WAAW,EAAtC,iBAAiB;QACU,cAAc,EAAzC,iBAAiB;aAY3B;IAED;;;;;;;OAOG;IACH;QAL+B,KAAK,EAAzB,UAAU;QACe,KAAK,EAA9B,eAAe;QACU,QAAQ,EAAjC,eAAe;QACE,gBAAgB,GAAjC,MAAM;eAuQhB;IAED,+BAGC;IAED,gBAGC;;CACJ;8BA9bY,OAAO,6BAA6B,EAAE,eAAe;8BACrD,OAAO,mCAAmC,EAAE,eAAe;yBAI3D,OAAO,iEAAiE,EAAE,UAAU;kCAnB/D,uCAAuC"}
1
+ {"version":3,"file":"GPUProbeAtlas.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe/octahedral/GPUProbeAtlas.js"],"names":[],"mappings":"AAuBA;;;GAGG;AAEH;;GAEG;AAIH;IAyEI;;;OAGG;IACH,+BAgBC;IAtFD;;;OAGG;IACH,0CAEC;IAGD;;;OAGG;IACH,2BAUC;IAQD;;;OAGG;IACH,uCAEC;IAED;;;OAGG;IACH,kBAFU,MAAM,CAEM;IAEtB;;;OAGG;IACH,sCAGC;IAED;;;OAGG;IACH,QAFU,MAAM,MAAM,CAEM;IAgC5B;;;;OAIG;IACH,6BAFW,MAAM,QAiChB;IAED;;;;;;;;OAQG;IACH;QAHsC,WAAW,EAAtC,iBAAiB;QACU,cAAc,EAAzC,iBAAiB;aAY3B;IAED;;;;;;;OAOG;IACH;QAL+B,KAAK,EAAzB,UAAU;QACe,KAAK,EAA9B,eAAe;QACU,QAAQ,EAAjC,eAAe;QACE,gBAAgB,GAAjC,MAAM;eAgRhB;IAED,+BAGC;IAED,gBAGC;;CACJ;8BAvcY,OAAO,6BAA6B,EAAE,eAAe;8BACrD,OAAO,mCAAmC,EAAE,eAAe;yBAI3D,OAAO,iEAAiE,EAAE,UAAU;kCAnB/D,uCAAuC"}
@@ -317,9 +317,18 @@ export class GPUProbeAtlas {
317
317
  */
318
318
  let t_radiance = graph_import_texture(graph, this.texture_radiance);
319
319
  let t_depth = graph_import_texture(graph, this.#texture_depth);
320
- const b_probes = graph_import_buffer(graph, scene.light_probe_volume.buffer_probes)
320
+ const b_probes = graph_import_buffer(graph, scene.light_probe_volume.buffer_probes);
321
321
 
322
- ({ radiance: t_radiance } = graph_lpv_shade({
322
+ /*
323
+ Plain assignment off the returned record, not a parenthesised destructuring assignment. The
324
+ line above used to end without a semicolon, and ASI does not insert one before an open
325
+ paren, so the two statements parsed as a single call expression: the handle
326
+ `graph_import_buffer` returns was invoked as a function and `graph_update` threw a TypeError
327
+ out of `Renderer.update_lpv` on its first frame, after `graph_lpv_shade` had already added
328
+ its pass and before the depth accumulation, border painting, SH convolution and SH store
329
+ were scheduled at all. This shape cannot recur.
330
+ */
331
+ t_radiance = graph_lpv_shade({
323
332
  graph,
324
333
  scene,
325
334
  atlas: this,
@@ -335,7 +344,7 @@ export class GPUProbeAtlas {
335
344
  g_buffer_pbr,
336
345
  g_buffer_position,
337
346
  g_buffer_indirect,
338
- }));
347
+ }).radiance;
339
348
 
340
349
  // avoid upsetting WebGPU validator with empty buffers
341
350
  if (update_count > 0) {
@@ -1 +1 @@
1
- {"version":3,"file":"RGBE_ReadPixels_RLE.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/light/environment/rgbe/RGBE_ReadPixels_RLE.js"],"names":[],"mappings":"AA2FA;;;GAGG;AACH,wCAFW,UAAU,kBAkGpB;AAED;;;;;;GAMG;AACH,4CALW,UAAU,KACV,MAAM,KACN,MAAM,GACJ,UAAU,CAmItB;+BAxU8B,qBAAqB"}
1
+ {"version":3,"file":"RGBE_ReadPixels_RLE.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/light/environment/rgbe/RGBE_ReadPixels_RLE.js"],"names":[],"mappings":"AAiGA;;;GAGG;AACH,wCAFW,UAAU,kBAkGpB;AAED;;;;;;GAMG;AACH,4CALW,UAAU,KACV,MAAM,KACN,MAAM,GACJ,UAAU,CAmItB;+BA9U8B,qBAAqB"}
@@ -64,7 +64,13 @@ function fgets(buffer, lineLimit = 1024, consume = true) {
64
64
  s += chunk;
65
65
  len += chunk.length;
66
66
  p += chunkSize;
67
- chunk += String.fromCharCode.apply(null, new Uint16Array(buffer.subarray(p, p + chunkSize)));
67
+
68
+ //`=`, not `+=`. Appending left `chunk` holding every chunk read so far while `s` already
69
+ //held them, so the line came back with its first 128 characters repeated and `len` — which
70
+ //line 81 below adds to `buffer.pos` — overshot the real line end by 128 per extra read.
71
+ //Every later `fgets` then read from the wrong offset, and a header with a comment longer
72
+ //than one chunk, which Radiance writers emit as a matter of course, was rejected outright.
73
+ chunk = String.fromCharCode.apply(null, new Uint16Array(buffer.subarray(p, p + chunkSize)));
68
74
 
69
75
  }
70
76
 
@@ -1 +1 @@
1
- {"version":3,"file":"GPULightMap.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/lightmap/GPULightMap.js"],"names":[],"mappings":"AAmBA;IAgCI;;;OAGG;IACH,+BA6CC;IA/ED;;;OAGG;IACH,WAFU,iBAAiB,GAAC,IAAI,CAEf;IACjB;;;OAGG;IACH,cAFU,iBAAiB,GAAC,IAAI,CAEZ;IACpB;;;OAGG;IACH,cAFU,iBAAiB,GAAC,IAAI,CAEZ;IAEpB;;;OAGG;IACH,aAFU,iBAAiB,GAAC,IAAI,CAEb;IAEnB;;;OAGG;IACH,yBAEC;IA2ED;;;;OAIG;IACH,wEAmCC;IA6BD;;OAEG;IACH,oBA0DC;IAED,iBA+DC;IAED;;;;OAIG;IACH,kEAQC;;CAEJ;kCA3UiC,iCAAiC"}
1
+ {"version":3,"file":"GPULightMap.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/lightmap/GPULightMap.js"],"names":[],"mappings":"AAmBA;IAgCI;;;OAGG;IACH,+BA6CC;IA/ED;;;OAGG;IACH,WAFU,iBAAiB,GAAC,IAAI,CAEf;IACjB;;;OAGG;IACH,cAFU,iBAAiB,GAAC,IAAI,CAEZ;IACpB;;;OAGG;IACH,cAFU,iBAAiB,GAAC,IAAI,CAEZ;IAEpB;;;OAGG;IACH,aAFU,iBAAiB,GAAC,IAAI,CAEb;IAEnB;;;OAGG;IACH,yBAEC;IA2ED;;;;OAIG;IACH,wEAmCC;IA6BD;;OAEG;IACH,oBA0DC;IAED,iBA4EC;IAED;;;;OAIG;IACH,kEAQC;;CAEJ;kCAxViC,iCAAiC"}