@woosh/meep-engine 3.24.0 → 3.25.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 (322) hide show
  1. package/package.json +1 -1
  2. package/src/engine/graphics3/PickingSystem.d.ts +3 -3
  3. package/src/engine/graphics3/PickingSystem.d.ts.map +1 -1
  4. package/src/engine/graphics3/PickingSystem.js +52 -55
  5. package/src/engine/graphics3/shader_picking_gather.d.ts +40 -0
  6. package/src/engine/graphics3/shader_picking_gather.d.ts.map +1 -0
  7. package/src/engine/graphics3/shader_picking_gather.js +120 -0
  8. package/src/engine/physics/cloth/MEASUREMENTS.md +1050 -0
  9. package/src/engine/physics/cloth/PLAN.md +411 -49
  10. package/src/engine/physics/cloth/ecs/ClothColliderSerializationAdapter.d.ts +52 -0
  11. package/src/engine/physics/cloth/ecs/ClothColliderSerializationAdapter.d.ts.map +1 -0
  12. package/src/engine/physics/cloth/ecs/ClothColliderSerializationAdapter.js +70 -0
  13. package/src/engine/physics/cloth/ecs/ClothDynamics.d.ts +12 -3
  14. package/src/engine/physics/cloth/ecs/ClothDynamics.d.ts.map +1 -1
  15. package/src/engine/physics/cloth/ecs/ClothDynamics.js +340 -331
  16. package/src/engine/physics/cloth/ecs/ClothInstance.d.ts +36 -22
  17. package/src/engine/physics/cloth/ecs/ClothInstance.d.ts.map +1 -1
  18. package/src/engine/physics/cloth/ecs/ClothInstance.js +38 -23
  19. package/src/engine/physics/cloth/ecs/ClothSerializationAdapter.d.ts +84 -0
  20. package/src/engine/physics/cloth/ecs/ClothSerializationAdapter.d.ts.map +1 -0
  21. package/src/engine/physics/cloth/ecs/ClothSerializationAdapter.js +141 -0
  22. package/src/engine/physics/cloth/ecs/ClothSystem.d.ts +51 -82
  23. package/src/engine/physics/cloth/ecs/ClothSystem.d.ts.map +1 -1
  24. package/src/engine/physics/cloth/ecs/ClothSystem.js +81 -869
  25. package/src/engine/physics/cloth/ecs/ClothWorkerCore.d.ts +48 -0
  26. package/src/engine/physics/cloth/ecs/ClothWorkerCore.d.ts.map +1 -0
  27. package/src/engine/physics/cloth/ecs/ClothWorkerCore.js +107 -0
  28. package/src/engine/physics/cloth/ecs/ClothWorld.d.ts +286 -0
  29. package/src/engine/physics/cloth/ecs/ClothWorld.d.ts.map +1 -0
  30. package/src/engine/physics/cloth/ecs/ClothWorld.js +1104 -0
  31. package/src/engine/physics/cloth/ecs/WorkerClothSystem.d.ts +182 -0
  32. package/src/engine/physics/cloth/ecs/WorkerClothSystem.d.ts.map +1 -0
  33. package/src/engine/physics/cloth/ecs/WorkerClothSystem.js +562 -0
  34. package/src/engine/physics/cloth/ecs/cloth.worker.d.ts +2 -0
  35. package/src/engine/physics/cloth/ecs/cloth.worker.d.ts.map +1 -0
  36. package/src/engine/physics/cloth/ecs/cloth.worker.js +12 -0
  37. package/src/engine/physics/cloth/ecs/cloth_build_rows.d.ts.map +1 -1
  38. package/src/engine/physics/cloth/ecs/cloth_build_rows.js +2 -1
  39. package/src/engine/physics/cloth/ecs/cloth_dynamics_map.d.ts +58 -0
  40. package/src/engine/physics/cloth/ecs/cloth_dynamics_map.d.ts.map +1 -1
  41. package/src/engine/physics/cloth/ecs/cloth_dynamics_map.js +341 -271
  42. package/src/engine/physics/cloth/ecs/cloth_gather_colliders.d.ts +20 -2
  43. package/src/engine/physics/cloth/ecs/cloth_gather_colliders.d.ts.map +1 -1
  44. package/src/engine/physics/cloth/ecs/cloth_gather_colliders.js +39 -15
  45. package/src/engine/physics/cloth/ecs/cloth_worker_protocol.d.ts +29 -0
  46. package/src/engine/physics/cloth/ecs/cloth_worker_protocol.d.ts.map +1 -0
  47. package/src/engine/physics/cloth/ecs/cloth_worker_protocol.js +78 -0
  48. package/src/engine/physics/cloth/ecs/makeClothWorker.d.ts +17 -0
  49. package/src/engine/physics/cloth/ecs/makeClothWorker.d.ts.map +1 -0
  50. package/src/engine/physics/cloth/ecs/makeClothWorker.js +18 -0
  51. package/src/engine/physics/cloth/playground/README.md +73 -2
  52. package/src/engine/physics/cloth/playground/wind.html +166 -0
  53. package/src/engine/physics/cloth/playground/wind_build.d.ts +81 -0
  54. package/src/engine/physics/cloth/playground/wind_build.d.ts.map +1 -0
  55. package/src/engine/physics/cloth/playground/wind_build.js +141 -0
  56. package/src/engine/physics/cloth/playground/wind_main.d.ts +2 -0
  57. package/src/engine/physics/cloth/playground/wind_main.d.ts.map +1 -0
  58. package/src/engine/physics/cloth/playground/wind_main.js +681 -0
  59. package/src/engine/physics/cloth/solver/ClothState.d.ts +134 -79
  60. package/src/engine/physics/cloth/solver/ClothState.d.ts.map +1 -1
  61. package/src/engine/physics/cloth/solver/ClothState.js +273 -12
  62. package/src/engine/physics/cloth/solver/cloth_solver_constants.d.ts +33 -0
  63. package/src/engine/physics/cloth/solver/cloth_solver_constants.d.ts.map +1 -1
  64. package/src/engine/physics/cloth/solver/cloth_solver_constants.js +34 -0
  65. package/src/engine/physics/cloth/solver/cloth_step.d.ts +21 -2
  66. package/src/engine/physics/cloth/solver/cloth_step.d.ts.map +1 -1
  67. package/src/engine/physics/cloth/solver/cloth_step.js +173 -4
  68. package/src/engine/physics/cloth/solver/cloth_step_instance.d.ts +40 -0
  69. package/src/engine/physics/cloth/solver/cloth_step_instance.d.ts.map +1 -0
  70. package/src/engine/physics/cloth/solver/cloth_step_instance.js +284 -0
  71. package/src/engine/physics/cloth/solver/cloth_wind_accelerate.d.ts +107 -0
  72. package/src/engine/physics/cloth/solver/cloth_wind_accelerate.d.ts.map +1 -0
  73. package/src/engine/physics/cloth/solver/cloth_wind_accelerate.js +263 -0
  74. package/src/engine/physics/cloth/wind/AbstractClothWind.d.ts +88 -0
  75. package/src/engine/physics/cloth/wind/AbstractClothWind.d.ts.map +1 -0
  76. package/src/engine/physics/cloth/wind/AbstractClothWind.js +100 -0
  77. package/src/engine/physics/cloth/wind/ClothAmbientWind.d.ts +85 -0
  78. package/src/engine/physics/cloth/wind/ClothAmbientWind.d.ts.map +1 -0
  79. package/src/engine/physics/cloth/wind/ClothAmbientWind.js +182 -0
  80. package/src/engine/physics/cloth/wind/ClothFluidWind.d.ts +79 -0
  81. package/src/engine/physics/cloth/wind/ClothFluidWind.d.ts.map +1 -0
  82. package/src/engine/physics/cloth/wind/ClothFluidWind.js +210 -0
  83. package/src/engine/physics/cloth/wind/cloth_sample_air.d.ts +101 -0
  84. package/src/engine/physics/cloth/wind/cloth_sample_air.d.ts.map +1 -0
  85. package/src/engine/physics/cloth/wind/cloth_sample_air.js +290 -0
  86. package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
  87. package/src/shade/device/mock/texture_copy.d.ts.map +1 -1
  88. package/src/shade/device/mock/texture_copy.js +28 -0
  89. package/src/shade/playground/vgeo_runtime/README.md +94 -0
  90. package/src/shade/playground/vgeo_runtime/index.html +62 -0
  91. package/src/shade/playground/vgeo_runtime/main.d.ts +2 -0
  92. package/src/shade/playground/vgeo_runtime/main.d.ts.map +1 -0
  93. package/src/shade/playground/vgeo_runtime/main.js +399 -0
  94. package/src/shade/playground/vgeo_viewer/sample_asset.js +1 -1
  95. package/src/shade/renderer/camera/Camera.d.ts +14 -0
  96. package/src/shade/renderer/camera/Camera.d.ts.map +1 -1
  97. package/src/shade/renderer/camera/Camera.js +7 -1
  98. package/src/shade/renderer/geometry/GEOMETRY_METADATA_STRUCT.d.ts.map +1 -1
  99. package/src/shade/renderer/geometry/GEOMETRY_METADATA_STRUCT.js +16 -1
  100. package/src/shade/renderer/geometry/GPUGeometryManager.d.ts.map +1 -1
  101. package/src/shade/renderer/geometry/GPUGeometryManager.js +29 -9
  102. package/src/shade/renderer/geometry/GPUGeometryMetadata.d.ts +10 -0
  103. package/src/shade/renderer/geometry/GPUGeometryMetadata.d.ts.map +1 -1
  104. package/src/shade/renderer/geometry/GPUGeometryMetadata.js +13 -0
  105. package/src/shade/renderer/geometry/virtual/VGEO_FORMAT.md +46 -18
  106. package/src/shade/renderer/geometry/virtual/VIRTUAL_GEOMETRY_DESIGN.md +70 -22
  107. package/src/shade/renderer/geometry/virtual/VIRTUAL_GEOMETRY_PLAN.md +97 -19
  108. package/src/shade/renderer/geometry/virtual/build/VGeoBuildOptions.d.ts +12 -2
  109. package/src/shade/renderer/geometry/virtual/build/VGeoBuildOptions.d.ts.map +1 -1
  110. package/src/shade/renderer/geometry/virtual/build/VGeoBuildOptions.js +14 -3
  111. package/src/shade/renderer/geometry/virtual/build/vgeo_assemble_pages.d.ts +2 -2
  112. package/src/shade/renderer/geometry/virtual/build/vgeo_assemble_pages.d.ts.map +1 -1
  113. package/src/shade/renderer/geometry/virtual/build/vgeo_assemble_pages.js +124 -6
  114. package/src/shade/renderer/geometry/virtual/build/vgeo_page_node_count.d.ts +22 -0
  115. package/src/shade/renderer/geometry/virtual/build/vgeo_page_node_count.d.ts.map +1 -0
  116. package/src/shade/renderer/geometry/virtual/build/vgeo_page_node_count.js +53 -0
  117. package/src/shade/renderer/geometry/virtual/format/VGeoWriteOptions.d.ts +8 -1
  118. package/src/shade/renderer/geometry/virtual/format/VGeoWriteOptions.d.ts.map +1 -1
  119. package/src/shade/renderer/geometry/virtual/format/VGeoWriteOptions.js +8 -1
  120. package/src/shade/renderer/geometry/virtual/format/header/VGEO_FEATURE_IGNORABLE_BOUNDED_PAGES.d.ts +16 -0
  121. package/src/shade/renderer/geometry/virtual/format/header/VGEO_FEATURE_IGNORABLE_BOUNDED_PAGES.d.ts.map +1 -0
  122. package/src/shade/renderer/geometry/virtual/format/header/VGEO_FEATURE_IGNORABLE_BOUNDED_PAGES.js +15 -0
  123. package/src/shade/renderer/geometry/virtual/format/page/VGEO_DEFAULT_PAGE_SIZE.d.ts +54 -0
  124. package/src/shade/renderer/geometry/virtual/format/page/VGEO_DEFAULT_PAGE_SIZE.d.ts.map +1 -0
  125. package/src/shade/renderer/geometry/virtual/format/page/VGEO_DEFAULT_PAGE_SIZE.js +53 -0
  126. package/src/shade/renderer/geometry/virtual/format/read/VGeoContainerHeader.d.ts +13 -2
  127. package/src/shade/renderer/geometry/virtual/format/read/VGeoContainerHeader.d.ts.map +1 -1
  128. package/src/shade/renderer/geometry/virtual/format/read/VGeoContainerHeader.js +14 -2
  129. package/src/shade/renderer/geometry/virtual/format/read/VGeoPage.d.ts +100 -0
  130. package/src/shade/renderer/geometry/virtual/format/read/VGeoPage.d.ts.map +1 -1
  131. package/src/shade/renderer/geometry/virtual/format/read/VGeoPage.js +113 -0
  132. package/src/shade/renderer/geometry/virtual/format/read/vgeo_read_header.d.ts.map +1 -1
  133. package/src/shade/renderer/geometry/virtual/format/read/vgeo_read_header.js +5 -0
  134. package/src/shade/renderer/geometry/virtual/format/read/vgeo_read_page.d.ts.map +1 -1
  135. package/src/shade/renderer/geometry/virtual/format/read/vgeo_read_page.js +108 -0
  136. package/src/shade/renderer/geometry/virtual/format/vgeo_validate_container.d.ts.map +1 -1
  137. package/src/shade/renderer/geometry/virtual/format/vgeo_validate_container.js +23 -0
  138. package/src/shade/renderer/geometry/virtual/format/vgeo_write_container.d.ts.map +1 -1
  139. package/src/shade/renderer/geometry/virtual/format/vgeo_write_container.js +40 -0
  140. package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryPool.d.ts +228 -0
  141. package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryPool.d.ts.map +1 -0
  142. package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryPool.js +932 -0
  143. package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.d.ts +176 -0
  144. package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.d.ts.map +1 -0
  145. package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.js +425 -0
  146. package/src/shade/renderer/geometry/virtual/runtime/REVIEW_LEDGER.md +241 -0
  147. package/src/shade/renderer/geometry/virtual/runtime/RUNTIME_PLAN.md +574 -0
  148. package/src/shade/renderer/geometry/virtual/runtime/VGeoFeedbackLoop.d.ts +120 -0
  149. package/src/shade/renderer/geometry/virtual/runtime/VGeoFeedbackLoop.d.ts.map +1 -0
  150. package/src/shade/renderer/geometry/virtual/runtime/VGeoFeedbackLoop.js +674 -0
  151. package/src/shade/renderer/geometry/virtual/runtime/VGeoRuntimeTables.d.ts +287 -0
  152. package/src/shade/renderer/geometry/virtual/runtime/VGeoRuntimeTables.d.ts.map +1 -0
  153. package/src/shade/renderer/geometry/virtual/runtime/VGeoRuntimeTables.js +976 -0
  154. package/src/shade/renderer/geometry/virtual/runtime/VirtualGeometry.d.ts +42 -0
  155. package/src/shade/renderer/geometry/virtual/runtime/VirtualGeometry.d.ts.map +1 -0
  156. package/src/shade/renderer/geometry/virtual/runtime/VirtualGeometry.js +96 -0
  157. package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_FLAG_CULL.d.ts +16 -0
  158. package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_FLAG_CULL.d.ts.map +1 -0
  159. package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_FLAG_CULL.js +15 -0
  160. package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_PARAMS_STRUCT.d.ts +19 -0
  161. package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_PARAMS_STRUCT.d.ts.map +1 -0
  162. package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_PARAMS_STRUCT.js +83 -0
  163. package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_WORKGROUP_SIZE.d.ts +9 -0
  164. package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_WORKGROUP_SIZE.d.ts.map +1 -0
  165. package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_WORKGROUP_SIZE.js +8 -0
  166. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_access.d.ts +19 -0
  167. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_access.d.ts.map +1 -0
  168. package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_access.js +160 -0
  169. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_collect.d.ts +3 -0
  170. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_collect.d.ts.map +1 -0
  171. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_collect.js +255 -0
  172. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_queue_prepare.d.ts +3 -0
  173. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_queue_prepare.d.ts.map +1 -0
  174. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_queue_prepare.js +80 -0
  175. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_seed.d.ts +3 -0
  176. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_seed.d.ts.map +1 -0
  177. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_seed.js +144 -0
  178. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_traverse.d.ts +3 -0
  179. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_traverse.d.ts.map +1 -0
  180. package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_traverse.js +530 -0
  181. package/src/shade/renderer/geometry/virtual/runtime/cut/vgeo_cut_feedback_layout.d.ts +39 -0
  182. package/src/shade/renderer/geometry/virtual/runtime/cut/vgeo_cut_feedback_layout.d.ts.map +1 -0
  183. package/src/shade/renderer/geometry/virtual/runtime/cut/vgeo_cut_feedback_layout.js +54 -0
  184. package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_if_enabled.d.ts +41 -0
  185. package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_if_enabled.d.ts.map +1 -0
  186. package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_if_enabled.js +56 -0
  187. package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_instances_to_meshlets.d.ts +49 -0
  188. package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_instances_to_meshlets.d.ts.map +1 -0
  189. package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_instances_to_meshlets.js +328 -0
  190. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CLUSTER_ROW_OFFSET.d.ts +10 -0
  191. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CLUSTER_ROW_OFFSET.d.ts.map +1 -0
  192. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CLUSTER_ROW_OFFSET.js +51 -0
  193. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CLUSTER_ROW_WORDS.d.ts +13 -0
  194. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CLUSTER_ROW_WORDS.d.ts.map +1 -0
  195. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CLUSTER_ROW_WORDS.js +12 -0
  196. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CUT_STAT.d.ts +17 -0
  197. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CUT_STAT.d.ts.map +1 -0
  198. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CUT_STAT.js +99 -0
  199. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CUT_STAT_COUNT.d.ts +9 -0
  200. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CUT_STAT_COUNT.d.ts.map +1 -0
  201. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CUT_STAT_COUNT.js +8 -0
  202. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_FEEDBACK_OFFSET.d.ts +7 -0
  203. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_FEEDBACK_OFFSET.d.ts.map +1 -0
  204. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_FEEDBACK_OFFSET.js +27 -0
  205. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GEOMETRY_ROW_NONE.d.ts +14 -0
  206. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GEOMETRY_ROW_NONE.d.ts.map +1 -0
  207. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GEOMETRY_ROW_NONE.js +13 -0
  208. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GEOMETRY_ROW_OFFSET.d.ts +7 -0
  209. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GEOMETRY_ROW_OFFSET.d.ts.map +1 -0
  210. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GEOMETRY_ROW_OFFSET.js +35 -0
  211. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GEOMETRY_ROW_WORDS.d.ts +9 -0
  212. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GEOMETRY_ROW_WORDS.d.ts.map +1 -0
  213. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GEOMETRY_ROW_WORDS.js +8 -0
  214. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GROUP_FLAG_SELECTABLE.d.ts +15 -0
  215. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GROUP_FLAG_SELECTABLE.d.ts.map +1 -0
  216. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GROUP_FLAG_SELECTABLE.js +14 -0
  217. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GROUP_ROW_OFFSET.d.ts +7 -0
  218. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GROUP_ROW_OFFSET.d.ts.map +1 -0
  219. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GROUP_ROW_OFFSET.js +36 -0
  220. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GROUP_ROW_WORDS.d.ts +10 -0
  221. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GROUP_ROW_WORDS.d.ts.map +1 -0
  222. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GROUP_ROW_WORDS.js +9 -0
  223. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_INSTANCE_OFFSET.d.ts +11 -0
  224. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_INSTANCE_OFFSET.d.ts.map +1 -0
  225. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_INSTANCE_OFFSET.js +54 -0
  226. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_INSTANCE_WORDS.d.ts +9 -0
  227. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_INSTANCE_WORDS.d.ts.map +1 -0
  228. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_INSTANCE_WORDS.js +8 -0
  229. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NODE_ROW_LEAF_BIT.d.ts +11 -0
  230. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NODE_ROW_LEAF_BIT.d.ts.map +1 -0
  231. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NODE_ROW_LEAF_BIT.js +10 -0
  232. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NODE_ROW_OFFSET.d.ts +7 -0
  233. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NODE_ROW_OFFSET.d.ts.map +1 -0
  234. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NODE_ROW_OFFSET.js +30 -0
  235. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NODE_ROW_WORDS.d.ts +9 -0
  236. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NODE_ROW_WORDS.d.ts.map +1 -0
  237. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NODE_ROW_WORDS.js +8 -0
  238. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NO_CHILD_PAGE.d.ts +13 -0
  239. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NO_CHILD_PAGE.d.ts.map +1 -0
  240. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NO_CHILD_PAGE.js +12 -0
  241. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PAGE_ROW_NONE.d.ts +14 -0
  242. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PAGE_ROW_NONE.d.ts.map +1 -0
  243. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PAGE_ROW_NONE.js +13 -0
  244. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PAGE_ROW_OFFSET.d.ts +11 -0
  245. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PAGE_ROW_OFFSET.d.ts.map +1 -0
  246. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PAGE_ROW_OFFSET.js +61 -0
  247. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PAGE_ROW_WORDS.d.ts +9 -0
  248. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PAGE_ROW_WORDS.d.ts.map +1 -0
  249. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PAGE_ROW_WORDS.js +8 -0
  250. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_QUEUE_ITEM_WORDS.d.ts +13 -0
  251. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_QUEUE_ITEM_WORDS.d.ts.map +1 -0
  252. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_QUEUE_ITEM_WORDS.js +12 -0
  253. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_QUEUE_TARGET_GROUP_BIT.d.ts +9 -0
  254. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_QUEUE_TARGET_GROUP_BIT.d.ts.map +1 -0
  255. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_QUEUE_TARGET_GROUP_BIT.js +8 -0
  256. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_WANT_WORDS.d.ts +20 -0
  257. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_WANT_WORDS.d.ts.map +1 -0
  258. package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_WANT_WORDS.js +19 -0
  259. package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_meshlet_batch.d.ts +23 -0
  260. package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_meshlet_batch.d.ts.map +1 -0
  261. package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_meshlet_batch.js +70 -0
  262. package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_page_block_words.d.ts +18 -0
  263. package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_page_block_words.d.ts.map +1 -0
  264. package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_page_block_words.js +25 -0
  265. package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_page_slot_words.d.ts +35 -0
  266. package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_page_slot_words.d.ts.map +1 -0
  267. package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_page_slot_words.js +41 -0
  268. package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_write_page_block.d.ts +32 -0
  269. package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_write_page_block.d.ts.map +1 -0
  270. package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_write_page_block.js +138 -0
  271. package/src/shade/renderer/loader/gltf/tiny-gltf.d.ts +1 -1
  272. package/src/shade/renderer/postprocess/nss/NSS.d.ts +1 -1
  273. package/src/shade/renderer/rasterize/bucket/prepare_meshlet_draw_commands_by_material.d.ts.map +1 -1
  274. package/src/shade/renderer/rasterize/bucket/prepare_meshlet_draw_commands_by_material.js +9 -0
  275. package/src/shade/renderer/rasterize/fast/graph_rasterize_scene_fast.d.ts.map +1 -1
  276. package/src/shade/renderer/rasterize/fast/graph_rasterize_scene_fast.js +12 -1
  277. package/src/shade/renderer/rasterize/standard/graph_rasterize_partial_opaque.d.ts.map +1 -1
  278. package/src/shade/renderer/rasterize/standard/graph_rasterize_partial_opaque.js +12 -1
  279. package/src/shade/renderer/rasterize/standard/graph_rasterize_remaining_opaque.d.ts.map +1 -1
  280. package/src/shade/renderer/rasterize/standard/graph_rasterize_remaining_opaque.js +10 -0
  281. package/src/shade/renderer/scene/GPUSceneContext.d.ts +18 -0
  282. package/src/shade/renderer/scene/GPUSceneContext.d.ts.map +1 -1
  283. package/src/shade/renderer/scene/GPUSceneContext.js +647 -594
  284. package/src/shade/renderer/scene/rows/GPUSceneRows.d.ts.map +1 -1
  285. package/src/shade/renderer/scene/rows/GPUSceneRows.js +22 -0
  286. package/src/shade/renderer/shader/chunk/geometry/mat3/chunk_mat3_singular_values.d.ts +35 -0
  287. package/src/shade/renderer/shader/chunk/geometry/mat3/chunk_mat3_singular_values.d.ts.map +1 -0
  288. package/src/shade/renderer/shader/chunk/geometry/mat3/chunk_mat3_singular_values.js +91 -0
  289. package/src/engine/graphics3/instantiate_scene_bundle.d.ts +0 -54
  290. package/src/engine/graphics3/instantiate_scene_bundle.d.ts.map +0 -1
  291. package/src/engine/graphics3/shade_node_to_entity_composition.d.ts +0 -39
  292. package/src/engine/graphics3/shade_node_to_entity_composition.d.ts.map +0 -1
  293. package/src/shade/renderer/animation/compute_skin_world_bounds.d.ts +0 -35
  294. package/src/shade/renderer/animation/compute_skin_world_bounds.d.ts.map +0 -1
  295. package/src/shade/renderer/animation/compute_skinned_mesh_clip_bounding_sphere.d.ts +0 -96
  296. package/src/shade/renderer/animation/compute_skinned_mesh_clip_bounding_sphere.d.ts.map +0 -1
  297. package/src/shade/renderer/animation/pose/pose_evaluate_world.d.ts +0 -20
  298. package/src/shade/renderer/animation/pose/pose_evaluate_world.d.ts.map +0 -1
  299. package/src/shade/renderer/animation/skin_bind_transform.d.ts +0 -25
  300. package/src/shade/renderer/animation/skin_bind_transform.d.ts.map +0 -1
  301. package/src/shade/renderer/animation/skin_frame_defect.d.ts +0 -34
  302. package/src/shade/renderer/animation/skin_frame_defect.d.ts.map +0 -1
  303. package/src/shade/renderer/animation/skin_joint_matrix.d.ts +0 -24
  304. package/src/shade/renderer/animation/skin_joint_matrix.d.ts.map +0 -1
  305. package/src/shade/renderer/animation/skin_normalize_mesh_frame.d.ts +0 -70
  306. package/src/shade/renderer/animation/skin_normalize_mesh_frame.d.ts.map +0 -1
  307. package/src/shade/renderer/buffer/table/GPUReadbackStagingRing.d.ts +0 -96
  308. package/src/shade/renderer/buffer/table/GPUReadbackStagingRing.d.ts.map +0 -1
  309. package/src/shade/renderer/scene/InstanceBatch.d.ts +0 -92
  310. package/src/shade/renderer/scene/InstanceBatch.d.ts.map +0 -1
  311. package/src/shade/renderer/scene/Mesh.d.ts +0 -55
  312. package/src/shade/renderer/scene/Mesh.d.ts.map +0 -1
  313. package/src/shade/renderer/scene/Node3D.d.ts +0 -159
  314. package/src/shade/renderer/scene/Node3D.d.ts.map +0 -1
  315. package/src/shade/renderer/scene/Node3DDirtyList.d.ts +0 -59
  316. package/src/shade/renderer/scene/Node3DDirtyList.d.ts.map +0 -1
  317. package/src/shade/renderer/scene/SceneNodeBinding.d.ts +0 -52
  318. package/src/shade/renderer/scene/SceneNodeBinding.d.ts.map +0 -1
  319. package/src/shade/renderer/scene/SkinnedMesh.d.ts +0 -27
  320. package/src/shade/renderer/scene/SkinnedMesh.d.ts.map +0 -1
  321. package/src/shade/renderer/scene/TransformAuthority.d.ts +0 -19
  322. package/src/shade/renderer/scene/TransformAuthority.d.ts.map +0 -1
