@woosh/meep-engine 3.24.0 → 3.26.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 (349) hide show
  1. package/package.json +1 -1
  2. package/src/core/geom/3d/shape/HeightMapShape3D.d.ts +59 -0
  3. package/src/core/geom/3d/shape/HeightMapShape3D.d.ts.map +1 -1
  4. package/src/core/geom/3d/shape/HeightMapShape3D.js +285 -0
  5. package/src/core/geom/3d/shape/PosedShape3D.d.ts.map +1 -1
  6. package/src/core/geom/3d/shape/PosedShape3D.js +57 -0
  7. package/src/core/geom/3d/shape/TransformedShape3D.d.ts.map +1 -1
  8. package/src/core/geom/3d/shape/TransformedShape3D.js +102 -0
  9. package/src/core/geom/3d/shape/UnionShape3D.d.ts.map +1 -1
  10. package/src/core/geom/3d/shape/UnionShape3D.js +64 -0
  11. package/src/engine/graphics3/PickingSystem.d.ts +3 -3
  12. package/src/engine/graphics3/PickingSystem.d.ts.map +1 -1
  13. package/src/engine/graphics3/PickingSystem.js +52 -55
  14. package/src/engine/graphics3/shader_picking_gather.d.ts +40 -0
  15. package/src/engine/graphics3/shader_picking_gather.d.ts.map +1 -0
  16. package/src/engine/graphics3/shader_picking_gather.js +120 -0
  17. package/src/engine/physics/cloth/MEASUREMENTS.md +1632 -0
  18. package/src/engine/physics/cloth/PLAN.md +738 -95
  19. package/src/engine/physics/cloth/collider/ClothColliderIndex.d.ts +84 -17
  20. package/src/engine/physics/cloth/collider/ClothColliderIndex.d.ts.map +1 -1
  21. package/src/engine/physics/cloth/collider/ClothColliderIndex.js +451 -42
  22. package/src/engine/physics/cloth/ecs/ClothColliderSerializationAdapter.d.ts +52 -0
  23. package/src/engine/physics/cloth/ecs/ClothColliderSerializationAdapter.d.ts.map +1 -0
  24. package/src/engine/physics/cloth/ecs/ClothColliderSerializationAdapter.js +70 -0
  25. package/src/engine/physics/cloth/ecs/ClothDynamics.d.ts +12 -3
  26. package/src/engine/physics/cloth/ecs/ClothDynamics.d.ts.map +1 -1
  27. package/src/engine/physics/cloth/ecs/ClothDynamics.js +340 -331
  28. package/src/engine/physics/cloth/ecs/ClothInstance.d.ts +101 -29
  29. package/src/engine/physics/cloth/ecs/ClothInstance.d.ts.map +1 -1
  30. package/src/engine/physics/cloth/ecs/ClothInstance.js +110 -31
  31. package/src/engine/physics/cloth/ecs/ClothSerializationAdapter.d.ts +84 -0
  32. package/src/engine/physics/cloth/ecs/ClothSerializationAdapter.d.ts.map +1 -0
  33. package/src/engine/physics/cloth/ecs/ClothSerializationAdapter.js +141 -0
  34. package/src/engine/physics/cloth/ecs/ClothSystem.d.ts +71 -81
  35. package/src/engine/physics/cloth/ecs/ClothSystem.d.ts.map +1 -1
  36. package/src/engine/physics/cloth/ecs/ClothSystem.js +135 -856
  37. package/src/engine/physics/cloth/ecs/ClothWorkerCore.d.ts +48 -0
  38. package/src/engine/physics/cloth/ecs/ClothWorkerCore.d.ts.map +1 -0
  39. package/src/engine/physics/cloth/ecs/ClothWorkerCore.js +107 -0
  40. package/src/engine/physics/cloth/ecs/ClothWorld.d.ts +323 -0
  41. package/src/engine/physics/cloth/ecs/ClothWorld.d.ts.map +1 -0
  42. package/src/engine/physics/cloth/ecs/ClothWorld.js +1248 -0
  43. package/src/engine/physics/cloth/ecs/WorkerClothSystem.d.ts +192 -0
  44. package/src/engine/physics/cloth/ecs/WorkerClothSystem.d.ts.map +1 -0
  45. package/src/engine/physics/cloth/ecs/WorkerClothSystem.js +578 -0
  46. package/src/engine/physics/cloth/ecs/cloth.worker.d.ts +2 -0
  47. package/src/engine/physics/cloth/ecs/cloth.worker.d.ts.map +1 -0
  48. package/src/engine/physics/cloth/ecs/cloth.worker.js +12 -0
  49. package/src/engine/physics/cloth/ecs/cloth_build_rows.d.ts.map +1 -1
  50. package/src/engine/physics/cloth/ecs/cloth_build_rows.js +2 -1
  51. package/src/engine/physics/cloth/ecs/cloth_dynamics_map.d.ts +85 -3
  52. package/src/engine/physics/cloth/ecs/cloth_dynamics_map.d.ts.map +1 -1
  53. package/src/engine/physics/cloth/ecs/cloth_dynamics_map.js +366 -271
  54. package/src/engine/physics/cloth/ecs/cloth_gather_colliders.d.ts +95 -12
  55. package/src/engine/physics/cloth/ecs/cloth_gather_colliders.d.ts.map +1 -1
  56. package/src/engine/physics/cloth/ecs/cloth_gather_colliders.js +170 -27
  57. package/src/engine/physics/cloth/ecs/cloth_seed_rig.d.ts +19 -0
  58. package/src/engine/physics/cloth/ecs/cloth_seed_rig.d.ts.map +1 -1
  59. package/src/engine/physics/cloth/ecs/cloth_seed_rig.js +249 -201
  60. package/src/engine/physics/cloth/ecs/cloth_seed_subtree.d.ts +21 -0
  61. package/src/engine/physics/cloth/ecs/cloth_seed_subtree.d.ts.map +1 -1
  62. package/src/engine/physics/cloth/ecs/cloth_seed_subtree.js +62 -1
  63. package/src/engine/physics/cloth/ecs/cloth_worker_protocol.d.ts +29 -0
  64. package/src/engine/physics/cloth/ecs/cloth_worker_protocol.d.ts.map +1 -0
  65. package/src/engine/physics/cloth/ecs/cloth_worker_protocol.js +78 -0
  66. package/src/engine/physics/cloth/ecs/cloth_write_back.d.ts.map +1 -1
  67. package/src/engine/physics/cloth/ecs/cloth_write_back.js +18 -10
  68. package/src/engine/physics/cloth/ecs/makeClothWorker.d.ts +17 -0
  69. package/src/engine/physics/cloth/ecs/makeClothWorker.d.ts.map +1 -0
  70. package/src/engine/physics/cloth/ecs/makeClothWorker.js +18 -0
  71. package/src/engine/physics/cloth/playground/README.md +73 -2
  72. package/src/engine/physics/cloth/playground/collide_main.js +1 -1
  73. package/src/engine/physics/cloth/playground/wind.html +166 -0
  74. package/src/engine/physics/cloth/playground/wind_build.d.ts +81 -0
  75. package/src/engine/physics/cloth/playground/wind_build.d.ts.map +1 -0
  76. package/src/engine/physics/cloth/playground/wind_build.js +141 -0
  77. package/src/engine/physics/cloth/playground/wind_main.d.ts +2 -0
  78. package/src/engine/physics/cloth/playground/wind_main.d.ts.map +1 -0
  79. package/src/engine/physics/cloth/playground/wind_main.js +681 -0
  80. package/src/engine/physics/cloth/solver/ClothState.d.ts +134 -79
  81. package/src/engine/physics/cloth/solver/ClothState.d.ts.map +1 -1
  82. package/src/engine/physics/cloth/solver/ClothState.js +273 -12
  83. package/src/engine/physics/cloth/solver/cloth_contact_find.d.ts +29 -8
  84. package/src/engine/physics/cloth/solver/cloth_contact_find.d.ts.map +1 -1
  85. package/src/engine/physics/cloth/solver/cloth_contact_find.js +37 -9
  86. package/src/engine/physics/cloth/solver/cloth_solver_constants.d.ts +45 -2
  87. package/src/engine/physics/cloth/solver/cloth_solver_constants.d.ts.map +1 -1
  88. package/src/engine/physics/cloth/solver/cloth_solver_constants.js +46 -2
  89. package/src/engine/physics/cloth/solver/cloth_step.d.ts +21 -2
  90. package/src/engine/physics/cloth/solver/cloth_step.d.ts.map +1 -1
  91. package/src/engine/physics/cloth/solver/cloth_step.js +173 -4
  92. package/src/engine/physics/cloth/solver/cloth_step_instance.d.ts +40 -0
  93. package/src/engine/physics/cloth/solver/cloth_step_instance.d.ts.map +1 -0
  94. package/src/engine/physics/cloth/solver/cloth_step_instance.js +284 -0
  95. package/src/engine/physics/cloth/solver/cloth_wind_accelerate.d.ts +107 -0
  96. package/src/engine/physics/cloth/solver/cloth_wind_accelerate.d.ts.map +1 -0
  97. package/src/engine/physics/cloth/solver/cloth_wind_accelerate.js +263 -0
  98. package/src/engine/physics/cloth/solver/constraint/cloth_backstop_row.d.ts +9 -2
  99. package/src/engine/physics/cloth/solver/constraint/cloth_backstop_row.d.ts.map +1 -1
  100. package/src/engine/physics/cloth/solver/constraint/cloth_backstop_row.js +9 -2
  101. package/src/engine/physics/cloth/wind/AbstractClothWind.d.ts +102 -0
  102. package/src/engine/physics/cloth/wind/AbstractClothWind.d.ts.map +1 -0
  103. package/src/engine/physics/cloth/wind/AbstractClothWind.js +114 -0
  104. package/src/engine/physics/cloth/wind/ClothAmbientWind.d.ts +87 -0
  105. package/src/engine/physics/cloth/wind/ClothAmbientWind.d.ts.map +1 -0
  106. package/src/engine/physics/cloth/wind/ClothAmbientWind.js +185 -0
  107. package/src/engine/physics/cloth/wind/ClothFluidWind.d.ts +79 -0
  108. package/src/engine/physics/cloth/wind/ClothFluidWind.d.ts.map +1 -0
  109. package/src/engine/physics/cloth/wind/ClothFluidWind.js +213 -0
  110. package/src/engine/physics/cloth/wind/cloth_sample_air.d.ts +106 -0
  111. package/src/engine/physics/cloth/wind/cloth_sample_air.d.ts.map +1 -0
  112. package/src/engine/physics/cloth/wind/cloth_sample_air.js +297 -0
  113. package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
  114. package/src/shade/device/mock/texture_copy.d.ts.map +1 -1
  115. package/src/shade/device/mock/texture_copy.js +28 -0
  116. package/src/shade/playground/vgeo_runtime/README.md +94 -0
  117. package/src/shade/playground/vgeo_runtime/index.html +62 -0
  118. package/src/shade/playground/vgeo_runtime/main.d.ts +2 -0
  119. package/src/shade/playground/vgeo_runtime/main.d.ts.map +1 -0
  120. package/src/shade/playground/vgeo_runtime/main.js +399 -0
  121. package/src/shade/playground/vgeo_viewer/sample_asset.js +1 -1
  122. package/src/shade/renderer/camera/Camera.d.ts +14 -0
  123. package/src/shade/renderer/camera/Camera.d.ts.map +1 -1
  124. package/src/shade/renderer/camera/Camera.js +7 -1
  125. package/src/shade/renderer/geometry/GEOMETRY_METADATA_STRUCT.d.ts.map +1 -1
  126. package/src/shade/renderer/geometry/GEOMETRY_METADATA_STRUCT.js +16 -1
  127. package/src/shade/renderer/geometry/GPUGeometryManager.d.ts.map +1 -1
  128. package/src/shade/renderer/geometry/GPUGeometryManager.js +29 -9
  129. package/src/shade/renderer/geometry/GPUGeometryMetadata.d.ts +10 -0
  130. package/src/shade/renderer/geometry/GPUGeometryMetadata.d.ts.map +1 -1
  131. package/src/shade/renderer/geometry/GPUGeometryMetadata.js +13 -0
  132. package/src/shade/renderer/geometry/virtual/VGEO_FORMAT.md +46 -18
  133. package/src/shade/renderer/geometry/virtual/VIRTUAL_GEOMETRY_DESIGN.md +70 -22
  134. package/src/shade/renderer/geometry/virtual/VIRTUAL_GEOMETRY_PLAN.md +97 -19
  135. package/src/shade/renderer/geometry/virtual/build/VGeoBuildOptions.d.ts +12 -2
  136. package/src/shade/renderer/geometry/virtual/build/VGeoBuildOptions.d.ts.map +1 -1
  137. package/src/shade/renderer/geometry/virtual/build/VGeoBuildOptions.js +14 -3
  138. package/src/shade/renderer/geometry/virtual/build/vgeo_assemble_pages.d.ts +2 -2
  139. package/src/shade/renderer/geometry/virtual/build/vgeo_assemble_pages.d.ts.map +1 -1
  140. package/src/shade/renderer/geometry/virtual/build/vgeo_assemble_pages.js +124 -6
  141. package/src/shade/renderer/geometry/virtual/build/vgeo_page_node_count.d.ts +22 -0
  142. package/src/shade/renderer/geometry/virtual/build/vgeo_page_node_count.d.ts.map +1 -0
  143. package/src/shade/renderer/geometry/virtual/build/vgeo_page_node_count.js +53 -0
  144. package/src/shade/renderer/geometry/virtual/format/VGeoWriteOptions.d.ts +8 -1
  145. package/src/shade/renderer/geometry/virtual/format/VGeoWriteOptions.d.ts.map +1 -1
  146. package/src/shade/renderer/geometry/virtual/format/VGeoWriteOptions.js +8 -1
  147. package/src/shade/renderer/geometry/virtual/format/header/VGEO_FEATURE_IGNORABLE_BOUNDED_PAGES.d.ts +16 -0
  148. package/src/shade/renderer/geometry/virtual/format/header/VGEO_FEATURE_IGNORABLE_BOUNDED_PAGES.d.ts.map +1 -0
  149. package/src/shade/renderer/geometry/virtual/format/header/VGEO_FEATURE_IGNORABLE_BOUNDED_PAGES.js +15 -0
  150. package/src/shade/renderer/geometry/virtual/format/page/VGEO_DEFAULT_PAGE_SIZE.d.ts +54 -0
  151. package/src/shade/renderer/geometry/virtual/format/page/VGEO_DEFAULT_PAGE_SIZE.d.ts.map +1 -0
  152. package/src/shade/renderer/geometry/virtual/format/page/VGEO_DEFAULT_PAGE_SIZE.js +53 -0
  153. package/src/shade/renderer/geometry/virtual/format/read/VGeoContainerHeader.d.ts +13 -2
  154. package/src/shade/renderer/geometry/virtual/format/read/VGeoContainerHeader.d.ts.map +1 -1
  155. package/src/shade/renderer/geometry/virtual/format/read/VGeoContainerHeader.js +14 -2
  156. package/src/shade/renderer/geometry/virtual/format/read/VGeoPage.d.ts +100 -0
  157. package/src/shade/renderer/geometry/virtual/format/read/VGeoPage.d.ts.map +1 -1
  158. package/src/shade/renderer/geometry/virtual/format/read/VGeoPage.js +113 -0
  159. package/src/shade/renderer/geometry/virtual/format/read/vgeo_read_header.d.ts.map +1 -1
  160. package/src/shade/renderer/geometry/virtual/format/read/vgeo_read_header.js +5 -0
  161. package/src/shade/renderer/geometry/virtual/format/read/vgeo_read_page.d.ts.map +1 -1
  162. package/src/shade/renderer/geometry/virtual/format/read/vgeo_read_page.js +108 -0
  163. package/src/shade/renderer/geometry/virtual/format/vgeo_validate_container.d.ts.map +1 -1
  164. package/src/shade/renderer/geometry/virtual/format/vgeo_validate_container.js +23 -0
  165. package/src/shade/renderer/geometry/virtual/format/vgeo_write_container.d.ts.map +1 -1
  166. package/src/shade/renderer/geometry/virtual/format/vgeo_write_container.js +40 -0
  167. package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryPool.d.ts +228 -0
  168. package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryPool.d.ts.map +1 -0
  169. package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryPool.js +932 -0
  170. package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.d.ts +176 -0
  171. package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.d.ts.map +1 -0
  172. package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.js +425 -0
  173. package/src/shade/renderer/geometry/virtual/runtime/REVIEW_LEDGER.md +241 -0
  174. package/src/shade/renderer/geometry/virtual/runtime/RUNTIME_PLAN.md +574 -0
  175. package/src/shade/renderer/geometry/virtual/runtime/VGeoFeedbackLoop.d.ts +120 -0
  176. package/src/shade/renderer/geometry/virtual/runtime/VGeoFeedbackLoop.d.ts.map +1 -0
  177. package/src/shade/renderer/geometry/virtual/runtime/VGeoFeedbackLoop.js +674 -0
  178. package/src/shade/renderer/geometry/virtual/runtime/VGeoRuntimeTables.d.ts +287 -0
  179. package/src/shade/renderer/geometry/virtual/runtime/VGeoRuntimeTables.d.ts.map +1 -0
  180. package/src/shade/renderer/geometry/virtual/runtime/VGeoRuntimeTables.js +976 -0
  181. package/src/shade/renderer/geometry/virtual/runtime/VirtualGeometry.d.ts +42 -0
  182. package/src/shade/renderer/geometry/virtual/runtime/VirtualGeometry.d.ts.map +1 -0
  183. package/src/shade/renderer/geometry/virtual/runtime/VirtualGeometry.js +96 -0
  184. package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_FLAG_CULL.d.ts +16 -0
  185. package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_FLAG_CULL.d.ts.map +1 -0
  186. package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_FLAG_CULL.js +15 -0
  187. package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_PARAMS_STRUCT.d.ts +19 -0
  188. package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_PARAMS_STRUCT.d.ts.map +1 -0
  189. package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_PARAMS_STRUCT.js +83 -0
  190. package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_WORKGROUP_SIZE.d.ts +9 -0
  191. package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_WORKGROUP_SIZE.d.ts.map +1 -0
  192. package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_WORKGROUP_SIZE.js +8 -0
  193. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_access.d.ts +19 -0
  194. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_access.d.ts.map +1 -0
  195. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_access.js +160 -0
  196. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_collect.d.ts +3 -0
  197. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_collect.d.ts.map +1 -0
  198. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_collect.js +255 -0
  199. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_queue_prepare.d.ts +3 -0
  200. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_queue_prepare.d.ts.map +1 -0
  201. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_queue_prepare.js +80 -0
  202. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_seed.d.ts +3 -0
  203. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_seed.d.ts.map +1 -0
  204. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_seed.js +144 -0
  205. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_traverse.d.ts +3 -0
  206. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_traverse.d.ts.map +1 -0
  207. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_traverse.js +530 -0
  208. package/src/shade/renderer/geometry/virtual/runtime/cut/vgeo_cut_feedback_layout.d.ts +39 -0
  209. package/src/shade/renderer/geometry/virtual/runtime/cut/vgeo_cut_feedback_layout.d.ts.map +1 -0
  210. package/src/shade/renderer/geometry/virtual/runtime/cut/vgeo_cut_feedback_layout.js +54 -0
  211. package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_if_enabled.d.ts +41 -0
  212. package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_if_enabled.d.ts.map +1 -0
  213. package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_if_enabled.js +56 -0
  214. package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_instances_to_meshlets.d.ts +49 -0
  215. package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_instances_to_meshlets.d.ts.map +1 -0
  216. package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_instances_to_meshlets.js +328 -0
  217. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CLUSTER_ROW_OFFSET.d.ts +10 -0
  218. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CLUSTER_ROW_OFFSET.d.ts.map +1 -0
  219. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CLUSTER_ROW_OFFSET.js +51 -0
  220. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CLUSTER_ROW_WORDS.d.ts +13 -0
  221. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CLUSTER_ROW_WORDS.d.ts.map +1 -0
  222. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CLUSTER_ROW_WORDS.js +12 -0
  223. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CUT_STAT.d.ts +17 -0
  224. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CUT_STAT.d.ts.map +1 -0
  225. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CUT_STAT.js +99 -0
  226. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CUT_STAT_COUNT.d.ts +9 -0
  227. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CUT_STAT_COUNT.d.ts.map +1 -0
  228. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CUT_STAT_COUNT.js +8 -0
  229. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_FEEDBACK_OFFSET.d.ts +7 -0
  230. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_FEEDBACK_OFFSET.d.ts.map +1 -0
  231. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_FEEDBACK_OFFSET.js +27 -0
  232. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GEOMETRY_ROW_NONE.d.ts +14 -0
  233. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GEOMETRY_ROW_NONE.d.ts.map +1 -0
  234. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GEOMETRY_ROW_NONE.js +13 -0
  235. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GEOMETRY_ROW_OFFSET.d.ts +7 -0
  236. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GEOMETRY_ROW_OFFSET.d.ts.map +1 -0
  237. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GEOMETRY_ROW_OFFSET.js +35 -0
  238. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GEOMETRY_ROW_WORDS.d.ts +9 -0
  239. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GEOMETRY_ROW_WORDS.d.ts.map +1 -0
  240. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GEOMETRY_ROW_WORDS.js +8 -0
  241. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GROUP_FLAG_SELECTABLE.d.ts +15 -0
  242. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GROUP_FLAG_SELECTABLE.d.ts.map +1 -0
  243. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GROUP_FLAG_SELECTABLE.js +14 -0
  244. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GROUP_ROW_OFFSET.d.ts +7 -0
  245. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GROUP_ROW_OFFSET.d.ts.map +1 -0
  246. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GROUP_ROW_OFFSET.js +36 -0
  247. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GROUP_ROW_WORDS.d.ts +10 -0
  248. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GROUP_ROW_WORDS.d.ts.map +1 -0
  249. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GROUP_ROW_WORDS.js +9 -0
  250. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_INSTANCE_OFFSET.d.ts +11 -0
  251. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_INSTANCE_OFFSET.d.ts.map +1 -0
  252. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_INSTANCE_OFFSET.js +54 -0
  253. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_INSTANCE_WORDS.d.ts +9 -0
  254. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_INSTANCE_WORDS.d.ts.map +1 -0
  255. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_INSTANCE_WORDS.js +8 -0
  256. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NODE_ROW_LEAF_BIT.d.ts +11 -0
  257. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NODE_ROW_LEAF_BIT.d.ts.map +1 -0
  258. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NODE_ROW_LEAF_BIT.js +10 -0
  259. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NODE_ROW_OFFSET.d.ts +7 -0
  260. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NODE_ROW_OFFSET.d.ts.map +1 -0
  261. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NODE_ROW_OFFSET.js +30 -0
  262. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NODE_ROW_WORDS.d.ts +9 -0
  263. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NODE_ROW_WORDS.d.ts.map +1 -0
  264. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NODE_ROW_WORDS.js +8 -0
  265. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NO_CHILD_PAGE.d.ts +13 -0
  266. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NO_CHILD_PAGE.d.ts.map +1 -0
  267. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NO_CHILD_PAGE.js +12 -0
  268. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PAGE_ROW_NONE.d.ts +14 -0
  269. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PAGE_ROW_NONE.d.ts.map +1 -0
  270. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PAGE_ROW_NONE.js +13 -0
  271. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PAGE_ROW_OFFSET.d.ts +11 -0
  272. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PAGE_ROW_OFFSET.d.ts.map +1 -0
  273. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PAGE_ROW_OFFSET.js +61 -0
  274. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PAGE_ROW_WORDS.d.ts +9 -0
  275. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PAGE_ROW_WORDS.d.ts.map +1 -0
  276. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PAGE_ROW_WORDS.js +8 -0
  277. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_QUEUE_ITEM_WORDS.d.ts +13 -0
  278. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_QUEUE_ITEM_WORDS.d.ts.map +1 -0
  279. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_QUEUE_ITEM_WORDS.js +12 -0
  280. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_QUEUE_TARGET_GROUP_BIT.d.ts +9 -0
  281. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_QUEUE_TARGET_GROUP_BIT.d.ts.map +1 -0
  282. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_QUEUE_TARGET_GROUP_BIT.js +8 -0
  283. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_WANT_WORDS.d.ts +20 -0
  284. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_WANT_WORDS.d.ts.map +1 -0
  285. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_WANT_WORDS.js +19 -0
  286. package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_meshlet_batch.d.ts +23 -0
  287. package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_meshlet_batch.d.ts.map +1 -0
  288. package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_meshlet_batch.js +70 -0
  289. package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_page_block_words.d.ts +18 -0
  290. package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_page_block_words.d.ts.map +1 -0
  291. package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_page_block_words.js +25 -0
  292. package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_page_slot_words.d.ts +35 -0
  293. package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_page_slot_words.d.ts.map +1 -0
  294. package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_page_slot_words.js +41 -0
  295. package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_write_page_block.d.ts +32 -0
  296. package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_write_page_block.d.ts.map +1 -0
  297. package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_write_page_block.js +138 -0
  298. package/src/shade/renderer/loader/gltf/tiny-gltf.d.ts +1 -1
  299. package/src/shade/renderer/postprocess/nss/NSS.d.ts +1 -1
  300. package/src/shade/renderer/rasterize/bucket/prepare_meshlet_draw_commands_by_material.d.ts.map +1 -1
  301. package/src/shade/renderer/rasterize/bucket/prepare_meshlet_draw_commands_by_material.js +9 -0
  302. package/src/shade/renderer/rasterize/fast/graph_rasterize_scene_fast.d.ts.map +1 -1
  303. package/src/shade/renderer/rasterize/fast/graph_rasterize_scene_fast.js +12 -1
  304. package/src/shade/renderer/rasterize/standard/graph_rasterize_partial_opaque.d.ts.map +1 -1
  305. package/src/shade/renderer/rasterize/standard/graph_rasterize_partial_opaque.js +12 -1
  306. package/src/shade/renderer/rasterize/standard/graph_rasterize_remaining_opaque.d.ts.map +1 -1
  307. package/src/shade/renderer/rasterize/standard/graph_rasterize_remaining_opaque.js +10 -0
  308. package/src/shade/renderer/scene/GPUSceneContext.d.ts +18 -0
  309. package/src/shade/renderer/scene/GPUSceneContext.d.ts.map +1 -1
  310. package/src/shade/renderer/scene/GPUSceneContext.js +647 -594
  311. package/src/shade/renderer/scene/rows/GPUSceneRows.d.ts.map +1 -1
  312. package/src/shade/renderer/scene/rows/GPUSceneRows.js +22 -0
  313. package/src/shade/renderer/shader/chunk/geometry/mat3/chunk_mat3_singular_values.d.ts +35 -0
  314. package/src/shade/renderer/shader/chunk/geometry/mat3/chunk_mat3_singular_values.d.ts.map +1 -0
  315. package/src/shade/renderer/shader/chunk/geometry/mat3/chunk_mat3_singular_values.js +91 -0
  316. package/src/engine/graphics3/instantiate_scene_bundle.d.ts +0 -54
  317. package/src/engine/graphics3/instantiate_scene_bundle.d.ts.map +0 -1
  318. package/src/engine/graphics3/shade_node_to_entity_composition.d.ts +0 -39
  319. package/src/engine/graphics3/shade_node_to_entity_composition.d.ts.map +0 -1
  320. package/src/shade/renderer/animation/compute_skin_world_bounds.d.ts +0 -35
  321. package/src/shade/renderer/animation/compute_skin_world_bounds.d.ts.map +0 -1
  322. package/src/shade/renderer/animation/compute_skinned_mesh_clip_bounding_sphere.d.ts +0 -96
  323. package/src/shade/renderer/animation/compute_skinned_mesh_clip_bounding_sphere.d.ts.map +0 -1
  324. package/src/shade/renderer/animation/pose/pose_evaluate_world.d.ts +0 -20
  325. package/src/shade/renderer/animation/pose/pose_evaluate_world.d.ts.map +0 -1
  326. package/src/shade/renderer/animation/skin_bind_transform.d.ts +0 -25
  327. package/src/shade/renderer/animation/skin_bind_transform.d.ts.map +0 -1
  328. package/src/shade/renderer/animation/skin_frame_defect.d.ts +0 -34
  329. package/src/shade/renderer/animation/skin_frame_defect.d.ts.map +0 -1
  330. package/src/shade/renderer/animation/skin_joint_matrix.d.ts +0 -24
  331. package/src/shade/renderer/animation/skin_joint_matrix.d.ts.map +0 -1
  332. package/src/shade/renderer/animation/skin_normalize_mesh_frame.d.ts +0 -70
  333. package/src/shade/renderer/animation/skin_normalize_mesh_frame.d.ts.map +0 -1
  334. package/src/shade/renderer/buffer/table/GPUReadbackStagingRing.d.ts +0 -96
  335. package/src/shade/renderer/buffer/table/GPUReadbackStagingRing.d.ts.map +0 -1
  336. package/src/shade/renderer/scene/InstanceBatch.d.ts +0 -92
  337. package/src/shade/renderer/scene/InstanceBatch.d.ts.map +0 -1
  338. package/src/shade/renderer/scene/Mesh.d.ts +0 -55
  339. package/src/shade/renderer/scene/Mesh.d.ts.map +0 -1
  340. package/src/shade/renderer/scene/Node3D.d.ts +0 -159
  341. package/src/shade/renderer/scene/Node3D.d.ts.map +0 -1
  342. package/src/shade/renderer/scene/Node3DDirtyList.d.ts +0 -59
  343. package/src/shade/renderer/scene/Node3DDirtyList.d.ts.map +0 -1
  344. package/src/shade/renderer/scene/SceneNodeBinding.d.ts +0 -52
  345. package/src/shade/renderer/scene/SceneNodeBinding.d.ts.map +0 -1
  346. package/src/shade/renderer/scene/SkinnedMesh.d.ts +0 -27
  347. package/src/shade/renderer/scene/SkinnedMesh.d.ts.map +0 -1
  348. package/src/shade/renderer/scene/TransformAuthority.d.ts +0 -19
  349. package/src/shade/renderer/scene/TransformAuthority.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"GPUSceneRows.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/scene/rows/GPUSceneRows.js"],"names":[],"mappings":"AAWA;;;;;;;;;;GAUG;AAEH;;;;;;;;;GASG;AACH,sCAHW,MAAM,GACJ,MAAM,CAIlB;AAED;;;;;;GAMG;AACH,mCAHW,MAAM,GACJ,MAAM,CAIlB;AAmID;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH;IA2II;;;;;;;;;OASG;IACH;QAR2C,OAAO,EAAvC,sBAAsB;QACC,UAAU;QACV,MAAM;QACD,UAAU,EAAtC,kBAAkB;QACU,SAAS,EAArC,kBAAkB;QACyB,IAAI,EAA/C,iCAAiC;QACW,QAAQ,QAAxC,sBAAsB;OAmB5C;IAED;;OAEG;IACH,iGAEC;IAED;;;;;OAKG;IACH,gCAEC;IAED;;;;;OAKG;IACH,YAHW,MAAM,GACJ,OAAO,CAInB;IAED;;;;;OAKG;IACH,iBAHW,MAAM,GACJ,OAAO,CAInB;IAED;;;;;;;OAOG;IACH,8BAHoB,MAAM,QAAE,eAAe,QAAE,aAAa,QAAE,OAAO,KAAG,IAAI,QASzE;IAED;;;;;;;;;OASG;IACH,6BAHW,KAAK,GACH,OAAO,CAyBnB;IAED;;;;;;;;;;OAUG;IACH,gBAFW,MAAM,QAuChB;IAED;;;;;;;;OAQG;IACH,gBAFW,MAAM,QA0BhB;IAED;;;;OAIG;IACH,mBAFW,MAAM,QAIhB;IAED;;;;;OAKG;IACH,mBAFW,MAAM,QAIhB;IAED;;;;;OAKG;IACH,2EAOC;IAED;;;;OAIG;IACH,gCAEC;IAqCD;;;;;;;;;;;;;;OAcG;IACH,oBALW,MAAM,YACN,eAAe,YACf,aAAa,YACb,OAAO,QA2BjB;IAED;;;;;OAKG;IACH,oBAFW,MAAM,QAUhB;IAsCD;;;;OAIG;IACH,SAFa,MAAM,CAsDlB;IAmMD;;;;OAIG;IACH;;;;;;;;OAQG;IACH,4BAHW,MAAM,kBACG,MAAM,KAAG,IAAI,QAiBhC;IAyGD;;OAEG;IACH,gBA+BC;;CACJ;qCAnmCY,OAAO,kDAAkD,EAAE,sBAAsB;;iCAEjF,OAAO,sCAAsC,EAAE,kBAAkB;iCACjE,OAAO,sCAAsC,EAAE,kBAAkB;gDACjE,OAAO,yCAAyC,EAAE,iCAAiC;qCACnF,OAAO,oDAAoD,EAAE,sBAAsB;8BACnF,OAAO,mCAAmC,EAAE,eAAe;4BAC3D,OAAO,iCAAiC,EAAE,aAAa;oBACvD,OAAO,wCAAwC,EAAE,KAAK"}
