python-cad-tools 0.1.0rc1__py3-none-any.whl

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 (236) hide show
  1. python_cad_tools/__init__.py +10 -0
  2. python_cad_tools/_locking.py +63 -0
  3. python_cad_tools/_project_loader.py +273 -0
  4. python_cad_tools/_project_state.py +65 -0
  5. python_cad_tools/_scaffold.py +66 -0
  6. python_cad_tools/_transaction.py +208 -0
  7. python_cad_tools/_viewer_static/app.webmanifest +18 -0
  8. python_cad_tools/_viewer_static/asset-manifest.json +1 -0
  9. python_cad_tools/_viewer_static/assets/animationGroup-Sd34ntWg.js +1 -0
  10. python_cad_tools/_viewer_static/assets/bakedVertexAnimation-Cd_pRdrn.js +316 -0
  11. python_cad_tools/_viewer_static/assets/basisTextureLoader-DWgvS_1G.js +1 -0
  12. python_cad_tools/_viewer_static/assets/brdfTextureTools-CWGiG1W2.js +2 -0
  13. python_cad_tools/_viewer_static/assets/bumpFragment-CWULheF1.js +127 -0
  14. python_cad_tools/_viewer_static/assets/bumpVertex-DqzFZayE.js +6 -0
  15. python_cad_tools/_viewer_static/assets/bumpVertexDeclaration-C5EFyTio.js +6 -0
  16. python_cad_tools/_viewer_static/assets/clipPlaneFragment-BXRtt4jj.js +46 -0
  17. python_cad_tools/_viewer_static/assets/clipPlaneVertex-B_VhD1oQ.js +37 -0
  18. python_cad_tools/_viewer_static/assets/cubemapToSphericalPolynomial-DRpaukza.js +1 -0
  19. python_cad_tools/_viewer_static/assets/dds-Dkb2Cx2N.js +1 -0
  20. python_cad_tools/_viewer_static/assets/dds.pure-DtvJsKvY.js +1 -0
  21. python_cad_tools/_viewer_static/assets/ddsTextureLoader-H78xux1g.js +1 -0
  22. python_cad_tools/_viewer_static/assets/default.fragment-oSQ-tWhe.js +469 -0
  23. python_cad_tools/_viewer_static/assets/default.vertex-DhFjw_Da.js +209 -0
  24. python_cad_tools/_viewer_static/assets/defaultUboDeclaration-BMDHNppx.js +5 -0
  25. python_cad_tools/_viewer_static/assets/dumpTools-BaNZPjUX.js +2 -0
  26. python_cad_tools/_viewer_static/assets/envTextureLoader-V0YnLcIM.js +1 -0
  27. python_cad_tools/_viewer_static/assets/exrTextureLoader-CjGyIK3x.js +1 -0
  28. python_cad_tools/_viewer_static/assets/flowGraphApplyForceBlock-CW5nuobR.js +1 -0
  29. python_cad_tools/_viewer_static/assets/flowGraphApplyImpulseBlock-LFqYIkhj.js +1 -0
  30. python_cad_tools/_viewer_static/assets/flowGraphArrayIndexBlock-BMOHUbBm.js +1 -0
  31. python_cad_tools/_viewer_static/assets/flowGraphBezierCurveEasingBlock-knmTiuEk.js +1 -0
  32. python_cad_tools/_viewer_static/assets/flowGraphBinaryOperationBlock-DFLuCAKJ.js +1 -0
  33. python_cad_tools/_viewer_static/assets/flowGraphBranchBlock-BJRHMXMo.js +1 -0
  34. python_cad_tools/_viewer_static/assets/flowGraphCachedOperationBlock-Dng-6jE0.js +1 -0
  35. python_cad_tools/_viewer_static/assets/flowGraphCancelDelayBlock-CgbK3CQZ.js +1 -0
  36. python_cad_tools/_viewer_static/assets/flowGraphCodeExecutionBlock-8zMtq9tg.js +1 -0
  37. python_cad_tools/_viewer_static/assets/flowGraphConditionalDataBlock-BiLr2rkI.js +1 -0
  38. python_cad_tools/_viewer_static/assets/flowGraphConsoleLogBlock-J1vcCtNP.js +1 -0
  39. python_cad_tools/_viewer_static/assets/flowGraphConstantBlock-CFb5nuaV.js +1 -0
  40. python_cad_tools/_viewer_static/assets/flowGraphContextBlock-DAeGVzhC.js +1 -0
  41. python_cad_tools/_viewer_static/assets/flowGraphCounterBlock-lZlAQiJd.js +1 -0
  42. python_cad_tools/_viewer_static/assets/flowGraphDataSwitchBlock-BIzvmbVy.js +1 -0
  43. python_cad_tools/_viewer_static/assets/flowGraphDebounceBlock-DvNuMVwy.js +1 -0
  44. python_cad_tools/_viewer_static/assets/flowGraphDebugBlock-Dymd2VEE.js +1 -0
  45. python_cad_tools/_viewer_static/assets/flowGraphDoNBlock-v68aoNLH.js +1 -0
  46. python_cad_tools/_viewer_static/assets/flowGraphEasingBlock-CTnGv92q.js +1 -0
  47. python_cad_tools/_viewer_static/assets/flowGraphFlipFlopBlock-DXsO0Chw.js +1 -0
  48. python_cad_tools/_viewer_static/assets/flowGraphForLoopBlock-CPpe9T75.js +1 -0
  49. python_cad_tools/_viewer_static/assets/flowGraphFunctionReferenceBlock-DjDev4Pq.js +1 -0
  50. python_cad_tools/_viewer_static/assets/flowGraphGLTFDataProvider-GIYCz4AQ.js +1 -0
  51. python_cad_tools/_viewer_static/assets/flowGraphGetAngularVelocityBlock-BStkOVeL.js +1 -0
  52. python_cad_tools/_viewer_static/assets/flowGraphGetAssetBlock-Eiqoivbz.js +1 -0
  53. python_cad_tools/_viewer_static/assets/flowGraphGetLinearVelocityBlock-B0cpV5ws.js +1 -0
  54. python_cad_tools/_viewer_static/assets/flowGraphGetPhysicsMassPropertiesBlock-B-H64yaI.js +1 -0
  55. python_cad_tools/_viewer_static/assets/flowGraphGetPropertyBlock-CUyOsPw0.js +1 -0
  56. python_cad_tools/_viewer_static/assets/flowGraphGetSoundVolumeBlock-C0FjrsUz.js +1 -0
  57. python_cad_tools/_viewer_static/assets/flowGraphGetVariableBlock-O4597zBl.js +1 -0
  58. python_cad_tools/_viewer_static/assets/flowGraphIndexOfBlock-E00Z3KXM.js +1 -0
  59. python_cad_tools/_viewer_static/assets/flowGraphInterpolationBlock-DnkA9MNH.js +1 -0
  60. python_cad_tools/_viewer_static/assets/flowGraphIsKeyPressedBlock-DDfeuAyf.js +1 -0
  61. python_cad_tools/_viewer_static/assets/flowGraphIsSoundPlayingBlock-DMXg8jdM.js +1 -0
  62. python_cad_tools/_viewer_static/assets/flowGraphJsonPointerParserBlock-OmCorK0y.js +1 -0
  63. python_cad_tools/_viewer_static/assets/flowGraphKeyDownEventBlock-RuVtj6g2.js +1 -0
  64. python_cad_tools/_viewer_static/assets/flowGraphKeyUpEventBlock-DO4pAfHi.js +1 -0
  65. python_cad_tools/_viewer_static/assets/flowGraphKeyboardEventBlock-Bx3pAzzh.js +1 -0
  66. python_cad_tools/_viewer_static/assets/flowGraphMathBlocks-7W1XYOC8.js +1 -0
  67. python_cad_tools/_viewer_static/assets/flowGraphMathCombineExtractBlocks-a4f0Kv6e.js +1 -0
  68. python_cad_tools/_viewer_static/assets/flowGraphMatrixMathBlocks-C5Z-y1Au.js +1 -0
  69. python_cad_tools/_viewer_static/assets/flowGraphMeshPickEventBlock-D4m-I4CS.js +1 -0
  70. python_cad_tools/_viewer_static/assets/flowGraphMultiGateBlock-BISVSMw6.js +1 -0
  71. python_cad_tools/_viewer_static/assets/flowGraphPauseAnimationBlock-BYP2Z-HG.js +1 -0
  72. python_cad_tools/_viewer_static/assets/flowGraphPauseSoundBlock-Drh1EeW6.js +1 -0
  73. python_cad_tools/_viewer_static/assets/flowGraphPhysicsCollisionEventBlock-BoziAQ75.js +1 -0
  74. python_cad_tools/_viewer_static/assets/flowGraphPlayAnimationBlock-Clry-68M.js +1 -0
  75. python_cad_tools/_viewer_static/assets/flowGraphPlaySoundBlock-LbBVxGBE.js +1 -0
  76. python_cad_tools/_viewer_static/assets/flowGraphPointerDownEventBlock-DIVXCSHh.js +1 -0
  77. python_cad_tools/_viewer_static/assets/flowGraphPointerMoveEventBlock-BNNOzY2W.js +1 -0
  78. python_cad_tools/_viewer_static/assets/flowGraphPointerOutEventBlock-B8f2dOFT.js +1 -0
  79. python_cad_tools/_viewer_static/assets/flowGraphPointerOverEventBlock-CQr8LCee.js +1 -0
  80. python_cad_tools/_viewer_static/assets/flowGraphPointerUpEventBlock-DMg_iEHl.js +1 -0
  81. python_cad_tools/_viewer_static/assets/flowGraphReceiveCustomEventBlock-B8GJm9Ai.js +1 -0
  82. python_cad_tools/_viewer_static/assets/flowGraphSceneReadyEventBlock-Dcdb29K2.js +1 -0
  83. python_cad_tools/_viewer_static/assets/flowGraphSceneTickEventBlock-BLE5p4mi.js +1 -0
  84. python_cad_tools/_viewer_static/assets/flowGraphSendCustomEventBlock-BMzDItQ5.js +1 -0
  85. python_cad_tools/_viewer_static/assets/flowGraphSequenceBlock-DRURovjn.js +1 -0
  86. python_cad_tools/_viewer_static/assets/flowGraphSetAngularVelocityBlock-Ba8dhkLM.js +1 -0
  87. python_cad_tools/_viewer_static/assets/flowGraphSetDelayBlock-CnQR--Gn.js +1 -0
  88. python_cad_tools/_viewer_static/assets/flowGraphSetLinearVelocityBlock-Dm1r3vkh.js +1 -0
  89. python_cad_tools/_viewer_static/assets/flowGraphSetPhysicsMotionTypeBlock-BNtMLimi.js +1 -0
  90. python_cad_tools/_viewer_static/assets/flowGraphSetPropertyBlock-C-uv2jhP.js +1 -0
  91. python_cad_tools/_viewer_static/assets/flowGraphSetSoundVolumeBlock-D9LDx3lg.js +1 -0
  92. python_cad_tools/_viewer_static/assets/flowGraphSetVariableBlock-DszzRB5X.js +1 -0
  93. python_cad_tools/_viewer_static/assets/flowGraphSoundEndedEventBlock-DeTDSudb.js +1 -0
  94. python_cad_tools/_viewer_static/assets/flowGraphStopAnimationBlock-DWuwoFWr.js +1 -0
  95. python_cad_tools/_viewer_static/assets/flowGraphStopSoundBlock-DEnj2cQw.js +1 -0
  96. python_cad_tools/_viewer_static/assets/flowGraphSwitchBlock-zs8Fp9ky.js +1 -0
  97. python_cad_tools/_viewer_static/assets/flowGraphThrottleBlock-BYAKUQXd.js +1 -0
  98. python_cad_tools/_viewer_static/assets/flowGraphTransformCoordinatesSystemBlock-DYP54m5P.js +1 -0
  99. python_cad_tools/_viewer_static/assets/flowGraphTypeToTypeBlocks-vFwn79bS.js +1 -0
  100. python_cad_tools/_viewer_static/assets/flowGraphUnaryOperationBlock-CaRh4Ef0.js +1 -0
  101. python_cad_tools/_viewer_static/assets/flowGraphVectorMathBlocks-BEIhMs-A.js +1 -0
  102. python_cad_tools/_viewer_static/assets/flowGraphWaitAllBlock-DFbELP_j.js +1 -0
  103. python_cad_tools/_viewer_static/assets/flowGraphWhileLoopBlock-C1OKQ-_F.js +1 -0
  104. python_cad_tools/_viewer_static/assets/fogFragment-DtDlQBnz.js +25 -0
  105. python_cad_tools/_viewer_static/assets/gaussianSplatting-Cfigjb15.js +242 -0
  106. python_cad_tools/_viewer_static/assets/gaussianSplatting-DIn8R8oF.js +296 -0
  107. python_cad_tools/_viewer_static/assets/gaussianSplatting.fragment-BxeRJ2k-.js +38 -0
  108. python_cad_tools/_viewer_static/assets/gaussianSplatting.fragment-DNDmvRs-.js +37 -0
  109. python_cad_tools/_viewer_static/assets/gaussianSplatting.vertex-D92z5jYn.js +86 -0
  110. python_cad_tools/_viewer_static/assets/gaussianSplatting.vertex-DSWfFnKQ.js +86 -0
  111. python_cad_tools/_viewer_static/assets/gaussianSplattingVoxel.fragment-DBQE2gDk.js +12 -0
  112. python_cad_tools/_viewer_static/assets/gaussianSplattingVoxel.fragment-qwx5ntqJ.js +17 -0
  113. python_cad_tools/_viewer_static/assets/gaussianSplattingVoxel.vertex-CP2kd3jU.js +30 -0
  114. python_cad_tools/_viewer_static/assets/gaussianSplattingVoxel.vertex-Dr-fEg_W.js +19 -0
  115. python_cad_tools/_viewer_static/assets/geometry.fragment-CsJIm2H0.js +242 -0
  116. python_cad_tools/_viewer_static/assets/geometry.fragment-Dph3muZt.js +262 -0
  117. python_cad_tools/_viewer_static/assets/geometry.vertex-BXGMTA_J.js +212 -0
  118. python_cad_tools/_viewer_static/assets/geometry.vertex-Bm9Wg3Gi.js +214 -0
  119. python_cad_tools/_viewer_static/assets/glowBlurPostProcess.fragment-BJSwKIJD.js +7 -0
  120. python_cad_tools/_viewer_static/assets/glowMapGeneration.fragment-DcyS1cTF.js +63 -0
  121. python_cad_tools/_viewer_static/assets/glowMapGeneration.vertex-BGq1Fakj.js +75 -0
  122. python_cad_tools/_viewer_static/assets/glowMapMerge.fragment-DxcneU_F.js +25 -0
  123. python_cad_tools/_viewer_static/assets/glowMapMerge.vertex-DaJJKqMV.js +8 -0
  124. python_cad_tools/_viewer_static/assets/harmonicsFunctions-DzJcvNWG.js +16 -0
  125. python_cad_tools/_viewer_static/assets/hdrTextureLoader-BGQvgh0h.js +2 -0
  126. python_cad_tools/_viewer_static/assets/helperFunctions-Cugfp1Fz.js +87 -0
  127. python_cad_tools/_viewer_static/assets/iesTextureLoader-CO4G0p2M.js +2 -0
  128. python_cad_tools/_viewer_static/assets/index-B2zBEWsq.js +7007 -0
  129. python_cad_tools/_viewer_static/assets/index-DcTTrc-8.css +1 -0
  130. python_cad_tools/_viewer_static/assets/kernelBlur.fragment-B6CTXTxY.js +57 -0
  131. python_cad_tools/_viewer_static/assets/kernelBlur.fragment-BkKbudbW.js +57 -0
  132. python_cad_tools/_viewer_static/assets/kernelBlur.vertex-BYwFU5IS.js +11 -0
  133. python_cad_tools/_viewer_static/assets/kernelBlur.vertex-D371zUfT.js +11 -0
  134. python_cad_tools/_viewer_static/assets/kernelBlurVaryingDeclaration-CgBGaCHg.js +1 -0
  135. python_cad_tools/_viewer_static/assets/kernelBlurVaryingDeclaration-YS8JpqdO.js +1 -0
  136. python_cad_tools/_viewer_static/assets/ktxTextureLoader-ncMSJTjl.js +1 -0
  137. python_cad_tools/_viewer_static/assets/lightFragment-skHiFbKB.js +398 -0
  138. python_cad_tools/_viewer_static/assets/logDepthDeclaration-BR8XRz9F.js +4 -0
  139. python_cad_tools/_viewer_static/assets/logDepthVertex-UKrhEIvg.js +14 -0
  140. python_cad_tools/_viewer_static/assets/mainUVVaryingDeclaration-BxQWGFcG.js +4 -0
  141. python_cad_tools/_viewer_static/assets/mesh.vertexData.functions-ayNlGC5K.js +1 -0
  142. python_cad_tools/_viewer_static/assets/meshUboDeclaration-BnX046aQ.js +4 -0
  143. python_cad_tools/_viewer_static/assets/oitFragment-CTMCOfNP.js +605 -0
  144. python_cad_tools/_viewer_static/assets/openpbr.fragment-DPJPqi6p.js +1530 -0
  145. python_cad_tools/_viewer_static/assets/openpbr.fragment-Dv6qTVVi.js +1384 -0
  146. python_cad_tools/_viewer_static/assets/openpbr.vertex-Bn2wrdGL.js +364 -0
  147. python_cad_tools/_viewer_static/assets/openpbr.vertex-CHESW3gB.js +251 -0
  148. python_cad_tools/_viewer_static/assets/openpbrMaterial.pure-BdK7VgO_.js +3 -0
  149. python_cad_tools/_viewer_static/assets/openpbrMaterialLoadingAdapter-Bm_AHDUN.js +4 -0
  150. python_cad_tools/_viewer_static/assets/openpbrTransmissionLayerData-BDa9qEoN.js +339 -0
  151. python_cad_tools/_viewer_static/assets/openpbrTransmissionLayerData-Ba_ly4LE.js +343 -0
  152. python_cad_tools/_viewer_static/assets/openpbrUboDeclaration-BY2lSH2C.js +5 -0
  153. python_cad_tools/_viewer_static/assets/openpbrUboDeclaration-DajhikDS.js +6 -0
  154. python_cad_tools/_viewer_static/assets/packingFunctions-BHPwcGG2.js +4 -0
  155. python_cad_tools/_viewer_static/assets/packingFunctions-DTwzBRBx.js +4 -0
  156. python_cad_tools/_viewer_static/assets/pass.fragment-9oKU4pI3.js +4 -0
  157. python_cad_tools/_viewer_static/assets/passCube.fragment-CpAeiYx1.js +23 -0
  158. python_cad_tools/_viewer_static/assets/passCube.fragment-DHtSWVRF.js +23 -0
  159. python_cad_tools/_viewer_static/assets/pbr.fragment-cIhMKwLs.js +2560 -0
  160. python_cad_tools/_viewer_static/assets/pbr.vertex-BfdONsf2.js +255 -0
  161. python_cad_tools/_viewer_static/assets/pbrBRDFFunctions-B_ppOzPO.js +173 -0
  162. python_cad_tools/_viewer_static/assets/pbrDebug-DDdwL5_t.js +693 -0
  163. python_cad_tools/_viewer_static/assets/pbrIBLFunctions-b1zdpzOP.js +43 -0
  164. python_cad_tools/_viewer_static/assets/pbrMaterial.pure-BZA7yVhu.js +2 -0
  165. python_cad_tools/_viewer_static/assets/pbrMaterialLoadingAdapter-BRvKRnjl.js +1 -0
  166. python_cad_tools/_viewer_static/assets/pbrUboDeclaration-CMZp25k3.js +5 -0
  167. python_cad_tools/_viewer_static/assets/postprocess.vertex-DzdUpNbW.js +9 -0
  168. python_cad_tools/_viewer_static/assets/procedural.vertex-BnbuQ-1f.js +7 -0
  169. python_cad_tools/_viewer_static/assets/procedural.vertex-Dp-Ng7Pc.js +8 -0
  170. python_cad_tools/_viewer_static/assets/reflectionFunction-DBlr3oDs.js +83 -0
  171. python_cad_tools/_viewer_static/assets/rgbdDecode.fragment-CyvnZFOJ.js +5 -0
  172. python_cad_tools/_viewer_static/assets/rgbdEncode.fragment-Dz4zLnoD.js +5 -0
  173. python_cad_tools/_viewer_static/assets/rgbdEncode.fragment-iscgpA1_.js +5 -0
  174. python_cad_tools/_viewer_static/assets/sceneUboDeclaration-BzFIc4mb.js +11 -0
  175. python_cad_tools/_viewer_static/assets/textureProcessor.fragment-C9D0rd-M.js +151 -0
  176. python_cad_tools/_viewer_static/assets/textureProcessor.fragment-JMKyWZng.js +146 -0
  177. python_cad_tools/_viewer_static/assets/tgaTextureLoader-oxTElIQJ.js +1 -0
  178. python_cad_tools/_viewer_static/assets/vertexColorMixing-mdC9xZe1.js +418 -0
  179. python_cad_tools/_viewer_static/favicon.svg +10 -0
  180. python_cad_tools/_viewer_static/index.html +18 -0
  181. python_cad_tools/_viewer_static/sw.js +61 -0
  182. python_cad_tools/artifacts.py +546 -0
  183. python_cad_tools/build-info.json +1 -0
  184. python_cad_tools/build.py +270 -0
  185. python_cad_tools/cli.py +212 -0
  186. python_cad_tools/context.py +67 -0
  187. python_cad_tools/determinism.py +66 -0
  188. python_cad_tools/drawings/__init__.py +124 -0
  189. python_cad_tools/drawings/_catalog.py +79 -0
  190. python_cad_tools/drawings/_validation.py +238 -0
  191. python_cad_tools/elements.py +121 -0
  192. python_cad_tools/exceptions.py +45 -0
  193. python_cad_tools/exporters/__init__.py +8 -0
  194. python_cad_tools/exporters/base.py +24 -0
  195. python_cad_tools/exporters/drawings/__init__.py +5 -0
  196. python_cad_tools/exporters/drawings/annotations.py +444 -0
  197. python_cad_tools/exporters/drawings/dxf.py +110 -0
  198. python_cad_tools/exporters/drawings/model.py +70 -0
  199. python_cad_tools/exporters/drawings/pdf.py +119 -0
  200. python_cad_tools/exporters/drawings/primitives.py +93 -0
  201. python_cad_tools/exporters/drawings/projection.py +64 -0
  202. python_cad_tools/exporters/drawings/svg.py +135 -0
  203. python_cad_tools/exporters/glb.py +100 -0
  204. python_cad_tools/exporters/ifc.py +229 -0
  205. python_cad_tools/exporters/quantities.py +136 -0
  206. python_cad_tools/exporters/step.py +117 -0
  207. python_cad_tools/geometry.py +187 -0
  208. python_cad_tools/manifests.py +338 -0
  209. python_cad_tools/project_config.py +174 -0
  210. python_cad_tools/py.typed +1 -0
  211. python_cad_tools/runtime_sync.py +126 -0
  212. python_cad_tools/schemas/build-manifest-1.json +1 -0
  213. python_cad_tools/schemas/design-manifest-1.json +1 -0
  214. python_cad_tools/schemas/download-manifest-2.json +46 -0
  215. python_cad_tools/schemas/drawing-annotations-1.json +66 -0
  216. python_cad_tools/schemas/glb-manifest-1.json +1 -0
  217. python_cad_tools/schemas/ifc-validation-1.json +1 -0
  218. python_cad_tools/schemas/quantities-1.json +1 -0
  219. python_cad_tools/schemas/run-metadata-1.json +1 -0
  220. python_cad_tools/schemas/site-metadata-1.json +34 -0
  221. python_cad_tools/schemas/step-validation-1.json +1 -0
  222. python_cad_tools/site.py +676 -0
  223. python_cad_tools/templates/project/.gitignore +9 -0
  224. python_cad_tools/templates/project/README.md +38 -0
  225. python_cad_tools/templates/project/config.py +36 -0
  226. python_cad_tools/templates/project/drawing_annotations.py +117 -0
  227. python_cad_tools/templates/project/model.py +87 -0
  228. python_cad_tools/templates/project/pyproject.toml +27 -0
  229. python_cad_tools/units.py +207 -0
  230. python_cad_tools/validation.py +153 -0
  231. python_cad_tools-0.1.0rc1.dist-info/METADATA +149 -0
  232. python_cad_tools-0.1.0rc1.dist-info/RECORD +236 -0
  233. python_cad_tools-0.1.0rc1.dist-info/WHEEL +5 -0
  234. python_cad_tools-0.1.0rc1.dist-info/entry_points.txt +2 -0
  235. python_cad_tools-0.1.0rc1.dist-info/licenses/LICENSE +679 -0
  236. python_cad_tools-0.1.0rc1.dist-info/top_level.txt +1 -0
