@woosh/meep-engine 3.16.0 → 3.17.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 (410) hide show
  1. package/editor/particles/effect/ParticleEffectDocument.d.ts +21 -6
  2. package/editor/particles/effect/ParticleEffectDocument.d.ts.map +1 -1
  3. package/editor/particles/effect/ParticleEffectDocument.js +38 -17
  4. package/editor/view/node-graph/NodeGraphClipboard.d.ts +186 -0
  5. package/editor/view/node-graph/NodeGraphClipboard.d.ts.map +1 -0
  6. package/editor/view/node-graph/NodeGraphClipboard.js +231 -0
  7. package/editor/view/node-graph/NodeGraphEditorView.d.ts +59 -1
  8. package/editor/view/node-graph/NodeGraphEditorView.d.ts.map +1 -1
  9. package/editor/view/node-graph/NodeGraphEditorView.js +248 -5
  10. package/editor/view/node-graph/NodeGraphView.d.ts.map +1 -1
  11. package/editor/view/node-graph/NodeGraphView.js +84 -8
  12. package/editor/view/node-graph/actions/connection_bind_actions.d.ts +23 -0
  13. package/editor/view/node-graph/actions/connection_bind_actions.d.ts.map +1 -0
  14. package/editor/view/node-graph/actions/connection_bind_actions.js +39 -0
  15. package/editor/view/particles/effect/ParticleCodeEditorView.d.ts.map +1 -1
  16. package/editor/view/particles/effect/ParticleCodeEditorView.js +4 -3
  17. package/editor/view/particles/effect/ParticleCurveEditorView.d.ts +20 -0
  18. package/editor/view/particles/effect/ParticleCurveEditorView.d.ts.map +1 -0
  19. package/editor/view/particles/effect/ParticleCurveEditorView.js +574 -0
  20. package/editor/view/particles/effect/ParticleEmitterInspectorView.d.ts.map +1 -1
  21. package/editor/view/particles/effect/ParticleEmitterInspectorView.js +27 -1
  22. package/editor/view/particles/effect/ParticleGradientEditorView.d.ts +24 -0
  23. package/editor/view/particles/effect/ParticleGradientEditorView.d.ts.map +1 -0
  24. package/editor/view/particles/effect/ParticleGradientEditorView.js +472 -0
  25. package/editor/view/particles/effect/ParticleGraphEditorView.d.ts +5 -0
  26. package/editor/view/particles/effect/ParticleGraphEditorView.d.ts.map +1 -1
  27. package/editor/view/particles/effect/ParticleGraphEditorView.js +61 -31
  28. package/editor/view/particles/effect/ParticleNodeParametersView.d.ts.map +1 -1
  29. package/editor/view/particles/effect/ParticleNodeParametersView.js +33 -0
  30. package/editor/view/particles/effect/particle-editor.css +123 -35
  31. package/package.json +1 -1
  32. package/src/core/binary/allocator/OffsetAllocator.d.ts +25 -16
  33. package/src/core/binary/allocator/OffsetAllocator.d.ts.map +1 -1
  34. package/src/core/binary/allocator/OffsetAllocator.js +10 -1
  35. package/src/core/collection/array/typed/float32_array_hash.d.ts +21 -0
  36. package/src/core/collection/array/typed/float32_array_hash.d.ts.map +1 -0
  37. package/src/core/collection/array/typed/float32_array_hash.js +38 -0
  38. package/src/core/graph/csr/CSRGraph.d.ts +8 -1
  39. package/src/core/graph/csr/CSRGraph.d.ts.map +1 -1
  40. package/src/core/graph/csr/CSRGraph.js +14 -6
  41. package/src/core/model/node-graph/visual/layout/LayoutProblem.d.ts +24 -0
  42. package/src/core/model/node-graph/visual/layout/LayoutProblem.d.ts.map +1 -1
  43. package/src/core/model/node-graph/visual/layout/LayoutProblem.js +27 -0
  44. package/src/core/model/node-graph/visual/layout/NodeGraphLayoutOptions.d.ts +26 -0
  45. package/src/core/model/node-graph/visual/layout/NodeGraphLayoutOptions.d.ts.map +1 -1
  46. package/src/core/model/node-graph/visual/layout/NodeGraphLayoutOptions.js +28 -0
  47. package/src/core/model/node-graph/visual/layout/RouteGrid.d.ts +92 -3
  48. package/src/core/model/node-graph/visual/layout/RouteGrid.d.ts.map +1 -1
  49. package/src/core/model/node-graph/visual/layout/RouteGrid.js +405 -242
  50. package/src/core/model/node-graph/visual/layout/RouteSearch.d.ts +50 -5
  51. package/src/core/model/node-graph/visual/layout/RouteSearch.d.ts.map +1 -1
  52. package/src/core/model/node-graph/visual/layout/RouteSearch.js +160 -24
  53. package/src/core/model/node-graph/visual/layout/RouteSet.d.ts +7 -0
  54. package/src/core/model/node-graph/visual/layout/RouteSet.d.ts.map +1 -1
  55. package/src/core/model/node-graph/visual/layout/RouteSet.js +8 -0
  56. package/src/core/model/node-graph/visual/layout/layout_assign_coordinates.js +9 -3
  57. package/src/core/model/node-graph/visual/layout/layout_build_problem.d.ts.map +1 -1
  58. package/src/core/model/node-graph/visual/layout/layout_build_problem.js +7 -0
  59. package/src/core/model/node-graph/visual/layout/layout_insert_lanes.d.ts +9 -3
  60. package/src/core/model/node-graph/visual/layout/layout_insert_lanes.d.ts.map +1 -1
  61. package/src/core/model/node-graph/visual/layout/layout_insert_lanes.js +17 -3
  62. package/src/core/model/node-graph/visual/layout/layout_node_graph.d.ts +9 -6
  63. package/src/core/model/node-graph/visual/layout/layout_node_graph.d.ts.map +1 -1
  64. package/src/core/model/node-graph/visual/layout/layout_node_graph.js +49 -7
  65. package/src/core/model/node-graph/visual/layout/layout_order_layers.d.ts +11 -1
  66. package/src/core/model/node-graph/visual/layout/layout_order_layers.d.ts.map +1 -1
  67. package/src/core/model/node-graph/visual/layout/layout_order_layers.js +135 -16
  68. package/src/core/model/node-graph/visual/layout/route_connections.d.ts +29 -0
  69. package/src/core/model/node-graph/visual/layout/route_connections.d.ts.map +1 -1
  70. package/src/core/model/node-graph/visual/layout/route_connections.js +716 -309
  71. package/src/core/model/node-graph/visual/layout/route_grid_build.d.ts +3 -2
  72. package/src/core/model/node-graph/visual/layout/route_grid_build.d.ts.map +1 -1
  73. package/src/core/model/node-graph/visual/layout/route_grid_build.js +7 -15
  74. package/src/core/model/node-graph/visual/layout/route_nudge.d.ts +6 -0
  75. package/src/core/model/node-graph/visual/layout/route_nudge.d.ts.map +1 -1
  76. package/src/core/model/node-graph/visual/layout/route_nudge.js +42 -13
  77. package/src/engine/animation/AnimationUtils.js +246 -246
  78. package/src/engine/animation/Animations.js +74 -74
  79. package/src/engine/control/first-person/FirstPersonPlayerControllerSystem.js +2078 -2078
  80. package/src/engine/ecs/EventType.d.ts +0 -1
  81. package/src/engine/ecs/EventType.js +1 -26
  82. package/src/engine/ecs/ik/ik_write_local_rotation.d.ts +1 -1
  83. package/src/engine/ecs/ik/ik_write_local_rotation.d.ts.map +1 -1
  84. package/src/engine/ecs/ik/ik_write_local_rotation.js +3 -7
  85. package/src/engine/ecs/parent/EntityNode.d.ts.map +1 -1
  86. package/src/engine/ecs/parent/EntityNode.js +4 -9
  87. package/src/engine/ecs/terrain/ecs/cling/ClingToTerrainSystem.d.ts.map +1 -1
  88. package/src/engine/ecs/terrain/ecs/cling/ClingToTerrainSystem.js +360 -364
  89. package/src/engine/ecs/transform/TRANSFORM64_EVENT_CHANGE.d.ts +41 -0
  90. package/src/engine/ecs/transform/TRANSFORM64_EVENT_CHANGE.d.ts.map +1 -0
  91. package/src/engine/ecs/transform/TRANSFORM64_EVENT_CHANGE.js +40 -0
  92. package/src/engine/ecs/transform/TRANSFORM64_MIGRATION_PLAN_2026_09_04.md +8 -0
  93. package/src/engine/ecs/transform/t64_announce_change.d.ts +10 -7
  94. package/src/engine/ecs/transform/t64_announce_change.d.ts.map +1 -1
  95. package/src/engine/ecs/transform/t64_announce_change.js +12 -12
  96. package/src/engine/ecs/transform-attachment/TRANSFORM_ATTACHMENT_EVENT_CHANGE.d.ts +30 -0
  97. package/src/engine/ecs/transform-attachment/TRANSFORM_ATTACHMENT_EVENT_CHANGE.d.ts.map +1 -0
  98. package/src/engine/ecs/transform-attachment/TRANSFORM_ATTACHMENT_EVENT_CHANGE.js +29 -0
  99. package/src/engine/ecs/transform-attachment/TransformAttachmentSystem.d.ts.map +1 -1
  100. package/src/engine/ecs/transform-attachment/TransformAttachmentSystem.js +13 -21
  101. package/src/engine/graphics/ecs/sprite/SpriteSystemPE.d.ts.map +1 -1
  102. package/src/engine/graphics/ecs/sprite/SpriteSystemPE.js +4 -8
  103. package/src/engine/graphics3/LightSystem.d.ts.map +1 -1
  104. package/src/engine/graphics3/LightSystem.js +4 -8
  105. package/src/engine/graphics3/MeshSystem.d.ts.map +1 -1
  106. package/src/engine/graphics3/MeshSystem.js +9 -19
  107. package/src/engine/graphics3/ParticleEmitterSystem.d.ts.map +1 -1
  108. package/src/engine/graphics3/ParticleEmitterSystem.js +4 -8
  109. package/src/engine/graphics3/ShadedGeometrySystem.d.ts.map +1 -1
  110. package/src/engine/graphics3/ShadedGeometrySystem.js +4 -10
  111. package/src/engine/grid/transform2grid/Transform2GridPositionSystem.d.ts +1 -1
  112. package/src/engine/grid/transform2grid/Transform2GridPositionSystem.d.ts.map +1 -1
  113. package/src/engine/grid/transform2grid/Transform2GridPositionSystem.js +4 -8
  114. package/src/engine/intelligence/behavior/ecs/OrbitingBehavior.js +218 -218
  115. package/src/engine/physics/ecs/PhysicsSystem.d.ts.map +1 -1
  116. package/src/engine/physics/ecs/PhysicsSystem.js +2 -5
  117. package/src/engine/sound/ecs/SoundListenerSystem.d.ts.map +1 -1
  118. package/src/engine/sound/ecs/SoundListenerSystem.js +6 -8
  119. package/src/engine/sound/simulation/ecs/AcousticSimulationSystem.d.ts +0 -4
  120. package/src/engine/sound/simulation/ecs/AcousticSimulationSystem.d.ts.map +1 -1
  121. package/src/engine/sound/simulation/ecs/AcousticSimulationSystem.js +5 -11
  122. package/src/shade/playground/particle_editor/README.md +43 -2
  123. package/src/shade/playground/particle_system/particle_prototype.d.ts.map +1 -1
  124. package/src/shade/playground/particle_system/particle_prototype.js +4 -5
  125. package/src/shade/playground/particle_system/particle_scene.js +4 -4
  126. package/src/shade/renderer/Renderer.d.ts.map +1 -1
  127. package/src/shade/renderer/Renderer.js +13 -1
  128. package/src/shade/renderer/particles/DESIGN.md +104 -19
  129. package/src/shade/renderer/particles/GPUParticleSystem.d.ts +64 -50
  130. package/src/shade/renderer/particles/GPUParticleSystem.d.ts.map +1 -1
  131. package/src/shade/renderer/particles/GPUParticleSystem.js +176 -78
  132. package/src/shade/renderer/particles/ParticleConstants.d.ts +59 -23
  133. package/src/shade/renderer/particles/ParticleConstants.d.ts.map +1 -1
  134. package/src/shade/renderer/particles/ParticleConstants.js +66 -23
  135. package/src/shade/renderer/particles/ParticleRenderMode.d.ts +19 -0
  136. package/src/shade/renderer/particles/ParticleRenderMode.d.ts.map +1 -0
  137. package/src/shade/renderer/particles/ParticleRenderMode.js +33 -0
  138. package/src/shade/renderer/particles/data/PARTICLE_EMITTER_STRUCT.d.ts.map +1 -1
  139. package/src/shade/renderer/particles/data/PARTICLE_EMITTER_STRUCT.js +167 -166
  140. package/src/shade/renderer/particles/data/particle_emitter_record.d.ts +37 -0
  141. package/src/shade/renderer/particles/data/particle_emitter_record.d.ts.map +1 -0
  142. package/src/shade/renderer/particles/data/particle_emitter_record.js +109 -0
  143. package/src/shade/renderer/particles/graph/ParticleGroupBuilder.d.ts +3 -3
  144. package/src/shade/renderer/particles/graph/ParticleGroupBuilder.js +303 -303
  145. package/src/shade/renderer/particles/graph/ParticleNodeDescription.d.ts +18 -0
  146. package/src/shade/renderer/particles/graph/ParticleNodeDescription.d.ts.map +1 -1
  147. package/src/shade/renderer/particles/graph/ParticleNodeDescription.js +152 -133
  148. package/src/shade/renderer/particles/graph/ParticleNodeRegistry.d.ts +0 -11
  149. package/src/shade/renderer/particles/graph/ParticleNodeRegistry.d.ts.map +1 -1
  150. package/src/shade/renderer/particles/graph/ParticleNodeRegistry.js +720 -621
  151. package/src/shade/renderer/particles/graph/compile_particle_graph.d.ts.map +1 -1
  152. package/src/shade/renderer/particles/graph/compile_particle_graph.js +8 -3
  153. package/src/shade/renderer/particles/graph/flatten_particle_graph.d.ts.map +1 -1
  154. package/src/shade/renderer/particles/graph/flatten_particle_graph.js +244 -213
  155. package/src/shade/renderer/particles/graph/groups/particle_builtin_groups.d.ts.map +1 -1
  156. package/src/shade/renderer/particles/graph/groups/particle_builtin_groups.js +6 -0
  157. package/src/shade/renderer/particles/graph/groups/particle_groups_geometry.d.ts.map +1 -1
  158. package/src/shade/renderer/particles/graph/groups/particle_groups_geometry.js +294 -319
  159. package/src/shade/renderer/particles/graph/groups/particle_groups_noise.d.ts.map +1 -1
  160. package/src/shade/renderer/particles/graph/groups/particle_groups_noise.js +524 -517
  161. package/src/shade/renderer/particles/graph/groups/particle_groups_psrdnoise.d.ts +22 -0
  162. package/src/shade/renderer/particles/graph/groups/particle_groups_psrdnoise.d.ts.map +1 -0
  163. package/src/shade/renderer/particles/graph/groups/particle_groups_psrdnoise.js +517 -0
  164. package/src/shade/renderer/particles/graph/groups/simplex_reference.d.ts.map +1 -1
  165. package/src/shade/renderer/particles/graph/groups/simplex_reference.js +185 -159
  166. package/src/shade/renderer/particles/graph/make_particle_group.d.ts.map +1 -1
  167. package/src/shade/renderer/particles/graph/make_particle_group.js +2 -20
  168. package/src/shade/renderer/particles/graph/particle_compare_ops.d.ts +17 -0
  169. package/src/shade/renderer/particles/graph/particle_compare_ops.d.ts.map +1 -0
  170. package/src/shade/renderer/particles/graph/particle_compare_ops.js +22 -0
  171. package/src/shade/renderer/particles/graph/particle_graph_diagnostic.d.ts +28 -8
  172. package/src/shade/renderer/particles/graph/particle_graph_diagnostic.d.ts.map +1 -1
  173. package/src/shade/renderer/particles/graph/particle_graph_diagnostic.js +49 -25
  174. package/src/shade/renderer/particles/graph/particle_node_parameters.d.ts +40 -0
  175. package/src/shade/renderer/particles/graph/particle_node_parameters.d.ts.map +1 -1
  176. package/src/shade/renderer/particles/graph/particle_node_parameters.js +312 -234
  177. package/src/shade/renderer/particles/graph/particle_node_presentation.d.ts.map +1 -1
  178. package/src/shade/renderer/particles/graph/particle_node_presentation.js +59 -3
  179. package/src/shade/renderer/particles/graph/particle_ramp.d.ts +230 -0
  180. package/src/shade/renderer/particles/graph/particle_ramp.d.ts.map +1 -0
  181. package/src/shade/renderer/particles/graph/particle_ramp.js +403 -0
  182. package/src/shade/renderer/particles/graph/validate_particle_graph.d.ts +7 -1
  183. package/src/shade/renderer/particles/graph/validate_particle_graph.d.ts.map +1 -1
  184. package/src/shade/renderer/particles/graph/validate_particle_graph.js +66 -10
  185. package/src/shade/renderer/particles/graph_particles.d.ts +23 -69
  186. package/src/shade/renderer/particles/graph_particles.d.ts.map +1 -1
  187. package/src/shade/renderer/particles/graph_particles.js +105 -262
  188. package/src/shade/renderer/particles/graph_particles_avboit.d.ts.map +1 -1
  189. package/src/shade/renderer/particles/graph_particles_avboit.js +3 -2
  190. package/src/shade/renderer/particles/graph_particles_billboard.d.ts +37 -0
  191. package/src/shade/renderer/particles/graph_particles_billboard.d.ts.map +1 -0
  192. package/src/shade/renderer/particles/graph_particles_billboard.js +93 -0
  193. package/src/shade/renderer/particles/isa/InstructionStream.d.ts +51 -22
  194. package/src/shade/renderer/particles/isa/InstructionStream.d.ts.map +1 -1
  195. package/src/shade/renderer/particles/isa/InstructionStream.js +98 -38
  196. package/src/shade/renderer/particles/isa/ParticleProgram.d.ts +49 -8
  197. package/src/shade/renderer/particles/isa/ParticleProgram.d.ts.map +1 -1
  198. package/src/shade/renderer/particles/isa/ParticleProgram.js +95 -150
  199. package/src/shade/renderer/particles/isa/ParticleVMISA.d.ts +306 -64
  200. package/src/shade/renderer/particles/isa/ParticleVMISA.d.ts.map +1 -1
  201. package/src/shade/renderer/particles/isa/ParticleVMISA.js +505 -136
  202. package/src/shade/renderer/particles/isa/particle_assembly.d.ts +36 -12
  203. package/src/shade/renderer/particles/isa/particle_assembly.d.ts.map +1 -1
  204. package/src/shade/renderer/particles/isa/particle_assembly.js +354 -139
  205. package/src/shade/renderer/particles/isa/validate_particle_program.d.ts +9 -0
  206. package/src/shade/renderer/particles/isa/validate_particle_program.d.ts.map +1 -0
  207. package/src/shade/renderer/particles/isa/validate_particle_program.js +128 -0
  208. package/src/shade/renderer/particles/layout/ParticleLayout.d.ts +23 -0
  209. package/src/shade/renderer/particles/layout/ParticleLayout.d.ts.map +1 -1
  210. package/src/shade/renderer/particles/layout/ParticleLayout.js +68 -0
  211. package/src/shade/renderer/particles/optimizer/dag/optimize_particle_program_vector.d.ts +77 -0
  212. package/src/shade/renderer/particles/optimizer/dag/optimize_particle_program_vector.d.ts.map +1 -0
  213. package/src/shade/renderer/particles/optimizer/dag/optimize_particle_program_vector.js +219 -0
  214. package/src/shade/renderer/particles/optimizer/dag/particle_vector_extract.d.ts +83 -0
  215. package/src/shade/renderer/particles/optimizer/dag/particle_vector_extract.d.ts.map +1 -0
  216. package/src/shade/renderer/particles/optimizer/dag/particle_vector_extract.js +283 -0
  217. package/src/shade/renderer/particles/optimizer/dag/particle_vector_graph.d.ts +133 -0
  218. package/src/shade/renderer/particles/optimizer/dag/particle_vector_graph.d.ts.map +1 -0
  219. package/src/shade/renderer/particles/optimizer/dag/particle_vector_graph.js +334 -0
  220. package/src/shade/renderer/particles/optimizer/dag/particle_vector_groups.d.ts +117 -0
  221. package/src/shade/renderer/particles/optimizer/dag/particle_vector_groups.d.ts.map +1 -0
  222. package/src/shade/renderer/particles/optimizer/dag/particle_vector_groups.js +70 -0
  223. package/src/shade/renderer/particles/optimizer/dag/particle_vector_lift.d.ts +97 -0
  224. package/src/shade/renderer/particles/optimizer/dag/particle_vector_lift.d.ts.map +1 -0
  225. package/src/shade/renderer/particles/optimizer/dag/particle_vector_lift.js +462 -0
  226. package/src/shade/renderer/particles/optimizer/dag/particle_vector_lower.d.ts +116 -0
  227. package/src/shade/renderer/particles/optimizer/dag/particle_vector_lower.d.ts.map +1 -0
  228. package/src/shade/renderer/particles/optimizer/dag/particle_vector_lower.js +687 -0
  229. package/src/shade/renderer/particles/optimizer/dag/particle_vector_pack.d.ts +57 -0
  230. package/src/shade/renderer/particles/optimizer/dag/particle_vector_pack.d.ts.map +1 -0
  231. package/src/shade/renderer/particles/optimizer/dag/particle_vector_pack.js +860 -0
  232. package/src/shade/renderer/particles/optimizer/dag/particle_vector_rules.d.ts +115 -0
  233. package/src/shade/renderer/particles/optimizer/dag/particle_vector_rules.d.ts.map +1 -0
  234. package/src/shade/renderer/particles/optimizer/dag/particle_vector_rules.js +264 -0
  235. package/src/shade/renderer/particles/optimizer/optimize_particle_program.d.ts +81 -42
  236. package/src/shade/renderer/particles/optimizer/optimize_particle_program.d.ts.map +1 -1
  237. package/src/shade/renderer/particles/optimizer/optimize_particle_program.js +477 -478
  238. package/src/shade/renderer/particles/optimizer/particle_integer_bounds.d.ts +100 -0
  239. package/src/shade/renderer/particles/optimizer/particle_integer_bounds.d.ts.map +1 -0
  240. package/src/shade/renderer/particles/optimizer/particle_integer_bounds.js +236 -0
  241. package/src/shade/renderer/particles/optimizer/particle_program_analysis.d.ts +139 -59
  242. package/src/shade/renderer/particles/optimizer/particle_program_analysis.d.ts.map +1 -1
  243. package/src/shade/renderer/particles/optimizer/particle_program_analysis.js +764 -647
  244. package/src/shade/renderer/particles/optimizer/particle_program_equivalence.d.ts +40 -7
  245. package/src/shade/renderer/particles/optimizer/particle_program_equivalence.d.ts.map +1 -1
  246. package/src/shade/renderer/particles/optimizer/particle_program_equivalence.js +376 -213
  247. package/src/shade/renderer/particles/optimizer/particle_program_fuzz.d.ts +30 -3
  248. package/src/shade/renderer/particles/optimizer/particle_program_fuzz.d.ts.map +1 -1
  249. package/src/shade/renderer/particles/optimizer/particle_program_fuzz.js +337 -223
  250. package/src/shade/renderer/particles/optimizer/particle_vm_semantics.d.ts +24 -38
  251. package/src/shade/renderer/particles/optimizer/particle_vm_semantics.d.ts.map +1 -1
  252. package/src/shade/renderer/particles/optimizer/particle_vm_semantics.js +166 -206
  253. package/src/shade/renderer/particles/optimizer/pass_allocate_registers.d.ts +99 -0
  254. package/src/shade/renderer/particles/optimizer/pass_allocate_registers.d.ts.map +1 -0
  255. package/src/shade/renderer/particles/optimizer/pass_allocate_registers.js +313 -0
  256. package/src/shade/renderer/particles/optimizer/pass_dedup_constants.d.ts +3 -2
  257. package/src/shade/renderer/particles/optimizer/pass_dedup_constants.d.ts.map +1 -1
  258. package/src/shade/renderer/particles/optimizer/pass_dedup_constants.js +198 -197
  259. package/src/shade/renderer/particles/optimizer/pass_eliminate_dead_code.d.ts.map +1 -1
  260. package/src/shade/renderer/particles/optimizer/pass_fold_constants.d.ts +19 -0
  261. package/src/shade/renderer/particles/optimizer/pass_fold_constants.d.ts.map +1 -1
  262. package/src/shade/renderer/particles/optimizer/pass_fold_constants.js +678 -561
  263. package/src/shade/renderer/particles/optimizer/pass_inline_constants.d.ts +22 -0
  264. package/src/shade/renderer/particles/optimizer/pass_inline_constants.d.ts.map +1 -0
  265. package/src/shade/renderer/particles/optimizer/pass_inline_constants.js +221 -0
  266. package/src/shade/renderer/particles/optimizer/pass_narrow_widths.d.ts.map +1 -1
  267. package/src/shade/renderer/particles/optimizer/pass_narrow_widths.js +63 -72
  268. package/src/shade/renderer/particles/optimizer/pass_pack_registers.d.ts.map +1 -1
  269. package/src/shade/renderer/particles/optimizer/pass_pack_registers.js +87 -86
  270. package/src/shade/renderer/particles/optimizer/pass_peephole.d.ts.map +1 -1
  271. package/src/shade/renderer/particles/optimizer/pass_peephole.js +392 -271
  272. package/src/shade/renderer/particles/optimizer/pass_propagate_copies.d.ts.map +1 -1
  273. package/src/shade/renderer/particles/optimizer/pass_propagate_copies.js +361 -268
  274. package/src/shade/renderer/particles/optimizer/pass_schedule.d.ts +4 -0
  275. package/src/shade/renderer/particles/optimizer/pass_schedule.d.ts.map +1 -0
  276. package/src/shade/renderer/particles/optimizer/pass_schedule.js +244 -0
  277. package/src/shade/renderer/particles/optimizer/pass_share_subexpressions.d.ts.map +1 -1
  278. package/src/shade/renderer/particles/optimizer/pass_share_subexpressions.js +154 -151
  279. package/src/shade/renderer/particles/particle_test_fixtures.d.ts +20 -0
  280. package/src/shade/renderer/particles/particle_test_fixtures.d.ts.map +1 -1
  281. package/src/shade/renderer/particles/particle_test_fixtures.js +229 -203
  282. package/src/shade/renderer/particles/runtime/EmitterRegistry.d.ts +99 -25
  283. package/src/shade/renderer/particles/runtime/EmitterRegistry.d.ts.map +1 -1
  284. package/src/shade/renderer/particles/runtime/EmitterRegistry.js +438 -286
  285. package/src/shade/renderer/particles/runtime/GPUParticleEmitterContext.d.ts +109 -0
  286. package/src/shade/renderer/particles/runtime/GPUParticleEmitterContext.d.ts.map +1 -0
  287. package/src/shade/renderer/particles/runtime/GPUParticleEmitterContext.js +127 -0
  288. package/src/shade/renderer/particles/runtime/ParticleEmitter.d.ts +87 -102
  289. package/src/shade/renderer/particles/runtime/ParticleEmitter.d.ts.map +1 -1
  290. package/src/shade/renderer/particles/runtime/ParticleEmitter.js +184 -163
  291. package/src/shade/renderer/particles/runtime/ProgramArena.d.ts +26 -0
  292. package/src/shade/renderer/particles/runtime/ProgramArena.d.ts.map +1 -1
  293. package/src/shade/renderer/particles/runtime/ProgramHeap.d.ts +130 -0
  294. package/src/shade/renderer/particles/runtime/ProgramHeap.d.ts.map +1 -0
  295. package/src/shade/renderer/particles/runtime/ProgramHeap.js +595 -0
  296. package/src/shade/renderer/particles/runtime/ProgramPlacement.d.ts +91 -0
  297. package/src/shade/renderer/particles/runtime/ProgramPlacement.d.ts.map +1 -0
  298. package/src/shade/renderer/particles/runtime/ProgramPlacement.js +106 -0
  299. package/src/shade/renderer/particles/runtime/create_particle_effect.d.ts +5 -2
  300. package/src/shade/renderer/particles/runtime/create_particle_effect.d.ts.map +1 -1
  301. package/src/shade/renderer/particles/runtime/create_particle_effect.js +22 -19
  302. package/src/shade/renderer/particles/shaders/chunk_particle_emit_step.d.ts +28 -0
  303. package/src/shade/renderer/particles/shaders/chunk_particle_emit_step.d.ts.map +1 -0
  304. package/src/shade/renderer/particles/shaders/chunk_particle_emit_step.js +136 -0
  305. package/src/shade/renderer/particles/shaders/chunk_particle_simulate_step.d.ts +35 -0
  306. package/src/shade/renderer/particles/shaders/chunk_particle_simulate_step.d.ts.map +1 -0
  307. package/src/shade/renderer/particles/shaders/chunk_particle_simulate_step.js +133 -0
  308. package/src/shade/renderer/particles/shaders/shader_particle_emit.d.ts +18 -9
  309. package/src/shade/renderer/particles/shaders/shader_particle_emit.d.ts.map +1 -1
  310. package/src/shade/renderer/particles/shaders/shader_particle_emit.js +20 -80
  311. package/src/shade/renderer/particles/shaders/shader_particle_emit_wide.d.ts +33 -0
  312. package/src/shade/renderer/particles/shaders/shader_particle_emit_wide.d.ts.map +1 -0
  313. package/src/shade/renderer/particles/shaders/shader_particle_emit_wide.js +114 -0
  314. package/src/shade/renderer/particles/shaders/shader_particle_simulate.d.ts +8 -0
  315. package/src/shade/renderer/particles/shaders/shader_particle_simulate.d.ts.map +1 -1
  316. package/src/shade/renderer/particles/shaders/shader_particle_simulate.js +33 -101
  317. package/src/shade/renderer/particles/shaders/shader_particle_simulate_wide.d.ts +45 -0
  318. package/src/shade/renderer/particles/shaders/shader_particle_simulate_wide.d.ts.map +1 -0
  319. package/src/shade/renderer/particles/shaders/shader_particle_simulate_wide.js +123 -0
  320. package/src/shade/renderer/particles/sort/graph_particle_sort.d.ts +51 -0
  321. package/src/shade/renderer/particles/sort/graph_particle_sort.d.ts.map +1 -0
  322. package/src/shade/renderer/particles/sort/graph_particle_sort.js +120 -0
  323. package/src/shade/renderer/particles/vm/PARTICLE_VM_CONTEXT_STRUCT.d.ts +6 -0
  324. package/src/shade/renderer/particles/vm/PARTICLE_VM_CONTEXT_STRUCT.d.ts.map +1 -0
  325. package/src/shade/renderer/particles/vm/PARTICLE_VM_CONTEXT_STRUCT.js +16 -0
  326. package/src/shade/renderer/particles/vm/ParticleVMReference.d.ts +4 -1
  327. package/src/shade/renderer/particles/vm/ParticleVMReference.d.ts.map +1 -1
  328. package/src/shade/renderer/particles/vm/ParticleVMReference.js +261 -140
  329. package/src/shade/renderer/particles/vm/chunk_particle_vm.d.ts.map +1 -1
  330. package/src/shade/renderer/particles/vm/chunk_particle_vm.js +217 -255
  331. package/src/shade/renderer/particles/vm/chunk_particle_vm_registers_fast.d.ts +43 -0
  332. package/src/shade/renderer/particles/vm/chunk_particle_vm_registers_fast.d.ts.map +1 -0
  333. package/src/shade/renderer/particles/vm/chunk_particle_vm_registers_fast.js +55 -0
  334. package/src/shade/renderer/particles/vm/chunk_particle_vm_registers_wide.d.ts +62 -0
  335. package/src/shade/renderer/particles/vm/chunk_particle_vm_registers_wide.d.ts.map +1 -0
  336. package/src/shade/renderer/particles/vm/chunk_particle_vm_registers_wide.js +86 -0
  337. package/src/shade/renderer/shader/chunk/math/chunk_mod_v3f.d.ts +22 -0
  338. package/src/shade/renderer/shader/chunk/math/chunk_mod_v3f.d.ts.map +1 -0
  339. package/src/shade/renderer/shader/chunk/math/chunk_mod_v3f.js +32 -0
  340. package/src/shade/renderer/shader/chunk/math/chunk_mod_v4f.d.ts +9 -0
  341. package/src/shade/renderer/shader/chunk/math/chunk_mod_v4f.d.ts.map +1 -0
  342. package/src/shade/renderer/shader/chunk/math/chunk_mod_v4f.js +19 -0
  343. package/src/shade/renderer/shader/chunk/noise/psrdnoise/README.md +65 -0
  344. package/src/shade/renderer/shader/chunk/noise/psrdnoise/chunk_psrdnoise2.d.ts +24 -0
  345. package/src/shade/renderer/shader/chunk/noise/psrdnoise/chunk_psrdnoise2.d.ts.map +1 -0
  346. package/src/shade/renderer/shader/chunk/noise/psrdnoise/chunk_psrdnoise2.js +83 -0
  347. package/src/shade/renderer/shader/chunk/noise/psrdnoise/chunk_psrdnoise2_hash.d.ts +25 -0
  348. package/src/shade/renderer/shader/chunk/noise/psrdnoise/chunk_psrdnoise2_hash.d.ts.map +1 -0
  349. package/src/shade/renderer/shader/chunk/noise/psrdnoise/chunk_psrdnoise2_hash.js +42 -0
  350. package/src/shade/renderer/shader/chunk/noise/psrdnoise/chunk_psrdnoise2_kernel.d.ts +31 -0
  351. package/src/shade/renderer/shader/chunk/noise/psrdnoise/chunk_psrdnoise2_kernel.d.ts.map +1 -0
  352. package/src/shade/renderer/shader/chunk/noise/psrdnoise/chunk_psrdnoise2_kernel.js +80 -0
  353. package/src/shade/renderer/shader/chunk/noise/psrdnoise/chunk_psrdnoise3.d.ts +26 -0
  354. package/src/shade/renderer/shader/chunk/noise/psrdnoise/chunk_psrdnoise3.d.ts.map +1 -0
  355. package/src/shade/renderer/shader/chunk/noise/psrdnoise/chunk_psrdnoise3.js +109 -0
  356. package/src/shade/renderer/shader/chunk/noise/psrdnoise/chunk_psrdnoise3_kernel.d.ts +38 -0
  357. package/src/shade/renderer/shader/chunk/noise/psrdnoise/chunk_psrdnoise3_kernel.d.ts.map +1 -0
  358. package/src/shade/renderer/shader/chunk/noise/psrdnoise/chunk_psrdnoise3_kernel.js +129 -0
  359. package/src/shade/renderer/shader/chunk/noise/psrdnoise/chunk_psrdnoise3_permute.d.ts +21 -0
  360. package/src/shade/renderer/shader/chunk/noise/psrdnoise/chunk_psrdnoise3_permute.d.ts.map +1 -0
  361. package/src/shade/renderer/shader/chunk/noise/psrdnoise/chunk_psrdnoise3_permute.js +35 -0
  362. package/src/shade/renderer/shader/chunk/noise/psrdnoise/chunk_psrdnoise3_skew.d.ts +19 -0
  363. package/src/shade/renderer/shader/chunk/noise/psrdnoise/chunk_psrdnoise3_skew.d.ts.map +1 -0
  364. package/src/shade/renderer/shader/chunk/noise/psrdnoise/chunk_psrdnoise3_skew.js +28 -0
  365. package/src/shade/renderer/shader/chunk/noise/psrdnoise/chunk_psrdnoise3_unskew.d.ts +13 -0
  366. package/src/shade/renderer/shader/chunk/noise/psrdnoise/chunk_psrdnoise3_unskew.d.ts.map +1 -0
  367. package/src/shade/renderer/shader/chunk/noise/psrdnoise/chunk_psrdnoise3_unskew.js +22 -0
  368. package/src/shade/renderer/shader/chunk/noise/psrdnoise/chunk_srdnoise2.d.ts +22 -0
  369. package/src/shade/renderer/shader/chunk/noise/psrdnoise/chunk_srdnoise2.d.ts.map +1 -0
  370. package/src/shade/renderer/shader/chunk/noise/psrdnoise/chunk_srdnoise2.js +59 -0
  371. package/src/shade/renderer/shader/chunk/noise/psrdnoise/chunk_srdnoise3.d.ts +23 -0
  372. package/src/shade/renderer/shader/chunk/noise/psrdnoise/chunk_srdnoise3.d.ts.map +1 -0
  373. package/src/shade/renderer/shader/chunk/noise/psrdnoise/chunk_srdnoise3.js +74 -0
  374. package/src/shade/wgsl/emulator/ComputeShaderEmulator.d.ts +34 -1
  375. package/src/shade/wgsl/emulator/ComputeShaderEmulator.d.ts.map +1 -1
  376. package/src/shade/wgsl/emulator/ComputeShaderEmulator.js +41 -1
  377. package/src/shade/wgsl/emulator/WGSLJavaScriptCompiler.d.ts +3 -2
  378. package/src/shade/wgsl/emulator/WGSLJavaScriptCompiler.d.ts.map +1 -1
  379. package/src/shade/wgsl/emulator/WGSLJavaScriptCompiler.js +49 -10
  380. package/src/view/minimap/dom/MinimapCameraView.d.ts.map +1 -1
  381. package/src/view/minimap/dom/MinimapCameraView.js +4 -9
  382. package/src/core/model/node-graph/visual/layout/BoxLayoutSpec.d.ts +0 -15
  383. package/src/core/model/node-graph/visual/layout/BoxLayoutSpec.d.ts.map +0 -1
  384. package/src/core/model/node-graph/visual/layout/ConnectedBoxLayouter.d.ts +0 -45
  385. package/src/core/model/node-graph/visual/layout/ConnectedBoxLayouter.d.ts.map +0 -1
  386. package/src/core/model/node-graph/visual/layout/ConnectionEndpointLayoutSpec.d.ts +0 -24
  387. package/src/core/model/node-graph/visual/layout/ConnectionEndpointLayoutSpec.d.ts.map +0 -1
  388. package/src/core/model/node-graph/visual/layout/ConnectionLayoutSpec.d.ts +0 -19
  389. package/src/core/model/node-graph/visual/layout/ConnectionLayoutSpec.d.ts.map +0 -1
  390. package/src/engine/ecs/transform/__probe.d.ts +0 -4
  391. package/src/engine/ecs/transform/__probe.d.ts.map +0 -1
  392. package/src/engine/ecs/util/hideEntityGracefully.d.ts +0 -9
  393. package/src/engine/ecs/util/hideEntityGracefully.d.ts.map +0 -1
  394. package/src/shade/renderer/buffer/table/gpu_database_emulator_image.d.ts +0 -27
  395. package/src/shade/renderer/buffer/table/gpu_database_emulator_image.d.ts.map +0 -1
  396. package/src/shade/renderer/particles/cull/chunk_particle_cull.d.ts +0 -14
  397. package/src/shade/renderer/particles/cull/chunk_particle_cull.d.ts.map +0 -1
  398. package/src/shade/renderer/particles/data/PARTICLE_EMITTER_LAYOUT.d.ts +0 -156
  399. package/src/shade/renderer/particles/data/PARTICLE_EMITTER_LAYOUT.d.ts.map +0 -1
  400. package/src/shade/renderer/particles/runtime/Emitter.d.ts +0 -219
  401. package/src/shade/renderer/particles/runtime/Emitter.d.ts.map +0 -1
  402. package/src/shade/renderer/particles/runtime/ParticleSpawnScheduler.d.ts +0 -77
  403. package/src/shade/renderer/particles/runtime/ParticleSpawnScheduler.d.ts.map +0 -1
  404. package/src/shade/renderer/particles/runtime/ProgramArena.js +0 -155
  405. package/src/shade/renderer/particles/runtime/emitter_database_image.d.ts +0 -15
  406. package/src/shade/renderer/particles/runtime/emitter_database_image.d.ts.map +0 -1
  407. package/src/shade/renderer/particles/runtime/spawn_request_encoding.d.ts +0 -34
  408. package/src/shade/renderer/particles/runtime/spawn_request_encoding.d.ts.map +0 -1
  409. package/src/shade/renderer/particles/shaders/chunk_particle_context.d.ts +0 -32
  410. package/src/shade/renderer/particles/shaders/chunk_particle_context.d.ts.map +0 -1