1
+ {"version":3,"file":"GPUSceneRows.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/scene/rows/GPUSceneRows.js"],"names":[],"mappings":"AAYA;;;;;;;;;;GAUG;AAEH;;;;;;;;;GASG;AACH,sCAHW,MAAM,GACJ,MAAM,CAIlB;AAED;;;;;;GAMG;AACH,mCAHW,MAAM,GACJ,MAAM,CAIlB;AAmID;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH;IA2II;;;;;;;;;OASG;IACH;QAR2C,OAAO,EAAvC,sBAAsB;QACC,UAAU;QACV,MAAM;QACD,UAAU,EAAtC,kBAAkB;QACU,SAAS,EAArC,kBAAkB;QACyB,IAAI,EAA/C,iCAAiC;QACW,QAAQ,QAAxC,sBAAsB;OAmB5C;IAED;;OAEG;IACH,iGAEC;IAED;;;;;OAKG;IACH,gCAEC;IAED;;;;;OAKG;IACH,YAHW,MAAM,GACJ,OAAO,CAInB;IAED;;;;;OAKG;IACH,iBAHW,MAAM,GACJ,OAAO,CAInB;IAED;;;;;;;OAOG;IACH,8BAHoB,MAAM,QAAE,eAAe,QAAE,aAAa,QAAE,OAAO,KAAG,IAAI,QASzE;IAED;;;;;;;;;OASG;IACH,6BAHW,KAAK,GACH,OAAO,CAyBnB;IAED;;;;;;;;;;OAUG;IACH,gBAFW,MAAM,QAuChB;IAED;;;;;;;;OAQG;IACH,gBAFW,MAAM,QA0BhB;IAED;;;;OAIG;IACH,mBAFW,MAAM,QAIhB;IAED;;;;;OAKG;IACH,mBAFW,MAAM,QAIhB;IAED;;;;;OAKG;IACH,2EAOC;IAED;;;;OAIG;IACH,gCAEC;IAqCD;;;;;;;;;;;;;;OAcG;IACH,oBALW,MAAM,YACN,eAAe,YACf,aAAa,YACb,OAAO,QAgDjB;IAED;;;;;OAKG;IACH,oBAFW,MAAM,QAUhB;IAsCD;;;;OAIG;IACH,SAFa,MAAM,CAsDlB;IAmMD;;;;OAIG;IACH;;;;;;;;OAQG;IACH,4BAHW,MAAM,kBACG,MAAM,KAAG,IAAI,QAiBhC;IAyGD;;OAEG;IACH,gBA+BC;;CACJ;qCAxnCY,OAAO,kDAAkD,EAAE,sBAAsB;;iCAEjF,OAAO,sCAAsC,EAAE,kBAAkB;iCACjE,OAAO,sCAAsC,EAAE,kBAAkB;gDACjE,OAAO,yCAAyC,EAAE,iCAAiC;qCACnF,OAAO,oDAAoD,EAAE,sBAAsB;8BACnF,OAAO,mCAAmC,EAAE,eAAe;4BAC3D,OAAO,iCAAiC,EAAE,aAAa;oBACvD,OAAO,wCAAwC,EAAE,KAAK"}
@@ -8,6 +8,7 @@ import { Transform64 } from "../../../../engine/ecs/transform/Transform64.js";
8
8
  import { generate_record_writer } from "../../buffer/table/serde/generate_record_writer.js";