@@ -1,96 +0,0 @@
1
- /**
2
- * Persistent, mappable buffers for reading GPU data back — a ring, so that a batch may be in flight
3
- * while the next one is recorded.
4
- *
5
- * The pattern is {@link GPUTimerArray}'s: buffers created once and kept, rather than a fresh
6
- * `MAP_READ` buffer created, copied into, mapped and destroyed per read, which is what
7
- * {@link inspect_via_copy} does and is the reason it is a debug affordance. Buffer creation is not
8
- * free, and a per-call one also means the allocator sees a new lifetime on every read.
9
- *
10
- * Slots never shrink. A ring sized by the busiest frame of a session stays that size, which is a
11
- * bounded cost measured in the largest batch, and the alternative is recreating buffers as the
12
- * request count breathes.
13
- *
14
- * @see GPUDatabaseReadback
15
- */
16
- export class GPUReadbackStagingRing {
17
- /**
18
- * @param {GPUDevice} device
19
- * @param {Object} [options]
20
- * @param {number} [options.frames_in_flight] slot count
21
- * @param {string} [options.label]
22
- */
23
- constructor(device: GPUDevice, { frames_in_flight, label, }?: {
24
- frames_in_flight?: number;
25
- label?: string;
26
- });
27
- /**
28
- * Number of slots, which is how many batches may be in flight at once.
29
- *
30
- * @returns {number}
31
- */
32
- get size(): number;
33
- /**
34
- * Bytes currently held across every slot. Zero until the first batch, because a database that is
35
- * never read back must not pay for the machinery that would read it.
36
- *
37
- * @returns {number}
38
- */
39
- get byte_size(): number;
40
- /**
41
- * Take a slot able to hold `byte_size`, growing its buffer if it is too small.
42
- *
43
- * @param {number} byte_size
44
- * @returns {GPUReadbackStagingSlot|null} `null` when every slot is still in flight. That is not
45
- * an error — it means readbacks are being requested faster than they are being read, and the
46
- * caller's correct response is to leave the requests queued for the next frame rather than to
47
- * overwrite bytes something is still reading
48
- */
49
- acquire(byte_size: number): GPUReadbackStagingSlot | null;
50
- /**
51
- * Give a slot back. Its buffer stays.
52
- *
53
- * @param {GPUReadbackStagingSlot} slot
54
- */
55
- release(slot: GPUReadbackStagingSlot): void;
56
- destroy(): void;
57
- #private;
58
- }
59
- /**
60
- * One slot of a {@link GPUReadbackStagingRing}.
61
- */
62
- declare class GPUReadbackStagingSlot {
63
- /**
64
- * `MAP_READ | COPY_DST`, which is the only pair WebGPU allows a mappable read buffer — so this
65
- * is a copy destination and nothing else. A shader that wants to write gathered data writes a
66
- * storage buffer, which is then copied here.
67
- *
68
- * @type {GPUBuffer|null}
69
- */
70
- buffer: GPUBuffer | null;
71
- /**
72
- * @type {number}
73
- */
74
- index: number;
75
- /**
76
- * Where a mapping of this slot is copied to, so that the GPU buffer can be unmapped at once and
77
- * the bytes still be there at the apply point.
78
- *
79
- * Lives on the slot rather than on the batch: a slot holds one batch at a time, so this is one
80
- * allocation per slot per high-water mark instead of one per frame. The owner sizes it.
81
- *
82
- * @type {Uint8Array|null}
83
- */
84
- cpu_bytes: Uint8Array | null;
85
- /**
86
- * Whether the slot has been handed out and not yet given back. The ring will not hand out a
87
- * busy slot, which is the whole reason it has more than one: a batch is copied into one slot in
88
- * the frame that encodes it and mapped a frame or more later, and reusing it in between would
89
- * overwrite the bytes being read.
90
- *
91
- * @type {boolean}
92
- */
93
- busy: boolean;
94
- }
95
- export {};
96
- //# sourceMappingURL=GPUReadbackStagingRing.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GPUReadbackStagingRing.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/buffer/table/GPUReadbackStagingRing.js"],"names":[],"mappings":"AA2DA;;;;;;;;;;;;;;GAcG;AACH;IAyBI;;;;;OAKG;IACH;QAH4B,gBAAgB,GAAjC,MAAM;QACW,KAAK,GAAtB,MAAM;OAqBhB;IAED;;;;OAIG;IACH,mBAEC;IAED;;;;;OAKG;IACH,wBAYC;IAED;;;;;;;;OAQG;IACH,mBANW,MAAM,GACJ,sBAAsB,GAAC,IAAI,CA6BvC;IAED;;;;OAIG;IACH,cAFW,sBAAsB,QAOhC;IA0BD,gBAWC;;CACJ;AA3ND;;GAEG;AACH;IACI;;;;;;OAMG;IACH,QAFU,YAAU,IAAI,CAEV;IAEd;;OAEG;IACH,OAFU,MAAM,CAEL;IAEX;;;;;;;;OAQG;IACH,WAFU,UAAU,GAAC,IAAI,CAER;IAEjB;;;;;;;OAOG;IACH,MAFU,OAAO,CAEJ;CAChB"}
@@ -1,92 +0,0 @@
1
- /**
2
- * @typedef {import("../material/ShadeMaterial.js").ShadeMaterial} ShadeMaterial
3
- * @typedef {import("./Mesh.js").Mesh} Mesh
4
- * @typedef {import("./Node3D.js").Node3D} Node3D
5
- */
6
- /**
7
- * The renderable side of a {@link Scene} — every {@link Node3D} that the
8
- * GPU's `transforms` table needs a row for, plus the cached mesh-only
9
- * filter rendering iterates.
10
- *
11
- * Storage is a flat `Node3D[]`. Anything `Mesh`-shaped feeds the
12
- * {@link instances} view (the renderable subset); everything else (anchor
13
- * rigs, attachment points, future skeleton joints) still earns a row in
14
- * the GPU scene-graph because the propagation pass needs to walk the
15
- * whole hierarchy regardless of which nodes happen to carry geometry.
16
- *
17
- * Lights live in {@link Scene.lights}, separately, and are not added
18
- * here — they have their own GPU pipeline that doesn't share the
19
- * `transforms` table.
20
- */
21
- export class InstanceBatch {
22
- /**
23
- * Set of all materials used in this scene.
24
- * Primarily useful for rendering.
25
- * @type {ShadeMaterial[]}
26
- */
27
- get materials(): import("../material/ShadeMaterial.js").ShadeMaterial[];
28
- /**
29
- *
30
- * @param {boolean} v
31
- */
32
- set needsUpdate(v: boolean);
33
- /**
34
- *
35
- * @return {number}
36
- */
37
- get version(): number;
38
- /**
39
- * The mesh-only subset of {@link nodes} — what the rasterization
40
- * pipeline iterates. Cached so repeated calls within the same
41
- * version are O(1).
42
- *
43
- * @returns {Mesh[]}
44
- */
45
- get instances(): import("./Mesh.js").Mesh[];
46
- /**
47
- * Every node in the batch — the input the GPU scene-graph propagation
48
- * pass iterates. Order is insertion order; {@link instances} is
49
- * a stable subset.
50
- *
51
- * @returns {Node3D[]}
52
- */
53
- get nodes(): import("./Node3D.js").Node3D[];
54
- /**
55
- * Add a node. Accepts any {@link Node3D} — meshes, anchors, future
56
- * skeleton joints. Meshes will additionally appear in
57
- * {@link instances} (cached).
58
- *
59
- * @param {Node3D} node
60
- */
61
- add(node: Node3D): void;
62
- /**
63
- *
64
- * @return {AABB3}
65
- */
66
- get bounding_box(): AABB3;
67
- /**
68
- *
69
- * @returns {number}
70
- */
71
- computeTriangleCount(): number;
72
- /**
73
- * Remove a node (mesh or otherwise). Returns true if the node was
74
- * found and dropped.
75
- *
76
- * @param {Node3D} node
77
- * @returns {boolean}
78
- */
79
- remove(node: Node3D): boolean;
80
- hash(): number;
81
- /**
82
- *
83
- * @param {InstanceBatch} other
84
- */
85
- equals(other: InstanceBatch): boolean;
86
- #private;
87
- }
88
- export type ShadeMaterial = import("../material/ShadeMaterial.js").ShadeMaterial;
89
- export type Mesh = import("./Mesh.js").Mesh;
90
- export type Node3D = import("./Node3D.js").Node3D;
91
- import { AABB3 } from "../../../core/geom/3d/aabb/AABB3.js";
92
- //# sourceMappingURL=InstanceBatch.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"InstanceBatch.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/scene/InstanceBatch.js"],"names":[],"mappings":"AAKA;;;;GAIG;AAEH;;;;;;;;;;;;;;GAcG;AACH;IAyCI;;;;OAIG;IACH,wEAcC;IAED;;;OAGG;IACH,4BAMC;IAED;;;OAGG;IACH,sBAEC;IAED;;;;;;OAMG;IACH,4CAeC;IAED;;;;;;OAMG;IACH,4CAEC;IAGD;;;;;;OAMG;IACH,UAFW,MAAM,QAShB;IAED;;;OAGG;IACH,0BAoBC;IAED;;;OAGG;IACH,wBAFa,MAAM,CAclB;IAED;;;;;;OAMG;IACH,aAHW,MAAM,GACJ,OAAO,CAWnB;IAED,eAEC;IAED;;;OAGG;IACH,cAFW,aAAa,WAIvB;;CAEJ;4BApOY,OAAO,8BAA8B,EAAE,aAAa;mBACpD,OAAO,WAAW,EAAE,IAAI;qBACxB,OAAO,aAAa,EAAE,MAAM;sBALnB,qCAAqC"}
@@ -1,55 +0,0 @@
1
- /**
2
- * @typedef {import("../geometry/MeshletGeometry.js").MeshletGeometry} MeshletGeometry
3
- * @typedef {import("../material/ShadeMaterial.js").ShadeMaterial} ShadeMaterial
4
- */
5
- export class Mesh extends Node3D {
6
- /**
7
- *
8
- * @param {MeshletGeometry} geometry
9
- * @param {ShadeMaterial} material
10
- * @param {number[]|Float32Array|Float64Array} [transform] 4x4 affine matrix, column-major
11
- * @return {Mesh}
12
- */
13
- static from(geometry: MeshletGeometry, material: ShadeMaterial, transform?: number[] | Float32Array | Float64Array): Mesh;
14
- /**
15
- * @type {MeshletGeometry}
16
- */
17
- geometry: MeshletGeometry;
18
- /**
19
- * @type {ShadeMaterial}
20
- */
21
- material: ShadeMaterial;
22
- /**
23
- * World-space AABB
24
- * @type {Float32Array}
25
- */
26
- bounding_box: Float32Array;
27
- /**
28
- *
29
- * @type {Float32Array}
30
- */
31
- bounding_sphere: Float32Array;
32
- /**
33
- *
34
- * @returns {Mesh}
35
- */
36
- clone(): Mesh;
37
- /**
38
- *
39
- * @param {Mesh} other
40
- */
41
- copy(other: Mesh): void;
42
- /**
43
- *
44
- * @param {Mesh} other
45
- * @returns {boolean}
46
- */
47
- equals(other: Mesh): boolean;
48
- updateBoundsBasic(): void;
49
- updateBoundsTight(): void;
50
- isMesh: boolean;
51
- }
52
- export type MeshletGeometry = import("../geometry/MeshletGeometry.js").MeshletGeometry;
53
- export type ShadeMaterial = import("../material/ShadeMaterial.js").ShadeMaterial;
54
- import { Node3D } from "./Node3D.js";
55
- //# sourceMappingURL=Mesh.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Mesh.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/scene/Mesh.js"],"names":[],"mappings":"AAUA;;;GAGG;AAEH;IA2HI;;;;;;OAMG;IACH,sBALW,eAAe,YACf,aAAa,cACb,MAAM,EAAE,GAAC,YAAY,GAAC,YAAY,GACjC,IAAI,CAoBf;IAnJD;;OAEG;IACH,UAFU,eAAe,CAEhB;IAET;;OAEG;IACH,UAFU,aAAa,CAEd;IAET;;;OAGG;IACH,cAFU,YAAY,CAEa;IAEnC;;;OAGG;IACH,iBAFU,YAAY,CAEgB;IAEtC;;;OAGG;IACH,SAFa,IAAI,CAQhB;IAED;;;OAGG;IACH,YAFW,IAAI,QAiBd;IAED;;;;OAIG;IACH,cAHW,IAAI,GACF,OAAO,CAQnB;IAQD,0BAOC;IAED,0BAqCC;IA+BL,gBAAqB;CAHpB;8BAzJY,OAAO,gCAAgC,EAAE,eAAe;4BACxD,OAAO,8BAA8B,EAAE,aAAa;uBAJ1C,aAAa"}
@@ -1,159 +0,0 @@
1
- /**
2
- * Note that hierarchy only exists on the CPU side
3
- * The only transform that GPU will see is the {@link transform_global}
4
- */
5
- export class Node3D {
6
- /**
7
- * Stable numeric id, unique across every Node3D instance (meshes,
8
- * lights, scenes, anchors) — tied to the JS object's identity, not
9
- * its position in any array. A node in a scene is bound to its rows
10
- * through the object itself (`GPUSceneContext.node_rows`).
11
- *
12
- * @type {number}
13
- * @readonly
14
- */
15
- readonly id: number;
16
- /**
17
- * Human-readable name
18
- * @type {string}
19
- */
20
- name: string;
21
- /**
22
- * Bumped by {@link updateMatrices}. The renderer compares it against the version it last
23
- * uploaded for this node's row, so a node that has not moved since the previous frame costs
24
- * nothing beyond the comparison — that is what keeps per-frame scene upkeep proportional to
25
- * what changed rather than to scene size.
26
- *
27
- * A caller that mutates `transform_local` without calling {@link updateMatrices} leaves
28
- * `transform_global` stale, and this counter says so: both are derived, and neither is
29
- * refreshed until the call is made.
30
- *
31
- * @returns {number}
32
- */
33
- get version(): number;
34
- /**
35
- * @param {boolean} v
36
- */
37
- set needsUpdate(v: boolean);
38
- /**
39
- * Where this node reports that it has moved — set by the {@link GPUSceneContext} that gives it
40
- * rows, cleared when it takes them back. Null for a node no context holds, which is every node
41
- * before it is added to a scene and every node after it leaves one.
42
- *
43
- * A node reports to one list, not several. Two contexts holding the same node would need two,
44
- * and nothing in the engine does that: a `SceneManager` keeps one context per scene, and
45
- * {@link GPUSceneContext} asserts when a node arrives already reporting somewhere else rather
46
- * than quietly taking the claim and leaving the other context deaf.
47
- *
48
- * @type {Node3DDirtyList|null}
49
- */
50
- transform_dirty_list: Node3DDirtyList | null;
51
- /**
52
- * Handing a row back to the CPU has to be *reported*, not waited for: while the GPU owned the
53
- * row nothing bumped this node's version, so nothing else would ever mark it as needing a
54
- * write and the CPU would go on not writing a row it now owns.
55
- *
56
- * @param {TransformAuthority} value
57
- */
58
- set transform_authority(value: number);
59
- /**
60
- * Who writes this node's TRS in the GPU `transforms` table. Declared, never inferred — see
61
- * {@link TransformAuthority} for what each side owns and why guessing does not work.
62
- *
63
- * @returns {TransformAuthority}
64
- */
65
- get transform_authority(): number;
66
- /**
67
- * World transform, **derived** — {@link updateMatrices} recomputes it from
68
- * {@link transform_local} and the parent chain, so writing it directly is undone the moment
69
- * anything refreshes. Place a node through its local transform.
70
- *
71
- * @type {Transform64}
72
- */
73
- transform_global: Transform64;
74
- /**
75
- * Local transform, and the node's own truth. Passive: setting a component does not refresh the
76
- * matrix, and nothing downstream sees the change until {@link updateMatrices} runs.
77
- *
78
- * @type {Transform64}
79
- */
80
- transform_local: Transform64;
81
- parent: any;
82
- /**
83
- *
84
- * @type {Node3D[]}
85
- */
86
- children: Node3D[];
87
- /**
88
- * Orient this node so its local +Z axis points along `v`. Preserves
89
- * position. A zero-length input is a no-op. Recomputes
90
- * `transform_global` so the new orientation is visible immediately.
91
- *
92
- * @param {Vector3|number[]} v
93
- */
94
- set forward(v: Vector3);
95
- /**
96
- * Orientation vector — `(0,0,1)` rotated by the node's global transform. Freshly allocated;
97
- * hold on to it rather than reading this in a loop.
98
- *
99
- * @return {Vector3}
100
- */
101
- get forward(): Vector3;
102
- /**
103
- * Orientation vector — `(1,0,0)` rotated by the node's global transform. Freshly allocated;
104
- * hold on to it rather than reading this in a loop.
105
- *
106
- * @return {Vector3}
107
- */
108
- get right(): Vector3;
109
- /**
110
- * @param {Vector3|number[]} v
111
- */
112
- set position(v: Float64Array);
113
- /**
114
- * Live view over the local transform's own storage, freshly allocated on every access. Writing
115
- * through it does not refresh anything — {@link updateMatrices} still has to run.
116
- *
117
- * @returns {Float64Array}
118
- */
119
- get position(): Float64Array;
120
- copy(other: any): void;
121
- clone(): Node3D;
122
- /**
123
- *
124
- * @param {function(Node3D)} callback
125
- * @param {*} [thisArg]
126
- */
127
- traverse(callback: (arg0: Node3D) => any, thisArg?: any): void;
128
- /**
129
- * Recompose this node's world transform and every descendant's.
130
- *
131
- * The local matrix is refreshed first because nothing else will: a `Transform64` does not track
132
- * its own components, and {@link Transform64.multiplyTransforms} composes through matrices. Skip
133
- * it and the node would be placed where it was the last time someone asked.
134
- */
135
- updateMatrices(): void;
136
- /**
137
- *
138
- * @param {Node3D[]} children
139
- */
140
- addChildren(children: Node3D[]): void;
141
- /**
142
- *
143
- * @param {Node3D} child
144
- */
145
- addChild(child: Node3D): void;
146
- /**
147
- * Type tag — lets `instanceof`-free callers (e.g. `InstanceBatch.add`)
148
- * accept anything that conforms to the Node3D shape.
149
- *
150
- * @readonly
151
- * @type {boolean}
152
- */
153
- readonly isNode3D: boolean;
154
- #private;
155
- }
156
- export type Node3DDirtyList = import("./Node3DDirtyList.js").Node3DDirtyList;
157
- import { Transform64 } from "../../../engine/ecs/transform/Transform64.js";
158
- import Vector3 from "../../../core/geom/Vector3.js";
159
- //# sourceMappingURL=Node3D.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Node3D.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/scene/Node3D.js"],"names":[],"mappings":"AAYA;;;GAGG;AACH;IAEI;;;;;;;;OAQG;IACH,aAHU,MAAM,CAGE;IAElB;;;OAGG;IACH,MAFU,MAAM,CAEP;IAOT;;;;;;;;;;;OAWG;IACH,sBAEC;IAED;;OAEG;IACH,4BAMC;IAED;;;;;;;;;;;OAWG;IACH,sBAFU,eAAe,GAAC,IAAI,CAEF;IA6C5B;;;;;;OAMG;IACH,uCAQC;IAzBD;;;;;OAKG;IACH,kCAEC;IAmBD;;;;;;OAMG;IACH,kBAFU,WAAW,CAEgB;IAErC;;;;;OAKG;IACH,iBAFU,WAAW,CAEe;IAEpC,YAAc;IAEd;;;OAGG;IACH,UAFU,MAAM,EAAE,CAEL;IAYb;;;;;;OAMG;IACH,wBAMC;IAvBD;;;;;OAKG;IACH,uBAEC;IAiBD;;;;;OAKG;IACH,qBAEC;IAED;;OAEG;IACH,8BAEC;IAED;;;;;OAKG;IACH,6BAEC;IAED,uBAOC;IAED,gBAmBC;IAED;;;;OAIG;IACH,0BAHoB,MAAM,+BASzB;IAED;;;;;;OAMG;IACH,uBA4BC;IAED;;;OAGG;IACH,sBAFW,MAAM,EAAE,QAOlB;IAED;;;OAGG;IACH,gBAFW,MAAM,QAchB;IAIL;;;;;;OAMG;IACH,mBAFU,OAAO,CAEQ;;CATxB;8BAhUY,OAAO,sBAAsB,EAAE,eAAe;4BAJ/B,8CAA8C;oBAHtD,+BAA+B"}
@@ -1,59 +0,0 @@
1
- /**
2
- * @typedef {import("./Node3D.js").Node3D} Node3D
3
- */
4
- /**
5
- * Nodes whose transform has been touched since the last drain — how a {@link GPUSceneContext}
6
- * finds out what moved, instead of asking every node it holds.
7
- *
8
- * A scene-wide scan is proportional to the scene and not to the frame: a version comparison is
9
- * cheap, several tens of thousands of them are not, and the scan runs once per view. Movement is
10
- * reported at the one place it happens — {@link Node3D.updateMatrices}, and the two other things
11
- * that bump a node's version — so the list is what actually changed and the frame costs what it
12
- * moved.
13
- *
14
- * {@link generation} is the drain counter, and a node stamps itself with it when it joins. That is
15
- * what makes a repeat within one frame free: `updateMatrices` recurses into children, so a
16
- * character's root moving reaches every joint under it, and reaching a joint twice — through the
17
- * recursion and again through a call of its own — must not queue it twice.
18
- *
19
- * A node on the list is a node that *may* have moved, never a promise that it did. The consumer
20
- * still compares versions: the membership sweep writes an arriving node's row itself, and that
21
- * node is on the list as well.
22
- */
23
- export class Node3DDirtyList {
24
- /**
25
- * Bumped by {@link drain}. A node carries the value it last joined under; see the class note.
26
- *
27
- * @type {number}
28
- */
29
- generation: number;
30
- /**
31
- * @param {Node3D} node
32
- */
33
- add(node: Node3D): void;
34
- /**
35
- * How many nodes are waiting. For a spec, and for anything that wants to know whether a frame
36
- * has anything to do before it starts doing it.
37
- *
38
- * @returns {number}
39
- */
40
- get size(): number;
41
- /**
42
- * Hand over everything queued and start a fresh batch.
43
- *
44
- * The returned array is valid until the next drain, which is also when it is recycled — so a
45
- * caller reads it and lets go of it. Anything queued *while* it is being read lands in the new
46
- * batch rather than being appended to the one under the reader's feet.
47
- *
48
- * @returns {Node3D[]}
49
- */
50
- drain(): Node3D[];
51
- /**
52
- * Forget everything queued without handing it anywhere. For a context being torn down, whose
53
- * nodes may outlive it.
54
- */
55
- clear(): void;
56
- #private;
57
- }
58
- export type Node3D = import("./Node3D.js").Node3D;
59
- //# sourceMappingURL=Node3DDirtyList.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Node3DDirtyList.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/scene/Node3DDirtyList.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;;;;;;;;;;;;GAkBG;AACH;IAEI;;;;OAIG;IACH,YAFU,MAAM,CAED;IAef;;OAEG;IACH,UAFW,MAAM,QAIhB;IAED;;;;;OAKG;IACH,mBAEC;IAED;;;;;;;;OAQG;IACH,SAFa,MAAM,EAAE,CAapB;IAED;;;OAGG;IACH,cAKC;;CACJ;qBA7FY,OAAO,aAAa,EAAE,MAAM"}
@@ -1,52 +0,0 @@
1
- /**
2
- * What one {@link Node3D} owns inside a {@link GPUSceneContext}'s scene database: a row in the
3
- * `transforms` table, and — when the node is a {@link Mesh} — a row in the `meshes` table too.
4
- *
5
- * **Rows are stable for the lifetime of the binding.** Removing a node frees its rows and leaves a
6
- * hole rather than compacting the table, because rows are addresses: GPU animation targets a node
7
- * by row index, `meshes.node` points at one, and every `transforms.parent` is one. Compaction would
8
- * silently re-point all of them, so the tables tolerate holes instead and the passes that walk them
9
- * consult occupancy.
10
- */
11
- export class SceneNodeBinding {
12
- /**
13
- * Row in the scene database's `transforms` table.
14
- *
15
- * @type {number}
16
- */
17
- transform_row: number;
18
- /**
19
- * Row in the scene database's `meshes` table. Meaningful only for a node that is a mesh —
20
- * `node.isMesh` is what says whether to read it, not this value.
21
- *
22
- * @type {number}
23
- */
24
- mesh_row: number;
25
- /**
26
- * The {@link Node3D.version} that the rows above were last written from. A node whose version
27
- * still matches this has not moved since, and costs nothing but the comparison.
28
- *
29
- * @type {number}
30
- */
31
- version: number;
32
- /**
33
- * The {@link TransformAuthority} in force when the rows were last written.
34
- *
35
- * Kept because handing a row back to the CPU has to be acted on rather than waited for: while
36
- * the GPU owned the row the node's own version stood still, so nothing would ever mark it as
37
- * needing a write, and the CPU would take over a row it never wrote to.
38
- *
39
- * @type {TransformAuthority}
40
- */
41
- authority: TransformAuthority;
42
- /**
43
- * Membership-sweep marker. Set to the current sweep's number every time the node is found in
44
- * the scene; a binding still carrying an older number after a sweep belongs to a node that has
45
- * left, and its rows are freed.
46
- *
47
- * @type {number}
48
- */
49
- epoch: number;
50
- }
51
- import { TransformAuthority } from "./TransformAuthority.js";
52
- //# sourceMappingURL=SceneNodeBinding.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SceneNodeBinding.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/scene/SceneNodeBinding.js"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AACH;IACI;;;;OAIG;IACH,eAFU,MAAM,CAEE;IAElB;;;;;OAKG;IACH,UAFU,MAAM,CAEF;IAEd;;;;;OAKG;IACH,SAFU,MAAM,CAEH;IAEb;;;;;;;;OAQG;IACH,WAFU,kBAAkB,CAEO;IAEnC;;;;;;OAMG;IACH,OAFU,MAAM,CAEL;CACd;mCAvDkC,yBAAyB"}
@@ -1,27 +0,0 @@
1
- /**
2
- * A loader's mark on a primitive that a skin deforms.
3
- *
4
- * **A tag, not a renderable.** A skinned model is placed as a prefab — `prefab_compile` reads
5
- * this class off the loader's tree to know which primitives deform against which skin, and
6
- * `prefab_instantiate` spawns each as an entity whose mesh row draws a per-instance clone the
7
- * skinning pass writes (`ShadedGeometryFlags.Skinned`). Adding one of these to a scene as a node
8
- * is refused by the scene database: a node draws its source geometry rigidly, and there is no
9
- * node-side skinning any more.
10
- *
11
- * What the class still says: the geometry, the material, and that this primitive's vertices are
12
- * placed by joints rather than by its own transform — which is why glTF declares the node's own
13
- * transform meaningless for it, and why the prefab moves the node onto the skin's bind frame.
14
- */
15
- export class SkinnedMesh extends Mesh {
16
- /**
17
- * @returns {SkinnedMesh}
18
- */
19
- clone(): SkinnedMesh;
20
- /**
21
- * @readonly
22
- * @type {boolean}
23
- */
24
- readonly isSkinnedMesh: boolean;
25
- }
26
- import { Mesh } from "./Mesh.js";
27
- //# sourceMappingURL=SkinnedMesh.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SkinnedMesh.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/scene/SkinnedMesh.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AACH;IAEI;;OAEG;IACH,SAFa,WAAW,CAMvB;IAGL;;;OAGG;IACH,wBAFU,OAAO,CAEkB;CANlC;qBA1BoB,WAAW"}
@@ -1,19 +0,0 @@
1
- /**
2
- * Who writes a node's `local_translation` / `local_rotation` / `local_scale` in the scene
3
- * database's `transforms` table.
4
- *
5
- * Both sides can reach those fields — the CPU through {@link GPUSceneContext }, the GPU through the
6
- * pose accumulator's resolve pass — and neither can tell that the other wrote. Without a stated
7
- * owner the two race, and the race is not hypothetical: {@link Node3D.updateMatrices } recurses into
8
- * children, so moving a character's root marks every joint under it as changed, and the CPU would
9
- * push its own idea of each joint's pose over whatever the animation had just resolved.
10
- *
11
- * `global` and `prev_global` are not covered by this — they are GPU-derived for every node, whoever
12
- * owns the TRS they are composed from.
13
- */
14
- export type TransformAuthority = number;
15
- export namespace TransformAuthority {
16
- let CPU: number;
17
- let GPU: number;
18
- }
19
- //# sourceMappingURL=TransformAuthority.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TransformAuthority.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/scene/TransformAuthority.js"],"names":[],"mappings":";;;;;;;;;;;;;iCAaU,MAAM"}