@@ -0,0 +1,115 @@
1
+ /**
2
+ * Constant folding, lane by lane.
3
+ *
4
+ * Every source a literal and an opcode whose two executors are obliged to agree on the bits, and the
5
+ * node is a vector of literals instead. A lane whose result is not finite refuses the whole fold
6
+ * rather than half of it — a partly-folded vector would need a pool run to say, which is a trade this
7
+ * does not make on its own.
8
+ *
9
+ * @param {ParticleVectorRuleOptions} options
10
+ * @returns {import("./particle_vector_graph.js").ParticleVectorRule}
11
+ */
12
+ export function rule_fold_constants(options: ParticleVectorRuleOptions): import("./particle_vector_graph.js").ParticleVectorRule;
13
+ /**
14
+ * Zero as an absorbing element, for the one opcode `PARTICLE_ZERO_ABSORBING_OPS` names — and only
15
+ * where the other side is unknown, since a product of two knowns is the number it actually is.
16
+ *
17
+ * Not bit-identical, and deliberately so; the argument is in `../pass_fold_constants.js`.
18
+ *
19
+ * @param {ParticleVectorRuleOptions} options
20
+ * @returns {import("./particle_vector_graph.js").ParticleVectorRule}
21
+ */
22
+ export function rule_absorb_zero(options: ParticleVectorRuleOptions): import("./particle_vector_graph.js").ParticleVectorRule;
23
+ /**
24
+ * @param {Partial<ParticleVectorRuleOptions>} [options]
25
+ * @returns {{rules: import("./particle_vector_graph.js").ParticleVectorRule[]}}
26
+ */
27
+ export function particle_vector_rules(options?: Partial<ParticleVectorRuleOptions>): {
28
+ rules: import("./particle_vector_graph.js").ParticleVectorRule[];
29
+ };
30
+ /**
31
+ * Whether every lane an operand reads holds a given literal — what an identity asks before it
32
+ * decides an instruction is a copy.
33
+ *
34
+ * @param {import("./particle_vector_graph.js").ParticleVectorGraph} graph
35
+ * @param {{value: number, pattern: number}} operand
36
+ * @param {number} width lanes the instruction reads of it
37
+ * @param {number} expected
38
+ * @returns {boolean}
39
+ */
40
+ export function operand_is(graph: import("./particle_vector_graph.js").ParticleVectorGraph, operand: {
41
+ value: number;
42
+ pattern: number;
43
+ }, width: number, expected: number): boolean;
44
+ /**
45
+ * The identities that hold for EVERY value a register can hold, as the operand each is a copy of.
46
+ *
47
+ * `x * 1`, `x / 1` and `x - (+0)` qualify. `x + 0` does not — `-0 + 0` is `+0` — and neither does
48
+ * `x * 0`. The line is `../pass_fold_constants.js`'s, and for its reason: the record is compared to
49
+ * the bit.
50
+ *
51
+ * @param {import("./particle_vector_graph.js").ParticleVectorGraph} graph
52
+ * @param {number} op
53
+ * @param {Array<{value: number, pattern: number}|null>} operands by source slot
54
+ * @param {number} width
55
+ * @returns {{value: number, pattern: number}|null} the operand the instruction merely copies
56
+ */
57
+ export function identity_of(graph: import("./particle_vector_graph.js").ParticleVectorGraph, op: number, operands: Array<{
58
+ value: number;
59
+ pattern: number;
60
+ } | null>, width: number): {
61
+ value: number;
62
+ pattern: number;
63
+ } | null;
64
+ /**
65
+ * Which lanes of an instruction merely copy an operand, when not all of them do.
66
+ *
67
+ * `colour * (1, 1, 1, 0.5)` is the shape a frontend emits for a fade, and three of its four lanes are
68
+ * `x * 1`. {@link identity_of} will not touch it, because the instruction as a whole is not a copy —
69
+ * but three quarters of it is, and those three lanes then store back to the very words they were
70
+ * loaded from, which is not a store at all. Peeling is what turns a four-lane multiply and a pool
71
+ * load into a one-lane multiply against an immediate.
72
+ *
73
+ * The identities are {@link identity_of}'s, asked one lane at a time; `SELECT` is here too, since a
74
+ * condition known in some lanes is a choice already made in those.
75
+ *
76
+ * @param {import("./particle_vector_graph.js").ParticleVectorGraph} graph
77
+ * @param {number} op
78
+ * @param {Array<{value: number, pattern: number}>} operands
79
+ * @param {number} width
80
+ * @returns {number[]|null} per lane, the operand it copies, or -1; null when no lane copies one
81
+ */
82
+ export function identity_lanes(graph: import("./particle_vector_graph.js").ParticleVectorGraph, op: number, operands: Array<{
83
+ value: number;
84
+ pattern: number;
85
+ }>, width: number): number[] | null;
86
+ /**
87
+ * The rewrites, over vectors.
88
+ *
89
+ * Only the ones that produce a VALUE live here. An identity — `x * 1` — does not: it produces a
90
+ * VIEW, the operand read through the swizzle it was already read through, and a view is not a node
91
+ * in this graph. So identities are recognised in `./particle_vector_lift.js`, where a view is exactly
92
+ * what an instruction's result can be, the same way a `MOV` is. That split is the vector graph's
93
+ * only real awkwardness and it is worth the price: it is the same reason a copy costs nothing here.
94
+ *
95
+ * The relaxations are the pass pipeline's, spelled the same way and argued where it argues them:
96
+ * `fold_multiply_by_zero` on, `fold_inexact` off.
97
+ */
98
+ /**
99
+ * @typedef {object} ParticleVectorRuleOptions
100
+ * @property {boolean} fold_inexact fold what the two executors may round apart
101
+ * @property {boolean} fold_multiply_by_zero a known zero on either side of a multiply gives `+0`
102
+ */
103
+ /** @type {Readonly<ParticleVectorRuleOptions>} */
104
+ export const PARTICLE_VECTOR_RULE_DEFAULTS: Readonly<ParticleVectorRuleOptions>;
105
+ export type ParticleVectorRuleOptions = {
106
+ /**
107
+ * fold what the two executors may round apart
108
+ */
109
+ fold_inexact: boolean;
110
+ /**
111
+ * a known zero on either side of a multiply gives `+0`
112
+ */
113
+ fold_multiply_by_zero: boolean;
114
+ };
115
+ //# sourceMappingURL=particle_vector_rules.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"particle_vector_rules.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/particles/optimizer/dag/particle_vector_rules.js"],"names":[],"mappings":"AA8BA;;;;;;;;;;GAUG;AACH,6CAHW,yBAAyB,GACvB,OAAO,4BAA4B,EAAE,kBAAkB,CAwCnE;AAED;;;;;;;;GAQG;AACH,0CAHW,yBAAyB,GACvB,OAAO,4BAA4B,EAAE,kBAAkB,CA6BnE;AAED;;;GAGG;AACH,gDAHW,QAAQ,yBAAyB,CAAC,GAChC;IAAC,KAAK,EAAE,OAAO,4BAA4B,EAAE,kBAAkB,EAAE,CAAA;CAAC,CAM9E;AAED;;;;;;;;;GASG;AACH,kCANW,OAAO,4BAA4B,EAAE,mBAAmB,WACxD;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAC,SAChC,MAAM,YACN,MAAM,GACJ,OAAO,CAiBnB;AAED;;;;;;;;;;;;GAYG;AACH,mCANW,OAAO,4BAA4B,EAAE,mBAAmB,MACxD,MAAM,YACN,MAAM;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAC,GAAC,IAAI,CAAC,SAC5C,MAAM,GACJ;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAC,GAAC,IAAI,CAuCjD;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,sCANW,OAAO,4BAA4B,EAAE,mBAAmB,MACxD,MAAM,YACN,MAAM;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAC,CAAC,SACvC,MAAM,GACJ,MAAM,EAAE,GAAC,IAAI,CAuCzB;AAlQD;;;;;;;;;;;GAWG;AAEH;;;;GAIG;AAEH,kDAAkD;AAClD,4CADW,SAAS,yBAAyB,CAAC,CAI3C;;;;;kBARW,OAAO;;;;2BACP,OAAO"}
@@ -0,0 +1,264 @@
1
+ import { VM_OP, swizzle_selector } from "../../isa/ParticleVMISA.js";
2
+ import { evaluate_particle_operation, PARTICLE_ZERO_ABSORBING_OPS } from "../pass_fold_constants.js";
3
+ import { vm_semantics_of } from "../particle_vm_semantics.js";
4
+ import { PV } from "./particle_vector_graph.js";
5
+
6
+ /**
7
+ * The rewrites, over vectors.
8
+ *
9
+ * Only the ones that produce a VALUE live here. An identity — `x * 1` — does not: it produces a
10
+ * VIEW, the operand read through the swizzle it was already read through, and a view is not a node
11
+ * in this graph. So identities are recognised in `./particle_vector_lift.js`, where a view is exactly
12
+ * what an instruction's result can be, the same way a `MOV` is. That split is the vector graph's
13
+ * only real awkwardness and it is worth the price: it is the same reason a copy costs nothing here.
14
+ *
15
+ * The relaxations are the pass pipeline's, spelled the same way and argued where it argues them:
16
+ * `fold_multiply_by_zero` on, `fold_inexact` off.
17
+ */
18
+
19
+ /**
20
+ * @typedef {object} ParticleVectorRuleOptions
21
+ * @property {boolean} fold_inexact fold what the two executors may round apart
22
+ * @property {boolean} fold_multiply_by_zero a known zero on either side of a multiply gives `+0`
23
+ */
24
+
25
+ /** @type {Readonly<ParticleVectorRuleOptions>} */
26
+ export const PARTICLE_VECTOR_RULE_DEFAULTS = Object.freeze({
27
+ fold_inexact: false,
28
+ fold_multiply_by_zero: true,
29
+ });
30
+
31
+ /**
32
+ * Constant folding, lane by lane.
33
+ *
34
+ * Every source a literal and an opcode whose two executors are obliged to agree on the bits, and the
35
+ * node is a vector of literals instead. A lane whose result is not finite refuses the whole fold
36
+ * rather than half of it — a partly-folded vector would need a pool run to say, which is a trade this
37
+ * does not make on its own.
38
+ *
39
+ * @param {ParticleVectorRuleOptions} options
40
+ * @returns {import("./particle_vector_graph.js").ParticleVectorRule}
41
+ */
42
+ export function rule_fold_constants(options) {
43
+ return (graph, node) => {
44
+ const semantics = vm_semantics_of(node.op);
45
+
46
+ if (!(semantics.foldable || (options.fold_inexact && semantics.foldable_inexact))) {
47
+ return -1;
48
+ }
49
+
50
+ if (node.children.length === 0 || node.children.length > 3) {
51
+ return -1;
52
+ }
53
+
54
+ const sources = node.children.map(child => graph.constants_of(child));
55
+
56
+ if (sources.some(source => source === null)) {
57
+ return -1;
58
+ }
59
+
60
+ const folded = [];
61
+
62
+ for (let lane = 0; lane < node.width; lane++) {
63
+ const inputs = sources.map((source, index) => source[swizzle_selector(node.patterns[index], lane)]);
64
+
65
+ if (inputs.some(input => input === undefined)) {
66
+ return -1;
67
+ }
68
+
69
+ const value = evaluate_particle_operation(node.op, inputs[0], inputs[1], inputs[2]);
70
+
71
+ if (!Number.isFinite(value)) {
72
+ return -1;
73
+ }
74
+
75
+ folded.push(Math.fround(value));
76
+ }
77
+
78
+ return graph.constant(...folded);
79
+ };
80
+ }
81
+
82
+ /**
83
+ * Zero as an absorbing element, for the one opcode `PARTICLE_ZERO_ABSORBING_OPS` names — and only
84
+ * where the other side is unknown, since a product of two knowns is the number it actually is.
85
+ *
86
+ * Not bit-identical, and deliberately so; the argument is in `../pass_fold_constants.js`.
87
+ *
88
+ * @param {ParticleVectorRuleOptions} options
89
+ * @returns {import("./particle_vector_graph.js").ParticleVectorRule}
90
+ */
91
+ export function rule_absorb_zero(options) {
92
+ return (graph, node) => {
93
+ if (!options.fold_multiply_by_zero || !PARTICLE_ZERO_ABSORBING_OPS.has(node.op)) {
94
+ return -1;
95
+ }
96
+
97
+ const sources = node.children.map(child => graph.constants_of(child));
98
+
99
+ if (sources.every(source => source !== null)) {
100
+ return -1;
101
+ }
102
+
103
+ const zeroed = [];
104
+
105
+ for (let lane = 0; lane < node.width; lane++) {
106
+ const absorbing = sources.some((source, index) => source !== null
107
+ && source[swizzle_selector(node.patterns[index], lane)] === 0);
108
+
109
+ if (!absorbing) {
110
+ return -1;
111
+ }
112
+
113
+ zeroed.push(0);
114
+ }
115
+
116
+ return graph.constant(...zeroed);
117
+ };
118
+ }
119
+
120
+ /**
121
+ * @param {Partial<ParticleVectorRuleOptions>} [options]
122
+ * @returns {{rules: import("./particle_vector_graph.js").ParticleVectorRule[]}}
123
+ */
124
+ export function particle_vector_rules(options = {}) {
125
+ const settings = { ...PARTICLE_VECTOR_RULE_DEFAULTS, ...options };
126
+
127
+ return { rules: [rule_fold_constants(settings), rule_absorb_zero(settings)] };
128
+ }
129
+
130
+ /**
131
+ * Whether every lane an operand reads holds a given literal — what an identity asks before it
132
+ * decides an instruction is a copy.
133
+ *
134
+ * @param {import("./particle_vector_graph.js").ParticleVectorGraph} graph
135
+ * @param {{value: number, pattern: number}} operand
136
+ * @param {number} width lanes the instruction reads of it
137
+ * @param {number} expected
138
+ * @returns {boolean}
139
+ */
140
+ export function operand_is(graph, operand, width, expected) {
141
+ const values = graph.constants_of(operand.value);
142
+
143
+ if (values === null) {
144
+ return false;
145
+ }
146
+
147
+ for (let lane = 0; lane < width; lane++) {
148
+ // `Object.is`, so a `-0` never passes for the `+0` an identity actually needs.
149
+ if (!Object.is(values[swizzle_selector(operand.pattern, lane)], expected)) {
150
+ return false;
151
+ }
152
+ }
153
+
154
+ return true;
155
+ }
156
+
157
+ /**
158
+ * The identities that hold for EVERY value a register can hold, as the operand each is a copy of.
159
+ *
160
+ * `x * 1`, `x / 1` and `x - (+0)` qualify. `x + 0` does not — `-0 + 0` is `+0` — and neither does
161
+ * `x * 0`. The line is `../pass_fold_constants.js`'s, and for its reason: the record is compared to
162
+ * the bit.
163
+ *
164
+ * @param {import("./particle_vector_graph.js").ParticleVectorGraph} graph
165
+ * @param {number} op
166
+ * @param {Array<{value: number, pattern: number}|null>} operands by source slot
167
+ * @param {number} width
168
+ * @returns {{value: number, pattern: number}|null} the operand the instruction merely copies
169
+ */
170
+ export function identity_of(graph, op, operands, width) {
171
+ const is = (slot, expected) => operands[slot] !== undefined && operand_is(graph, operands[slot], width, expected);
172
+
173
+ switch (op) {
174
+ case VM_OP.MUL:
175
+ if (is(1, 1)) return operands[0];
176
+ if (is(0, 1)) return operands[1];
177
+ return null;
178
+
179
+ case VM_OP.DIV:
180
+ return is(1, 1) ? operands[0] : null;
181
+
182
+ // Positive zero only: `x - (-0)` is `x + 0`, and that turns a `-0` into a `+0`.
183
+ case VM_OP.SUB:
184
+ return is(1, 0) ? operands[0] : null;
185
+
186
+ // A condition that is known is a choice already made — but only when it is the same choice in
187
+ // every lane, since one instruction cannot be two copies.
188
+ case VM_OP.SELECT: {
189
+ const values = operands[2] === undefined ? null : graph.constants_of(operands[2].value);
190
+
191
+ if (values === null) {
192
+ return null;
193
+ }
194
+
195
+ const picks = [];
196
+
197
+ for (let lane = 0; lane < width; lane++) {
198
+ picks.push(values[swizzle_selector(operands[2].pattern, lane)] > 0.5 ? 1 : 0);
199
+ }
200
+
201
+ return picks.every(pick => pick === picks[0]) ? operands[picks[0]] : null;
202
+ }
203
+
204
+ default:
205
+ return null;
206
+ }
207
+ }
208
+
209
+ /**
210
+ * Which lanes of an instruction merely copy an operand, when not all of them do.
211
+ *
212
+ * `colour * (1, 1, 1, 0.5)` is the shape a frontend emits for a fade, and three of its four lanes are
213
+ * `x * 1`. {@link identity_of} will not touch it, because the instruction as a whole is not a copy —
214
+ * but three quarters of it is, and those three lanes then store back to the very words they were
215
+ * loaded from, which is not a store at all. Peeling is what turns a four-lane multiply and a pool
216
+ * load into a one-lane multiply against an immediate.
217
+ *
218
+ * The identities are {@link identity_of}'s, asked one lane at a time; `SELECT` is here too, since a
219
+ * condition known in some lanes is a choice already made in those.
220
+ *
221
+ * @param {import("./particle_vector_graph.js").ParticleVectorGraph} graph
222
+ * @param {number} op
223
+ * @param {Array<{value: number, pattern: number}>} operands
224
+ * @param {number} width
225
+ * @returns {number[]|null} per lane, the operand it copies, or -1; null when no lane copies one
226
+ */
227
+ export function identity_lanes(graph, op, operands, width) {
228
+ const at = (slot, lane) => {
229
+ const values = operands[slot] === undefined ? null : graph.constants_of(operands[slot].value);
230
+
231
+ return values === null ? undefined : values[swizzle_selector(operands[slot].pattern, lane)];
232
+ };
233
+ /** @type {number[]} */
234
+ const from = [];
235
+
236
+ for (let lane = 0; lane < width; lane++) {
237
+ switch (op) {
238
+ case VM_OP.MUL:
239
+ from.push(Object.is(at(1, lane), 1) ? 0 : Object.is(at(0, lane), 1) ? 1 : -1);
240
+ break;
241
+
242
+ case VM_OP.DIV:
243
+ from.push(Object.is(at(1, lane), 1) ? 0 : -1);
244
+ break;
245
+
246
+ // Positive zero only, for {@link identity_of}'s reason.
247
+ case VM_OP.SUB:
248
+ from.push(Object.is(at(1, lane), 0) ? 0 : -1);
249
+ break;
250
+
251
+ case VM_OP.SELECT: {
252
+ const condition = at(2, lane);
253
+
254
+ from.push(condition === undefined ? -1 : (condition > 0.5 ? 1 : 0));
255
+ break;
256
+ }
257
+
258
+ default:
259
+ return null;
260
+ }
261
+ }
262
+
263
+ return from.some(one => one >= 0) ? from : null;
264
+ }
@@ -1,62 +1,90 @@
1
1
  /**
2
2
  * Optimize one section of a particle program.
3
3
  *
4
+ * The options are flat, and the ones that are not about the pipeline itself are handed to every pass
5
+ * — each takes the ones it knows and ignores the rest, which is why a rewrite like
6
+ * `fold_multiply_by_zero` is named here rather than buried under the pass that happens to implement
7
+ * it. A caller asking for exact arithmetic should not have to know which pass would otherwise round.
8
+ *
4
9
  * @param {InstructionStream} stream
5
10
  * @param {object} [options]
6
11
  * @param {ArrayLike<number>} [options.constants] the shared constant pool; without it the passes
7
12
  * that reason about literal values do nothing
8
13
  * @param {function(number[]): number} [options.intern_constant] adds a run to that pool
9
- * @param {Object<string, boolean|object>} [options.passes] per-pass switches, overriding
10
- * {@link PARTICLE_OPTIMIZER_DEFAULT_PASSES}; an object value also carries that pass's options
14
+ * @param {ReadonlyArray<string>} [options.passes] the passes to run, defaulting to
15
+ * {@link PARTICLE_OPTIMIZER_DEFAULT_PASSES}; see {@link particle_passes_except}
11
16
  * @param {number} [options.max_iterations] sweeps of the whole pass list
12
17
  * @param {boolean} [options.speculate] whether to try lane peeling both ways and keep the better
13
18
  * program; on unless told otherwise. Off makes the pipeline a straight run of its passes, which is
14
19
  * what a caller measuring one pass in isolation wants.
15
20
  * @param {number} [options.register_slots]
21
+ * @param {boolean} [options.fold_multiply_by_zero] a known zero absorbs a multiply
22
+ * @param {boolean} [options.fold_inexact] fold what the two executors may round apart
23
+ * @param {boolean} [options.peel_constant_lanes] split a lane whose value is known off its
24
+ * instruction
25
+ * @param {number} [options.max_select_moves] how many copies folding a `SELECT` may cost
26
+ * @param {boolean} [options.fuse_multiply_add] fuse where the rounding may differ
27
+ * @param {boolean} [options.fuse_exact_multiply_add] fuse where it cannot
28
+ * @param {boolean} [options.merge_constant_loads] join adjacent pool loads into one run
29
+ * @param {boolean} [options.merge_moves] join adjacent copies into one
16
30
  * @returns {InstructionStream} a fresh stream, whose `register_count` is re-derived from what the
17
31
  * optimized instructions actually touch
18
32
  */