@@ -0,0 +1,5 @@
1
+ import{S as o}from"./index-B2zBEWsq.js";import"./sceneUboDeclaration-BzFIc4mb.js";import"./meshUboDeclaration-BnX046aQ.js";const f="defaultUboDeclaration",i=`uniform diffuseLeftColor: vec4f;uniform diffuseRightColor: vec4f;uniform opacityParts: vec4f;uniform reflectionLeftColor: vec4f;uniform reflectionRightColor: vec4f;uniform refractionLeftColor: vec4f;uniform refractionRightColor: vec4f;uniform emissiveLeftColor: vec4f;uniform emissiveRightColor: vec4f;uniform vDiffuseInfos: vec2f;uniform vAmbientInfos: vec2f;uniform vOpacityInfos: vec2f;uniform vEmissiveInfos: vec2f;uniform vLightmapInfos: vec2f;uniform vSpecularInfos: vec2f;uniform vBumpInfos: vec3f;uniform diffuseMatrix: mat4x4f;uniform ambientMatrix: mat4x4f;uniform opacityMatrix: mat4x4f;uniform emissiveMatrix: mat4x4f;uniform lightmapMatrix: mat4x4f;uniform specularMatrix: mat4x4f;uniform bumpMatrix: mat4x4f;uniform vTangentSpaceParams: vec2f;uniform pointSize: f32;uniform alphaCutOff: f32;uniform refractionMatrix: mat4x4f;uniform vRefractionInfos: vec4f;uniform vRefractionPosition: vec3f;uniform vRefractionSize: vec3f;uniform vSpecularColor: vec4f;uniform vEmissiveColor: vec3f;uniform vDiffuseColor: vec4f;uniform vAmbientColor: vec3f;uniform cameraInfo: vec4f;uniform vTextureRepetitionHexTilingParams: vec4f;uniform vReflectionInfos: vec2f;uniform reflectionMatrix: mat4x4f;uniform vReflectionPosition: vec3f;uniform vReflectionSize: vec3f;
2
+ #define ADDITIONAL_UBO_DECLARATION
3
+ #include<sceneUboDeclaration>
4
+ #include<meshUboDeclaration>
5
+ `;o.IncludesShadersStoreWGSL[f]||(o.IncludesShadersStoreWGSL[f]=i);const t={name:f,shader:i};export{t as d};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-B2zBEWsq.js","./index-DcTTrc-8.css"])))=>i.map(i=>d[i]);
2
+ import{C as S,au as d,L as D,cK as O,aU as C,aO as P,aP as g,ay as v,cL as x,cM as R,cN as L,bp as B}from"./index-B2zBEWsq.js";let f=null;async function j(){const e=g.LastCreatedEngine?.createCanvas(100,100)??new OffscreenCanvas(100,100);e instanceof OffscreenCanvas&&D.Warn("DumpData: OffscreenCanvas will be used for dumping data. This may result in lossy alpha values.");const{ThinEngine:i}=await v(async()=>{const{ThinEngine:s}=await Promise.resolve().then(()=>z);return{ThinEngine:s}},void 0,import.meta.url);if(!i.IsSupported)throw new Error("DumpData: No WebGL context available. Cannot dump data.");const a={preserveDrawingBuffer:!0,depth:!1,stencil:!1,alpha:!0,premultipliedAlpha:!1,antialias:!1,failIfMajorPerformanceCaveat:!1},n=new i(e,!1,a);g.Instances.pop(),g.OnEnginesDisposedObservable.add(s=>{n&&s!==n&&!n.isDisposed&&g.Instances.length===0&&A()}),n.getCaps().parallelShaderCompile=void 0;const t=new x(n),{passPixelShader:r}=await v(async()=>{const{passPixelShader:s}=await import("./index-B2zBEWsq.js").then(o=>o.cO);return{passPixelShader:s}},__vite__mapDeps([0,1]),import.meta.url),l=new R({engine:n,name:r.name,fragmentShader:r.shader,samplerNames:["textureSampler"]});return{canvas:e,dumpEngine:{engine:n,renderer:t,wrapper:l}}}async function M(){return f||(f=j()),await f}let b=(()=>{var e;let i=[],a;return e=class{static async EncodeImageAsync(t,r,l,s,o,u){const p=await M(),c=p.dumpEngine;c.engine.setSize(r,l,!0);const m=c.engine.createRawTexture(t,r,l,5,!1,!o,1);return c.renderer.setViewport(),c.renderer.applyEffectWrapper(c.wrapper),c.wrapper.effect._bindTexture("textureSampler",m),c.renderer.draw(),m.dispose(),await new Promise((I,T)=>{d.ToBlob(p.canvas,w=>{w?I(w):T(new Error("EncodeImageAsync: Failed to convert canvas to blob."))},s,u)})}},(()=>{const n=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;a=[L],C(e,null,a,{kind:"method",name:"EncodeImageAsync",static:!0,private:!1,access:{has:t=>"EncodeImageAsync"in t,get:t=>t.EncodeImageAsync},metadata:n},null,i),n&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:n}),P(e,i)})(),e})();const $=b.EncodeImageAsync;async function h(e,i,a,n,t="image/png",r,l){const s=await a.readPixels(0,0,e,i),o=new Uint8Array(s.buffer);y(e,i,o,n,t,r,!0,void 0,l)}async function E(e,i,a,n="image/png",t,r=!1,l=!1,s){if(a instanceof Float32Array){const p=new Uint8Array(a.length);let c=a.length;for(;c--;){const m=a[c];p[c]=Math.round(S(m)*255)}a=p}const o=await b.EncodeImageAsync(a,e,i,n,r,s);t!==void 0&&d.DownloadBlob(o,t),o.type!==n&&D.Warn(`DumpData: The requested mimeType '${n}' is not supported. The result has mimeType '${o.type}' instead.`);const u=await o.arrayBuffer();return l?u:`data:${n};base64,${O(u)}`}function y(e,i,a,n,t="image/png",r,l=!1,s=!1,o){r===void 0&&!n&&(r=""),E(e,i,a,t,r,l,s,o).then(u=>{n&&n(u)})}function A(){f&&(f?.then(e=>{e.canvas instanceof HTMLCanvasElement&&e.canvas.remove(),e.dumpEngine&&(e.dumpEngine.engine.dispose(),e.dumpEngine.renderer.dispose(),e.dumpEngine.wrapper.dispose())}),f=null)}const H={DumpData:y,DumpDataAsync:E,DumpFramebuffer:h,Dispose:A};let _=!1;function W(){if(_)return;_=!0,d.DumpData=y,d.DumpDataAsync=E,d.DumpFramebuffer=h}W();const z=Object.freeze(Object.defineProperty({__proto__:null,ThinEngine:B},Symbol.toStringTag,{value:"Module"}));export{A as Dispose,y as DumpData,E as DumpDataAsync,h as DumpFramebuffer,H as DumpTools,$ as EncodeImageAsync,W as RegisterDumpTools};
@@ -0,0 +1 @@
1
+ import{B as a,G as u,U as h,v as p}from"./index-B2zBEWsq.js";import{C as m}from"./cubemapToSphericalPolynomial-DRpaukza.js";let n=!1;function c(){n||(n=!0,a.prototype._sphericalPolynomialTargetSize=0,a.prototype.forceSphericalPolynomialsRecompute=function(){this._texture&&(this._texture._sphericalPolynomial=null,this._texture._sphericalPolynomialPromise=null,this._texture._sphericalPolynomialComputed=!1)},Object.defineProperty(a.prototype,"sphericalPolynomial",{get:function(){if(this._texture){if(this._texture._sphericalPolynomial||this._texture._sphericalPolynomialComputed)return this._texture._sphericalPolynomial;if(this._texture.isReady)return this._texture._sphericalPolynomialPromise||(this._texture._sphericalPolynomialPromise=m.ConvertCubeMapTextureToSphericalPolynomial(this),this._texture._sphericalPolynomialPromise===null?this._texture._sphericalPolynomialComputed=!0:this._texture._sphericalPolynomialPromise.then(i=>{this._texture._sphericalPolynomial=i,this._texture._sphericalPolynomialComputed=!0})),null}return null},set:function(i){this._texture&&(this._texture._sphericalPolynomial=i)},enumerable:!0,configurable:!0}))}class P{constructor(){this.supportCascades=!1}loadCubeData(o,e,_,s,l){if(Array.isArray(o))return;const t=u(o);if(t){e.width=t.width,e.height=t.width;try{c(),h(e,t),p(e,o,t).then(()=>{e.isReady=!0,e.onLoadedObservable.notifyObservers(e),e.onLoadedObservable.clear(),s&&s()},r=>{l?.("Can not upload environment levels",r)})}catch(r){l?.("Can not upload environment file",r)}}else l&&l("Can not parse the environment file",null)}loadData(){throw".env not supported in 2d."}}export{P as _ENVTextureLoader};
@@ -0,0 +1 @@
1
+ import{F as gn,T as In,C as On,cm as V,L as z,au as G}from"./index-B2zBEWsq.js";const an=4,X=4,sn=1,M=2,bn=8,H=65536,d=H>>3,Pn=16,C=14,D=(1<<Pn)+1,j=1<<C,nn=j-1,K=59,cn=63,An=2+cn-K;var U;(function(n){n[n.NO_COMPRESSION=0]="NO_COMPRESSION",n[n.RLE_COMPRESSION=1]="RLE_COMPRESSION",n[n.ZIPS_COMPRESSION=2]="ZIPS_COMPRESSION",n[n.ZIP_COMPRESSION=3]="ZIP_COMPRESSION",n[n.PIZ_COMPRESSION=4]="PIZ_COMPRESSION",n[n.PXR24_COMPRESSION=5]="PXR24_COMPRESSION"})(U||(U={}));var q;(function(n){n[n.INCREASING_Y=0]="INCREASING_Y",n[n.DECREASING_Y=1]="DECREASING_Y"})(q||(q={}));function $(n,t){const e=new Uint8Array(n);let l=0;for(;e[t.value+l]!=0;)l+=1;const r=new TextDecoder().decode(e.slice(t.value,t.value+l));return t.value=t.value+l+1,r}function R(n,t){const e=n.getInt32(t.value,!0);return t.value+=an,e}function m(n,t){const e=n.getUint32(t.value,!0);return t.value+=an,e}function Z(n,t){const e=n.getUint8(t.value);return t.value+=sn,e}function B(n,t){const e=n.getUint16(t.value,!0);return t.value+=M,e}function on(n,t){const e=n[t.value];return t.value+=sn,e}function xn(n,t){let e;return"getBigInt64"in DataView.prototype?e=Number(n.getBigInt64(t.value,!0)):e=n.getUint32(t.value+4,!0)+Number(n.getUint32(t.value,!0)<<32),t.value+=bn,e}function I(n,t){const e=n.getFloat32(t.value,!0);return t.value+=X,e}function Rn(n,t){return gn(B(n,t))}function Un(n,t){return In(On(I(n,t),-V,V))}function mn(n,t,e){const l=new TextDecoder().decode(new Uint8Array(n).slice(t.value,t.value+e));return t.value=t.value+e,l}function Cn(n,t){const e=R(n,t),l=m(n,t);return[e,l]}function _n(n,t){const e=m(n,t),l=m(n,t);return[e,l]}function Nn(n,t){const e=I(n,t),l=I(n,t);return[e,l]}function Mn(n,t){const e=I(n,t),l=I(n,t),r=I(n,t);return[e,l,r]}function Fn(n,t,e){const l=t.value,r=[];for(;t.value<l+e-1;){const s=$(n.buffer,t),i=R(n,t),c=Z(n,t);t.value+=3;const o=R(n,t),a=R(n,t);r.push({name:s,pixelType:i,pLinear:c,xSampling:o,ySampling:a})}return t.value+=1,r}function Tn(n,t){const e=I(n,t),l=I(n,t),r=I(n,t),s=I(n,t),i=I(n,t),c=I(n,t),o=I(n,t),a=I(n,t);return{redX:e,redY:l,greenX:r,greenY:s,blueX:i,blueY:c,whiteX:o,whiteY:a}}function Dn(n,t){return Z(n,t)}function kn(n,t){const e=R(n,t),l=R(n,t),r=R(n,t),s=R(n,t);return{xMin:e,yMin:l,xMax:r,yMax:s}}function Ln(n,t){const e=Z(n,t);return q[e]}function zn(n,t,e,l){switch(e){case"string":case"stringvector":case"iccProfile":return mn(n.buffer,t,l);case"chlist":return Fn(n,t,l);case"chromaticities":return Tn(n,t);case"compression":return Dn(n,t);case"box2i":return kn(n,t);case"lineOrder":return Ln(n,t);case"float":return I(n,t);case"v2f":return Nn(n,t);case"v3f":return Mn(n,t);case"int":return R(n,t);case"rational":return Cn(n,t);case"timecode":return _n(n,t);case"preview":return t.value+=l,"skipped";default:t.value+=l;return}}function un(n){for(let t=1;t<n.length;t++){const e=n[t-1]+n[t]-128;n[t]=e}}function pn(n,t){let e=0,l=Math.floor((n.length+1)/2),r=0;const s=n.length-1;for(;!(r>s||(t[r++]=n[e++],r>s));)t[r++]=n[l++]}const Hn=20000630;function hn(n,t){if(n.getUint32(0,!0)!=Hn)throw new Error("Incorrect OpenEXR format");const e=n.getUint8(4),l=n.getUint8(5),r={singleTile:!!(l&2),longName:!!(l&4),deepFormat:!!(l&8),multiPart:!!(l&16)};t.value=8;const s={};let i=!0;for(;i;){const c=$(n.buffer,t);if(!c)i=!1;else{const o=$(n.buffer,t),a=m(n,t),u=zn(n,t,o,a);u===void 0?z.Warn(`Unknown header attribute type ${o}'.`):s[c]=u}}if((l&-5)!=0)throw new Error("Unsupported file format");return{version:e,spec:r,...s}}const wn=16,Bn=1<<wn-1,tn=(1<<wn)-1;function Zn(n,t){let e=0;for(let r=0;r<H;++r)(r==0||n[r>>3]&1<<(r&7))&&(t[e++]=r);const l=e-1;for(;e<H;)t[e++]=0;return l}function Wn(n){for(let t=0;t<j;t++)n[t]={},n[t].len=0,n[t].lit=0,n[t].p=null}function en(n,t,e,l,r){for(;e<n;)t=t<<8|on(l,r),e+=8;return e-=n,{l:t>>e&(1<<n)-1,c:t,lc:e}}function J(n,t,e,l){return n=n<<8|on(e,l),t+=8,{c:n,lc:t}}function Y(n,t,e,l,r,s,i,c,o){if(n==t){if(l<8){const h=J(e,l,r,s);e=h.c,l=h.lc}l-=8;let a=e>>l;if(a=new Uint8Array([a])[0],c.value+a>o)return null;const u=i[c.value-1];for(;a-- >0;)i[c.value++]=u}else if(c.value<o)i[c.value++]=n;else return null;return{c:e,lc:l}}const T=new Array(59);function Gn(n){for(let e=0;e<=58;++e)T[e]=0;for(let e=0;e<D;++e)T[n[e]]+=1;let t=0;for(let e=58;e>0;--e){const l=t+T[e]>>1;T[e]=t,t=l}for(let e=0;e<D;++e){const l=n[e];l>0&&(n[e]=l|T[l]++<<6)}}function Yn(n,t,e,l,r,s){const i=t;let c=0,o=0;for(;l<=r;l++){if(i.value-t.value>e)return;let a=en(6,c,o,n,i);const u=a.l;if(c=a.c,o=a.lc,s[l]=u,u==cn){if(i.value-t.value>e)throw new Error("Error in HufUnpackEncTable");a=en(8,c,o,n,i);let h=a.l+An;if(c=a.c,o=a.lc,l+h>r+1)throw new Error("Error in HufUnpackEncTable");for(;h--;)s[l++]=0;l--}else if(u>=K){let h=u-K+2;if(l+h>r+1)throw new Error("Error in HufUnpackEncTable");for(;h--;)s[l++]=0;l--}}Gn(s)}function yn(n){return n&63}function fn(n){return n>>6}function Xn(n,t,e,l){for(;t<=e;t++){const r=fn(n[t]),s=yn(n[t]);if(r>>s)throw new Error("Invalid table entry");if(s>C){const i=l[r>>s-C];if(i.len)throw new Error("Invalid table entry");if(i.lit++,i.p){const c=i.p;i.p=new Array(i.lit);for(let o=0;o<i.lit-1;++o)i.p[o]=c[o]}else i.p=new Array(1);i.p[i.lit-1]=t}else if(s){let i=0;for(let c=1<<C-s;c>0;c--){const o=l[(r<<C-s)+i];if(o.len||o.p)throw new Error("Invalid table entry");o.len=s,o.lit=t,i++}}}return!0}function Kn(n,t,e,l,r,s,i,c,o){let a=0,u=0;const h=i,v=Math.trunc(l.value+(r+7)/8);for(;l.value<v;){let p=J(a,u,e,l);for(a=p.c,u=p.lc;u>=C;){const y=a>>u-C&nn,f=t[y];if(f.len){u-=f.len;const w=Y(f.lit,s,a,u,e,l,c,o,h);w&&(a=w.c,u=w.lc)}else{if(!f.p)throw new Error("hufDecode issues");let w;for(w=0;w<f.lit;w++){const g=yn(n[f.p[w]]);for(;u<g&&l.value<v;)p=J(a,u,e,l),a=p.c,u=p.lc;if(u>=g&&fn(n[f.p[w]])==(a>>u-g&(1<<g)-1)){u-=g;const A=Y(f.p[w],s,a,u,e,l,c,o,h);A&&(a=A.c,u=A.lc);break}}if(w==f.lit)throw new Error("HufDecode issues")}}}const b=8-r&7;for(a>>=b,u-=b;u>0;){const p=t[a<<C-u&nn];if(p.len){u-=p.len;const y=Y(p.lit,s,a,u,e,l,c,o,h);y&&(a=y.c,u=y.lc)}else throw new Error("HufDecode issues")}return!0}function qn(n,t,e,l,r,s){const i={value:0},c=e.value,o=m(t,e),a=m(t,e);e.value+=4;const u=m(t,e);if(e.value+=4,o<0||o>=D||a<0||a>=D)throw new Error("Wrong HUF_ENCSIZE");const h=new Array(D),v=new Array(j);Wn(v);const b=l-(e.value-c);if(Yn(n,e,b,o,a,h),u>8*(l-(e.value-c)))throw new Error("Wrong hufUncompress");Xn(h,o,a,v),Kn(h,v,n,e,u,a,s,r,i)}function Q(n){return n&65535}function rn(n){const t=Q(n);return t>32767?t-65536:t}function _(n,t){const e=rn(n),r=rn(t),s=e+(r&1)+(r>>1),i=s,c=s-r;return{a:i,b:c}}function N(n,t){const e=Q(n),l=Q(t),r=e-(l>>1)&tn;return{a:l+r-Bn&tn,b:r}}function $n(n,t,e,l,r,s,i){const c=i<16384,o=e>r?r:e;let a=1,u,h;for(;a<=o;)a<<=1;for(a>>=1,u=a,a>>=1;a>=1;){h=0;const v=h+s*(r-u),b=s*a,p=s*u,y=l*a,f=l*u;let w,g,A,k;for(;h<=v;h+=p){let E=h;const W=h+l*(e-u);for(;E<=W;E+=f){const P=E+y,O=E+b,L=O+y;if(c){let S=_(n[E+t],n[O+t]);w=S.a,A=S.b,S=_(n[P+t],n[L+t]),g=S.a,k=S.b,S=_(w,g),n[E+t]=S.a,n[P+t]=S.b,S=_(A,k),n[O+t]=S.a,n[L+t]=S.b}else{let S=N(n[E+t],n[O+t]);w=S.a,A=S.b,S=N(n[P+t],n[L+t]),g=S.a,k=S.b,S=N(w,g),n[E+t]=S.a,n[P+t]=S.b,S=N(A,k),n[O+t]=S.a,n[L+t]=S.b}}if(e&a){const P=E+b;let O;c?O=_(n[E+t],n[P+t]):O=N(n[E+t],n[P+t]),w=O.a,n[P+t]=O.b,n[E+t]=w}}if(r&a){let E=h;const W=h+l*(e-u);for(;E<=W;E+=f){const P=E+y;let O;c?O=_(n[E+t],n[P+t]):O=N(n[E+t],n[P+t]),w=O.a,n[P+t]=O.b,n[E+t]=w}}u=a,a>>=1}return h}function Jn(n,t,e){for(let l=0;l<e;++l)t[l]=n[t[l]]}function Qn(n){let t=n.byteLength;const e=[];let l=0;const r=new DataView(n);for(;t>0;){const s=r.getInt8(l++);if(s<0){const i=-s;t-=i+1;for(let c=0;c<i;c++)e.push(r.getUint8(l++))}else{const i=s;t-=2;const c=r.getUint8(l++);for(let o=0;o<i+1;o++)e.push(c)}}return e}function Sn(n){return new DataView(n.array.buffer,n.offset.value,n.size)}function jn(n){const t=n.viewer.buffer.slice(n.offset.value,n.offset.value+n.size),e=new Uint8Array(Qn(t)),l=new Uint8Array(e.length);return un(e),pn(e,l),new DataView(l.buffer)}function ln(n){const t=n.array.slice(n.offset.value,n.offset.value+n.size),e=fflate.unzlibSync(t),l=new Uint8Array(e.length);return un(e),pn(e,l),new DataView(l.buffer)}function Vn(n){const t=n.array.slice(n.offset.value,n.offset.value+n.size),e=fflate.unzlibSync(t),l=n.lines*n.channels*n.width,r=n.type==1?new Uint16Array(l):new Uint32Array(l);let s=0,i=0;const c=new Array(4);for(let o=0;o<n.lines;o++)for(let a=0;a<n.channels;a++){let u=0;switch(n.type){case 1:c[0]=s,c[1]=c[0]+n.width,s=c[1]+n.width;for(let h=0;h<n.width;++h){const v=e[c[0]++]<<8|e[c[1]++];u+=v,r[i]=u,i++}break;case 2:c[0]=s,c[1]=c[0]+n.width,c[2]=c[1]+n.width,s=c[2]+n.width;for(let h=0;h<n.width;++h){const v=e[c[0]++]<<24|e[c[1]++]<<16|e[c[2]++]<<8;u+=v,r[i]=u,i++}break}}return new DataView(r.buffer)}function dn(n){const t=n.viewer,e={value:n.offset.value},l=new Uint16Array(n.width*n.scanlineBlockSize*(n.channels*n.type)),r=new Uint8Array(d);let s=0;const i=new Array(n.channels);for(let p=0;p<n.channels;p++)i[p]={},i[p].start=s,i[p].end=i[p].start,i[p].nx=n.width,i[p].ny=n.lines,i[p].size=n.type,s+=i[p].nx*i[p].ny*i[p].size;const c=B(t,e),o=B(t,e);if(o>=d)throw new Error("Wrong PIZ_COMPRESSION BITMAP_SIZE");if(c<=o)for(let p=0;p<o-c+1;p++)r[p+c]=Z(t,e);const a=new Uint16Array(H),u=Zn(r,a),h=m(t,e);qn(n.array,t,e,h,l,s);for(let p=0;p<n.channels;++p){const y=i[p];for(let f=0;f<i[p].size;++f)$n(l,y.start+f,y.nx,y.size,y.ny,y.nx*y.size,u)}Jn(a,l,s);let v=0;const b=new Uint8Array(l.buffer.byteLength);for(let p=0;p<n.lines;p++)for(let y=0;y<n.channels;y++){const f=i[y],w=f.nx*f.size,g=new Uint8Array(l.buffer,f.end*M,w*M);b.set(g,v),v+=w*M,f.end+=w}return new DataView(b.buffer)}var x;(function(n){n[n.Float=0]="Float",n[n.HalfFloat=1]="HalfFloat"})(x||(x={}));class F{}F.DefaultOutputType=x.HalfFloat;F.FFLATEUrl="https://unpkg.com/fflate@0.8.2";async function En(n,t,e,l){const r={size:0,viewer:t,array:new Uint8Array(t.buffer),offset:e,width:n.dataWindow.xMax-n.dataWindow.xMin+1,height:n.dataWindow.yMax-n.dataWindow.yMin+1,channels:n.channels.length,channelLineOffsets:{},scanOrder:()=>0,bytesPerLine:0,outLineWidth:0,lines:0,scanlineBlockSize:0,inputSize:null,type:0,uncompress:null,getter:()=>0,format:5,outputChannels:0,decodeChannels:{},blockCount:null,byteArray:null,linearSpace:!1,textureType:0};switch(n.compression){case U.NO_COMPRESSION:r.lines=1,r.uncompress=Sn;break;case U.RLE_COMPRESSION:r.lines=1,r.uncompress=jn;break;case U.ZIPS_COMPRESSION:r.lines=1,r.uncompress=ln,await G.LoadScriptAsync(F.FFLATEUrl);break;case U.ZIP_COMPRESSION:r.lines=16,r.uncompress=ln,await G.LoadScriptAsync(F.FFLATEUrl);break;case U.PIZ_COMPRESSION:r.lines=32,r.uncompress=dn;break;case U.PXR24_COMPRESSION:r.lines=16,r.uncompress=Vn,await G.LoadScriptAsync(F.FFLATEUrl);break;default:throw new Error(U[n.compression]+" is unsupported")}r.scanlineBlockSize=r.lines;const s={};for(const a of n.channels)switch(a.name){case"R":case"G":case"B":case"A":s[a.name]=!0,r.type=a.pixelType;break;case"Y":s[a.name]=!0,r.type=a.pixelType;break}let i=!1;if(s.R&&s.G&&s.B&&s.A)r.outputChannels=4,r.decodeChannels={R:0,G:1,B:2,A:3};else if(s.R&&s.G&&s.B)i=!0,r.outputChannels=4,r.decodeChannels={R:0,G:1,B:2,A:3};else if(s.R&&s.G)r.outputChannels=2,r.decodeChannels={R:0,G:1};else if(s.R)r.outputChannels=1,r.decodeChannels={R:0};else if(s.Y)r.outputChannels=1,r.decodeChannels={Y:0};else throw new Error("EXRLoader.parse: file contains unsupported data channels.");if(r.type===1)switch(l){case x.Float:r.getter=Rn,r.inputSize=M;break;case x.HalfFloat:r.getter=B,r.inputSize=M;break}else if(r.type===2)switch(l){case x.Float:r.getter=I,r.inputSize=X;break;case x.HalfFloat:r.getter=Un,r.inputSize=X}else throw new Error("Unsupported pixelType "+r.type+" for "+n.compression);r.blockCount=r.height/r.scanlineBlockSize;for(let a=0;a<r.blockCount;a++)xn(t,e);const c=r.width*r.height*r.outputChannels;switch(l){case x.Float:r.byteArray=new Float32Array(c),r.textureType=1,i&&r.byteArray.fill(1,0,c);break;case x.HalfFloat:r.byteArray=new Uint16Array(c),r.textureType=2,i&&r.byteArray.fill(15360,0,c);break;default:throw new Error("Unsupported type: "+l)}let o=0;for(const a of n.channels)r.decodeChannels[a.name]!==void 0&&(r.channelLineOffsets[a.name]=o*r.width),o+=a.pixelType*2;return r.bytesPerLine=r.width*o,r.outLineWidth=r.width*r.outputChannels,n.lineOrder==="INCREASING_Y"?r.scanOrder=a=>a:r.scanOrder=a=>r.height-1-a,r.outputChannels==4?(r.format=5,r.linearSpace=!0):(r.format=6,r.linearSpace=!1),r}function vn(n,t,e,l){const r={value:0};for(let s=0;s<n.height/n.scanlineBlockSize;s++){const i=R(e,l)-t.dataWindow.yMin;n.size=m(e,l),n.lines=i+n.scanlineBlockSize>n.height?n.height-i:n.scanlineBlockSize;const o=n.size<n.lines*n.bytesPerLine&&n.uncompress?n.uncompress(n):Sn(n);l.value+=n.size;for(let a=0;a<n.scanlineBlockSize;a++){const u=s*n.scanlineBlockSize,h=a+n.scanOrder(u);if(h>=n.height)continue;const v=a*n.bytesPerLine,b=(n.height-1-h)*n.outLineWidth;for(let p=0;p<n.channels;p++){const y=t.channels[p].name,f=n.channelLineOffsets[y],w=n.decodeChannels[y];if(w!==void 0){r.value=v+f;for(let g=0;g<n.width;g++){const A=b+g*n.outputChannels+w;n.byteArray&&(n.byteArray[A]=n.getter(o,r))}}}}}}class tt{constructor(){this.supportCascades=!1}loadCubeData(t,e,l,r,s){throw".exr not supported in Cube."}loadData(t,e,l){const r=new DataView(t.buffer),s={value:0},i=hn(r,s);En(i,r,s,F.DefaultOutputType).then(c=>{vn(c,i,r,s);const o=i.dataWindow.xMax-i.dataWindow.xMin+1,a=i.dataWindow.yMax-i.dataWindow.yMin+1;l(o,a,e.generateMipMaps,!1,()=>{const u=e.getEngine();e.format=i.format,e.type=c.textureType,e.invertY=!1,e._gammaSpace=!i.linearSpace,c.byteArray&&u._uploadDataToTextureDirectly(e,c.byteArray,0,0,void 0,!0)})}).catch(c=>{z.Error("Failed to load EXR texture: ",c)})}}async function et(n){const t=new DataView(n),e={value:0},l=hn(t,e);try{const r=await En(l,t,e,x.Float);return vn(r,l,t,e),r.byteArray?{width:l.dataWindow.xMax-l.dataWindow.xMin+1,height:l.dataWindow.yMax-l.dataWindow.yMin+1,data:new Float32Array(r.byteArray)}:(z.Error("Failed to decode EXR data: No byte array available."),{width:0,height:0,data:null})}catch(r){z.Error("Failed to load EXR data: ",r)}return{width:0,height:0,data:null}}export{et as ReadExrDataAsync,tt as _ExrTextureLoader};
@@ -0,0 +1 @@
1
+ import{y as a,g as l,H as o,i as c}from"./index-B2zBEWsq.js";class p extends a{constructor(e){super(e),this.body=this.registerDataInput("body",l),this.force=this.registerDataInput("force",o),this.location=this.registerDataInput("location",o)}_execute(e,u){const t=this.body.getValue(e);if(!t){this._reportError(e,"No physics body provided"),this.out._activateSignal(e);return}const i=this.force.getValue(e),s=this.location.getValue(e);t.applyForce(i,s),this.out._activateSignal(e)}getClassName(){return"FlowGraphApplyForceBlock"}}let r=!1;function h(){r||(r=!0,c("FlowGraphApplyForceBlock",p))}h();export{p as FlowGraphApplyForceBlock,h as RegisterFlowGraphApplyForceBlock};
@@ -0,0 +1 @@
1
+ import{y as p,g as o,H as t,i as r}from"./index-B2zBEWsq.js";class u extends p{constructor(e){super(e),this.body=this.registerDataInput("body",o),this.impulse=this.registerDataInput("impulse",t),this.location=this.registerDataInput("location",t)}_execute(e,n){const s=this.body.getValue(e);if(!s){this._reportError(e,"No physics body provided"),this.out._activateSignal(e);return}const l=this.impulse.getValue(e),a=this.location.getValue(e);s.applyImpulse(l,a),this.out._activateSignal(e)}getClassName(){return"FlowGraphApplyImpulseBlock"}}let i=!1;function c(){i||(i=!0,r("FlowGraphApplyImpulseBlock",u))}c();export{u as FlowGraphApplyImpulseBlock,c as RegisterFlowGraphApplyImpulseBlock};
@@ -0,0 +1 @@
1
+ import{f as i,g as s,X as l,W as u,i as n}from"./index-B2zBEWsq.js";class h extends i{constructor(e){super(e),this.config=e,this.array=this.registerDataInput("array",s),this.index=this.registerDataInput("index",s,new l(-1)),this.value=this.registerDataOutput("value",s)}_updateOutputs(e){const r=this.array.getValue(e),a=u(this.index.getValue(e));r&&a>=0&&a<r.length?this.value.setValue(r[a],e):this.value.setValue(null,e)}serialize(e){super.serialize(e)}getClassName(){return"FlowGraphArrayIndexBlock"}}let t=!1;function o(){t||(t=!0,n("FlowGraphArrayIndexBlock",h))}o();export{h as FlowGraphArrayIndexBlock,o as RegisterFlowGraphArrayIndexBlock};
@@ -0,0 +1 @@
1
+ import{f as u,x as c,a8 as r,g,ag as h,i as l}from"./index-B2zBEWsq.js";class p extends u{constructor(t){super(t),this.config=t,this._easingFunctions={},this.mode=this.registerDataInput("mode",c,0),this.controlPoint1=this.registerDataInput("controlPoint1",r),this.controlPoint2=this.registerDataInput("controlPoint2",r),this.easingFunction=this.registerDataOutput("easingFunction",g)}_updateOutputs(t){const s=this.mode.getValue(t),e=this.controlPoint1.getValue(t),i=this.controlPoint2.getValue(t);if(s===void 0)return;const n=`${s}-${e.x}-${e.y}-${i.x}-${i.y}`;if(!this._easingFunctions[n]){const o=new h(e.x,e.y,i.x,i.y);o.setEasingMode(s),this._easingFunctions[n]=o}this.easingFunction.setValue(this._easingFunctions[n],t)}getClassName(){return"FlowGraphBezierCurveEasing"}}let a=!1;function F(){a||(a=!0,l("FlowGraphBezierCurveEasing",p))}F();export{p as FlowGraphBezierCurveEasingBlock,F as RegisterFlowGraphBezierCurveEasingBlock};
@@ -0,0 +1 @@
1
+ import{F as o}from"./flowGraphCachedOperationBlock-Dng-6jE0.js";class p extends o{constructor(t,a,s,e,r,i){super(s,i),this._operation=e,this._className=r,this.a=this.registerDataInput("a",t),this.b=this.registerDataInput("b",a)}_doOperation(t){const a=this.a.getValue(t),s=this.b.getValue(t);return this._operation(a,s)}getClassName(){return this._className}}export{p as F};
@@ -0,0 +1 @@
1
+ import{N as i,h as a,i as r}from"./index-B2zBEWsq.js";class s extends i{constructor(e){super(e),this.condition=this.registerDataInput("condition",a),this.onTrue=this._registerSignalOutput("onTrue"),this.onFalse=this._registerSignalOutput("onFalse")}_execute(e){this.condition.getValue(e)?this.onTrue._activateSignal(e):this.onFalse._activateSignal(e)}getClassName(){return"FlowGraphBranchBlock"}}let t=!1;function o(){t||(t=!0,r("FlowGraphBranchBlock",s))}o();export{s as FlowGraphBranchBlock,o as RegisterFlowGraphBranchBlock};
@@ -0,0 +1 @@
1
+ import{f as u,h}from"./index-B2zBEWsq.js";const l="cachedOperationValue",t="cachedExecutionId";class c extends u{constructor(e,i){super(i),this.value=this.registerDataOutput("value",e),this.isValid=this.registerDataOutput("isValid",h)}_updateOutputs(e){const i=e._getExecutionVariable(this,t,-1),s=e._getExecutionVariable(this,l,null);if(s!=null&&i===e.executionId)this.isValid.setValue(!0,e),this.value.setValue(s,e);else try{const a=this._doOperation(e);if(a==null){this.isValid.setValue(!1,e);return}e._setExecutionVariable(this,l,a),e._setExecutionVariable(this,t,e.executionId),this.value.setValue(a,e),this.isValid.setValue(!0,e)}catch{this.isValid.setValue(!1,e)}}}export{c as F};
@@ -0,0 +1 @@
1
+ import{y as i,O as r,W as s,i as n}from"./index-B2zBEWsq.js";class o extends i{constructor(e){super(e),this.delayIndex=this.registerDataInput("delayIndex",r)}_execute(e,u){const a=s(this.delayIndex.getValue(e));if(a<0||isNaN(a)||!isFinite(a))return this._reportError(e,"Invalid delay index");const l=e._getGlobalContextVariable("pendingDelays",[])[a];l&&l.dispose(),this.out._activateSignal(e)}getClassName(){return"FlowGraphCancelDelayBlock"}}let t=!1;function c(){t||(t=!0,n("FlowGraphCancelDelayBlock",o))}c();export{o as FlowGraphCancelDelayBlock,c as RegisterFlowGraphCancelDelayBlock};
@@ -0,0 +1 @@
1
+ import{f as i,g as e}from"./index-B2zBEWsq.js";class o extends i{constructor(t){super(t),this.config=t,this.executionFunction=this.registerDataInput("function",e),this.value=this.registerDataInput("value",e),this.result=this.registerDataOutput("result",e)}_updateOutputs(t){const s=this.executionFunction.getValue(t),u=this.value.getValue(t);s&&this.result.setValue(s(u,t),t)}getClassName(){return"FlowGraphCodeExecutionBlock"}}export{o as FlowGraphCodeExecutionBlock};
@@ -0,0 +1 @@
1
+ import{f as a,h as s,g as e,i as n}from"./index-B2zBEWsq.js";class r extends a{constructor(t){super(t),this.condition=this.registerDataInput("condition",s),this.onTrue=this.registerDataInput("onTrue",e),this.onFalse=this.registerDataInput("onFalse",e),this.output=this.registerDataOutput("output",e)}_updateOutputs(t){const o=this.condition.getValue(t);this.output.setValue(o?this.onTrue.getValue(t):this.onFalse.getValue(t),t)}getClassName(){return"FlowGraphConditionalBlock"}}let i=!1;function l(){i||(i=!0,n("FlowGraphConditionalBlock",r))}l();export{r as FlowGraphConditionalDataBlock,l as RegisterFlowGraphConditionalDataBlock};
@@ -0,0 +1 @@
1
+ import{y as h,g,k as u,L as o,i as p}from"./index-B2zBEWsq.js";class m extends h{constructor(e){if(super(e),this.message=this.registerDataInput("message",g),this.logType=this.registerDataInput("logType",u,"log"),e?.messageTemplate){const t=this._getTemplateMatches(e.messageTemplate);for(const s of t)this.registerDataInput(s,g)}}_execute(e){const t=this.logType.getValue(e),s=this._getMessageValue(e);t==="warn"?o.Warn(s):t==="error"?o.Error(s):o.Log(s),this.out._activateSignal(e)}getClassName(){return"FlowGraphConsoleLogBlock"}_serializeValue(e){if(e==null)return String(e);if(typeof e=="object"){const t=e.toString();if(t==="[object Object]")try{return JSON.stringify(e)}catch{return t}return t}return String(e)}_getMessageValue(e){if(this.config?.messageTemplate){let t=this.config.messageTemplate;const s=this._getTemplateMatches(t),a=this.message.getValue(e),i=a!=null&&typeof a=="object"?a:null;for(const r of s){let l;if(i!==null&&r in i?l=i[r]:l=this.getDataInput(r)?.getValue(e),l!==void 0){const c=r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp(`\\{${c}\\}`,"g"),this._serializeValue(l))}}return t}else return this.message.getValue(e)}_getTemplateMatches(e){const t=/\{([^}]+)\}/g,s=[];let a;for(;(a=t.exec(e))!==null;)s.push(a[1]);return s}}let n=!1;function f(){n||(n=!0,p("FlowGraphConsoleLogBlock",m))}f();export{m as FlowGraphConsoleLogBlock,f as RegisterFlowGraphConsoleLogBlock};
@@ -0,0 +1 @@
1
+ import{f as a,Z as o,$ as u,i as l}from"./index-B2zBEWsq.js";class r extends a{constructor(t){super(t),this.config=t,this.output=this.registerDataOutput("output",o(t.value))}_updateOutputs(t){this.output.setValue(this.config.value,t)}getClassName(){return"FlowGraphConstantBlock"}serialize(t={},s=u){super.serialize(t),s("value",this.config.value,t.config)}}let e=!1;function i(){e||(e=!0,l("FlowGraphConstantBlock",r))}i();export{r as FlowGraphConstantBlock,i as RegisterFlowGraphConstantBlock};
@@ -0,0 +1 @@
1
+ import{f as t,g as r,x as a,i}from"./index-B2zBEWsq.js";class u extends t{constructor(e){super(e),this.userVariables=this.registerDataOutput("userVariables",r),this.executionId=this.registerDataOutput("executionId",a)}_updateOutputs(e){this.userVariables.setValue(e.userVariables,e),this.executionId.setValue(e.executionId,e)}serialize(e){super.serialize(e)}getClassName(){return"FlowGraphContextBlock"}}let s=!1;function l(){s||(s=!0,i("FlowGraphContextBlock",u))}l();export{u as FlowGraphContextBlock,l as RegisterFlowGraphContextBlock};
@@ -0,0 +1 @@
1
+ import{y as i,x as u,i as a}from"./index-B2zBEWsq.js";class l extends i{constructor(t){super(t),this.count=this.registerDataOutput("count",u),this.reset=this._registerSignalInput("reset")}_execute(t,r){if(r===this.reset){t._setExecutionVariable(this,"count",0),this.count.setValue(0,t);return}const e=t._getExecutionVariable(this,"count",0)+1;t._setExecutionVariable(this,"count",e),this.count.setValue(e,t),this.out._activateSignal(t)}getClassName(){return"FlowGraphCallCounterBlock"}}let s=!1;function o(){s||(s=!0,a("FlowGraphCallCounterBlock",l))}o();export{l as FlowGraphCallCounterBlock,o as RegisterFlowGraphCounterBlock};
@@ -0,0 +1 @@
1
+ import{f as r,g as a,W as i,Y as l,i as h}from"./index-B2zBEWsq.js";class c extends r{constructor(e){super(e),this.config=e,this._inputCases=new Map,this.case=this.registerDataInput("case",a,NaN),this.default=this.registerDataInput("default",a),this.value=this.registerDataOutput("value",a);const s=this.config.cases||[];for(let t of s){if(t=i(t),this.config.treatCasesAsIntegers&&(t=t|0,this._inputCases.has(t)))return;this._inputCases.set(t,this.registerDataInput(`in_${t}`,a))}}_updateOutputs(e){const s=this.case.getValue(e);let t;l(s)&&(t=this._getOutputValueForCase(i(s),e)),t||(t=this.default.getValue(e)),this.value.setValue(t,e)}_getOutputValueForCase(e,s){return this._inputCases.get(e)?.getValue(s)}getClassName(){return"FlowGraphDataSwitchBlock"}}let u=!1;function o(){u||(u=!0,h("FlowGraphDataSwitchBlock",c))}o();export{c as FlowGraphDataSwitchBlock,o as RegisterFlowGraphDataSwitchBlock};
@@ -0,0 +1 @@
1
+ import{y as i,x as u,i as o}from"./index-B2zBEWsq.js";class a extends i{constructor(e){super(e),this.count=this.registerDataInput("count",u),this.reset=this._registerSignalInput("reset"),this.currentCount=this.registerDataOutput("currentCount",u)}_execute(e,s){if(s===this.reset){e._setExecutionVariable(this,"debounceCount",0);return}const n=this.count.getValue(e),t=e._getExecutionVariable(this,"debounceCount",0)+1;this.currentCount.setValue(t,e),e._setExecutionVariable(this,"debounceCount",t),t>=n&&(this.out._activateSignal(e),e._setExecutionVariable(this,"debounceCount",0))}getClassName(){return"FlowGraphDebounceBlock"}}let r=!1;function c(){r||(r=!0,o("FlowGraphDebounceBlock",a))}c();export{a as FlowGraphDebounceBlock,c as RegisterFlowGraphDebounceBlock};
@@ -0,0 +1 @@
1
+ import{f as s,g as o,i as e}from"./index-B2zBEWsq.js";const g=100;class r extends s{constructor(t){super(t),this.log=[],this._isDebug=!0,this.input=this.registerDataInput("input",o),this.output=this.registerDataOutput("output",o)}_updateOutputs(t){const i=this.input.getValue(t);this.output.setValue(i,t),this._logValue(i)}_logValue(t){if(t==null)this.log.push(["null","null"]);else{const i=r._FormatValue(t);this.log.push([i,String(t)])}this.log.length>g&&this.log.shift()}static _FormatValue(t){if(typeof t=="number")return Number.isInteger(t)?t.toString():t.toFixed(4);if(typeof t=="boolean"||typeof t=="string")return String(t);if(t&&typeof t=="object"){if("w"in t&&"x"in t&&"y"in t&&"z"in t)return`(${t.x.toFixed(3)}, ${t.y.toFixed(3)}, ${t.z.toFixed(3)}, ${t.w.toFixed(3)})`;if("z"in t&&"x"in t&&"y"in t)return`(${t.x.toFixed(3)}, ${t.y.toFixed(3)}, ${t.z.toFixed(3)})`;if("x"in t&&"y"in t)return`(${t.x.toFixed(3)}, ${t.y.toFixed(3)})`;if("r"in t&&"g"in t&&"b"in t){const i="a"in t?`, ${t.a.toFixed(3)}`:"";return`(${t.r.toFixed(3)}, ${t.g.toFixed(3)}, ${t.b.toFixed(3)}${i})`}if(typeof t.toString=="function"&&t.toString!==Object.prototype.toString)return t.toString()}try{const i=JSON.stringify(t);return i.length>64?i.substring(0,61)+"...":i}catch{return String(t)}}getClassName(){return"FlowGraphDebugBlock"}}let n=!1;function p(){n||(n=!0,e("FlowGraphDebugBlock",r))}p();export{r as FlowGraphDebugBlock,p as RegisterFlowGraphDebugBlock};
@@ -0,0 +1 @@
1
+ import{y as u,X as t,O as i,i as o}from"./index-B2zBEWsq.js";class n extends u{constructor(e={}){super(e),this.config=e,this.config.startIndex=e.startIndex??new t(0),this.reset=this._registerSignalInput("reset"),this.maxExecutions=this.registerDataInput("maxExecutions",i),this.executionCount=this.registerDataOutput("executionCount",i,new t(0))}_execute(e,r){if(r===this.reset)this.executionCount.setValue(this.config.startIndex,e);else{const s=this.executionCount.getValue(e);s.value<this.maxExecutions.getValue(e).value&&(this.executionCount.setValue(new t(s.value+1),e),this.out._activateSignal(e))}}getClassName(){return"FlowGraphDoNBlock"}}let a=!1;function l(){a||(a=!0,o("FlowGraphDoNBlock",n))}l();export{n as FlowGraphDoNBlock,l as RegisterFlowGraphDoNBlock};
@@ -0,0 +1 @@
1
+ import{f as o,g as i,x as E,aa as d,ab as n,ac as w,ad as B,ae as f,af as C,ag as m,i as k}from"./index-B2zBEWsq.js";var l;(function(e){e[e.CircleEase=0]="CircleEase",e[e.BackEase=1]="BackEase",e[e.BounceEase=2]="BounceEase",e[e.CubicEase=3]="CubicEase",e[e.ElasticEase=4]="ElasticEase",e[e.ExponentialEase=5]="ExponentialEase",e[e.PowerEase=6]="PowerEase",e[e.QuadraticEase=7]="QuadraticEase",e[e.QuarticEase=8]="QuarticEase",e[e.QuinticEase=9]="QuinticEase",e[e.SineEase=10]="SineEase",e[e.BezierCurveEase=11]="BezierCurveEase"})(l||(l={}));function g(e,...s){switch(e){case 11:return new m(...s);case 0:return new C;case 1:return new f(...s);case 2:return new B(...s);case 3:return new w;case 4:return new n(...s);case 5:return new d(...s);default:throw new Error("Easing type not yet implemented")}}class Q extends o{constructor(s){super(s),this.config=s,this._easingFunctions={},this.type=this.registerDataInput("type",i,11),this.mode=this.registerDataInput("mode",E,0),this.parameters=this.registerDataInput("parameters",i,[1,0,0,1]),this.easingFunction=this.registerDataOutput("easingFunction",i)}_updateOutputs(s){const a=this.type.getValue(s),t=this.mode.getValue(s),u=this.parameters.getValue(s);if(a===void 0||t===void 0)return;const r=`${a}-${t}-${u.join("-")}`;if(!this._easingFunctions[r]){const c=g(a,...u);c.setEasingMode(t),this._easingFunctions[r]=c}this.easingFunction.setValue(this._easingFunctions[r],s)}getClassName(){return"FlowGraphEasingBlock"}}let h=!1;function _(){h||(h=!0,k("FlowGraphEasingBlock",Q))}_();export{l as EasingFunctionType,Q as FlowGraphEasingBlock,_ as RegisterFlowGraphEasingBlock};
@@ -0,0 +1 @@
1
+ import{N as i,h as a,i as s}from"./index-B2zBEWsq.js";class o extends i{constructor(e){super(e),this.onOn=this._registerSignalOutput("onOn"),this.onOff=this._registerSignalOutput("onOff"),this.value=this.registerDataOutput("value",a)}_execute(e,n){let l=e._getExecutionVariable(this,"value",typeof this.config?.startValue=="boolean"?!this.config.startValue:!1);l=!l,e._setExecutionVariable(this,"value",l),this.value.setValue(l,e),l?this.onOn._activateSignal(e):this.onOff._activateSignal(e)}getClassName(){return"FlowGraphFlipFlopBlock"}}let t=!1;function r(){t||(t=!0,s("FlowGraphFlipFlopBlock",o))}r();export{o as FlowGraphFlipFlopBlock,r as RegisterFlowGraphFlipFlopBlock};
@@ -0,0 +1 @@
1
+ import{y as h,g as o,x as p,O as d,X as r,W as t,i as g}from"./index-B2zBEWsq.js";class s extends h{constructor(e){super(e),this.startIndex=this.registerDataInput("startIndex",o,0),this.endIndex=this.registerDataInput("endIndex",o),this.step=this.registerDataInput("step",p,1),this.index=this.registerDataOutput("index",d,new r(t(e?.initialIndex??0))),this.executionFlow=this._registerSignalOutput("executionFlow"),this.completed=this._registerSignalOutput("completed"),this._unregisterSignalOutput("out")}_execute(e){const u=t(this.startIndex.getValue(e)),a=this.step.getValue(e);let n=t(this.endIndex.getValue(e));for(let i=u;i<n&&(this.index.setValue(new r(i),e),this.executionFlow._activateSignal(e),n=t(this.endIndex.getValue(e)),!(i>s.MaxLoopIterations*a));i+=a);this.config?.incrementIndexWhenLoopDone&&this.index.setValue(new r(t(this.index.getValue(e))+a),e),this.completed._activateSignal(e)}getClassName(){return"FlowGraphForLoopBlock"}}s.MaxLoopIterations=1e3;let l=!1;function x(){l||(l=!0,g("FlowGraphForLoopBlock",s))}x();export{s as FlowGraphForLoopBlock,x as RegisterFlowGraphForLoopBlock};
@@ -0,0 +1 @@
1
+ import{f as a,k as c,g as n,i as r}from"./index-B2zBEWsq.js";class l extends a{constructor(t){super(t),this.functionName=this.registerDataInput("functionName",c),this.object=this.registerDataInput("object",n),this.context=this.registerDataInput("context",n,null),this.output=this.registerDataOutput("output",n)}_updateOutputs(t){const s=this.functionName.getValue(t),i=this.object.getValue(t),u=this.context.getValue(t);if(i&&s){const e=i[s];e&&typeof e=="function"&&this.output.setValue(e.bind(u),t)}}getClassName(){return"FlowGraphFunctionReference"}}let o=!1;function p(){o||(o=!0,r("FlowGraphFunctionReference",l))}p();export{l as FlowGraphFunctionReferenceBlock,p as RegisterFlowGraphFunctionReferenceBlock};
@@ -0,0 +1 @@
1
+ import{f as e,g as s}from"./index-B2zBEWsq.js";class m extends e{constructor(o){super(o);const t=o.glTF,r=t?.animations?.map(a=>a._babylonAnimationGroup)||[];this.animationGroups=this.registerDataOutput("animationGroups",s,r);const n=t?.nodes?.map(a=>a._babylonTransformNode)||[];this.nodes=this.registerDataOutput("nodes",s,n)}getClassName(){return"FlowGraphGLTFDataProvider"}}export{m as FlowGraphGLTFDataProvider};
@@ -0,0 +1 @@
1
+ import{H as l,g as i,V as a,i as s}from"./index-B2zBEWsq.js";import{F as c}from"./flowGraphCachedOperationBlock-Dng-6jE0.js";class n extends c{constructor(e){super(l,e),this.body=this.registerDataInput("body",i)}_doOperation(e){const r=this.body.getValue(e);if(!r)return;let t=e._getExecutionVariable(this,"_cachedVelocity",null);return t||(t=new a,e._setExecutionVariable(this,"_cachedVelocity",t)),r.getAngularVelocityToRef(t),t}getClassName(){return"FlowGraphGetAngularVelocityBlock"}}let o=!1;function u(){o||(o=!0,s("FlowGraphGetAngularVelocityBlock",n))}u();export{n as FlowGraphGetAngularVelocityBlock,u as RegisterFlowGraphGetAngularVelocityBlock};
@@ -0,0 +1 @@
1
+ import{f as u,g as t,X as p,W as s,a1 as h,i as n}from"./index-B2zBEWsq.js";class o extends u{constructor(e){super(e),this.config=e,this.type=this.registerDataInput("type",t,e.type),this.value=this.registerDataOutput("value",t),this.index=this.registerDataInput("index",t,new p(s(e.index??-1)))}_updateOutputs(e){const i=this.type.getValue(e),r=this.index.getValue(e),l=h(e.assetsContext,i,s(r),this.config.useIndexAsUniqueId);this.value.setValue(l,e)}getClassName(){return"FlowGraphGetAssetBlock"}}let a=!1;function G(){a||(a=!0,n("FlowGraphGetAssetBlock",o))}G();export{o as FlowGraphGetAssetBlock,G as RegisterFlowGraphGetAssetBlock};
@@ -0,0 +1 @@
1
+ import{H as o,g as a,V as l,i as s}from"./index-B2zBEWsq.js";import{F as c}from"./flowGraphCachedOperationBlock-Dng-6jE0.js";class n extends c{constructor(e){super(o,e),this.body=this.registerDataInput("body",a)}_doOperation(e){const r=this.body.getValue(e);if(!r)return;let t=e._getExecutionVariable(this,"_cachedVelocity",null);return t||(t=new l,e._setExecutionVariable(this,"_cachedVelocity",t)),r.getLinearVelocityToRef(t),t}getClassName(){return"FlowGraphGetLinearVelocityBlock"}}let i=!1;function h(){i||(i=!0,s("FlowGraphGetLinearVelocityBlock",n))}h();export{n as FlowGraphGetLinearVelocityBlock,h as RegisterFlowGraphGetLinearVelocityBlock};
@@ -0,0 +1 @@
1
+ import{f as a,g as o,x as h,H as r,i as p}from"./index-B2zBEWsq.js";class u extends a{constructor(s){super(s),this.body=this.registerDataInput("body",o),this.mass=this.registerDataOutput("mass",h),this.centerOfMass=this.registerDataOutput("centerOfMass",r),this.inertia=this.registerDataOutput("inertia",r)}_updateOutputs(s){const t=this.body.getValue(s);if(!t)return;const e=t.getMassProperties();e.mass!==void 0&&this.mass.setValue(e.mass,s),e.centerOfMass&&this.centerOfMass.setValue(e.centerOfMass,s),e.inertia&&this.inertia.setValue(e.inertia,s)}getClassName(){return"FlowGraphGetPhysicsMassPropertiesBlock"}}let i=!1;function c(){i||(i=!0,p("FlowGraphGetPhysicsMassPropertiesBlock",u))}c();export{u as FlowGraphGetPhysicsMassPropertiesBlock,c as RegisterFlowGraphGetPhysicsMassPropertiesBlock};
@@ -0,0 +1 @@
1
+ import{g as a,k as i,i as u}from"./index-B2zBEWsq.js";import{F as l}from"./flowGraphCachedOperationBlock-Dng-6jE0.js";class n extends l{constructor(e){super(a,e),this.config=e,this.object=this.registerDataInput("object",a,e.object),this.propertyName=this.registerDataInput("propertyName",i,e.propertyName),this.customGetFunction=this.registerDataInput("customGetFunction",a)}_doOperation(e){const o=this.customGetFunction.getValue(e);let r;if(o)r=o(this.object.getValue(e),this.propertyName.getValue(e),e);else{const t=this.object.getValue(e),s=this.propertyName.getValue(e);r=t&&s?this._getPropertyValue(t,s):void 0}return r}_getPropertyValue(e,o){const r=o.split(".");let t=e;for(const s of r)if(t=t[s],t===void 0)return;return t}getClassName(){return"FlowGraphGetPropertyBlock"}}let p=!1;function h(){p||(p=!0,u("FlowGraphGetPropertyBlock",n))}h();export{n as FlowGraphGetPropertyBlock,h as RegisterFlowGraphGetPropertyBlock};
@@ -0,0 +1 @@
1
+ import{x as r,g as s,i as u}from"./index-B2zBEWsq.js";import{F as n}from"./flowGraphCachedOperationBlock-Dng-6jE0.js";class l extends n{constructor(e){super(r,e),this.sound=this.registerDataInput("sound",s)}_doOperation(e){const o=this.sound.getValue(e);if(o)return o.volume}getClassName(){return"FlowGraphGetSoundVolumeBlock"}}let t=!1;function a(){t||(t=!0,u("FlowGraphGetSoundVolumeBlock",l))}a();export{l as FlowGraphGetSoundVolumeBlock,a as RegisterFlowGraphGetSoundVolumeBlock};
@@ -0,0 +1 @@
1
+ import{f as r,g as i,i as s}from"./index-B2zBEWsq.js";class t extends r{constructor(e){super(e),this.config=e,this.value=this.registerDataOutput("value",i,e.initialValue)}_updateOutputs(e){const a=this.config.variable;e.hasVariable(a)&&this.value.setValue(e.getVariable(a),e)}serialize(e){super.serialize(e),e.config.variable=this.config.variable}getClassName(){return"FlowGraphGetVariableBlock"}}let l=!1;function u(){l||(l=!0,s("FlowGraphGetVariableBlock",t))}u();export{t as FlowGraphGetVariableBlock,u as RegisterFlowGraphGetVariableBlock};
@@ -0,0 +1 @@
1
+ import{f as l,g as r,O as o,X as s,i as n}from"./index-B2zBEWsq.js";class h extends l{constructor(e){super(e),this.config=e,this.object=this.registerDataInput("object",r),this.array=this.registerDataInput("array",r),this.index=this.registerDataOutput("index",o,new s(-1))}_updateOutputs(e){const i=this.object.getValue(e),t=this.array.getValue(e);t&&this.index.setValue(new s(t.indexOf(i)),e)}serialize(e){super.serialize(e)}getClassName(){return"FlowGraphIndexOfBlock"}}let a=!1;function p(){a||(a=!0,n("FlowGraphIndexOfBlock",h))}p();export{h as FlowGraphIndexOfBlock,p as RegisterFlowGraphIndexOfBlock};
@@ -0,0 +1 @@
1
+ import{f as d,z as g,A as f,x as h,g as m,k as F,D as y,i as A}from"./index-B2zBEWsq.js";class V extends d{constructor(t={}){super(t),this.keyFrames=[];const a=typeof t?.animationType=="string"?g(t.animationType):f(t?.animationType??0),i=t?.keyFramesCount??1,n=this.registerDataInput("duration_0",h,0),e=this.registerDataInput("value_0",a);this.keyFrames.push({duration:n,value:e});for(let s=1;s<i+1;s++){const u=this.registerDataInput(`duration_${s}`,h,s===i?t.duration:void 0),l=this.registerDataInput(`value_${s}`,a);this.keyFrames.push({duration:u,value:l})}this.initialValue=this.keyFrames[0].value,this.endValue=this.keyFrames[i].value,this.easingFunction=this.registerDataInput("easingFunction",m),this.animation=this.registerDataOutput("animation",m),this.propertyName=this.registerDataInput("propertyName",F,t?.propertyName),this.customBuildAnimation=this.registerDataInput("customBuildAnimation",m)}_updateOutputs(t){const a=t._getGlobalContextVariable("interpolationAnimations",[]),i=this.propertyName.getValue(t),n=this.easingFunction.getValue(t),e=this._createAnimation(t,i,n);if(this.animation.setValue(e,t),Array.isArray(e))for(const s of e)a.push(s.uniqueId);else a.push(e.uniqueId);t._setGlobalContextVariable("interpolationAnimations",a)}_createAnimation(t,a,i){const n=this.initialValue.richType,e=[],s=this.initialValue.getValue(t)||n.defaultValue;e.push({frame:0,value:s});const u=this.config?.numberOfKeyFrames??1;for(let r=1;r<u+1;r++){const p=this.keyFrames[r].duration?.getValue(t);let o=this.keyFrames[r].value?.getValue(t);r===u-1&&(o=o||n.defaultValue),p!==void 0&&o&&e.push({frame:p*60,value:o})}const l=this.customBuildAnimation.getValue(t);if(l)return l(null,null,t)(e,60,n.animationType,i);if(typeof a=="string"){const r=y(a,n.animationType,60,i);return r.setKeys(e),[r]}else return a.map(p=>{const o=y(p,n.animationType,60,i);return o.setKeys(e),o})}getClassName(){return"FlowGraphInterpolationBlock"}}let c=!1;function k(){c||(c=!0,A("FlowGraphInterpolationBlock",V))}k();export{V as FlowGraphInterpolationBlock,k as RegisterFlowGraphInterpolationBlock};
@@ -0,0 +1 @@
1
+ import{f as r,k as l,h as i,i as o}from"./index-B2zBEWsq.js";class u extends r{constructor(t){super(t),this.key=this.registerDataInput("key",l),this.withShift=this.registerDataInput("withShift",i),this.withCtrl=this.registerDataInput("withCtrl",i),this.withAlt=this.registerDataInput("withAlt",i),this.withMeta=this.registerDataInput("withMeta",i),this.withCommandOrCtrl=this.registerDataInput("withCommandOrCtrl",i),this.isPressed=this.registerDataOutput("isPressed",i)}_updateOutputs(t){const h=t.configuration.sceneEventCoordinator;if(!h){this.isPressed.setValue(!1,t);return}const e=h.pressedKeys,a=this.key.getValue(t);let s=a?e.has(a):!0;s&&this.withShift.getValue(t)&&(s=e.has("ShiftLeft")||e.has("ShiftRight")),s&&this.withCtrl.getValue(t)&&(s=e.has("ControlLeft")||e.has("ControlRight")),s&&this.withAlt.getValue(t)&&(s=e.has("AltLeft")||e.has("AltRight")),s&&this.withMeta.getValue(t)&&(s=e.has("MetaLeft")||e.has("MetaRight")),s&&this.withCommandOrCtrl.getValue(t)&&(s=e.has("CommandOrControl")),this.isPressed.setValue(s,t)}getClassName(){return"FlowGraphIsKeyPressedBlock"}}o("FlowGraphIsKeyPressedBlock",u);export{u as FlowGraphIsKeyPressedBlock};
@@ -0,0 +1 @@
1
+ import{h as t,g as r,i as a}from"./index-B2zBEWsq.js";import{F as n}from"./flowGraphCachedOperationBlock-Dng-6jE0.js";class i extends n{constructor(e){super(t,e),this.sound=this.registerDataInput("sound",r)}_doOperation(e){const o=this.sound.getValue(e);if(o)return o.state===3||o.state===2}getClassName(){return"FlowGraphIsSoundPlayingBlock"}}let s=!1;function l(){s||(s=!0,a("FlowGraphIsSoundPlayingBlock",i))}l();export{i as FlowGraphIsSoundPlayingBlock,l as RegisterFlowGraphIsSoundPlayingBlock};
@@ -0,0 +1 @@
1
+ import{O as F,X as _,g as c,c as y,aA as b,V as j,a7 as I,i as N}from"./index-B2zBEWsq.js";import{F as V}from"./flowGraphCachedOperationBlock-Dng-6jE0.js";const g=new RegExp(/\/\{(\w+)\}(?=\/|$)/g);class G{constructor(o,s){this.path=o,this.ownerBlock=s,this.templatedInputs=[];let n=g.exec(o);const r=new Set;for(;n;){const[,e]=n;if(r.has(e))throw new Error("Duplicate template variable detected.");r.add(e),this.templatedInputs.push(s.registerDataInput(e,F,new _(0))),n=g.exec(o)}}getAccessor(o,s){let n=this.path;for(const r of this.templatedInputs){const e=r.getValue(s).value;if(typeof e!="number"||e<0)throw new Error("Invalid value for templated input.");n=n.replace(`{${r.name}}`,e.toString())}return o.convert(n)}}class O extends V{constructor(o){super(c,o),this.config=o,this.object=this.registerDataOutput("object",c),this.propertyName=this.registerDataOutput("propertyName",c),this.setterFunction=this.registerDataOutput("setFunction",c,this._setPropertyValue.bind(this)),this.getterFunction=this.registerDataOutput("getFunction",c,this._getPropertyValue.bind(this)),this.generateAnimationsFunction=this.registerDataOutput("generateAnimationsFunction",c,this._getInterpolationAnimationPropertyInfo.bind(this)),this.templateComponent=new G(o.jsonPointer,this)}_doOperation(o){const s=this.templateComponent.getAccessor(this.config.pathConverter,o),n=s.info.get(s.object),r=s.info.getTarget?.(s.object),e=s.info.getPropertyName?.[0](s.object);if(r)this.object.setValue(r,o),e&&this.propertyName.setValue(e,o);else throw new Error("Object is undefined");return n}_setPropertyValue(o,s,n,r){const e=this.templateComponent.getAccessor(this.config.pathConverter,r),i=e.info.type;i.startsWith("Color")&&(n=C(n,i)),e.info.set?.(n,e.object)}_getPropertyValue(o,s,n){const r=this.templateComponent.getAccessor(this.config.pathConverter,n),e=r.info.type,i=r.info.get(r.object);return e.startsWith("Color")?D(i):i}_getInterpolationAnimationPropertyInfo(o,s,n){const r=this.templateComponent.getAccessor(this.config.pathConverter,n);return(e,i,d,h)=>{const l=[],m=r.info.type;return m.startsWith("Color")&&(e=e.map(p=>({frame:p.frame,value:C(p.value,m)}))),r.info.interpolation?.forEach((p,u)=>{const P=r.info.getPropertyName?.[u](r.object)||"Animation-interpolation-"+u;let f=e;d!==p.type&&(f=e.map(a=>({frame:a.frame,value:p.getValue(void 0,a.value.asArray?a.value.asArray():[a.value],0,1)})));const A=p.buildAnimations(r.object,P,60,f);for(const a of A)h&&a.babylonAnimation.setEasingFunction(h),l.push(a.babylonAnimation)}),l}}getClassName(){return"FlowGraphJsonPointerParserBlock"}}function C(t,o){return t.getClassName().startsWith("Color")?t:o==="Color3"?new y(t.x,t.y,t.z):o==="Color4"?new b(t.x,t.y,t.z,t.w):t}function D(t){if(t instanceof y)return new j(t.r,t.g,t.b);if(t instanceof b)return new I(t.r,t.g,t.b,t.a);throw new Error("Invalid color type")}let w=!1;function R(){w||(w=!0,N("FlowGraphJsonPointerParserBlock",O))}R();export{O as FlowGraphJsonPointerParserBlock,R as RegisterFlowGraphJsonPointerParserBlock};
@@ -0,0 +1 @@
1
+ import{h as s,i as a}from"./index-B2zBEWsq.js";import{F as o}from"./flowGraphKeyboardEventBlock-Bx3pAzzh.js";class n extends o{constructor(e){super(e),this.type="KeyDown",this.isRepeat=this.registerDataOutput("isRepeat",s)}_executeEvent(e,t){const r=t.event.repeat??!1;return r&&this.config?.ignoreRepeat?!0:(this.isRepeat.setValue(r,e),super._executeEvent(e,t))}getClassName(){return"FlowGraphKeyDownEventBlock"}}a("FlowGraphKeyDownEventBlock",n);export{n as FlowGraphKeyDownEventBlock};
@@ -0,0 +1 @@
1
+ import{i as o}from"./index-B2zBEWsq.js";import{F as r}from"./flowGraphKeyboardEventBlock-Bx3pAzzh.js";class t extends r{constructor(e){super(e),this.type="KeyUp"}getClassName(){return"FlowGraphKeyUpEventBlock"}}o("FlowGraphKeyUpEventBlock",t);export{t as FlowGraphKeyUpEventBlock};
@@ -0,0 +1 @@
1
+ import{j as h,k as a,h as s,_ as u}from"./index-B2zBEWsq.js";class o extends h{constructor(e){super(e),this.key=this.registerDataInput("key",a),this.keyCode=this.registerDataOutput("keyCode",a),this.keyValue=this.registerDataOutput("keyValue",a),this.shiftKey=this.registerDataOutput("shiftKey",s),this.ctrlKey=this.registerDataOutput("ctrlKey",s),this.altKey=this.registerDataOutput("altKey",s),this.metaKey=this.registerDataOutput("metaKey",s),this.commandOrCtrl=this.registerDataOutput("commandOrCtrl",s)}_executeEvent(e,r){const t=r.event,i=this.key.getValue(e);return i&&i!==t.code?!0:(this.keyCode.setValue(t.code,e),this.keyValue.setValue(t.key,e),this.shiftKey.setValue(t.shiftKey,e),this.ctrlKey.setValue(t.ctrlKey,e),this.altKey.setValue(t.altKey,e),this.metaKey.setValue(t.metaKey,e),this.commandOrCtrl.setValue(u?t.metaKey:t.ctrlKey,e),this._execute(e),!this.config?.stopPropagation)}_preparePendingTasks(e){}_cancelPendingTasks(e){}}export{o as F};
@@ -0,0 +1 @@
1
+ import{O as G,X as y,z as i,g as l,x as a,h as B,Y as I,W as m,aW as F,aX as d,aY as x,aZ as _,a7 as k,a5 as f,a3 as M,M as g,Q as N,V as v,a9 as S,i as s}from"./index-B2zBEWsq.js";import{F as w}from"./flowGraphBinaryOperationBlock-DFLuCAKJ.js";import{F as D}from"./flowGraphCachedOperationBlock-Dng-6jE0.js";import{F as c}from"./flowGraphUnaryOperationBlock-CaRh4Ef0.js";class T extends D{constructor(r,o,t,n){super(r,n),this._operation=o,this._className=t}_doOperation(r){return this._operation(r)}getClassName(){return this._className}}class E extends D{constructor(r,o,t,n,p,u,L){super(n,L),this._operation=p,this._className=u,this.a=this.registerDataInput("a",r),this.b=this.registerDataInput("b",o),this.c=this.registerDataInput("c",t)}_doOperation(r){return this._operation(this.a.getValue(r),this.b.getValue(r),this.c.getValue(r))}getClassName(){return this._className}}class V extends w{constructor(r){super(i(r?.type),i(r?.type),i(r?.type),(o,t)=>this._polymorphicAdd(o,t),"FlowGraphAddBlock",r)}_polymorphicAdd(r,o){const t=F(r),n=F(o);if(d(t,n)||x(t,n)||_(t,n))return r.add(o);if(t==="Quaternion"||n==="Vector4")return new k(r.x,r.y,r.z,r.w).addInPlace(o);if(t==="Vector4"||n==="Quaternion")return r.add(o);if(this.config?.preventIntegerFloatArithmetic&&typeof r!=typeof o)throw new Error("Cannot add different types of numbers.");return m(r)+m(o)}}class z extends w{constructor(r){super(i(r?.type),i(r?.type),i(r?.type),(o,t)=>this._polymorphicSubtract(o,t),"FlowGraphSubtractBlock",r)}_polymorphicSubtract(r,o){const t=F(r),n=F(o);if(d(t,n)||_(t,n)||x(t,n))return r.subtract(o);if(t==="Quaternion"||n==="Vector4")return new k(r.x,r.y,r.z,r.w).subtractInPlace(o);if(t==="Vector4"||n==="Quaternion")return r.subtract(o);if(this.config?.preventIntegerFloatArithmetic&&typeof r!=typeof o)throw new Error("Cannot add different types of numbers.");return m(r)-m(o)}}class q extends w{constructor(r){super(i(r?.type),i(r?.type),i(r?.type),(o,t)=>this._polymorphicMultiply(o,t),"FlowGraphMultiplyBlock",r)}_polymorphicMultiply(r,o){const t=F(r),n=F(o);if(d(t,n)||_(t,n))return r.multiply(o);if(t==="Quaternion"||n==="Vector4")return new k(r.x,r.y,r.z,r.w).multiplyInPlace(o);if(t==="Vector4"||n==="Quaternion")return r.multiply(o);if(x(t,n))if(this.config?.useMatrixPerComponent){const p=r.m;for(let u=0;u<p.length;u++)p[u]*=o.m[u];return t==="Matrix2D"?new f(p):t==="Matrix3D"?new M(p):g.FromArray(p)}else return r=r,o=o,o.multiply(r);else{if(this.config?.preventIntegerFloatArithmetic&&typeof r!=typeof o)throw new Error("Cannot add different types of numbers.");return m(r)*m(o)}}}class P extends w{constructor(r){super(i(r?.type),i(r?.type),i(r?.type),(o,t)=>this._polymorphicDivide(o,t),"FlowGraphDivideBlock",r)}_polymorphicDivide(r,o){const t=F(r),n=F(o);if(d(t,n)||_(t,n))return r.divide(o);if(t==="Quaternion"||n==="Quaternion"){const p=r.clone();return p.x/=o.x,p.y/=o.y,p.z/=o.z,p.w/=o.w,p}else{if(t==="Quaternion"||n==="Vector4")return new k(r.x,r.y,r.z,r.w).divideInPlace(o);if(t==="Vector4"||n==="Quaternion")return r.divide(o);if(x(t,n))if(this.config?.useMatrixPerComponent){const p=r.m;for(let u=0;u<p.length;u++)p[u]/=o.m[u];return t==="Matrix2D"?new f(p):t==="Matrix3D"?new M(p):g.FromArray(p)}else return r=r,o=o,r.divide(o);else{if(this.config?.preventIntegerFloatArithmetic&&typeof r!=typeof o)throw new Error("Cannot add different types of numbers.");return m(r)/m(o)}}}}class Q extends T{constructor(r){super(a,o=>this._random(o),"FlowGraphRandomBlock",r),this.min=this.registerDataInput("min",a,r?.min??0),this.max=this.registerDataInput("max",a,r?.max??1),r?.seed&&(this._seed=r.seed)}_isSeed(r=this._seed){return r!==void 0}_getRandomValue(){if(this._isSeed(this._seed)){const r=Math.sin(this._seed++)*1e4;return r-Math.floor(r)}return Math.random()}_random(r){const o=this.min.getValue(r),t=this.max.getValue(r);return this._getRandomValue()*(t-o)+o}}class $ extends T{constructor(r){super(a,()=>Math.E,"FlowGraphEBlock",r)}}class Z extends T{constructor(r){super(a,()=>Math.PI,"FlowGraphPIBlock",r)}}class j extends T{constructor(r){super(a,()=>Number.POSITIVE_INFINITY,"FlowGraphInfBlock",r)}}class X extends T{constructor(r){super(a,()=>Number.NaN,"FlowGraphNaNBlock",r)}}function h(e,r){switch(F(e)){case"FlowGraphInteger":return e=e,new y(r(e.value));case"Vector2":return e=e,new S(r(e.x),r(e.y));case"Vector3":return e=e,new v(r(e.x),r(e.y),r(e.z));case"Vector4":return e=e,new k(r(e.x),r(e.y),r(e.z),r(e.w));case"Quaternion":return e=e,new N(r(e.x),r(e.y),r(e.z),r(e.w));case"Matrix":return e=e,g.FromArray(e.m.map(r));case"Matrix2D":return e=e,new f(e.m.map(r));case"Matrix3D":return e=e,new M(e.m.map(r));default:return e=e,r(e)}}class W extends c{constructor(r){super(a,a,o=>this._polymorphicAbs(o),"FlowGraphAbsBlock",r)}_polymorphicAbs(r){return h(r,Math.abs)}}class Y extends c{constructor(r){super(a,a,o=>this._polymorphicSign(o),"FlowGraphSignBlock",r)}_polymorphicSign(r){return h(r,Math.sign)}}class U extends c{constructor(r){super(a,a,o=>this._polymorphicTrunc(o),"FlowGraphTruncBlock",r)}_polymorphicTrunc(r){return h(r,Math.trunc)}}class H extends c{constructor(r){super(a,a,o=>this._polymorphicFloor(o),"FlowGraphFloorBlock",r)}_polymorphicFloor(r){return h(r,Math.floor)}}class J extends c{constructor(r){super(l,l,o=>this._polymorphicCeiling(o),"FlowGraphCeilBlock",r)}_polymorphicCeiling(r){return h(r,Math.ceil)}}class K extends c{constructor(r){super(l,l,o=>this._polymorphicRound(o),"FlowGraphRoundBlock",r)}_polymorphicRound(r){return h(r,o=>o<0&&this.config?.roundHalfAwayFromZero?-Math.round(-o):Math.round(o))}}class b extends c{constructor(r){super(l,l,o=>this._polymorphicFraction(o),"FlowGraphFractBlock",r)}_polymorphicFraction(r){return h(r,o=>o-Math.floor(o))}}class rr extends c{constructor(r){super(l,l,o=>this._polymorphicNeg(o),"FlowGraphNegationBlock",r)}_polymorphicNeg(r){return h(r,o=>-o)}}function C(e,r,o){switch(F(e)){case"FlowGraphInteger":return e=e,r=r,new y(o(e.value,r.value));case"Vector2":return e=e,r=r,new S(o(e.x,r.x),o(e.y,r.y));case"Vector3":return e=e,r=r,new v(o(e.x,r.x),o(e.y,r.y),o(e.z,r.z));case"Vector4":return e=e,r=r,new k(o(e.x,r.x),o(e.y,r.y),o(e.z,r.z),o(e.w,r.w));case"Quaternion":return e=e,r=r,new N(o(e.x,r.x),o(e.y,r.y),o(e.z,r.z),o(e.w,r.w));case"Matrix":return e=e,g.FromArray(e.m.map((n,p)=>o(n,r.m[p])));case"Matrix2D":return e=e,new f(e.m.map((n,p)=>o(n,r.m[p])));case"Matrix3D":return e=e,new M(e.m.map((n,p)=>o(n,r.m[p])));default:return o(m(e),m(r))}}class or extends w{constructor(r){super(l,l,l,(o,t)=>this._polymorphicRemainder(o,t),"FlowGraphModuloBlock",r)}_polymorphicRemainder(r,o){return C(r,o,(t,n)=>t%n)}}class er extends w{constructor(r){super(l,l,l,(o,t)=>this._polymorphicMin(o,t),"FlowGraphMinBlock",r)}_polymorphicMin(r,o){return C(r,o,Math.min)}}class tr extends w{constructor(r){super(l,l,l,(o,t)=>this._polymorphicMax(o,t),"FlowGraphMaxBlock",r)}_polymorphicMax(r,o){return C(r,o,Math.max)}}function lr(e,r,o){return Math.min(Math.max(e,Math.min(r,o)),Math.max(r,o))}function O(e,r,o,t){switch(F(e)){case"FlowGraphInteger":return e=e,r=r,o=o,new y(t(e.value,r.value,o.value));case"Vector2":return e=e,r=r,o=o,new S(t(e.x,r.x,o.x),t(e.y,r.y,o.y));case"Vector3":return e=e,r=r,o=o,new v(t(e.x,r.x,o.x),t(e.y,r.y,o.y),t(e.z,r.z,o.z));case"Vector4":return e=e,r=r,o=o,new k(t(e.x,r.x,o.x),t(e.y,r.y,o.y),t(e.z,r.z,o.z),t(e.w,r.w,o.w));case"Quaternion":return e=e,r=r,o=o,new N(t(e.x,r.x,o.x),t(e.y,r.y,o.y),t(e.z,r.z,o.z),t(e.w,r.w,o.w));case"Matrix":return g.FromArray(e.m.map((p,u)=>t(p,r.m[u],o.m[u])));case"Matrix2D":return new f(e.m.map((p,u)=>t(p,r.m[u],o.m[u])));case"Matrix3D":return new M(e.m.map((p,u)=>t(p,r.m[u],o.m[u])));default:return t(m(e),m(r),m(o))}}class sr extends E{constructor(r){super(l,l,l,l,(o,t,n)=>this._polymorphicClamp(o,t,n),"FlowGraphClampBlock",r)}_polymorphicClamp(r,o,t){return O(r,o,t,lr)}}function nr(e){return Math.min(Math.max(e,0),1)}class ar extends c{constructor(r){super(l,l,o=>this._polymorphicSaturate(o),"FlowGraphSaturateBlock",r)}_polymorphicSaturate(r){return h(r,nr)}}function cr(e,r,o){return(1-o)*e+o*r}class pr extends E{constructor(r){super(l,l,l,l,(o,t,n)=>this._polymorphicInterpolate(o,t,n),"FlowGraphMathInterpolationBlock",r)}_polymorphicInterpolate(r,o,t){return O(r,o,t,cr)}}class hr extends w{constructor(r){super(l,l,B,(o,t)=>this._polymorphicEq(o,t),"FlowGraphEqualityBlock",r)}_polymorphicEq(r,o){const t=F(r),n=F(o);return typeof r!=typeof o?!1:d(t,n)||x(t,n)||_(t,n)?r.equals(o):r===o}}function A(e,r,o){if(I(e)&&I(r))return o(m(e),m(r));throw new Error(`Cannot compare ${e} and ${r}`)}class ir extends w{constructor(r){super(l,l,B,(o,t)=>this._polymorphicLessThan(o,t),"FlowGraphLessThanBlock",r)}_polymorphicLessThan(r,o){return A(r,o,(t,n)=>t<n)}}class ur extends w{constructor(r){super(l,l,B,(o,t)=>this._polymorphicLessThanOrEqual(o,t),"FlowGraphLessThanOrEqualBlock",r)}_polymorphicLessThanOrEqual(r,o){return A(r,o,(t,n)=>t<=n)}}class wr extends w{constructor(r){super(l,l,B,(o,t)=>this._polymorphicGreaterThan(o,t),"FlowGraphGreaterThanBlock",r)}_polymorphicGreaterThan(r,o){return A(r,o,(t,n)=>t>n)}}class mr extends w{constructor(r){super(l,l,B,(o,t)=>this._polymorphicGreaterThanOrEqual(o,t),"FlowGraphGreaterThanOrEqualBlock",r)}_polymorphicGreaterThanOrEqual(r,o){return A(r,o,(t,n)=>t>=n)}}class Fr extends c{constructor(r){super(l,B,o=>this._polymorphicIsNan(o),"FlowGraphIsNaNBlock",r)}_polymorphicIsNan(r){if(I(r,!0))return isNaN(m(r));throw new Error(`Cannot get NaN of ${r}`)}}class Gr extends c{constructor(r){super(l,B,o=>this._polymorphicIsInf(o),"FlowGraphIsInfBlock",r)}_polymorphicIsInf(r){if(I(r))return!isFinite(m(r));throw new Error(`Cannot get isInf of ${r}`)}}class yr extends c{constructor(r){super(l,l,o=>this._polymorphicDegToRad(o),"FlowGraphDegToRadBlock",r)}_degToRad(r){return r*Math.PI/180}_polymorphicDegToRad(r){return h(r,this._degToRad)}}class Br extends c{constructor(r){super(l,l,o=>this._polymorphicRadToDeg(o),"FlowGraphRadToDegBlock",r)}_radToDeg(r){return r*180/Math.PI}_polymorphicRadToDeg(r){return h(r,this._radToDeg)}}class Jr extends c{constructor(r){super(a,a,o=>this._polymorphicSin(o),"FlowGraphSinBlock",r)}_polymorphicSin(r){return h(r,Math.sin)}}class Kr extends c{constructor(r){super(a,a,o=>this._polymorphicCos(o),"FlowGraphCosBlock",r)}_polymorphicCos(r){return h(r,Math.cos)}}class br extends c{constructor(r){super(a,a,o=>this._polymorphicTan(o),"FlowGraphTanBlock",r)}_polymorphicTan(r){return h(r,Math.tan)}}class kr extends c{constructor(r){super(a,a,o=>this._polymorphicAsin(o),"FlowGraphASinBlock",r)}_polymorphicAsin(r){return h(r,Math.asin)}}class dr extends c{constructor(r){super(a,a,o=>this._polymorphicAcos(o),"FlowGraphACosBlock",r)}_polymorphicAcos(r){return h(r,Math.acos)}}class xr extends c{constructor(r){super(a,a,o=>this._polymorphicAtan(o),"FlowGraphATanBlock",r)}_polymorphicAtan(r){return h(r,Math.atan)}}class _r extends w{constructor(r){super(l,l,l,(o,t)=>this._polymorphicAtan2(o,t),"FlowGraphATan2Block",r)}_polymorphicAtan2(r,o){return C(r,o,Math.atan2)}}class fr extends c{constructor(r){super(l,l,o=>this._polymorphicSinh(o),"FlowGraphSinhBlock",r)}_polymorphicSinh(r){return h(r,Math.sinh)}}class Mr extends c{constructor(r){super(l,l,o=>this._polymorphicCosh(o),"FlowGraphCoshBlock",r)}_polymorphicCosh(r){return h(r,Math.cosh)}}class gr extends c{constructor(r){super(l,l,o=>this._polymorphicTanh(o),"FlowGraphTanhBlock",r)}_polymorphicTanh(r){return h(r,Math.tanh)}}class Tr extends c{constructor(r){super(l,a,o=>this._polymorphicAsinh(o),"FlowGraphASinhBlock",r)}_polymorphicAsinh(r){return h(r,Math.asinh)}}class Cr extends c{constructor(r){super(l,a,o=>this._polymorphicAcosh(o),"FlowGraphACoshBlock",r)}_polymorphicAcosh(r){return h(r,Math.acosh)}}class Ir extends c{constructor(r){super(l,a,o=>this._polymorphicAtanh(o),"FlowGraphATanhBlock",r)}_polymorphicAtanh(r){return h(r,Math.atanh)}}class Ar extends c{constructor(r){super(l,a,o=>this._polymorphicExp(o),"FlowGraphExponentialBlock",r)}_polymorphicExp(r){return h(r,Math.exp)}}class Nr extends c{constructor(r){super(l,a,o=>this._polymorphicLog(o),"FlowGraphLogBlock",r)}_polymorphicLog(r){return h(r,Math.log)}}class vr extends c{constructor(r){super(l,a,o=>this._polymorphicLog2(o),"FlowGraphLog2Block",r)}_polymorphicLog2(r){return h(r,Math.log2)}}class Sr extends c{constructor(r){super(l,a,o=>this._polymorphicLog10(o),"FlowGraphLog10Block",r)}_polymorphicLog10(r){return h(r,Math.log10)}}class Rr extends c{constructor(r){super(l,a,o=>this._polymorphicSqrt(o),"FlowGraphSquareRootBlock",r)}_polymorphicSqrt(r){return h(r,Math.sqrt)}}class Dr extends c{constructor(r){super(l,a,o=>this._polymorphicCubeRoot(o),"FlowGraphCubeRootBlock",r)}_polymorphicCubeRoot(r){return h(r,Math.cbrt)}}class Er extends w{constructor(r){super(l,a,a,(o,t)=>this._polymorphicPow(o,t),"FlowGraphPowerBlock",r)}_polymorphicPow(r,o){return C(r,o,Math.pow)}}class Or extends c{constructor(r){super(i(r?.valueType||"FlowGraphInteger"),i(r?.valueType||"FlowGraphInteger"),o=>typeof o=="boolean"?!o:typeof o=="number"?~o:new y(~o.value),"FlowGraphBitwiseNotBlock",r)}}class Lr extends w{constructor(r){super(i(r?.valueType||"FlowGraphInteger"),i(r?.valueType||"FlowGraphInteger"),i(r?.valueType||"FlowGraphInteger"),(o,t)=>{if(typeof o=="boolean"&&typeof t=="boolean")return o&&t;if(typeof o=="number"&&typeof t=="number")return o&t;if(typeof o=="object"&&typeof t=="object")return new y(o.value&t.value);throw new Error(`Cannot perform bitwise AND on ${o} and ${t}`)},"FlowGraphBitwiseAndBlock",r)}}class Vr extends w{constructor(r){super(i(r?.valueType||"FlowGraphInteger"),i(r?.valueType||"FlowGraphInteger"),i(r?.valueType||"FlowGraphInteger"),(o,t)=>{if(typeof o=="boolean"&&typeof t=="boolean")return o||t;if(typeof o=="number"&&typeof t=="number")return o|t;if(typeof o=="object"&&typeof t=="object")return new y(o.value|t.value);throw new Error(`Cannot perform bitwise OR on ${o} and ${t}`)},"FlowGraphBitwiseOrBlock",r)}}class zr extends w{constructor(r){super(i(r?.valueType||"FlowGraphInteger"),i(r?.valueType||"FlowGraphInteger"),i(r?.valueType||"FlowGraphInteger"),(o,t)=>{if(typeof o=="boolean"&&typeof t=="boolean")return o!==t;if(typeof o=="number"&&typeof t=="number")return o^t;if(typeof o=="object"&&typeof t=="object")return new y(o.value^t.value);throw new Error(`Cannot perform bitwise XOR on ${o} and ${t}`)},"FlowGraphBitwiseXorBlock",r)}}class qr extends w{constructor(r){super(G,G,G,(o,t)=>new y(o.value<<t.value),"FlowGraphBitwiseLeftShiftBlock",r)}}class Pr extends w{constructor(r){super(G,G,G,(o,t)=>new y(o.value>>t.value),"FlowGraphBitwiseRightShiftBlock",r)}}class Qr extends c{constructor(r){super(G,G,o=>new y(Math.clz32(o.value)),"FlowGraphLeadingZerosBlock",r)}}class $r extends c{constructor(r){super(G,G,o=>new y(o.value?31-Math.clz32(o.value&-o.value):32),"FlowGraphTrailingZerosBlock",r)}}function Zr(e){let r=0;for(;e;)r+=e&1,e>>=1;return r}class jr extends c{constructor(r){super(G,G,o=>new y(Zr(o.value)),"FlowGraphOneBitsCounterBlock",r)}}let R=!1;function Xr(){R||(R=!0,s("FlowGraphAddBlock",V),s("FlowGraphSubtractBlock",z),s("FlowGraphMultiplyBlock",q),s("FlowGraphDivideBlock",P),s("FlowGraphRandomBlock",Q),s("FlowGraphEBlock",$),s("FlowGraphPIBlock",Z),s("FlowGraphInfBlock",j),s("FlowGraphNaNBlock",X),s("FlowGraphAbsBlock",W),s("FlowGraphSignBlock",Y),s("FlowGraphTruncBlock",U),s("FlowGraphFloorBlock",H),s("FlowGraphCeilBlock",J),s("FlowGraphRoundBlock",K),s("FlowGraphFractBlock",b),s("FlowGraphNegationBlock",rr),s("FlowGraphModuloBlock",or),s("FlowGraphMinBlock",er),s("FlowGraphMaxBlock",tr),s("FlowGraphClampBlock",sr),s("FlowGraphSaturateBlock",ar),s("FlowGraphMathInterpolationBlock",pr),s("FlowGraphEqualityBlock",hr),s("FlowGraphLessThanBlock",ir),s("FlowGraphLessThanOrEqualBlock",ur),s("FlowGraphGreaterThanBlock",wr),s("FlowGraphGreaterThanOrEqualBlock",mr),s("FlowGraphIsNaNBlock",Fr),s("FlowGraphIsInfBlock",Gr),s("FlowGraphDegToRadBlock",yr),s("FlowGraphRadToDegBlock",Br),s("FlowGraphASinBlock",kr),s("FlowGraphACosBlock",dr),s("FlowGraphATanBlock",xr),s("FlowGraphATan2Block",_r),s("FlowGraphSinhBlock",fr),s("FlowGraphCoshBlock",Mr),s("FlowGraphTanhBlock",gr),s("FlowGraphASinhBlock",Tr),s("FlowGraphACoshBlock",Cr),s("FlowGraphATanhBlock",Ir),s("FlowGraphExponentialBlock",Ar),s("FlowGraphLogBlock",Nr),s("FlowGraphLog2Block",vr),s("FlowGraphLog10Block",Sr),s("FlowGraphSquareRootBlock",Rr),s("FlowGraphCubeRootBlock",Dr),s("FlowGraphPowerBlock",Er),s("FlowGraphBitwiseNotBlock",Or),s("FlowGraphBitwiseAndBlock",Lr),s("FlowGraphBitwiseOrBlock",Vr),s("FlowGraphBitwiseXorBlock",zr),s("FlowGraphBitwiseLeftShiftBlock",qr),s("FlowGraphBitwiseRightShiftBlock",Pr),s("FlowGraphLeadingZerosBlock",Qr),s("FlowGraphTrailingZerosBlock",$r),s("FlowGraphOneBitsCounterBlock",jr))}Xr();export{W as FlowGraphAbsBlock,dr as FlowGraphAcosBlock,Cr as FlowGraphAcoshBlock,V as FlowGraphAddBlock,kr as FlowGraphAsinBlock,Tr as FlowGraphAsinhBlock,_r as FlowGraphAtan2Block,xr as FlowGraphAtanBlock,Ir as FlowGraphAtanhBlock,Lr as FlowGraphBitwiseAndBlock,qr as FlowGraphBitwiseLeftShiftBlock,Or as FlowGraphBitwiseNotBlock,Vr as FlowGraphBitwiseOrBlock,Pr as FlowGraphBitwiseRightShiftBlock,zr as FlowGraphBitwiseXorBlock,J as FlowGraphCeilBlock,sr as FlowGraphClampBlock,Kr as FlowGraphCosBlock,Mr as FlowGraphCoshBlock,Dr as FlowGraphCubeRootBlock,yr as FlowGraphDegToRadBlock,P as FlowGraphDivideBlock,$ as FlowGraphEBlock,hr as FlowGraphEqualityBlock,Ar as FlowGraphExpBlock,H as FlowGraphFloorBlock,b as FlowGraphFractionBlock,wr as FlowGraphGreaterThanBlock,mr as FlowGraphGreaterThanOrEqualBlock,j as FlowGraphInfBlock,Gr as FlowGraphIsInfinityBlock,Fr as FlowGraphIsNanBlock,Qr as FlowGraphLeadingZerosBlock,ir as FlowGraphLessThanBlock,ur as FlowGraphLessThanOrEqualBlock,Sr as FlowGraphLog10Block,vr as FlowGraphLog2Block,Nr as FlowGraphLogBlock,pr as FlowGraphMathInterpolationBlock,tr as FlowGraphMaxBlock,er as FlowGraphMinBlock,or as FlowGraphModuloBlock,q as FlowGraphMultiplyBlock,X as FlowGraphNaNBlock,rr as FlowGraphNegationBlock,jr as FlowGraphOneBitsCounterBlock,Z as FlowGraphPiBlock,Er as FlowGraphPowerBlock,Br as FlowGraphRadToDegBlock,Q as FlowGraphRandomBlock,K as FlowGraphRoundBlock,ar as FlowGraphSaturateBlock,Y as FlowGraphSignBlock,Jr as FlowGraphSinBlock,fr as FlowGraphSinhBlock,Rr as FlowGraphSquareRootBlock,z as FlowGraphSubtractBlock,br as FlowGraphTanBlock,gr as FlowGraphTanhBlock,$r as FlowGraphTrailingZerosBlock,U as FlowGraphTruncBlock,Xr as RegisterFlowGraphMathBlocks};
@@ -0,0 +1 @@
1
+ import{F as G}from"./flowGraphCachedOperationBlock-Dng-6jE0.js";import{a2 as n,a3 as h,a4 as g,a5 as o,K as V,M as c,a6 as _,a7 as D,H as I,V as w,a8 as m,a9 as d,f as k,x as F,i}from"./index-B2zBEWsq.js";class p extends G{constructor(t,a,e){super(a,e);for(let s=0;s<t;s++)this.registerDataInput(`input_${s}`,F,0)}}class r extends k{constructor(t,a,e){super(e),this.registerDataInput("input",a);for(let s=0;s<t;s++)this.registerDataOutput(`output_${s}`,F,0)}}class B extends p{constructor(t){super(2,m,t)}_doOperation(t){t._hasExecutionVariable(this,"cachedVector")||t._setExecutionVariable(this,"cachedVector",new d);const a=t._getExecutionVariable(this,"cachedVector",null);return a.set(this.getDataInput("input_0").getValue(t),this.getDataInput("input_1").getValue(t)),a}getClassName(){return"FlowGraphCombineVector2Block"}}class M extends p{constructor(t){super(3,I,t)}_doOperation(t){t._hasExecutionVariable(this,"cachedVector")||t._setExecutionVariable(this,"cachedVector",new w);const a=t._getExecutionVariable(this,"cachedVector",null);return a.set(this.getDataInput("input_0").getValue(t),this.getDataInput("input_1").getValue(t),this.getDataInput("input_2").getValue(t)),a}getClassName(){return"FlowGraphCombineVector3Block"}}class b extends p{constructor(t){super(4,_,t)}_doOperation(t){t._hasExecutionVariable(this,"cachedVector")||t._setExecutionVariable(this,"cachedVector",new D);const a=t._getExecutionVariable(this,"cachedVector",null);return a.set(this.getDataInput("input_0").getValue(t),this.getDataInput("input_1").getValue(t),this.getDataInput("input_2").getValue(t),this.getDataInput("input_3").getValue(t)),a}getClassName(){return"FlowGraphCombineVector4Block"}}class E extends p{constructor(t){super(16,V,t)}_doOperation(t){t._hasExecutionVariable(this,"cachedMatrix")||t._setExecutionVariable(this,"cachedMatrix",new c);const a=t._getExecutionVariable(this,"cachedMatrix",null);return this.config?.inputIsColumnMajor?a.set(this.getDataInput("input_0").getValue(t),this.getDataInput("input_4").getValue(t),this.getDataInput("input_8").getValue(t),this.getDataInput("input_12").getValue(t),this.getDataInput("input_1").getValue(t),this.getDataInput("input_5").getValue(t),this.getDataInput("input_9").getValue(t),this.getDataInput("input_13").getValue(t),this.getDataInput("input_2").getValue(t),this.getDataInput("input_6").getValue(t),this.getDataInput("input_10").getValue(t),this.getDataInput("input_14").getValue(t),this.getDataInput("input_3").getValue(t),this.getDataInput("input_7").getValue(t),this.getDataInput("input_11").getValue(t),this.getDataInput("input_15").getValue(t)):a.set(this.getDataInput("input_0").getValue(t),this.getDataInput("input_1").getValue(t),this.getDataInput("input_2").getValue(t),this.getDataInput("input_3").getValue(t),this.getDataInput("input_4").getValue(t),this.getDataInput("input_5").getValue(t),this.getDataInput("input_6").getValue(t),this.getDataInput("input_7").getValue(t),this.getDataInput("input_8").getValue(t),this.getDataInput("input_9").getValue(t),this.getDataInput("input_10").getValue(t),this.getDataInput("input_11").getValue(t),this.getDataInput("input_12").getValue(t),this.getDataInput("input_13").getValue(t),this.getDataInput("input_14").getValue(t),this.getDataInput("input_15").getValue(t)),a}getClassName(){return"FlowGraphCombineMatrixBlock"}}class C extends p{constructor(t){super(4,g,t)}_doOperation(t){t._hasExecutionVariable(this,"cachedMatrix")||t._setExecutionVariable(this,"cachedMatrix",new o);const a=t._getExecutionVariable(this,"cachedMatrix",null),e=this.config?.inputIsColumnMajor?[this.getDataInput("input_0").getValue(t),this.getDataInput("input_2").getValue(t),this.getDataInput("input_1").getValue(t),this.getDataInput("input_3").getValue(t)]:[this.getDataInput("input_0").getValue(t),this.getDataInput("input_1").getValue(t),this.getDataInput("input_2").getValue(t),this.getDataInput("input_3").getValue(t)];return a.fromArray(e),a}getClassName(){return"FlowGraphCombineMatrix2DBlock"}}class f extends p{constructor(t){super(9,n,t)}_doOperation(t){t._hasExecutionVariable(this,"cachedMatrix")||t._setExecutionVariable(this,"cachedMatrix",new h);const a=t._getExecutionVariable(this,"cachedMatrix",null),e=this.config?.inputIsColumnMajor?[this.getDataInput("input_0").getValue(t),this.getDataInput("input_3").getValue(t),this.getDataInput("input_6").getValue(t),this.getDataInput("input_1").getValue(t),this.getDataInput("input_4").getValue(t),this.getDataInput("input_7").getValue(t),this.getDataInput("input_2").getValue(t),this.getDataInput("input_5").getValue(t),this.getDataInput("input_8").getValue(t)]:[this.getDataInput("input_0").getValue(t),this.getDataInput("input_1").getValue(t),this.getDataInput("input_2").getValue(t),this.getDataInput("input_3").getValue(t),this.getDataInput("input_4").getValue(t),this.getDataInput("input_5").getValue(t),this.getDataInput("input_6").getValue(t),this.getDataInput("input_7").getValue(t),this.getDataInput("input_8").getValue(t)];return a.fromArray(e),a}getClassName(){return"FlowGraphCombineMatrix3DBlock"}}class O extends r{constructor(t){super(2,m,t)}_updateOutputs(t){let a=this.getDataInput("input")?.getValue(t);a||(a=d.Zero(),this.getDataInput("input").setValue(a,t)),this.getDataOutput("output_0").setValue(a.x,t),this.getDataOutput("output_1").setValue(a.y,t)}getClassName(){return"FlowGraphExtractVector2Block"}}class y extends r{constructor(t){super(3,I,t)}_updateOutputs(t){let a=this.getDataInput("input")?.getValue(t);a||(a=w.Zero(),this.getDataInput("input").setValue(a,t)),this.getDataOutput("output_0").setValue(a.x,t),this.getDataOutput("output_1").setValue(a.y,t),this.getDataOutput("output_2").setValue(a.z,t)}getClassName(){return"FlowGraphExtractVector3Block"}}class N extends r{constructor(t){super(4,_,t)}_updateOutputs(t){let a=this.getDataInput("input")?.getValue(t);a||(a=D.Zero(),this.getDataInput("input").setValue(a,t)),this.getDataOutput("output_0").setValue(a.x,t),this.getDataOutput("output_1").setValue(a.y,t),this.getDataOutput("output_2").setValue(a.z,t),this.getDataOutput("output_3").setValue(a.w,t)}getClassName(){return"FlowGraphExtractVector4Block"}}class R extends r{constructor(t){super(16,V,t)}_updateOutputs(t){let a=this.getDataInput("input")?.getValue(t);a||(a=c.Identity(),this.getDataInput("input").setValue(a,t));for(let e=0;e<16;e++)this.getDataOutput(`output_${e}`).setValue(a.m[e],t)}getClassName(){return"FlowGraphExtractMatrixBlock"}}class T extends r{constructor(t){super(4,g,t)}_updateOutputs(t){let a=this.getDataInput("input")?.getValue(t);a||(a=new o,this.getDataInput("input").setValue(a,t));for(let e=0;e<4;e++)this.getDataOutput(`output_${e}`).setValue(a.m[e],t)}getClassName(){return"FlowGraphExtractMatrix2DBlock"}}class $ extends r{constructor(t){super(9,n,t)}_updateOutputs(t){let a=this.getDataInput("input")?.getValue(t);a||(a=new h,this.getDataInput("input").setValue(a,t));for(let e=0;e<9;e++)this.getDataOutput(`output_${e}`).setValue(a.m[e],t)}getClassName(){return"FlowGraphExtractMatrix3DBlock"}}let l=!1;function j(){l||(l=!0,i("FlowGraphCombineVector2Block",B),i("FlowGraphCombineVector3Block",M),i("FlowGraphCombineVector4Block",b),i("FlowGraphCombineMatrixBlock",E),i("FlowGraphCombineMatrix2DBlock",C),i("FlowGraphCombineMatrix3DBlock",f),i("FlowGraphExtractVector2Block",O),i("FlowGraphExtractVector3Block",y),i("FlowGraphExtractVector4Block",N),i("FlowGraphExtractMatrixBlock",R),i("FlowGraphExtractMatrix2DBlock",T),i("FlowGraphExtractMatrix3DBlock",$))}j();export{C as FlowGraphCombineMatrix2DBlock,f as FlowGraphCombineMatrix3DBlock,E as FlowGraphCombineMatrixBlock,B as FlowGraphCombineVector2Block,M as FlowGraphCombineVector3Block,b as FlowGraphCombineVector4Block,T as FlowGraphExtractMatrix2DBlock,$ as FlowGraphExtractMatrix3DBlock,R as FlowGraphExtractMatrixBlock,O as FlowGraphExtractVector2Block,y as FlowGraphExtractVector3Block,N as FlowGraphExtractVector4Block,j as RegisterFlowGraphMathCombineExtractBlocks};
@@ -0,0 +1 @@
1
+ import{f as g,H as u,J as w,K as F,M as m,h as k,V as n,Q as x,z as e,x as D,i as r}from"./index-B2zBEWsq.js";import{F as V}from"./flowGraphUnaryOperationBlock-CaRh4Ef0.js";import{F as _}from"./flowGraphBinaryOperationBlock-DFLuCAKJ.js";import"./flowGraphCachedOperationBlock-Dng-6jE0.js";class E extends V{constructor(t){super(e(t?.matrixType||"Matrix"),e(t?.matrixType||"Matrix"),i=>i.transpose?i.transpose():m.Transpose(i),"FlowGraphTransposeBlock",t)}}class b extends V{constructor(t){super(e(t?.matrixType||"Matrix"),D,i=>i.determinant(),"FlowGraphDeterminantBlock",t)}}class R extends V{constructor(t){super(e(t?.matrixType||"Matrix"),e(t?.matrixType||"Matrix"),i=>i.inverse?i.inverse():m.Invert(i),"FlowGraphInvertMatrixBlock",t)}}class v extends _{constructor(t){super(e(t?.matrixType||"Matrix"),e(t?.matrixType||"Matrix"),e(t?.matrixType||"Matrix"),(i,a)=>a.multiply(i),"FlowGraphMatrixMultiplicationBlock",t)}}class Q extends g{constructor(t){super(t),this.input=this.registerDataInput("input",F),this.position=this.registerDataOutput("position",u),this.rotationQuaternion=this.registerDataOutput("rotationQuaternion",w),this.scaling=this.registerDataOutput("scaling",u),this.isValid=this.registerDataOutput("isValid",k,!1)}_updateOutputs(t){const i=t._getExecutionVariable(this,"executionId",-1),a=t._getExecutionVariable(this,"cachedPosition",null),s=t._getExecutionVariable(this,"cachedRotation",null),h=t._getExecutionVariable(this,"cachedScaling",null);if(i===t.executionId&&a&&s&&h)this.position.setValue(a,t),this.rotationQuaternion.setValue(s,t),this.scaling.setValue(h,t);else{const l=this.input.getValue(t),p=a||new n,c=s||new x,d=h||new n,G=Math.round(l.m[3]*1e4)/1e4,B=Math.round(l.m[7]*1e4)/1e4,y=Math.round(l.m[11]*1e4)/1e4,I=Math.round(l.m[15]*1e4)/1e4;if(G!==0||B!==0||y!==0||I!==1){this.isValid.setValue(!1,t),this.position.setValue(n.Zero(),t),this.rotationQuaternion.setValue(x.Identity(),t),this.scaling.setValue(n.One(),t);return}const T=l.decompose(d,c,p);this.isValid.setValue(T,t),this.position.setValue(p,t),this.rotationQuaternion.setValue(c,t),this.scaling.setValue(d,t),t._setExecutionVariable(this,"cachedPosition",p),t._setExecutionVariable(this,"cachedRotation",c),t._setExecutionVariable(this,"cachedScaling",d),t._setExecutionVariable(this,"executionId",t.executionId)}}getClassName(){return"FlowGraphMatrixDecompose"}}class O extends g{constructor(t){super(t),this.position=this.registerDataInput("position",u),this.rotationQuaternion=this.registerDataInput("rotationQuaternion",w),this.scaling=this.registerDataInput("scaling",u),this.value=this.registerDataOutput("value",F)}_updateOutputs(t){const i=t._getExecutionVariable(this,"executionId",-1),a=t._getExecutionVariable(this,"cachedMatrix",null);if(i===t.executionId&&a)this.value.setValue(a,t);else{const s=m.Compose(this.scaling.getValue(t),this.rotationQuaternion.getValue(t),this.position.getValue(t));this.value.setValue(s,t),t._setExecutionVariable(this,"cachedMatrix",s),t._setExecutionVariable(this,"executionId",t.executionId)}}getClassName(){return"FlowGraphMatrixCompose"}}let M=!1;function C(){M||(M=!0,r("FlowGraphTransposeBlock",E),r("FlowGraphDeterminantBlock",b),r("FlowGraphInvertMatrixBlock",R),r("FlowGraphMatrixMultiplicationBlock",v),r("FlowGraphMatrixDecompose",Q),r("FlowGraphMatrixCompose",O))}C();export{b as FlowGraphDeterminantBlock,R as FlowGraphInvertMatrixBlock,O as FlowGraphMatrixComposeBlock,Q as FlowGraphMatrixDecomposeBlock,v as FlowGraphMatrixMultiplicationBlock,E as FlowGraphTransposeBlock,C as RegisterFlowGraphMatrixMathBlocks};
@@ -0,0 +1 @@
1
+ import{j as p,g as r,H as a,x as n,P as u,I as c,i as o}from"./index-B2zBEWsq.js";class l extends p{constructor(e){super(e),this.config=e,this.type="MeshPick",this.asset=this.registerDataInput("asset",r,e?.targetMesh),this.pickedPoint=this.registerDataOutput("pickedPoint",a),this.pickOrigin=this.registerDataOutput("pickOrigin",a),this.pointerId=this.registerDataOutput("pointerId",n),this.pickedMesh=this.registerDataOutput("pickedMesh",r),this.pointerType=this.registerDataInput("pointerType",r,u.POINTERPICK)}_getReferencedMesh(e){return this.asset.getValue(e)}_executeEvent(e,s){if(this.pointerType.getValue(e)!==s.type)return!0;const i=this._getReferencedMesh(e),t=s.pickInfo?.pickedMesh;return(i?!!(t&&(t===i||c(t,i)||t.name===i.name)):!!t)&&t?(this.pointerId.setValue(s.event.pointerId,e),this.pickOrigin.setValue(s.pickInfo.ray?.origin,e),this.pickedPoint.setValue(s.pickInfo.pickedPoint,e),this.pickedMesh.setValue(t,e),this._execute(e),!this.config?.stopPropagation):(this.pointerId.resetToDefaultValue(e),this.pickOrigin.resetToDefaultValue(e),this.pickedPoint.resetToDefaultValue(e),this.pickedMesh.resetToDefaultValue(e),!0)}_preparePendingTasks(e){}_cancelPendingTasks(e){}getClassName(){return"FlowGraphMeshPickEventBlock"}}let h=!1;function k(){h||(h=!0,o("FlowGraphMeshPickEventBlock",l))}k();export{l as FlowGraphMeshPickEventBlock,k as RegisterFlowGraphMeshPickEventBlock};
@@ -0,0 +1 @@
1
+ import{N as a,O as u,X as n,i as o}from"./index-B2zBEWsq.js";class r extends a{constructor(t){super(t),this.config=t,this.outputSignals=[],this.reset=this._registerSignalInput("reset"),this.lastIndex=this.registerDataOutput("lastIndex",u,new n(-1)),this.setNumberOfOutputSignals(t?.outputSignalCount)}_getNextIndex(t){if(t.includes(!1)||this.config.isLoop&&t.fill(!1),this.config.isRandom){const e=t.map((s,i)=>s?-1:i).filter(s=>s!==-1);return e.length?e[Math.floor(Math.random()*e.length)]:-1}else return t.indexOf(!1)}setNumberOfOutputSignals(t=1){for(;this.outputSignals.length>t;){const e=this.outputSignals.pop();e&&(e.disconnectFromAll(),this._unregisterSignalOutput(e.name))}for(;this.outputSignals.length<t;)this.outputSignals.push(this._registerSignalOutput(`out_${this.outputSignals.length}`))}_execute(t,e){if(t._hasExecutionVariable(this,"indexesUsed")||t._setExecutionVariable(this,"indexesUsed",this.outputSignals.map(()=>!1)),e===this.reset){t._deleteExecutionVariable(this,"indexesUsed"),this.lastIndex.setValue(new n(-1),t);return}const s=t._getExecutionVariable(this,"indexesUsed",[]),i=this._getNextIndex(s);i>-1&&(this.lastIndex.setValue(new n(i),t),s[i]=!0,t._setExecutionVariable(this,"indexesUsed",s),this.outputSignals[i]._activateSignal(t))}getClassName(){return"FlowGraphMultiGateBlock"}serialize(t){super.serialize(t),t.config.outputSignalCount=this.config.outputSignalCount,t.config.isRandom=this.config.isRandom,t.config.loop=this.config.isLoop,t.config.startIndex=this.config.startIndex}}let l=!1;function h(){l||(l=!0,o("FlowGraphMultiGateBlock",r))}h();export{r as FlowGraphMultiGateBlock,h as RegisterFlowGraphMultiGateBlock};
@@ -0,0 +1 @@
1
+ import{y as t,g as i,i as o}from"./index-B2zBEWsq.js";class s extends t{constructor(a){super(a),this.animationToPause=this.registerDataInput("animationToPause",i)}_execute(a){this.animationToPause.getValue(a).pause(),this.out._activateSignal(a)}getClassName(){return"FlowGraphPauseAnimationBlock"}}let e=!1;function n(){e||(e=!0,o("FlowGraphPauseAnimationBlock",s))}n();export{s as FlowGraphPauseAnimationBlock,n as RegisterFlowGraphPauseAnimationBlock};
@@ -0,0 +1 @@
1
+ import{y as a,g as o,i as r}from"./index-B2zBEWsq.js";class u extends a{constructor(e){super(e),this.sound=this.registerDataInput("sound",o)}_execute(e,n){const s=this.sound.getValue(e);if(!s){this._reportError(e,"No sound provided"),this.out._activateSignal(e);return}s.state===5?s.resume():(s.state===2||s.state===3)&&s.pause(),this.out._activateSignal(e)}getClassName(){return"FlowGraphPauseSoundBlock"}}let t=!1;function i(){t||(t=!0,r("FlowGraphPauseSoundBlock",u))}i();export{u as FlowGraphPauseSoundBlock,i as RegisterFlowGraphPauseSoundBlock};
@@ -0,0 +1 @@
1
+ import{j as n,g as l,H as o,x as r,i as h}from"./index-B2zBEWsq.js";class u extends n{constructor(s){super(s),this.config=s,this.body=this.registerDataInput("body",l),this.otherBody=this.registerDataOutput("otherBody",l),this.point=this.registerDataOutput("point",o),this.normal=this.registerDataOutput("normal",o),this.impulse=this.registerDataOutput("impulse",r),this.distance=this.registerDataOutput("distance",r)}_preparePendingTasks(s){const i=this.body.getValue(s);if(!i){this._reportError(s,"No physics body provided for collision event");return}i.setCollisionCallbackEnabled(!0);const e=i.getCollisionObservable().add(t=>{this._onCollision(s,t)});s._setExecutionVariable(this,"_collisionObserver",e),s._setExecutionVariable(this,"_subscribedBody",i)}_onCollision(s,i){const e=this.body.getValue(s),t=i.collider===e?i.collidedAgainst:i.collider;this.otherBody.setValue(t,s),i.point&&this.point.setValue(i.point,s),i.normal&&this.normal.setValue(i.normal,s),this.impulse.setValue(i.impulse,s),this.distance.setValue(i.distance,s),this._execute(s)}_executeEvent(s,i){return!0}_cancelPendingTasks(s){const i=s._getExecutionVariable(this,"_collisionObserver",null),e=s._getExecutionVariable(this,"_subscribedBody",null);if(i&&e){const t=e.getCollisionObservable();t.remove(i),t.hasObservers()||e.setCollisionCallbackEnabled(!1)}s._setExecutionVariable(this,"_collisionObserver",null),s._setExecutionVariable(this,"_subscribedBody",null)}getClassName(){return"FlowGraphPhysicsCollisionEventBlock"}}let a=!1;function c(){a||(a=!0,h("FlowGraphPhysicsCollisionEventBlock",u))}c();export{u as FlowGraphPhysicsCollisionEventBlock,c as RegisterFlowGraphPhysicsCollisionEventBlock};
@@ -0,0 +1 @@
1
+ import{w as _,x as u,h as b,g as l,i as y}from"./index-B2zBEWsq.js";import{AnimationGroup as V}from"./animationGroup-Sd34ntWg.js";class R extends _{constructor(i){super(i,["animationLoop","animationEnd","animationGroupLoop"]),this.config=i,this.speed=this.registerDataInput("speed",u),this.loop=this.registerDataInput("loop",b),this.from=this.registerDataInput("from",u,0),this.to=this.registerDataInput("to",u),this.currentFrame=this.registerDataOutput("currentFrame",u),this.currentTime=this.registerDataOutput("currentTime",u),this.currentAnimationGroup=this.registerDataOutput("currentAnimationGroup",l),this.animationGroup=this.registerDataInput("animationGroup",l,i?.animationGroup),this.animation=this.registerDataInput("animation",l),this.object=this.registerDataInput("object",l)}_preparePendingTasks(i){const t=this.animationGroup.getValue(i),r=this.animation.getValue(i);if(!t&&!r)return this._reportError(i,"No animation or animation group provided");{const a=this.currentAnimationGroup.getValue(i);a&&a!==t&&a.dispose();let n=t;if(r&&!n){const o=this.object.getValue(i);if(!o)return this._reportError(i,"No target object provided");const h=Array.isArray(r)?r:[r],A=h[0].name;n=new V("flowGraphAnimationGroup-"+A+"-"+o.name,i.configuration.scene);let g=!1;const f=i._getGlobalContextVariable("interpolationAnimations",[]);for(const c of h)n.addTargetedAnimation(c,o),f.indexOf(c.uniqueId)!==-1&&(g=!0);g&&this._checkInterpolationDuplications(i,h,o)}const s=this.speed.getValue(i)||1,e=this.from.getValue(i)??0,p=this.to.getValue(i)||n.to,G=!isFinite(p)||this.loop.getValue(i);this.currentAnimationGroup.setValue(n,i);const m=i._getGlobalContextVariable("currentlyRunningAnimationGroups",[]);m.indexOf(n.uniqueId)!==-1&&n.stop();try{n.start(G,s,e,p),n.onAnimationGroupEndObservable.add(()=>this._onAnimationGroupEnd(i)),n.onAnimationEndObservable.add(()=>this._eventsSignalOutputs.animationEnd._activateSignal(i)),n.onAnimationLoopObservable.add(()=>this._eventsSignalOutputs.animationLoop._activateSignal(i)),n.onAnimationGroupLoopObservable.add(()=>this._eventsSignalOutputs.animationGroupLoop._activateSignal(i)),m.push(n.uniqueId),i._setGlobalContextVariable("currentlyRunningAnimationGroups",m)}catch(o){this._reportError(i,o)}}}_reportError(i,t){super._reportError(i,t),this.currentFrame.setValue(-1,i),this.currentTime.setValue(-1,i)}_executeOnTick(i){const t=this.currentAnimationGroup.getValue(i);t&&(this.currentFrame.setValue(t.getCurrentFrame(),i),this.currentTime.setValue(t.animatables[0]?.elapsedTime??0,i))}_execute(i){this._startPendingTasks(i)}_onAnimationGroupEnd(i){this._removeFromCurrentlyRunning(i,this.currentAnimationGroup.getValue(i)),this._resetAfterCanceled(i),this.done._activateSignal(i)}_checkInterpolationDuplications(i,t,r){const a=i._getGlobalContextVariable("currentlyRunningAnimationGroups",[]);for(const n of a){const s=i.assetsContext.animationGroups.find(e=>e.uniqueId===n);if(s)for(const e of s.targetedAnimations)for(const p of t)e.animation.targetProperty===p.targetProperty&&e.target===r&&this._stopAnimationGroup(i,s)}}_stopAnimationGroup(i,t){t.stop(!0),t.name.startsWith("flowGraphAnimationGroup-")&&t.dispose(),this._removeFromCurrentlyRunning(i,t)}_removeFromCurrentlyRunning(i,t){const r=i._getGlobalContextVariable("currentlyRunningAnimationGroups",[]),a=r.indexOf(t.uniqueId);a!==-1&&(r.splice(a,1),i._setGlobalContextVariable("currentlyRunningAnimationGroups",r))}_cancelPendingTasks(i){const t=this.currentAnimationGroup.getValue(i);t&&this._stopAnimationGroup(i,t)}getClassName(){return"FlowGraphPlayAnimationBlock"}}let d=!1;function v(){d||(d=!0,y("FlowGraphPlayAnimationBlock",R))}v();export{R as FlowGraphPlayAnimationBlock,v as RegisterFlowGraphPlayAnimationBlock};
@@ -0,0 +1 @@
1
+ import{y as r,g as u,x as e,h as n,i as h}from"./index-B2zBEWsq.js";class p extends r{constructor(t){super(t),this.sound=this.registerDataInput("sound",u),this.volume=this.registerDataInput("volume",e,1),this.startOffset=this.registerDataInput("startOffset",e,0),this.loop=this.registerDataInput("loop",n,!1)}_execute(t,c){const s=this.sound.getValue(t);if(!s){this._reportError(t,"No sound provided"),this.out._activateSignal(t);return}const o=this.volume.getValue(t),l=this.startOffset.getValue(t),i=this.loop.getValue(t);s.play({volume:o,startOffset:l,loop:i}),this.out._activateSignal(t)}getClassName(){return"FlowGraphPlaySoundBlock"}}let a=!1;function g(){a||(a=!0,h("FlowGraphPlaySoundBlock",p))}g();export{p as FlowGraphPlaySoundBlock,g as RegisterFlowGraphPlaySoundBlock};
@@ -0,0 +1 @@
1
+ import{j as a,g as r,x as o,I as h,i as p}from"./index-B2zBEWsq.js";class c extends a{constructor(e){super(e),this.type="PointerDown",this.targetMesh=this.registerDataInput("targetMesh",r,e?.targetMesh),this.pointerId=this.registerDataOutput("pointerId",o),this.pickedMesh=this.registerDataOutput("pickedMesh",r),this.pickedPoint=this.registerDataOutput("pickedPoint",r)}_executeEvent(e,s){const i=this.targetMesh.getValue(e),t=s.pickInfo?.pickedMesh;return i&&!(t===i||t&&h(t,i))?!0:(this.pointerId.setValue(s.event.pointerId,e),this.pickedMesh.setValue(t??null,e),this.pickedPoint.setValue(s.pickInfo?.pickedPoint??null,e),this._execute(e),!this.config?.stopPropagation)}_preparePendingTasks(e){}_cancelPendingTasks(e){}getClassName(){return"FlowGraphPointerDownEventBlock"}}let n=!1;function u(){n||(n=!0,p("FlowGraphPointerDownEventBlock",c))}u();export{c as FlowGraphPointerDownEventBlock,u as RegisterFlowGraphPointerDownEventBlock};
@@ -0,0 +1 @@
1
+ import{j as a,g as r,x as o,I as h,i as p}from"./index-B2zBEWsq.js";class u extends a{constructor(e){super(e),this.type="PointerMove",this.targetMesh=this.registerDataInput("targetMesh",r,e?.targetMesh),this.pointerId=this.registerDataOutput("pointerId",o),this.meshUnderPointer=this.registerDataOutput("meshUnderPointer",r),this.pickedPoint=this.registerDataOutput("pickedPoint",r)}_executeEvent(e,s){const i=this.targetMesh.getValue(e),t=s.pickInfo?.pickedMesh;return i&&!(t===i||t&&h(t,i))?!0:(this.pointerId.setValue(s.event.pointerId,e),this.meshUnderPointer.setValue(t??null,e),this.pickedPoint.setValue(s.pickInfo?.pickedPoint??null,e),this._execute(e),!this.config?.stopPropagation)}_preparePendingTasks(e){}_cancelPendingTasks(e){}getClassName(){return"FlowGraphPointerMoveEventBlock"}}let n=!1;function c(){n||(n=!0,p("FlowGraphPointerMoveEventBlock",u))}c();export{u as FlowGraphPointerMoveEventBlock,c as RegisterFlowGraphPointerMoveEventBlock};
@@ -0,0 +1 @@
1
+ import{j as h,x as o,g as r,I as i,i as u}from"./index-B2zBEWsq.js";class a extends h{constructor(e){super(e),this.type="PointerOut",this.pointerId=this.registerDataOutput("pointerId",o),this.targetMesh=this.registerDataInput("targetMesh",r,e?.targetMesh),this.meshOutOfPointer=this.registerDataOutput("meshOutOfPointer",r)}_executeEvent(e,t){const s=this.targetMesh.getValue(e);return this.meshOutOfPointer.setValue(t.mesh,e),this.pointerId.setValue(t.pointerId,e),!(t.over&&i(t.mesh,s))&&(t.mesh===s||i(t.mesh,s))?(this._execute(e),!this.config?.stopPropagation):!0}_preparePendingTasks(e){}_cancelPendingTasks(e){}getClassName(){return"FlowGraphPointerOutEventBlock"}}let n=!1;function p(){n||(n=!0,u("FlowGraphPointerOutEventBlock",a))}p();export{a as FlowGraphPointerOutEventBlock,p as RegisterFlowGraphPointerOutEventBlock};
@@ -0,0 +1 @@
1
+ import{j as o,x as a,g as s,I as i,i as u}from"./index-B2zBEWsq.js";class p extends o{constructor(e){super(e),this.type="PointerOver",this.pointerId=this.registerDataOutput("pointerId",a),this.targetMesh=this.registerDataInput("targetMesh",s,e?.targetMesh),this.meshUnderPointer=this.registerDataOutput("meshUnderPointer",s)}_executeEvent(e,t){const r=this.targetMesh.getValue(e);this.meshUnderPointer.setValue(t.mesh,e);const h=t.out&&i(t.out,r);return this.pointerId.setValue(t.pointerId,e),!h&&(t.mesh===r||i(t.mesh,r))?(this._execute(e),!this.config?.stopPropagation):!0}_preparePendingTasks(e){}_cancelPendingTasks(e){}getClassName(){return"FlowGraphPointerOverEventBlock"}}let n=!1;function c(){n||(n=!0,u("FlowGraphPointerOverEventBlock",p))}c();export{p as FlowGraphPointerOverEventBlock,c as RegisterFlowGraphPointerOverEventBlock};
@@ -0,0 +1 @@
1
+ import{j as n,g as r,x as p,I as h,i as o}from"./index-B2zBEWsq.js";class c extends n{constructor(e){super(e),this.type="PointerUp",this.targetMesh=this.registerDataInput("targetMesh",r,e?.targetMesh),this.pointerId=this.registerDataOutput("pointerId",p),this.pickedMesh=this.registerDataOutput("pickedMesh",r),this.pickedPoint=this.registerDataOutput("pickedPoint",r)}_executeEvent(e,s){const i=this.targetMesh.getValue(e),t=s.pickInfo?.pickedMesh;return i&&!(t===i||t&&h(t,i))?!0:(this.pointerId.setValue(s.event.pointerId,e),this.pickedMesh.setValue(t??null,e),this.pickedPoint.setValue(s.pickInfo?.pickedPoint??null,e),this._execute(e),!this.config?.stopPropagation)}_preparePendingTasks(e){}_cancelPendingTasks(e){}getClassName(){return"FlowGraphPointerUpEventBlock"}}let a=!1;function u(){a||(a=!0,o("FlowGraphPointerUpEventBlock",c))}u();export{c as FlowGraphPointerUpEventBlock,u as RegisterFlowGraphPointerUpEventBlock};
@@ -0,0 +1 @@
1
+ import{j as c,z as v,E as i,L as l,i as p}from"./index-B2zBEWsq.js";class u extends c{constructor(e){super(e),this.config=e,this.initPriority=1;for(const t in this.config.eventData){const s=this.config.eventData[t],r=typeof s.type=="string"?s.type:s.type?.typeName,o=typeof s.type?.serialize=="function"?s.type:v(r);s.type=o,this.registerDataOutput(t,o)}}_preparePendingTasks(e){const t=e.configuration.coordinator.getCustomEventObservable(this.config.eventId);if(t&&t.hasObservers()&&t.observers.length>i.MaxEventsPerType){this._reportError(e,`FlowGraphReceiveCustomEventBlock: Too many observers for event ${this.config.eventId}. Max is ${i.MaxEventsPerType}.`);return}const s=t.add(r=>{const o=Object.keys(r);for(const n of o)this.getDataOutput(n)?.setValue(r[n],e);this._execute(e)});e._setExecutionVariable(this,"_eventObserver",s)}_cancelPendingTasks(e){const t=e.configuration.coordinator.getCustomEventObservable(this.config.eventId);if(t){const s=e._getExecutionVariable(this,"_eventObserver",null);t.remove(s)}else l.Warn(`FlowGraphReceiveCustomEventBlock: Missing observable for event ${this.config.eventId}`)}_executeEvent(e,t){return!0}serialize(e={}){super.serialize(e);const t={};for(const s in this.config.eventData)t[s]={type:this.config.eventData[s].type.typeName};e.config.eventData=t}getClassName(){return"FlowGraphReceiveCustomEventBlock"}}let a=!1;function h(){a||(a=!0,p("FlowGraphReceiveCustomEventBlock",u))}h();export{u as FlowGraphReceiveCustomEventBlock,h as RegisterFlowGraphReceiveCustomEventBlock};
@@ -0,0 +1 @@
1
+ import{j as n,i as r}from"./index-B2zBEWsq.js";class a extends n{constructor(){super(...arguments),this.initPriority=-1,this.type="SceneReady"}_executeEvent(e,o){return this._execute(e),!0}_preparePendingTasks(e){}_cancelPendingTasks(e){}getClassName(){return"FlowGraphSceneReadyEventBlock"}}let t=!1;function s(){t||(t=!0,r("FlowGraphSceneReadyEventBlock",a))}s();export{a as FlowGraphSceneReadyEventBlock,s as RegisterFlowGraphSceneReadyEventBlock};
@@ -0,0 +1 @@
1
+ import{j as s,x as i,i as a}from"./index-B2zBEWsq.js";class n extends s{constructor(){super(),this.type="SceneBeforeRender",this.timeSinceStart=this.registerDataOutput("timeSinceStart",i),this.deltaTime=this.registerDataOutput("deltaTime",i)}_preparePendingTasks(e){}_executeEvent(e,t){return this.timeSinceStart.setValue(t.timeSinceStart,e),this.deltaTime.setValue(t.deltaTime,e),this._execute(e),!0}_cancelPendingTasks(e){}getClassName(){return"FlowGraphSceneTickEventBlock"}}let r=!1;function c(){r||(r=!0,a("FlowGraphSceneTickEventBlock",n))}c();export{n as FlowGraphSceneTickEventBlock,c as RegisterFlowGraphSceneTickEventBlock};
@@ -0,0 +1 @@
1
+ import{y as i,z as r,i as c}from"./index-B2zBEWsq.js";class p extends i{constructor(t){super(t),this.config=t;for(const n in this.config.eventData){const e=this.config.eventData[n],o=typeof e.type=="string"?e.type:e.type?.typeName,a=typeof e.type?.serialize=="function"?e.type:r(o);e.type=a,this.registerDataInput(n,a,e.value)}}_execute(t){const n=this.config.eventId,e={};for(const o of this.dataInputs)e[o.name]=o.getValue(t);t.configuration.coordinator.notifyCustomEvent(n,e),this.out._activateSignal(t)}serialize(t={}){super.serialize(t);const n={};for(const e in this.config.eventData){const o=this.config.eventData[e];n[e]={type:o.type.typeName},o.value!==void 0&&(n[e].value=o.value)}t.config.eventData=n}getClassName(){return"FlowGraphSendCustomEventBlock"}}let s=!1;function l(){s||(s=!0,c("FlowGraphSendCustomEventBlock",p))}l();export{p as FlowGraphSendCustomEventBlock,l as RegisterFlowGraphSendCustomEventBlock};
@@ -0,0 +1 @@
1
+ import{N as s,i as n}from"./index-B2zBEWsq.js";class l extends s{constructor(e){super(e),this.config=e,this.executionSignals=[],this.setNumberOfOutputSignals(this.config.outputSignalCount)}_execute(e){for(let t=0;t<this.executionSignals.length;t++)this.executionSignals[t]._activateSignal(e)}setNumberOfOutputSignals(e=1){for(;this.executionSignals.length>e;){const t=this.executionSignals.pop();t&&(t.disconnectFromAll(),this._unregisterSignalOutput(t.name))}for(;this.executionSignals.length<e;)this.executionSignals.push(this._registerSignalOutput(`out_${this.executionSignals.length}`))}getClassName(){return"FlowGraphSequenceBlock"}}let i=!1;function o(){i||(i=!0,n("FlowGraphSequenceBlock",l))}o();export{l as FlowGraphSequenceBlock,o as RegisterFlowGraphSequenceBlock};
@@ -0,0 +1 @@
1
+ import{y as r,g as l,H as a,i as o}from"./index-B2zBEWsq.js";class s extends r{constructor(t){super(t),this.body=this.registerDataInput("body",l),this.velocity=this.registerDataInput("velocity",a)}_execute(t,g){const e=this.body.getValue(t);if(!e){this._reportError(t,"No physics body provided"),this.out._activateSignal(t);return}e.setAngularVelocity(this.velocity.getValue(t)),this.out._activateSignal(t)}getClassName(){return"FlowGraphSetAngularVelocityBlock"}}let i=!1;function c(){i||(i=!0,o("FlowGraphSetAngularVelocityBlock",s))}c();export{s as FlowGraphSetAngularVelocityBlock,c as RegisterFlowGraphSetAngularVelocityBlock};
@@ -0,0 +1 @@
1
+ import{az as n,w as m,x as v,O as g,X as h,L as d,i as T}from"./index-B2zBEWsq.js";var _;(function(r){r[r.INIT=0]="INIT",r[r.STARTED=1]="STARTED",r[r.ENDED=2]="ENDED"})(_||(_={}));class f{constructor(e){this.onEachCountObservable=new n,this.onTimerAbortedObservable=new n,this.onTimerEndedObservable=new n,this.onStateChangedObservable=new n,this._observer=null,this._breakOnNextTick=!1,this._tick=t=>{const a=Date.now();this._timer=a-this._startTime;const s={startTime:this._startTime,currentTime:a,deltaTime:this._timer,completeRate:this._timer/this._timeToEnd,payload:t},i=this._breakOnNextTick||this._breakCondition(s);i||this._timer>=this._timeToEnd?this._stop(s,i):this.onEachCountObservable.notifyObservers(s)},this._setState(0),this._contextObservable=e.contextObservable,this._observableParameters=e.observableParameters??{},this._breakCondition=e.breakCondition??(()=>!1),this._timeToEnd=e.timeout,e.onEnded&&this.onTimerEndedObservable.add(e.onEnded),e.onTick&&this.onEachCountObservable.add(e.onTick),e.onAborted&&this.onTimerAbortedObservable.add(e.onAborted)}set breakCondition(e){this._breakCondition=e}clearObservables(){this.onEachCountObservable.clear(),this.onTimerAbortedObservable.clear(),this.onTimerEndedObservable.clear(),this.onStateChangedObservable.clear()}start(e=this._timeToEnd){if(this._state===1)throw new Error("Timer already started. Please stop it before starting again");this._timeToEnd=e,this._startTime=Date.now(),this._timer=0,this._observer=this._contextObservable.add(this._tick,this._observableParameters.mask,this._observableParameters.insertFirst,this._observableParameters.scope),this._setState(1)}stop(){this._state===1&&(this._breakOnNextTick=!0)}dispose(){this._observer&&this._contextObservable.remove(this._observer),this.clearObservables()}_setState(e){this._state=e,this.onStateChangedObservable.notifyObservers(this._state)}_stop(e,t=!1){this._contextObservable.remove(this._observer),this._setState(2),t?this.onTimerAbortedObservable.notifyObservers(e):this.onTimerEndedObservable.notifyObservers(e)}}class l extends m{constructor(e){super(e),this.cancel=this._registerSignalInput("cancel"),this.duration=this.registerDataInput("duration",v),this.lastDelayIndex=this.registerDataOutput("lastDelayIndex",g,new h(-1))}_preparePendingTasks(e){const t=this.duration.getValue(e);if(t<0||isNaN(t)||!isFinite(t))return this._reportError(e,"Invalid duration in SetDelay block");if(e._getGlobalContextVariable("activeDelays",0)>=l.MaxParallelDelayCount)return this._reportError(e,"Max parallel delays reached");const s=e._getGlobalContextVariable("lastDelayIndex",-1),i=e._getExecutionVariable(this,"pendingDelays",[]),u=e.configuration.scene,o=new f({timeout:t*1e3,contextObservable:u.onBeforeRenderObservable,onEnded:()=>this._onEnded(o,e)});o.start();const b=s+1;this.lastDelayIndex.setValue(new h(b),e),e._setGlobalContextVariable("lastDelayIndex",b),i[b]=o,e._setExecutionVariable(this,"pendingDelays",i),this._updateGlobalTimers(e)}_cancelPendingTasks(e){const t=e._getExecutionVariable(this,"pendingDelays",[]);for(const a of t)a?.dispose();e._deleteExecutionVariable(this,"pendingDelays"),this.lastDelayIndex.setValue(new h(-1),e),this._updateGlobalTimers(e)}_execute(e,t){if(t===this.cancel){this._cancelPendingTasks(e);return}else this._preparePendingTasks(e),this.out._activateSignal(e)}getClassName(){return"FlowGraphSetDelayBlock"}_onEnded(e,t){const a=t._getExecutionVariable(this,"pendingDelays",[]),s=a.indexOf(e);s!==-1?a.splice(s,1):d.Warn("FlowGraphTimerBlock: Timer ended but was not found in the running timers list"),t._removePendingBlock(this),this.done._activateSignal(t),this._updateGlobalTimers(t)}_updateGlobalTimers(e){const t=e._getExecutionVariable(this,"pendingDelays",[]),a=e._getGlobalContextVariable("pendingDelays",[]);for(let s=0;s<t.length;s++){if(!t[s])continue;const i=t[s];a[s]&&a[s]!==i?d.Warn("FlowGraphTimerBlock: Timer ended but was not found in the running timers list"):a[s]=i}e._setGlobalContextVariable("pendingDelays",a)}}l.MaxParallelDelayCount=100;let c=!1;function p(){c||(c=!0,T("FlowGraphSetDelayBlock",l))}p();export{l as FlowGraphSetDelayBlock,p as RegisterFlowGraphSetDelayBlock};
@@ -0,0 +1 @@
1
+ import{y as r,g as a,H as o,i as s}from"./index-B2zBEWsq.js";class l extends r{constructor(e){super(e),this.body=this.registerDataInput("body",a),this.velocity=this.registerDataInput("velocity",o)}_execute(e,y){const t=this.body.getValue(e);if(!t){this._reportError(e,"No physics body provided"),this.out._activateSignal(e);return}t.setLinearVelocity(this.velocity.getValue(e)),this.out._activateSignal(e)}getClassName(){return"FlowGraphSetLinearVelocityBlock"}}let i=!1;function c(){i||(i=!0,s("FlowGraphSetLinearVelocityBlock",l))}c();export{l as FlowGraphSetLinearVelocityBlock,c as RegisterFlowGraphSetLinearVelocityBlock};
@@ -0,0 +1 @@
1
+ import{y as s,g as o,x as r,i as a}from"./index-B2zBEWsq.js";class p extends s{constructor(t){super(t),this.body=this.registerDataInput("body",o),this.motionType=this.registerDataInput("motionType",r,2)}_execute(t,y){const e=this.body.getValue(t);if(!e){this._reportError(t,"No physics body provided"),this.out._activateSignal(t);return}e.setMotionType(this.motionType.getValue(t)),this.out._activateSignal(t)}getClassName(){return"FlowGraphSetPhysicsMotionTypeBlock"}}let i=!1;function h(){i||(i=!0,a("FlowGraphSetPhysicsMotionTypeBlock",p))}h();export{p as FlowGraphSetPhysicsMotionTypeBlock,h as RegisterFlowGraphSetPhysicsMotionTypeBlock};
@@ -0,0 +1 @@
1
+ import{y as p,g as a,k as c,i as g}from"./index-B2zBEWsq.js";class h extends p{constructor(t){super(t),this.config=t,this.object=this.registerDataInput("object",a,t.target),this.value=this.registerDataInput("value",a),this.propertyName=this.registerDataInput("propertyName",c,t.propertyName),this.customSetFunction=this.registerDataInput("customSetFunction",a)}_execute(t,o){try{const n=this.object.getValue(t),e=this.value.getValue(t),i=this.propertyName.getValue(t);this._stopRunningAnimations(t,n,i);const r=this.customSetFunction.getValue(t);r?r(n,i,e,t):this._setPropertyValue(n,i,e)}catch(n){this._reportError(t,n)}this.out._activateSignal(t)}_stopRunningAnimations(t,o,n){const e=t._getGlobalContextVariable("currentlyRunningAnimationGroups",[]);for(const i of e){const r=t.assetsContext.animationGroups.find(s=>s.uniqueId===i);if(r){for(const s of r.targetedAnimations)if(s.target===o&&s.animation.targetProperty===n){r.stop(!0),r.dispose();const u=e.indexOf(i);u!==-1&&(e.splice(u,1),t._setGlobalContextVariable("currentlyRunningAnimationGroups",e))}}}}_setPropertyValue(t,o,n){const e=o.split(".");let i=t;for(let r=0;r<e.length-1;r++){const s=e[r];i[s]===void 0&&(i[s]={}),i=i[s]}i[e[e.length-1]]=n}getClassName(){return"FlowGraphSetPropertyBlock"}}let l=!1;function m(){l||(l=!0,g("FlowGraphSetPropertyBlock",h))}m();export{h as FlowGraphSetPropertyBlock,m as RegisterFlowGraphSetPropertyBlock};
@@ -0,0 +1 @@
1
+ import{y as u,g as l,x as r,i}from"./index-B2zBEWsq.js";class a extends u{constructor(e){super(e),this.sound=this.registerDataInput("sound",l),this.volume=this.registerDataInput("volume",r,1)}_execute(e,c){const t=this.sound.getValue(e);if(!t){this._reportError(e,"No sound provided"),this.out._activateSignal(e);return}const s=this.volume.getValue(e);t.volume=s,this.out._activateSignal(e)}getClassName(){return"FlowGraphSetSoundVolumeBlock"}}let o=!1;function n(){o||(o=!0,i("FlowGraphSetSoundVolumeBlock",a))}n();export{a as FlowGraphSetSoundVolumeBlock,n as RegisterFlowGraphSetSoundVolumeBlock};
@@ -0,0 +1 @@
1
+ import{y as f,g as o,i as g}from"./index-B2zBEWsq.js";class p extends f{constructor(a){if(super(a),a.variables&&a.variable)throw new Error("FlowGraphSetVariableBlock: variable and variables are both defined");if(a.variables)for(const e of a.variables)this.registerDataInput(e,o);else this.registerDataInput("value",o)}_execute(a,e){if(this.config?.variables)for(const t of this.config.variables)this._saveVariable(a,t);else this._saveVariable(a,this.config?.variable,"value");this.out._activateSignal(a)}_saveVariable(a,e,t){const i=a._getGlobalContextVariable("currentlyRunningAnimationGroups",[]);for(const l of i){const s=a.assetsContext.animationGroups.find(r=>r.uniqueId==l);if(s){for(const r of s.targetedAnimations)if(r.target===a&&r.animation.targetProperty===e){s.stop();const n=i.indexOf(l);n>-1&&i.splice(n,1),a._setGlobalContextVariable("currentlyRunningAnimationGroups",i);break}}}const b=this.getDataInput(t||e)?.getValue(a);a.setVariable(e,b)}getClassName(){return"FlowGraphSetVariableBlock"}serialize(a){super.serialize(a),a.config.variable=this.config?.variable}}let u=!1;function c(){u||(u=!0,g("FlowGraphSetVariableBlock",p))}c();export{p as FlowGraphSetVariableBlock,c as RegisterFlowGraphSetVariableBlock};
@@ -0,0 +1 @@
1
+ import{j as d,g as o,i as t}from"./index-B2zBEWsq.js";class u extends d{constructor(e){super(e),this.sound=this.registerDataInput("sound",o)}_preparePendingTasks(e){const s=this.sound.getValue(e);if(!s){this._reportError(e,"No sound provided for sound-ended event");return}const n=s.onEndedObservable.add(()=>{this._execute(e)});e._setExecutionVariable(this,"_soundEndedObserver",n),e._setExecutionVariable(this,"_subscribedSound",s)}_executeEvent(e,s){return!0}_cancelPendingTasks(e){const s=e._getExecutionVariable(this,"_soundEndedObserver",null),n=e._getExecutionVariable(this,"_subscribedSound",null);s&&n&&n.onEndedObservable.remove(s),e._setExecutionVariable(this,"_soundEndedObserver",null),e._setExecutionVariable(this,"_subscribedSound",null)}getClassName(){return"FlowGraphSoundEndedEventBlock"}}let r=!1;function i(){r||(r=!0,t("FlowGraphSoundEndedEventBlock",u))}i();export{u as FlowGraphSoundEndedEventBlock,i as RegisterFlowGraphSoundEndedEventBlock};
@@ -0,0 +1 @@
1
+ import{w as o,g as s,x as r,L as p,i as l}from"./index-B2zBEWsq.js";class u extends o{constructor(i){super(i),this.animationGroup=this.registerDataInput("animationGroup",s),this.stopAtFrame=this.registerDataInput("stopAtFrame",r,-1)}_preparePendingTasks(i){const a=this.animationGroup.getValue(i),t=this.stopAtFrame.getValue(i)??-1,n=i._getGlobalContextVariable("pendingStopAnimations",[]);n.push({uniqueId:a.uniqueId,stopAtFrame:t}),i._setGlobalContextVariable("pendingStopAnimations",n)}_cancelPendingTasks(i){const a=this.animationGroup.getValue(i),t=i._getGlobalContextVariable("pendingStopAnimations",[]);for(let n=0;n<t.length;n++)if(t[n].uniqueId===a.uniqueId){t.splice(n,1),i._setGlobalContextVariable("pendingStopAnimations",t);break}}_execute(i){const a=this.animationGroup.getValue(i),t=this.stopAtFrame.getValue(i)??-1;if(!a)return p.Warn("No animation group provided to stop."),this._reportError(i,"No animation group provided to stop.");if(isNaN(t))return this._reportError(i,"Invalid stop time.");t>0?this._startPendingTasks(i):this._stopAnimation(a,i),this.out._activateSignal(i)}_executeOnTick(i){const a=this.animationGroup.getValue(i),t=i._getGlobalContextVariable("pendingStopAnimations",[]);for(let n=0;n<t.length;n++)if(t[n].uniqueId===a.uniqueId&&a.getCurrentFrame()>=t[n].stopAtFrame){this._stopAnimation(a,i),t.splice(n,1),i._setGlobalContextVariable("pendingStopAnimations",t),this.done._activateSignal(i),i._removePendingBlock(this);break}}getClassName(){return"FlowGraphStopAnimationBlock"}_stopAnimation(i,a){const t=a._getGlobalContextVariable("currentlyRunningAnimationGroups",[]),n=t.indexOf(i.uniqueId);n!==-1&&(i.stop(),t.splice(n,1),a._setGlobalContextVariable("currentlyRunningAnimationGroups",t))}}let e=!1;function m(){e||(e=!0,l("FlowGraphStopAnimationBlock",u))}m();export{u as FlowGraphStopAnimationBlock,m as RegisterFlowGraphStopAnimationBlock};
@@ -0,0 +1 @@
1
+ import{y as s,g as r,i as a}from"./index-B2zBEWsq.js";class i extends s{constructor(t){super(t),this.sound=this.registerDataInput("sound",r)}_execute(t,n){const o=this.sound.getValue(t);if(!o){this._reportError(t,"No sound provided"),this.out._activateSignal(t);return}o.stop(),this.out._activateSignal(t)}getClassName(){return"FlowGraphStopSoundBlock"}}let e=!1;function u(){e||(e=!0,a("FlowGraphStopSoundBlock",i))}u();export{i as FlowGraphStopSoundBlock,u as RegisterFlowGraphStopSoundBlock};
@@ -0,0 +1 @@
1
+ import{N as u,g as c,Y as l,W as o,i as r}from"./index-B2zBEWsq.js";class h extends u{constructor(t){super(t),this.config=t,this.default=this._registerSignalOutput("default"),this._caseToOutputFlow=new Map,this.case=this.registerDataInput("case",c);const e=this.config.cases||[];for(const s of e)this._caseToOutputFlow.set(s,this._registerSignalOutput(`out_${s}`))}_execute(t,e){const s=this.case.getValue(t);let i;l(s)?i=this._getOutputFlowForCase(o(s)):i=this._getOutputFlowForCase(s),i?i._activateSignal(t):this.default._activateSignal(t)}addCase(t){this.config.cases.includes(t)||(this.config.cases.push(t),this._caseToOutputFlow.set(t,this._registerSignalOutput(`out_${t}`)))}removeCase(t){if(!this.config.cases.includes(t))return;const e=this.config.cases.indexOf(t);this.config.cases.splice(e,1),this._caseToOutputFlow.delete(t)}_getOutputFlowForCase(t){return this._caseToOutputFlow.get(t)}getClassName(){return"FlowGraphSwitchBlock"}serialize(t){super.serialize(t),t.cases=this.config.cases}}let a=!1;function n(){a||(a=!0,r("FlowGraphSwitchBlock",h))}n();export{h as FlowGraphSwitchBlock,n as RegisterFlowGraphSwitchBlock};
@@ -0,0 +1 @@
1
+ import{y as h,x as l,i as o}from"./index-B2zBEWsq.js";class g extends h{constructor(i){super(i),this.reset=this._registerSignalInput("reset"),this.duration=this.registerDataInput("duration",l),this.lastRemainingTime=this.registerDataOutput("lastRemainingTime",l,NaN)}_execute(i,u){if(u===this.reset){this.lastRemainingTime.setValue(NaN,i),i._setExecutionVariable(this,"lastRemainingTime",NaN),i._setExecutionVariable(this,"timestamp",0);return}const e=this.duration.getValue(i);if(e<=0||isNaN(e)||!isFinite(e))return this._reportError(i,"Invalid duration in Throttle block");const m=i._getExecutionVariable(this,"lastRemainingTime",NaN),t=Date.now();if(isNaN(m))return this.lastRemainingTime.setValue(0,i),i._setExecutionVariable(this,"lastRemainingTime",0),i._setExecutionVariable(this,"timestamp",t),this.out._activateSignal(i);{const a=t-i._getExecutionVariable(this,"timestamp",0),s=e*1e3;if(s<=a)return this.lastRemainingTime.setValue(0,i),i._setExecutionVariable(this,"lastRemainingTime",0),i._setExecutionVariable(this,"timestamp",t),this.out._activateSignal(i);{const r=s-a;this.lastRemainingTime.setValue(r/1e3,i),i._setExecutionVariable(this,"lastRemainingTime",r)}}}getClassName(){return"FlowGraphThrottleBlock"}}let n=!1;function T(){n||(n=!0,o("FlowGraphThrottleBlock",g))}T();export{g as FlowGraphThrottleBlock,T as RegisterFlowGraphThrottleBlock};
@@ -0,0 +1 @@
1
+ import{f as m,g as o,H as r,a0 as a,V as h,i as y}from"./index-B2zBEWsq.js";class g extends m{constructor(t){super(t),this.sourceSystem=this.registerDataInput("sourceSystem",o),this.destinationSystem=this.registerDataInput("destinationSystem",o),this.inputCoordinates=this.registerDataInput("inputCoordinates",r),this.outputCoordinates=this.registerDataOutput("outputCoordinates",r)}_updateOutputs(t){const n=this.sourceSystem.getValue(t),u=this.destinationSystem.getValue(t),l=this.inputCoordinates.getValue(t),d=n.getWorldMatrix(),p=u.getWorldMatrix(),s=a.Matrix[0].copyFrom(p);s.invert();const e=a.Matrix[1];s.multiplyToRef(d,e);const c=this.outputCoordinates.getValue(t);h.TransformCoordinatesToRef(l,e,c)}getClassName(){return"FlowGraphTransformCoordinatesSystemBlock"}}let i=!1;function C(){i||(i=!0,y("FlowGraphTransformCoordinatesSystemBlock",g))}C();export{g as FlowGraphTransformCoordinatesSystemBlock,C as RegisterFlowGraphTransformCoordinatesSystemBlock};
@@ -0,0 +1 @@
1
+ import{F as e}from"./flowGraphUnaryOperationBlock-CaRh4Ef0.js";import{x as n,O as s,X as t,h as F,i as a}from"./index-B2zBEWsq.js";import"./flowGraphCachedOperationBlock-Dng-6jE0.js";class u extends e{constructor(r){super(F,n,o=>+o,"FlowGraphBooleanToFloat",r)}}class c extends e{constructor(r){super(F,s,o=>t.FromValue(+o),"FlowGraphBooleanToInt",r)}}class h extends e{constructor(r){super(n,F,o=>!!o,"FlowGraphFloatToBoolean",r)}}class T extends e{constructor(r){super(s,F,o=>!!o.value,"FlowGraphIntToBoolean",r)}}class w extends e{constructor(r){super(s,n,o=>o.value,"FlowGraphIntToFloat",r)}}class G extends e{constructor(r){super(n,s,o=>{switch(r?.roundingMode){case"floor":return t.FromValue(Math.floor(o));case"ceil":return t.FromValue(Math.ceil(o));case"round":return t.FromValue(Math.round(o));default:return t.FromValue(o)}},"FlowGraphFloatToInt",r)}}let p=!1;function i(){p||(p=!0,a("FlowGraphBooleanToFloat",u),a("FlowGraphBooleanToInt",c),a("FlowGraphFloatToBoolean",h),a("FlowGraphIntToBoolean",T),a("FlowGraphIntToFloat",w),a("FlowGraphFloatToInt",G))}i();export{u as FlowGraphBooleanToFloat,c as FlowGraphBooleanToInt,h as FlowGraphFloatToBoolean,G as FlowGraphFloatToInt,T as FlowGraphIntToBoolean,w as FlowGraphIntToFloat,i as RegisterFlowGraphTypeToTypeBlocks};
@@ -0,0 +1 @@
1
+ import{F as o}from"./flowGraphCachedOperationBlock-Dng-6jE0.js";class p extends o{constructor(a,t,s,e,r){super(t,r),this._operation=s,this._className=e,this.a=this.registerDataInput("a",a)}_doOperation(a){return this._operation(this.a.getValue(a))}getClassName(){return this._className}}export{p as F};
@@ -0,0 +1 @@
1
+ import{Q as w,C as f,V as F,H as a,J as c,f as y,x as i,h as A,K as C,z as m,a8 as d,g as h,aW as u,a7 as D,i as s}from"./index-B2zBEWsq.js";import{F as n}from"./flowGraphBinaryOperationBlock-DFLuCAKJ.js";import{F as g}from"./flowGraphUnaryOperationBlock-CaRh4Ef0.js";import"./flowGraphCachedOperationBlock-Dng-6jE0.js";function T(o,e){return o.x*e.x+o.y*e.y+o.z*e.z}function R(o,e){return o.x*e.x+o.y*e.y+o.z*e.z+o.w*e.w}function N(o,e){return Math.acos(f(R(o,e),-1,1))*2}function Q(o,e){const r=new w;return z(o,e,r),r}function z(o,e,r){const t=F.Cross(o,e),l=Math.acos(f(T(o,e),-1,1));return w.RotationAxisToRef(t,l,r),r}const G="cachedOperationAxis",V="cachedOperationAngle",x="cachedExecutionId";class _ extends g{constructor(e){super(h,i,r=>this._polymorphicLength(r),"FlowGraphLengthBlock",e)}_polymorphicLength(e){switch(u(e)){case"Vector2":case"Vector3":case"Vector4":case"Quaternion":return e.length();default:throw new Error(`Cannot compute length of value ${e}`)}}}class E extends g{constructor(e){super(h,h,r=>this._polymorphicNormalize(r),"FlowGraphNormalizeBlock",e)}_polymorphicNormalize(e){const r=u(e);let t;switch(r){case"Vector2":case"Vector3":case"Vector4":case"Quaternion":return t=e.normalizeToNew(),this.config?.nanOnZeroLength&&e.length()===0&&t.setAll(NaN),t;default:throw new Error(`Cannot normalize value ${e}`)}}}class O extends n{constructor(e){super(h,h,i,(r,t)=>this._polymorphicDot(r,t),"FlowGraphDotBlock",e)}_polymorphicDot(e,r){switch(u(e)){case"Vector2":case"Vector3":case"Vector4":case"Quaternion":return e.dot(r);default:throw new Error(`Cannot get dot product of ${e} and ${r}`)}}}class M extends n{constructor(e){super(a,a,a,(r,t)=>F.Cross(r,t),"FlowGraphCrossBlock",e)}}class I extends n{constructor(e){super(d,i,d,(r,t)=>r.rotate(t),"FlowGraphRotate2DBlock",e)}}class L extends n{constructor(e){super(a,c,a,(r,t)=>r.applyRotationQuaternion(t),"FlowGraphRotate3DBlock",e)}}function v(o,e){switch(u(o)){case"Vector2":return e.transformVector(o);case"Vector3":return e.transformVector(o);case"Vector4":return o=o,new D(o.x*e.m[0]+o.y*e.m[1]+o.z*e.m[2]+o.w*e.m[3],o.x*e.m[4]+o.y*e.m[5]+o.z*e.m[6]+o.w*e.m[7],o.x*e.m[8]+o.y*e.m[9]+o.z*e.m[10]+o.w*e.m[11],o.x*e.m[12]+o.y*e.m[13]+o.z*e.m[14]+o.w*e.m[15]);default:throw new Error(`Cannot transform value ${o}`)}}class $ extends n{constructor(e){const r=e?.vectorType||"Vector3",t=r==="Vector2"?"Matrix2D":r==="Vector3"?"Matrix3D":"Matrix";super(m(r),m(t),m(r),v,"FlowGraphTransformVectorBlock",e)}}class j extends n{constructor(e){super(a,C,a,(r,t)=>F.TransformCoordinates(r,t),"FlowGraphTransformCoordinatesBlock",e)}}class H extends g{constructor(e){super(c,c,r=>r.conjugate(),"FlowGraphConjugateBlock",e)}}class J extends n{constructor(e){super(c,c,i,(r,t)=>N(r,t),"FlowGraphAngleBetweenBlock",e)}}class K extends n{constructor(e){super(a,i,c,(r,t)=>w.RotationAxis(r,t),"FlowGraphQuaternionFromAxisAngleBlock",e)}}class U extends y{constructor(e){super(e),this.a=this.registerDataInput("a",c),this.axis=this.registerDataOutput("axis",a),this.angle=this.registerDataOutput("angle",i),this.isValid=this.registerDataOutput("isValid",A)}_updateOutputs(e){const r=e._getExecutionVariable(this,x,-1),t=e._getExecutionVariable(this,G,null),l=e._getExecutionVariable(this,V,null);if(t!=null&&l!==void 0&&l!==null&&r===e.executionId)this.axis.setValue(t,e),this.angle.setValue(l,e);else try{const{axis:p,angle:B}=this.a.getValue(e).toAxisAngle();e._setExecutionVariable(this,G,p),e._setExecutionVariable(this,V,B),e._setExecutionVariable(this,x,e.executionId),this.axis.setValue(p,e),this.angle.setValue(B,e),this.isValid.setValue(!0,e)}catch{this.isValid.setValue(!1,e)}}getClassName(){return"FlowGraphAxisAngleFromQuaternionBlock"}}class X extends n{constructor(e){super(a,a,c,(r,t)=>Q(r,t),"FlowGraphQuaternionFromDirectionsBlock",e)}}let k=!1;function W(){k||(k=!0,s("FlowGraphLengthBlock",_),s("FlowGraphNormalizeBlock",E),s("FlowGraphDotBlock",O),s("FlowGraphCrossBlock",M),s("FlowGraphRotate2DBlock",I),s("FlowGraphRotate3DBlock",L),s("FlowGraphTransformVectorBlock",$),s("FlowGraphTransformCoordinatesBlock",j),s("FlowGraphConjugateBlock",H),s("FlowGraphAngleBetweenBlock",J),s("FlowGraphQuaternionFromAxisAngleBlock",K),s("FlowGraphAxisAngleFromQuaternionBlock",U))}W();export{J as FlowGraphAngleBetweenBlock,U as FlowGraphAxisAngleFromQuaternionBlock,H as FlowGraphConjugateBlock,M as FlowGraphCrossBlock,O as FlowGraphDotBlock,_ as FlowGraphLengthBlock,E as FlowGraphNormalizeBlock,K as FlowGraphQuaternionFromAxisAngleBlock,X as FlowGraphQuaternionFromDirectionsBlock,I as FlowGraphRotate2DBlock,L as FlowGraphRotate3DBlock,$ as FlowGraphTransformBlock,j as FlowGraphTransformCoordinatesBlock,W as RegisterFlowGraphVectorMathBlocks};
@@ -0,0 +1 @@
1
+ import{y as l,O as r,X as n,i as o}from"./index-B2zBEWsq.js";class h extends l{constructor(i){super(i),this.config=i,this.inFlows=[],this._cachedActivationState=[],this.reset=this._registerSignalInput("reset"),this.completed=this._registerSignalOutput("completed"),this.remainingInputs=this.registerDataOutput("remainingInputs",r,new n(this.config.inputSignalCount||0));for(let e=0;e<this.config.inputSignalCount;e++)this.inFlows.push(this._registerSignalInput(`in_${e}`));this._unregisterSignalInput("in")}_getCurrentActivationState(i){const e=this._cachedActivationState;if(e.length=0,i._hasExecutionVariable(this,"activationState")){const s=i._getExecutionVariable(this,"activationState",[]);for(let t=0;t<s.length;t++)e.push(s[t])}else for(let s=0;s<this.config.inputSignalCount;s++)e.push(!1);return e}_execute(i,e){const s=this._getCurrentActivationState(i);if(e===this.reset)for(let t=0;t<this.config.inputSignalCount;t++)s[t]=!1;else{const t=this.inFlows.indexOf(e);t>=0&&(s[t]=!0)}if(this.remainingInputs.setValue(new n(s.filter(t=>!t).length),i),i._setExecutionVariable(this,"activationState",s.slice()),s.includes(!1))e!==this.reset&&this.out._activateSignal(i);else{this.completed._activateSignal(i);for(let t=0;t<this.config.inputSignalCount;t++)s[t]=!1}}getClassName(){return"FlowGraphWaitAllBlock"}serialize(i){super.serialize(i),i.config.inputFlows=this.config.inputSignalCount}}let a=!1;function u(){a||(a=!0,o("FlowGraphWaitAllBlock",h))}u();export{h as FlowGraphWaitAllBlock,u as RegisterFlowGraphWaitAllBlock};