9
9
  import { MESH_INSTANCE_METADATA_STRUCT } from "../MESH_INSTANCE_METADATA_STRUCT.js";
10
10
  import { NODE3D_SCENE_ID, NODE3D_STRUCT } from "../NODE3D_STRUCT.js";
11
+ import { TransparencyMode } from "../../material/TransparencyMode.js";
11
12
 
12
13
  /**
13
14
  * @typedef {import("../../../../engine/ecs/EntityComponentDataset.js").EntityComponentDataset} EntityComponentDataset
@@ -640,6 +641,27 @@ export class GPUSceneRows {
640
641
  assert.defined(material, 'material');
641
642
  assert.isBoolean(skinned, 'skinned');
642
643
 
644
+ if (geometry.isVirtualGeometry === true
645
+ && material.transparency_mode !== TransparencyMode.Opaque) {
646
+ /*
647
+ It would draw nothing at all, silently. A virtual geometry expands to zero static
648
+ meshlets by construction, and the cut that fills that gap runs only in the opaque
649
+ rasterization paths — `prepare_meshlet_draw_commands_by_material`, which serves the
650
+ transparent and alpha-tested buckets, has no seam. VIRTUAL_GEOMETRY_DESIGN §9 scopes
651
+ v1 that way; what it did not do until now was say so, and the code cited it anyway
652
+ (REVIEW_LEDGER M14).
653
+
654
+ A warning rather than a refusal, because the attachment is otherwise legal and the
655
+ asset is fine — what is missing is a path, and the next campaign may add one.
656
+ */
657
+ console.warn(
658
+ `virtual geometry: entity ${entity} carries a ${
659
+ geometry.name ?? 'virtual'
660
+ } geometry with a non-opaque material, and will draw nothing.`
661
+ + ` The cut runs only in the opaque paths (DESIGN §9).`
662
+ );
663
+ }
664
+
643
665
  let entry = this.#mesh_entries.get(entity);