19
- export function optimize_particle_program(stream: InstructionStream, options?: {
33
+ export function optimize_particle_section(stream: InstructionStream, { constants, intern_constant, register_slots, passes, max_iterations, speculate, ...settings }?: {
20
34
  constants?: ArrayLike<number>;
21
35
  intern_constant?: (arg0: number[]) => number;
22
- passes?: {
23
- [x: string]: boolean | object;
24
- };
36
+ passes?: ReadonlyArray<string>;
25
37
  max_iterations?: number;
26
38
  speculate?: boolean;
27
39
  register_slots?: number;
40
+ fold_multiply_by_zero?: boolean;
41
+ fold_inexact?: boolean;
42
+ peel_constant_lanes?: boolean;
43
+ max_select_moves?: number;
44
+ fuse_multiply_add?: boolean;
45
+ fuse_exact_multiply_add?: boolean;
46
+ merge_constant_loads?: boolean;
47
+ merge_moves?: boolean;
28
48
  }): InstructionStream;
29
49
  /**
30
- * A `passes` setting enabling only the named passes.
31
- *
32
- * The plain object form is additive — anything it does not mention keeps its default — which is what
33
- * a caller turning one pass off wants and the opposite of what a caller measuring one pass wants.
50
+ * The default passes with these ones left out — what a caller turning ONE pass off wants, without
51
+ * having to write down the ten it is keeping.
34
52
  *
35
53
  * @param {...string} names
36
- * @returns {Object<string, boolean>}
54
+ * @returns {string[]}
37
55
  */
38
- export function only_particle_passes(...names: string[]): {
39
- [x: string]: boolean;
40
- };
56
+ export function particle_passes_except(...names: string[]): string[];
41
57
  /**
42
- * Optimize both sections of a compiled program against their shared constant pool.
58
+ * Optimize a compiled program: `ParticleProgram` in, `ParticleProgram` out.
59
+ *
60
+ * The entry point, and the same shape
61
+ * {@link ./dag/optimize_particle_program_vector.js the graph optimizer} has — one program in, one
62
+ * out, flat options — so that a caller can hold both and choose.
43
63
  *
44
- * The pool is shared and may grow — a folded expression needs somewhere to put its literal — so it
45
- * is interned through a {@link ParticleAssembler}, which is the code that already knows how to reuse
46
- * a run that is anywhere in the pool rather than only one on a boundary.
64
+ * Both sections are optimized against one constant pool, which is shared and may grow: a folded
65
+ * expression needs somewhere to put its literal. It is interned through a
66
+ * {@link ParticleAssembler}, which is the code that already knows how to reuse a run anywhere in the
67
+ * pool rather than only one on a boundary.
47
68
  *
48
69
  * @param {ParticleProgram} program
49
- * @param {object} [options] as {@link optimize_particle_program}, minus the pool it supplies itself
70
+ * @param {object} [options] as {@link optimize_particle_section}, minus the pool it supplies itself
50
71
  * @returns {ParticleProgram}
51
72
  */
52
- export function optimize_compiled_particle_program(program: ParticleProgram, options?: object): ParticleProgram;
73
+ export function optimize_particle_program(program: ParticleProgram, options?: object): ParticleProgram;
53
74
  /**
54
75
  * @param {Uint32Array} words a packed instruction section
55
76
  * @returns {InstructionStream}
56
77
  */
57
78
  export function stream_from_words(words: Uint32Array): InstructionStream;
58
79
  /**
59
- * Binary-level optimizer for particle VM programs: instructions in, instructions out.
80
+ * Binary-level optimizer for particle VM programs: a {@link ParticleProgram} in, one out.
81
+ *
82
+ * {@link optimize_particle_program} is the entry point and its options are FLAT — the passes to run
83
+ * as a list of names, and every rewrite a caller might want to name as an option of its own. Which
84
+ * pass implements a rewrite is this file's business and not the caller's, so
85
+ * `{ fold_multiply_by_zero: false }` asks for exact arithmetic without naming the pass that would
86
+ * otherwise round. {@link ./dag/optimize_particle_program_vector.js the graph optimizer} has the
87
+ * same shape, so a caller can hold both and choose between them.
60
88
  *
61
89
  * It runs over a compiled {@link InstructionStream} rather than inside any one frontend, because
62
90
  * there is more than one frontend — the node-graph compiler, the assembly text pane in the editor,
@@ -67,24 +95,35 @@ export function stream_from_words(words: Uint32Array): InstructionStream;
67
95
  * ## Shape
68
96
  *
69
97
  * Passes are ordinary functions from an instruction array to a new one, with `null` for "changed
70
- * nothing". They never reorder: every pass rewrites an instruction in place or drops it, which is
71
- * what makes the ordering constraints — `RANDOM`'s draw sequence, `STORE_ATTR`/`LOAD_ATTR`
72
- * aliasing — hold structurally rather than by each pass remembering them.
98
+ * nothing". All but one never reorder: every pass rewrites an instruction in place or drops it,
99
+ * which is what makes the ordering constraints — `RANDOM`'s draw sequence, `STORE_ATTR`/`LOAD_ATTR`
100
+ * aliasing — hold structurally rather than by each pass remembering them. The one that does,
101
+ * `pass_schedule`, moves nothing across an instruction with side effects, which keeps the same
102
+ * constraints structural for it.
73
103
  *
74
104
  * The pipeline sweeps the enabled passes in order until a whole sweep changes nothing or
75
- * `max_iterations` sweeps have run, then packs the register file once. Passes that pay to repeat on
76
- * their own take their own `max_iterations`, so effort is the caller's to spend.
105
+ * `max_iterations` sweeps have run, then schedules, allocates and packs the register file — and
106
+ * sweeps again if that changed anything, since a reordered program is one the passes have not seen.
107
+ * Passes that pay to repeat on their own take their own `max_iterations`, so effort is the
108
+ * caller's to spend.
77
109
  *
78
110
  * ## What must not change
79
111
  *
80
112
  * A program's meaning is the record it leaves, the kill flag it sets, and the RNG state it ends on.
81
113
  * Every pass here preserves all three to the bit, with one deliberate exception: folding `x * 0` to
82
- * `+0` gives up the sign of that zero, and gives up `NaN` where something upstream overflowed. It is
83
- * on by default — see the argument in `pass_fold_constants.js` — and
84
- * `{ passes: { fold_constants: { fold_multiply_by_zero: false } } }` takes the optimizer back to
85
- * bit-identical. `optimize_particle_program.spec.js` and the differential harness beside it hold
86
- * both settings to their respective promises, over the real distribution compositions, the
87
- * hand-written spec programs and randomly generated ones.
114
+ * `+0` gives up the sign of that zero, and gives up `NaN` where something upstream overflowed. That
115
+ * substitution is made in a register, so what it does to the record is whatever the instructions
116
+ * below it do with a zero — which is not bounded, and is why the harness holds the fold to the
117
+ * record words a multiply can REACH rather than to a shape. It is on by default — see the argument
118
+ * in `pass_fold_constants.js` — and `{ fold_multiply_by_zero: false }`
119
+ * takes the optimizer back to bit-identical. `optimize_particle_program.spec.js` and the
120
+ * differential harness beside it hold both settings to their respective promises, over the real
121
+ * distribution compositions, the hand-written spec programs and randomly generated ones.
122
+ *
123
+ * Two further rewrites change the arithmetic and are off unless a caller names them:
124
+ * `fuse_multiply_add`, which is a rounding the reference can see, and `fold_inexact`, which is a
125
+ * rounding only a GPU can see — the fast-math fold of the transcendentals and `rsqrt`. Each is
126
+ * argued where it lives.
88
127
  */
89
128
  /**
90
129
  * @callback ParticleOptimizerPass
@@ -103,27 +142,27 @@ export function stream_from_words(words: Uint32Array): InstructionStream;
103
142
  */
104
143
  /**
105
144
  * The passes, in the order a sweep runs them. `final` passes run once, after the sweeps settle.
145
+ * A pass marked `enabled: false` runs only when a caller switches it on by name.
106
146
  *
107
- * @type {Array<{name: string, run: ParticleOptimizerPass, max_iterations: number, final?: boolean}>}
147
+ * @type {Array<{name: string, run: ParticleOptimizerPass, max_iterations: number, final?: boolean, enabled?: boolean}>}
108
148
  */
109
149
  export const PARTICLE_OPTIMIZER_PASSES: Array<{
110
150
  name: string;
111
151
  run: ParticleOptimizerPass;
112
152
  max_iterations: number;
113
153
  final?: boolean;
154
+ enabled?: boolean;
114
155
  }>;
115
156
  /**
116
- * Passes enabled unless the caller says otherwise. The switches are for bisecting and for measuring
117
- * what each pass is worth; the two rewrites that change the arithmetic rather than the program are
118
- * options of their passes rather than passes, so that the list stays a list of what to run and not a
119
- * list of what to trust. `fold_constants.fold_multiply_by_zero` is on, `peephole.fuse_multiply_add`
120
- * is off, and both are argued where they live.
157
+ * The passes that run unless the caller names a different set. For bisecting, and for measuring what
158
+ * each pass is worth; the rewrites that change the ARITHMETIC rather than the program are flat
159
+ * options instead of passes, so that this stays a list of what to run and not a list of what to
160
+ * trust. `fold_multiply_by_zero` is on, `fuse_multiply_add` and `fold_inexact` are off, and each is
161
+ * argued where it lives.
121
162
  *
122
- * @type {Readonly<Object<string, boolean>>}
163
+ * @type {ReadonlyArray<string>}
123
164
  */
124
- export const PARTICLE_OPTIMIZER_DEFAULT_PASSES: Readonly<{
125
- [x: string]: boolean;
126
- }>;
165
+ export const PARTICLE_OPTIMIZER_DEFAULT_PASSES: ReadonlyArray<string>;
127
166
  /**
128
167
  * How many times the whole pass list may sweep before the optimizer gives up on reaching a fixed
129
168
  * point. Passes feed each other — folding a `SELECT` makes a broadcast dead, deleting it lets the
@@ -1 +1 @@
1
- {"version":3,"file":"optimize_particle_program.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/particles/optimizer/optimize_particle_program.js"],"names":[],"mappings":"AA8GA;;;;;;;;;;;;;;;;;GAiBG;AACH,kDAfW,iBAAiB;IAEW,SAAS,GAArC,UAAU,MAAM,CAAC;IAEoB,eAAe,UAA3C,MAAM,EAAE,KAAG,MAAM;IACe,MAAM;YAAxC,MAAM,GAAE,OAAO,GAAC,MAAM;;IAEZ,cAAc,GAA/B,MAAM;IACY,SAAS,GAA3B,OAAO;IAGU,cAAc,GAA/B,MAAM;IACJ,iBAAiB,CAqC7B;AA6GD;;;;;;;;GAQG;AACH,+CAHc,MAAM;QACA,MAAM,GAAE,OAAO;EAUlC;AAED;;;;;;;;;;GAUG;AACH,4DAJW,eAAe,YACf,MAAM,GACJ,eAAe,CAmC3B;AAyGD;;;GAGG;AACH,yCAHW,WAAW,GACT,iBAAiB,CAiB7B;AAvbD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH;;;;;GAKG;AAEH;;;;;;;;GAQG;AAEH;;;;GAIG;AACH,wCAFU,MAAM;IAAC,MAAM,MAAM,CAAC;IAAC,GAAG,EAAE,qBAAqB,CAAC;IAAC,cAAc,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CAAC,CAAC,CAalG;AAEF;;;;;;;;GAQG;AACH,gDAFU;QAAgB,MAAM,GAAE,OAAO;EAAE,CAIzC;AAEF;;;;;;;;GAQG;AACH,oDAFU,MAAM,CAEuC;mDAvD5C,MAAM,EAAE,EAAE,WACV,wBAAwB,KACtB,MAAM,EAAE,EAAE,GAAC,IAAI;;;;;eAKd,UAAU,MAAM,CAAC;;;;;;8BACP,MAAM,EAAE,KAAK,MAAM;;;;oBAG7B,MAAM;;;;oBACN,MAAM;;kCA/Dc,6BAA6B;gCAE/B,2BAA2B"}
1
+ {"version":3,"file":"optimize_particle_program.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/particles/optimizer/optimize_particle_program.js"],"names":[],"mappings":"AA+IA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,kDAxBW,iBAAiB;IAEW,SAAS,GAArC,UAAU,MAAM,CAAC;IAEoB,eAAe,UAA3C,MAAM,EAAE,KAAG,MAAM;IACM,MAAM,GAAtC,cAAc,MAAM,CAAC;IAEJ,cAAc,GAA/B,MAAM;IACY,SAAS,GAA3B,OAAO;IAGU,cAAc,GAA/B,MAAM;IACY,qBAAqB,GAAvC,OAAO;IACW,YAAY,GAA9B,OAAO;IACW,mBAAmB,GAArC,OAAO;IAEU,gBAAgB,GAAjC,MAAM;IACY,iBAAiB,GAAnC,OAAO;IACW,uBAAuB,GAAzC,OAAO;IACW,oBAAoB,GAAtC,OAAO;IACW,WAAW,GAA7B,OAAO;IACL,iBAAiB,CAqC7B;AAuFD;;;;;;GAMG;AACH,iDAHc,MAAM,KACP,MAAM,EAAE,CAIpB;AAED;;;;;;;;;;;;;;;GAeG;AACH,mDAJW,eAAe,YACf,MAAM,GACJ,eAAe,CAsC3B;AAsFD;;;GAGG;AACH,yCAHW,WAAW,GACT,iBAAiB,CAU7B;AAnbD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AAEH;;;;;GAKG;AAEH;;;;;;;;GAQG;AAEH;;;;;GAKG;AACH,wCAFU,MAAM;IAAC,MAAM,MAAM,CAAC;IAAC,GAAG,EAAE,qBAAqB,CAAC;IAAC,cAAc,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAC,CAAC,CAwBrH;AAEF;;;;;;;;GAQG;AACH,gDAFU,cAAc,MAAM,CAAC,CAI7B;AAEF;;;;;;;;GAQG;AACH,oDAFU,MAAM,CAEuC;mDAnE5C,MAAM,EAAE,EAAE,WACV,wBAAwB,KACtB,MAAM,EAAE,EAAE,GAAC,IAAI;;;;;eAKd,UAAU,MAAM,CAAC;;;;;;8BACP,MAAM,EAAE,KAAK,MAAM;;;;oBAG7B,MAAM;;;;oBACN,MAAM;;kCApFc,6BAA6B;gCAE/B,2BAA2B"}