644
666
 
645
667
  if (entry === undefined) {
@@ -0,0 +1,35 @@
1
+ /**
2
+ * The largest and smallest singular values of a 3×3 matrix.
3
+ *
4
+ * They are what "how much does this transform stretch a distance" actually means: a vector's length
5
+ * is scaled by something between σ_min and σ_max, and both bounds are attained. Column lengths are
6
+ * the obvious stand-in and they are **not** the same number — for
7
+ * `[[1,0,0],[k,1,0],[0,0,1]]`, every column has length 1 or √(1+k²) while the true ratio grows
8
+ * without bound in `k`. A shear has no scale in any column and stretches space anyway.
9
+ *
10
+ * Computed as the square roots of the eigenvalues of `MᵀM`, which is symmetric and positive
11
+ * semi-definite, through the closed form for a symmetric 3×3 (Smith 1961). No iteration, no
12
+ * branching past the diagonal case, and **exact for a uniform scale**: `MᵀM` is then `s²I`, the
13
+ * off-diagonal sum is zero, and both values come back as `s`. That matters more than the general
14
+ * case — a conservative bound that answered 5.2 for an unscaled instance would over-refine every
15
+ * ordinary object in a scene to buy correctness for a sheared one.
16
+ *
17
+ * **Not a degeneracy test.** σ_min is zero exactly when the matrix is singular *in exact
18
+ * arithmetic*, and this once said so without the qualifier. In f32 it holds only on the diagonal
19
+ * branch: the trigonometric one computes the smallest eigenvalue as a difference of nearly equal
20
+ * numbers, and the `sqrt` turns its absolute error of about `eps·σ_max²` into about
21
+ * `sqrt(eps)·σ_max ≈ 3.4e-4·σ_max` in σ_min. A rotated matrix with one column of zeros therefore
22
+ * comes back with a σ_min near 1e-4 rather than 0, and a caller testing `σ_min > 0` before
23
+ * inverting is let through with the NaN it was guarding against
24
+ * (`shader_vgeo_cut_collect`, REVIEW_LEDGER M3). A caller about to invert should test the
25
+ * **determinant**, which is the number the inverse divides by and which is exactly zero whenever a
26
+ * column is.
27
+ *
28
+ * @type {CodeChunk}
29
+ *
30
+ * @author Alex Goldring
31
+ * @copyright Company Named Limited (c) 2026
32
+ */
33
+ export const chunk_mat3_singular_values: CodeChunk;
34
+ import { CodeChunk } from "../../../compiler/CodeChunk.js";
35
+ //# sourceMappingURL=chunk_mat3_singular_values.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chunk_mat3_singular_values.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shade/renderer/shader/chunk/geometry/mat3/chunk_mat3_singular_values.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,yCALU,SAAS,CA6DZ;0BA1FmB,gCAAgC"}
@@ -0,0 +1,91 @@
1
+ import { CodeChunk } from "../../../compiler/CodeChunk.js";
2
+
3
+ /**
4
+ * The largest and smallest singular values of a 3×3 matrix.
5
+ *
6
+ * They are what "how much does this transform stretch a distance" actually means: a vector's length
7
+ * is scaled by something between σ_min and σ_max, and both bounds are attained. Column lengths are
8
+ * the obvious stand-in and they are **not** the same number — for
9
+ * `[[1,0,0],[k,1,0],[0,0,1]]`, every column has length 1 or √(1+k²) while the true ratio grows
10
+ * without bound in `k`. A shear has no scale in any column and stretches space anyway.
11
+ *
12
+ * Computed as the square roots of the eigenvalues of `MᵀM`, which is symmetric and positive
13
+ * semi-definite, through the closed form for a symmetric 3×3 (Smith 1961). No iteration, no
14
+ * branching past the diagonal case, and **exact for a uniform scale**: `MᵀM` is then `s²I`, the
15
+ * off-diagonal sum is zero, and both values come back as `s`. That matters more than the general
16
+ * case — a conservative bound that answered 5.2 for an unscaled instance would over-refine every
17
+ * ordinary object in a scene to buy correctness for a sheared one.
18
+ *
19
+ * **Not a degeneracy test.** σ_min is zero exactly when the matrix is singular *in exact
20
+ * arithmetic*, and this once said so without the qualifier. In f32 it holds only on the diagonal
21
+ * branch: the trigonometric one computes the smallest eigenvalue as a difference of nearly equal
22
+ * numbers, and the `sqrt` turns its absolute error of about `eps·σ_max²` into about
23
+ * `sqrt(eps)·σ_max ≈ 3.4e-4·σ_max` in σ_min. A rotated matrix with one column of zeros therefore
24
+ * comes back with a σ_min near 1e-4 rather than 0, and a caller testing `σ_min > 0` before
25
+ * inverting is let through with the NaN it was guarding against
26
+ * (`shader_vgeo_cut_collect`, REVIEW_LEDGER M3). A caller about to invert should test the
27
+ * **determinant**, which is the number the inverse divides by and which is exactly zero whenever a
28
+ * column is.
29
+ *
30
+ * @type {CodeChunk}
31
+ *
32
+ * @author Alex Goldring
33
+ * @copyright Company Named Limited (c) 2026
34
+ */
35
+ export const chunk_mat3_singular_values = CodeChunk.from(
36
+ //language=WGSL
37
+ `
38
+ /**
39
+ * @returns (largest, smallest) singular value
40
+ */
41
+ fn mat3_singular_values(m: mat3x3<f32>) -> vec2<f32> {
42
+ // MtM, symmetric and positive semi-definite; its eigenvalues are the squared singular values
43
+ let a00 = dot(m[0], m[0]);
44
+ let a11 = dot(m[1], m[1]);
45
+ let a22 = dot(m[2], m[2]);
46
+ let a01 = dot(m[0], m[1]);
47
+ let a02 = dot(m[0], m[2]);
48
+ let a12 = dot(m[1], m[2]);
49
+
50
+ let p1 = a01 * a01 + a02 * a02 + a12 * a12;
51
+
52
+ if (p1 <= 0.0) {
53
+ // already diagonal — the uniform-scale case lands here, and lands exactly
54
+ let high = max(a00, max(a11, a22));
55
+ let low = min(a00, min(a11, a22));
56
+
57
+ return vec2<f32>(sqrt(max(high, 0.0)), sqrt(max(low, 0.0)));
58
+ }
59
+
60
+ let q = (a00 + a11 + a22) / 3.0;
61
+
62
+ let d0 = a00 - q;
63
+ let d1 = a11 - q;
64
+ let d2 = a22 - q;
65
+
66
+ let p2 = d0 * d0 + d1 * d1 + d2 * d2 + 2.0 * p1;
67
+
68
+ let p = sqrt(p2 / 6.0);
69
+
70
+ // det(B) / 2, with B = (A - qI) / p
71
+ let b00 = d0 / p;
72
+ let b11 = d1 / p;
73
+ let b22 = d2 / p;
74
+ let b01 = a01 / p;
75
+ let b02 = a02 / p;
76
+ let b12 = a12 / p;
77
+
78
+ let determinant = b00 * (b11 * b22 - b12 * b12)
79
+ - b01 * (b01 * b22 - b12 * b02)
80
+ + b02 * (b01 * b12 - b11 * b02);
81
+
82
+ // clamped because rounding can push it a hair outside acos's domain, where the whole
83
+ // computation would otherwise come back NaN for a perfectly ordinary matrix
84
+ let phi = acos(clamp(determinant * 0.5, -1.0, 1.0)) / 3.0;
85
+
86
+ let high = q + 2.0 * p * cos(phi);
87
+ let low = q + 2.0 * p * cos(phi + 2.0 * 3.14159265358979 / 3.0);
88
+
89
+ return vec2<f32>(sqrt(max(high, 0.0)), sqrt(max(low, 0.0)));
90
+ }
91
+ `, []);
@@ -1,54 +0,0 @@
1
- /**
2
- * Instantiate a loaded asset for one owner.
3
- *
4
- * Skins and clips come back pointing at the returned tree and nothing else, so they are ready for
5
- * {@link GPUAnimationManager#register_skin} and {@link GPUAnimationManager#register_clip} as they
6
- * are. Every node a clip drives is handed to the GPU
7
- * ({@link TransformAuthority.GPU}): the pose accumulator writes those rows, and a CPU that also
8
- * wrote them would race the animation it is trying to show. That same rule is what makes the CPU
9
- * pose evaluator correct, since it reads `transform_local` as the rest pose.
10
- *
11
- * Nothing in the bundle is modified.
12
- *
13
- * @param {SceneBundle} bundle
14
- * @returns {SceneBundleInstance}
15
- */
16
- export function instantiate_scene_bundle(bundle: SceneBundle): SceneBundleInstance;
17
- /**
18
- * One entity's private copy of a loaded asset: its own node tree, its own skins bound to that
19
- * tree's joints, and its own clips retargeted onto it.
20
- *
21
- * A loader's {@link SceneBundle} is a template. Its skins name Node3Ds and its clip channels
22
- * target Node3Ds, so two entities showing the same model cannot share it — the second would drive
23
- * the first one's joints. What they can share is everything read-only: geometry, materials,
24
- * inverse-bind matrices and the animation curves themselves, which is why the copy is per-node
25
- * rather than per-byte.
26
- */
27
- export class SceneBundleInstance {
28
- /**
29
- * @type {Node3D[]}
30
- */
31
- roots: Node3D[];
32
- /**
33
- * @type {Skin[]}
34
- */
35
- skins: Skin[];
36
- /**
37
- * @type {ShadeAnimationClip[]}
38
- */
39
- clips: ShadeAnimationClip[];
40
- /**
41
- * Every node of the instance, by the name the asset gave it — where a socket, an effect anchor
42
- * or a projectile spawn is looked up, since all three are authored as names of bones.
43
- *
44
- * Built here rather than walked per query because the walk is already happening: the tree is
45
- * visited once to copy it. A name authored twice keeps the first node the copy reaches, which
46
- * is the same answer a search would have returned.
47
- *
48
- * @type {Map<string,Node3D>}
49
- */
50
- nodes: Map<string, Node3D>;
51
- }
52
- import { Skin } from "../../shade/renderer/animation/Skin.js";
53
- import { ShadeAnimationClip } from "../../shade/renderer/animation/ShadeAnimationClip.js";
54
- //# sourceMappingURL=instantiate_scene_bundle.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"instantiate_scene_bundle.d.ts","sourceRoot":"","sources":["../../../../src/engine/graphics3/instantiate_scene_bundle.js"],"names":[],"mappings":"AAiGA;;;;;;;;;;;;;;GAcG;AACH,+DAFa,mBAAmB,CAqD/B;AA7JD;;;;;;;;;GASG;AACH;IACI;;OAEG;IACH,OAFU,QAAQ,CAEP;IAEX;;OAEG;IACH,OAFU,IAAI,EAAE,CAEL;IAEX;;OAEG;IACH,OAFU,kBAAkB,EAAE,CAEnB;IAEX;;;;;;;;;OASG;IACH,OAFU,IAAI,MAAM,SAAQ,CAEV;CACrB;qBAxCoB,wCAAwC;mCAD1B,sDAAsD"}
@@ -1,39 +0,0 @@
1
- /**
2
- * Turn a loaded model's node tree into entities.
3
- *
4
- * **This is what a hierarchy is in an ECS** (D47). meep has no scene graph to hand a model to: it
5
- * has entities, `EntityNode` to parent them, and `ShadedGeometry` for the ones that draw. A model
6
- * file is therefore not a thing an entity *holds* — it is a shape an entity's descendants take, and
7
- * this function is where the file stops being the renderer's tree and becomes the dataset's.
8
- *
9
- * It is `three_object_to_entity_composition` with the source swapped: the same output, built from
10
- * Shade's `Node3D`s instead of three's `Object3D`s. The two exist side by side for as long as both
11
- * renderers do.
12
- *
13
- * **Geometry and material are shared, not copied.** Two entities placing the same model name the
14
- * same `MeshletGeometry` and the same `ShadeMaterial`; what is per-entity is the row each one gets
15
- * in the scene, which is `ShadedGeometrySystem`'s business. That is the whole reason a static model
16
- * needs no clone of the bundle at all.
17
- *
18
- * **A skinned mesh is not expanded, and that is a boundary rather than an omission.** Its vertices
19
- * are deformed against a skeleton the renderer owns and the GPU poses, and making those joints
20
- * entities is a design this program does not do (D47). A `SkinnedMesh` node therefore contributes
21
- * its transform and its name and no geometry, and whatever placed the model keeps drawing it the way
22
- * Phase 4 built.
23
- *
24
- * @param {Node3D} node
25
- * @returns {EntityNode}
26
- */
27
- export function shade_node_to_entity_composition(node: Node3D): EntityNode;
28
- /**
29
- * The same, for everything a loader produced.
30
- *
31
- * A bundle can carry more than one scene — glTF allows it — and the entity that placed the file owns
32
- * all of them, so they become children of one root rather than several compositions nobody joins.
33
- *
34
- * @param {SceneBundle} bundle
35
- * @returns {EntityNode}
36
- */
37
- export function shade_bundle_to_entity_composition(bundle: SceneBundle): EntityNode;
38
- import { EntityNode } from "../ecs/parent/EntityNode.js";
39
- //# sourceMappingURL=shade_node_to_entity_composition.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shade_node_to_entity_composition.d.ts","sourceRoot":"","sources":["../../../../src/engine/graphics3/shade_node_to_entity_composition.js"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,gEAFa,UAAU,CA6BtB;AAED;;;;;;;;GAQG;AACH,yEAFa,UAAU,CAmBtB;2BAtF0B,6BAA6B"}
@@ -1,35 +0,0 @@
1
- /**
2
- * World-space bounds of a mesh deformed by `skin`, in the pose the skin's joint nodes currently
3
- * hold.
4
- *
5
- * **The mesh node's own transform does not appear here, and that is the point.** A skinned vertex
6
- * lands at `mesh.global × inverse(mesh.global) × joint.global × inverse_bind × v` — the skinning
7
- * pass applies the leftmost inverse (see `chunk_skin_blend_mesh_local`) and the rasterizer
8
- * re-applies `mesh.global` afterwards, so the two cancel and the vertex is at
9
- * `joint.global × inverse_bind × v`. Bounding a skinned mesh by putting its rest-pose geometry
10
- * under `mesh.transform_global` therefore applies a transform the renderer cancels: on an
11
- * FBX-derived glTF whose root node carries the file's centimetre→metre scale, it comes out 100×
12
- * too small.
13
- *
14
- * The bound is the union over joints of `joint.global × inverse_bind` applied to the mesh-space
15
- * geometry bounds. Conservative: each joint's product maps the whole geometry rather than the
16
- * vertices that joint actually weights, and a skinned vertex is a convex combination of those
17
- * per-joint images, which the enclosing (convex) AABB contains. In the case that matters it is also
18
- * *tight* — with every joint at its bind pose `joint.global × inverse_bind` collapses to one and
19
- * the same matrix, the character's placement in the world, so the union is a single exact box.
20
- *
21
- * **Pose freshness is the caller's problem.** Joints driven by the GPU pose accumulator are
22
- * {@link TransformAuthority.GPU}, and their `transform_global` stays at the rest pose the CPU
23
- * seeded — so for an animated character this is a rest-pose bound that tracks placement, not the
24
- * deformed silhouette. The per-frame deformed world box lives in the scene database's `meshes` row,
25
- * published by the skinning pass's bounds-refresh chain, and anything that needs the real thing
26
- * reads it there.
27
- *
28
- * @param {Skin} skin
29
- * @param {ArrayLike<number>} mesh_box mesh-space AABB, 6 floats — `(low_x, low_y, low_z, high_x, high_y, high_z)`
30
- * @param {ArrayLike<number>} mesh_sphere mesh-space sphere, 4 floats — `(x, y, z, radius)`
31
- * @param {Float32Array|number[]} out_box receives the world AABB, 6 floats
32
- * @param {Float32Array|number[]} out_sphere receives the world sphere, 4 floats
33
- */
34
- export function compute_skin_world_bounds(skin: Skin, mesh_box: ArrayLike<number>, mesh_sphere: ArrayLike<number>, out_box: Float32Array | number[], out_sphere: Float32Array | number[]): void;
35
- //# sourceMappingURL=compute_skin_world_bounds.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"compute_skin_world_bounds.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/animation/compute_skin_world_bounds.js"],"names":[],"mappings":"AAgDA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,gEALW,UAAU,MAAM,CAAC,eACjB,UAAU,MAAM,CAAC,WACjB,YAAY,GAAC,MAAM,EAAE,cACrB,YAAY,GAAC,MAAM,EAAE,QAkE/B"}
@@ -1,96 +0,0 @@
1
- /**
2
- * Inflate a column-major 4×4 matrix `m` into the row-major 3×4 form
3
- * `mesh_apply_skeletal_vertex_skinning` reads per bone. Writes
4
- * 12 floats starting at `out[out_offset]`.
5
- *
6
- * Mapping: the meep skinner does
7
- * `sx = b[0]*x + b[1]*y + b[2]*z + b[3]` etc., which is row-major
8
- * 3×4 (`b[r*4 + c]`). Our `m` is column-major 4×4, so column `c`
9
- * lives at `m[c*4 + r]`. Hence `b[r*4 + c] = m[c*4 + r]`.
10
- *
11
- * Exported (with leading underscore) for direct test coverage.
12
- *
13
- * @param {Float32Array} m column-major 4×4
14
- * @param {Float32Array} out
15
- * @param {number} out_offset
16
- */
17
- export function _pack_mat4_to_bone_3x4(m: Float32Array, out: Float32Array, out_offset: number): void;
18
- /**
19
- * CPU skinning + bounding-sphere computation for a single pose.
20
- *
21
- * Pure-function sub-step. Takes pre-built `bone_matrices` (already
22
- * in the row-major 3×4 form `mesh_apply_skeletal_vertex_skinning`
23
- * expects, with `joint_world × inverse_bind` baked in per bone)
24
- * plus the bind-pose vertex data, performs CPU skinning into an
25
- * internal scratch buffer, and writes the resulting tight bounding
26
- * sphere into `out_sphere` via miniball.
27
- *
28
- * Doesn't allocate (beyond the one-time scratch growth on first
29
- * call with larger-than-seen-before inputs).
30
- *
31
- * @param {object} args
32
- * @param {Float32Array} args.positions bind-pose vertex positions, flat `3 × vertex_count`
33
- * @param {Uint32Array|number[]} args.joint_indices flat `4 × vertex_count` joint indices
34
- * @param {Float32Array} args.joint_weights flat `4 × vertex_count` weights
35
- * @param {number} args.vertex_count
36
- * @param {Float32Array} args.bone_matrices row-major 3×4 (12 floats) per joint
37
- * @param {{ set: function(number,number,number,number):void }} out_sphere
38
- */
39
- export function compute_skinned_pose_bounding_sphere({ positions, joint_indices, joint_weights, vertex_count, bone_matrices, }: {
40
- positions: Float32Array;
41
- joint_indices: Uint32Array | number[];
42
- joint_weights: Float32Array;
43
- vertex_count: number;
44
- bone_matrices: Float32Array;
45
- }, out_sphere: {
46
- set: (arg0: number, arg1: number, arg2: number, arg3: number) => void;
47
- }): void;
48
- /**
49
- * Tight-ish bounding sphere over an entire clip's worth of poses.
50
- * Steps the clip at a fixed `dt`, CPU-skins the bind-pose vertices
51
- * at each tick, computes a per-tick miniball sphere, and unions
52
- * them into one final sphere.
53
- *
54
- * The output sphere is in the mesh's **local space** — the bone
55
- * matrices encode `joint_world × inverse_bind` only, with no mesh-
56
- * node factor. Multiplying the sphere by the SkinnedMesh's runtime
57
- * `transform_global` produces the world-space sphere a frustum-cull
58
- * pass can compare against. This matches the rasterizer's
59
- * convention (clone vertices are mesh-local; world placement comes
60
- * from `mesh.transform_global` at draw time).
61
- *
62
- * Mutates the joint Node3D's `transform_local` while stepping —
63
- * bind-pose values are saved on entry and restored on exit. Doesn't
64
- * touch joints not driven by the clip.
65
- *
66
- * Allocation: zero per-call. Module-level scratch grows once on
67
- * first call with a new largest size; subsequent calls reuse it.
68
- *
69
- * For the per-clip cost: this is intended for one-time computation
70
- * at scene-setup time, so the bounding sphere can be uploaded to
71
- * the GPU for skinning-workload culling. Per-frame use isn't
72
- * supported (would have to deal with concurrent users of the
73
- * module-level scratch).
74
- *
75
- * @param {object} args
76
- * @param {Float32Array} args.positions bind-pose vertex positions, flat `3 × vertex_count`
77
- * @param {Uint32Array|number[]} args.joint_indices flat `4 × vertex_count` joint indices
78
- * @param {Float32Array} args.joint_weights flat `4 × vertex_count` weights
79
- * @param {number} args.vertex_count
80
- * @param {Skin} args.skin joints + inverse-bind matrices (column-major, 16 each)
81
- * @param {ShadeAnimationClip} args.clip
82
- * @param {number} [args.dt] time step in seconds (default `1/60`)
83
- * @param {{ set: function(number,number,number,number):void }} out_sphere
84
- */
85
- export function compute_skinned_mesh_clip_bounding_sphere({ positions, joint_indices, joint_weights, vertex_count, skin, clip, dt, }: {
86
- positions: Float32Array;
87
- joint_indices: Uint32Array | number[];
88
- joint_weights: Float32Array;
89
- vertex_count: number;
90
- skin: Skin;
91
- clip: ShadeAnimationClip;
92
- dt?: number;
93
- }, out_sphere: {
94
- set: (arg0: number, arg1: number, arg2: number, arg3: number) => void;
95
- }): void;
96
- //# sourceMappingURL=compute_skinned_mesh_clip_bounding_sphere.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"compute_skinned_mesh_clip_bounding_sphere.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/animation/compute_skinned_mesh_clip_bounding_sphere.js"],"names":[],"mappings":"AAsJA;;;;;;;;;;;;;;;GAeG;AACH,0CAJW,YAAY,OACZ,YAAY,cACZ,MAAM,QAehB;AAYD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH;IAP8B,SAAS,EAA5B,YAAY;IACe,aAAa,EAAxC,WAAW,GAAC,MAAM,EAAE;IACD,aAAa,EAAhC,YAAY;IACC,YAAY,EAAzB,MAAM;IACa,aAAa,EAAhC,YAAY;eACZ;IAAE,GAAG,SAAW,MAAM,QAAC,MAAM,QAAC,MAAM,QAAC,MAAM,KAAE,IAAI,CAAA;CAAE,QAwC7D;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH;IAT8B,SAAS,EAA5B,YAAY;IACe,aAAa,EAAxC,WAAW,GAAC,MAAM,EAAE;IACD,aAAa,EAAhC,YAAY;IACC,YAAY,EAAzB,MAAM;IACK,IAAI;IACU,IAAI;IACf,EAAE,GAAhB,MAAM;eACN;IAAE,GAAG,SAAW,MAAM,QAAC,MAAM,QAAC,MAAM,QAAC,MAAM,KAAE,IAAI,CAAA;CAAE,QAmP7D"}
@@ -1,20 +0,0 @@
1
- /**
2
- * Evaluate a node's **world** pose under a set of playing clips.
3
- *
4
- * This is the query gameplay actually asks: where is the muzzle, where does this effect attach,
5
- * where does the projectile leave from. It walks the node's parent chain, evaluates every ancestor's
6
- * animated local pose the same way, and composes down — so a socket on a hand follows the arm, the
7
- * shoulder and the root without any of it having been read back from the GPU.
8
- *
9
- * The chain is composed in double precision and every level is evaluated from the same `playbacks`,
10
- * which is what makes the result a pure function of (clip set, time, weights) rather than of
11
- * whatever the renderer last happened to write.
12
- *
13
- * @param {Transform64} result
14
- * @param {Node3D} node
15
- * @param {PosePlayback[]} playbacks
16
- * @returns {Transform64} `result`
17
- */
18
- export function pose_evaluate_world(result: Transform64, node: Node3D, playbacks: PosePlayback[]): Transform64;
19
- import { Transform64 } from "../../../../engine/ecs/transform/Transform64.js";
20
- //# sourceMappingURL=pose_evaluate_world.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pose_evaluate_world.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/animation/pose/pose_evaluate_world.js"],"names":[],"mappings":"AA6BA;;;;;;;;;;;;;;;;GAgBG;AACH,4CALW,WAAW,2BAEX,cAAc,GACZ,WAAW,CA+BvB;4BA1E2B,iDAAiD"}
@@ -1,25 +0,0 @@
1
- /**
2
- * The transform that maps this skin's mesh-space geometry into the world at rest.
3
- *
4
- * `compute_skin_world_bounds` already names the thing: *"with every joint at its bind pose
5
- * `joint.global × inverse_bind` collapses to one and the same matrix, the character's placement in
6
- * the world"*. This returns that matrix. It is the frame a skinned mesh's vertices belong in, and
7
- * under {@link skin_normalize_mesh_frame} it becomes the mesh node's transform — see
8
- * `SKINNING_FRAME_PLAN.md`.
9
- *
10
- * **Joint 0's is the one taken.** In a file whose rest pose is its bind pose every joint answers the
11
- * same matrix, so which one is asked is not a choice; in a file where they differ there is no single
12
- * answer and no amount of averaging makes one. What matters is not that they agree but that
13
- * `frame⁻¹ · joint_matrix` comes out rigid for every joint, which is a weaker condition and a
14
- * different question — {@link skin_frame_defect} is that question, and it is the one to ask.
15
- *
16
- * Reads the joints' `transform_global`, so the skeleton has to have been walked
17
- * ({@link Node3D#updateMatrices}) since it was last moved. Joints under
18
- * {@link TransformAuthority.GPU} hold the rest pose there, which is what this wants.
19
- *
20
- * @param {Float64Array|Float32Array|number[]} out 16 elements, column-major
21
- * @param {Skin} skin
22
- * @returns {Float64Array|Float32Array|number[]} `out`
23
- */
24
- export function skin_bind_transform(out: Float64Array | Float32Array | number[], skin: Skin): Float64Array | Float32Array | number[];
25
- //# sourceMappingURL=skin_bind_transform.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"skin_bind_transform.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/animation/skin_bind_transform.js"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,yCAJW,YAAY,GAAC,YAAY,GAAC,MAAM,EAAE,eAEhC,YAAY,GAAC,YAAY,GAAC,MAAM,EAAE,CAQ9C"}
@@ -1,34 +0,0 @@
1
- /**
2
- * Whether a frame is one this skin can be deformed in — and if not, by how much it is not.
3
- *
4
- * The skinning pass converts `frame⁻¹ × joint.global × inverse_bind` to a dual quaternion, and a
5
- * dual quaternion carries a rotation and a translation and nothing else. So that product must be
6
- * rigid for every joint. This is that condition as a number: zero when the frame works, and growing
7
- * with whatever the conversion would have to throw away. `SKINNING_FRAME_PLAN.md` §1 is what
8
- * happens when it does.
9
- *
10
- * **This, and not "do the joints agree", is the precondition.** A file whose rest pose is not its
11
- * bind pose has joints whose skin matrices differ — by *rigid* motions, which cost nothing here.
12
- * What cannot be absorbed is a scale or a shear, and this sees exactly that.
13
- *
14
- * Reads the joints' `transform_global`, so it answers for whatever pose the skeleton is standing in.
15
- * At rest that is the registration-time question. Handed a posed skeleton it answers the runtime one
16
- * — a clip that scales a joint, which no frame can fix (§4).
17
- *
18
- * @param {Skin} skin
19
- * @param {ArrayLike<number>} frame 16 elements, column-major — the transform the renderer re-applies
20
- * @returns {number} the largest {@link m4_rigidity_defect} over the skin's joints; `Infinity` if
21
- * `frame` has no inverse, or if any joint's fold comes out a reflection — which scores zero
22
- * on the defect and is unrepresentable all the same
23
- */
24
- export function skin_frame_defect(skin: Skin, frame: ArrayLike<number>): number;
25
- /**
26
- * The same question of one joint, freshly allocated — for a caller that wants to say *which* joint
27
- * and by how much rather than only the worst of them.
28
- *
29
- * @param {Skin} skin
30
- * @param {ArrayLike<number>} frame
31
- * @returns {number[]} one defect per joint, in joint order
32
- */
33
- export function skin_frame_defect_by_joint(skin: Skin, frame: ArrayLike<number>): number[];
34
- //# sourceMappingURL=skin_frame_defect.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"skin_frame_defect.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/animation/skin_frame_defect.js"],"names":[],"mappings":"AAcA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,qDALW,UAAU,MAAM,CAAC,GACf,MAAM,CA6ClB;AAiBD;;;;;;;GAOG;AACH,8DAHW,UAAU,MAAM,CAAC,GACf,MAAM,EAAE,CA8BpB"}
@@ -1,24 +0,0 @@
1
- /**
2
- * One joint's skin matrix, in the pose its node currently holds: `joint.global × inverse_bind`.
3
- *
4
- * The same quantity `shader_skin_matrix_prep` writes to the GPU's `skin_matrices` buffer, and the
5
- * same one `compute_skin_world_bounds` composes its box out of — kept here so the CPU-side callers
6
- * that reason about a skin's geometry all read it from one place rather than three.
7
- *
8
- * It maps a vertex from the skin's mesh space into **world** space. The mesh node's own transform
9
- * does not appear and must not: glTF says a skinned mesh's node transform is ignored, and this
10
- * engine's arrangement is that the skinning pass folds its inverse in and the rasterizer re-applies
11
- * it, so the two cancel. See `SKINNING_FRAME_PLAN.md` for what that fold requires of an asset.
12
- *
13
- * Not a per-frame path. Joints the pose accumulator drives are {@link TransformAuthority.GPU} and
14
- * their `transform_global` holds the rest pose the CPU seeded, so what this answers for an animated
15
- * character is the rest-pose matrix — which is exactly what the frame arithmetic wants, and is not
16
- * what a renderer wants.
17
- *
18
- * @param {Float64Array|Float32Array|number[]} out 16 elements, column-major
19
- * @param {Skin} skin
20
- * @param {number} joint_index
21
- * @returns {Float64Array|Float32Array|number[]} `out`
22
- */
23
- export function skin_joint_matrix(out: Float64Array | Float32Array | number[], skin: Skin, joint_index: number): Float64Array | Float32Array | number[];
24
- //# sourceMappingURL=skin_joint_matrix.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"skin_joint_matrix.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/animation/skin_joint_matrix.js"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,uCALW,YAAY,GAAC,YAAY,GAAC,MAAM,EAAE,2BAElC,MAAM,GACJ,YAAY,GAAC,YAAY,GAAC,MAAM,EAAE,CAsB9C"}
@@ -1,70 +0,0 @@
1
- /**
2
- * Put a skin's meshes into the frame the skin actually deforms in.
3
- *
4
- * ## What it does and why
5
- *
6
- * The skinning pass writes each clone's vertices in `inverse(mesh.global)` space and the rasterizer
7
- * re-applies `mesh.global`, so `mesh.global` is the *frame* a skinned mesh's vertices live in. The
8
- * pass gets there by converting `inverse(mesh.global) × joint.global × inverse_bind` to a dual
9
- * quaternion, which carries a rotation and a translation and **nothing else** — so that product has
10
- * to be rigid, and whether it is depends entirely on `mesh.global`.
11
- *
12
- * glTF says a skinned mesh's node transform is ignored, so it is not the asset's to choose. This
13
- * makes it the engine's, and sets it to the one frame that is guaranteed to work: the skin's own
14
- * bind transform, `joint.global × inverse_bind` at rest — see {@link skin_bind_transform}. After
15
- * this, `inverse(mesh.global) × joint.global × inverse_bind` is the joint's **displacement from
16
- * bind**, which is rigid whenever the clip rotates and translates and does not scale. That is the
17
- * honest precondition of dual-quaternion skinning, and it is a property of the animation rather than
18
- * of the exporter's unit conventions.
19
- *
20
- * `SKINNING_FRAME_PLAN.md` is the whole argument, including what a violation looks like on screen.
21
- *
22
- * ## Properties worth knowing
23
- *
24
- * - **Idempotent.** Afterwards `mesh.global` *is* the bind transform, so a second call computes the
25
- * identity and changes nothing. Re-registering a skin is free.
26
- * - **Placement-invariant.** The correction is `mesh.global⁻¹ × bind`, and anything applied above
27
- * both the mesh node and the joints — a placement, a walk cycle moving the character — multiplies
28
- * both on the left and cancels. Computed once, correct forever.
29
- * - **A no-op for an asset that already agrees.** A file whose inverse-bind matrices are authored
30
- * before its root's unit conversion has `bind == mesh.global` already and is not touched. That is
31
- * the shape this engine's creature models are said to have, and it is what keeps this from being
32
- * a change to them.
33
- *
34
- * ## What it cannot fix
35
- *
36
- * A skin whose *own* bind frame does not work — a rest pose carrying a non-uniform scale or a shear,
37
- * or joints that disagree about more than a rigid motion. No choice of frame fixes those; a dual
38
- * quaternion cannot represent them at all. `frame_defect` in the report is that case, and when it
39
- * fires nothing is written: the mesh is left as the asset had it rather than moved somewhere equally
40
- * wrong. See `SKINNING_FRAME_PLAN.md` §4 for the ladder out.
41
- *
42
- * @param {Skin} skin its joints and meshes must have been walked — this reads `transform_global`,
43
- * which is derived. A skin that has never been walked at all is refused rather than
44
- * measured; one walked and then moved is the caller's to walk again, and the residual
45
- * below is what notices if the mesh half of that was missed
46
- * @returns {{
47
- * frame_defect: number,
48
- * absorbed: number,
49
- * corrected: number,
50
- * unchanged: number,
51
- * residual: number,
52
- * obstructed: Node3D[],
53
- * unwalked: Node3D[],
54
- * }} `frame_defect` — how far the skin is from being deformable in *any* frame, zero when it is
55
- * fine and `NaN` when `unwalked` stopped it being asked; `absorbed` — how far from rigid the largest correction was, which for a violation is the
56
- * number the soup was made of; `corrected` and `unchanged` — meshes moved and meshes already
57
- * right; `residual` — the worst `|mesh.global − bind|` left afterwards; `obstructed` — corrected
58
- * mesh nodes that had children, which have been scaled along with them; `unwalked` — joints or
59
- * meshes whose `transform_global` has never been derived, which stops everything else
60
- */
61
- export function skin_normalize_mesh_frame(skin: Skin): {
62
- frame_defect: number;
63
- absorbed: number;
64
- corrected: number;
65
- unchanged: number;
66
- residual: number;
67
- obstructed: Node3D[];
68
- unwalked: Node3D[];
69
- };
70
- //# sourceMappingURL=skin_normalize_mesh_frame.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"skin_normalize_mesh_frame.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/animation/skin_normalize_mesh_frame.js"],"names":[],"mappings":"AAoBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AACH,uDAfa;IACZ,YAAkB,EAAE,MAAM,CAAC;IAC3B,QAAc,EAAE,MAAM,CAAC;IACvB,SAAe,EAAE,MAAM,CAAC;IACxB,SAAe,EAAE,MAAM,CAAC;IACxB,QAAc,EAAE,MAAM,CAAC;IACvB,UAAgB,EAAE,QAAQ,CAAC;IAC3B,QAAc,EAAE,QAAQ,CAAC;CACtB,CA2GH"}