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 @@
1
+ :root{color-scheme:light;font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;color:#17232d;background:#edf1f3;font-synthesis:none;--ink: #17232d;--muted: #61707c;--line: #d7dfe4;--panel: #fbfcfc;--panel-strong: #ffffff;--nav: #101820;--accent: #087ea4;--accent-soft: #dff3f9;--shadow: 0 16px 44px rgb(28 42 53 / 14%)}*{box-sizing:border-box}html,body,#app{width:100%;height:100%;margin:0;overflow:hidden}body{min-width:320px}button,a{font:inherit}button{color:inherit}button,summary,a{-webkit-tap-highlight-color:transparent}button:focus-visible,a:focus-visible,summary:focus-visible,canvas:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #19a5d1;outline-offset:2px}.skip-link{position:fixed;z-index:100;left:1rem;top:-5rem;padding:.75rem 1rem;color:#fff;background:#101820;border-radius:.5rem}.skip-link:focus{top:1rem}.app-shell{display:grid;grid-template-rows:68px minmax(0,1fr);height:100%}.app-header{z-index:15;display:flex;align-items:center;justify-content:space-between;padding:0 max(1.2rem,env(safe-area-inset-right)) 0 max(1.2rem,env(safe-area-inset-left));background:#fff;border-bottom:1px solid var(--line)}.brand-block{display:flex;align-items:center;gap:.75rem;min-width:0}.brand-mark{display:grid;place-items:center;width:38px;height:38px;flex:0 0 auto;border-radius:10px;color:#fff;background:linear-gradient(145deg,#0b8db6,#075e7c);font-weight:800}.eyebrow{margin:0 0 .12rem;color:var(--muted);font-size:.65rem;font-weight:750;letter-spacing:.12em;text-transform:uppercase}h1,h2,h3,p{margin-top:0}h1{margin-bottom:0;font-size:1.02rem;letter-spacing:-.02em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}h2{margin-bottom:0;font-size:1.05rem;letter-spacing:-.02em}.header-tools,.header-status{display:flex;align-items:center;gap:.7rem}.unit-control{display:flex;align-items:center;gap:.42rem;color:var(--muted);font-size:.68rem;font-weight:700}.unit-control select{min-height:34px;padding:.32rem 1.8rem .32rem .55rem;border:1px solid #c8d4da;border-radius:.5rem;color:var(--ink);background:#fff;cursor:pointer;font:inherit}.status-pill{display:inline-flex;align-items:center;gap:.4rem;padding:.38rem .65rem;border-radius:999px;color:#155f44;background:#e2f6ed;font-size:.72rem;font-weight:700}.status-pill:before{content:"";width:.42rem;height:.42rem;border-radius:50%;background:#1f9e70}.status-pill.is-warning{color:#815611;background:#fff1cf}.status-pill.is-warning:before{background:#cf8712}.offline-status{max-width:190px;color:var(--muted);font-size:.68rem}.workspace{display:grid;grid-template-columns:76px auto minmax(0,1fr) 340px;min-height:0;background:#dfe6e9}.section-nav{z-index:12;display:flex;flex-direction:column;gap:.35rem;padding:.7rem .45rem;background:var(--nav)}.nav-button{display:grid;justify-items:center;gap:.28rem;min-height:58px;padding:.55rem .2rem;border:0;border-radius:.55rem;color:#adbac4;background:transparent;cursor:pointer;font-size:.65rem}.nav-button>span:first-child{font-size:1.25rem;line-height:1}.nav-button:hover,.nav-button.is-active{color:#fff;background:#25333d}.nav-button.is-active{box-shadow:inset 3px 0 #20a4cf}.aux-panel,.property-panel{z-index:8;min-height:0;background:var(--panel)}.aux-panel{width:0;overflow:hidden;border-right:0 solid var(--line);transition:width .2s ease}.aux-panel.is-open{width:310px;border-right-width:1px}.panel-heading{display:flex;align-items:center;justify-content:space-between;gap:1rem;min-height:72px;padding:1rem 1rem .85rem;border-bottom:1px solid var(--line)}.icon-button{display:grid;place-items:center;width:34px;height:34px;flex:0 0 auto;border:1px solid var(--line);border-radius:50%;background:#fff;cursor:pointer;font-size:1.35rem;line-height:1}.icon-button:hover{background:#eff3f5}.panel-scroll{height:calc(100% - 72px);overflow:auto;overscroll-behavior:contain;padding:1rem}.viewport{position:relative;min-width:0;min-height:0;overflow:hidden;background:#edf2f4}#viewer-canvas{display:block;width:100%;height:100%;touch-action:none;outline-offset:-4px}.loading-overlay{position:absolute;z-index:10;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.7rem;padding:2rem;color:var(--ink);background:#eff4f6f5;text-align:center;transition:opacity .24s ease}.loading-overlay.is-complete{opacity:0;pointer-events:none}.loading-overlay.is-error{color:#8e2f2f}.loader-ring{width:34px;height:34px;border:3px solid #c6d6dc;border-top-color:var(--accent);border-radius:50%;animation:spin .85s linear infinite}.loading-overlay.is-error .loader-ring{animation:none;border-color:#d98c8c}.progress-track{width:min(280px,70vw);height:4px;overflow:hidden;border-radius:2px;background:#cfdae0}.progress-track span{display:block;width:2%;height:100%;background:var(--accent);transition:width .15s ease}@keyframes spin{to{transform:rotate(360deg)}}.view-toolbar{position:absolute;z-index:5;left:50%;bottom:38px;display:flex;align-items:center;gap:.2rem;max-width:calc(100% - 2rem);padding:.35rem;border:1px solid rgb(205 216 222 / 80%);border-radius:.75rem;background:#ffffffeb;box-shadow:0 8px 22px #1a2b3624;transform:translate(-50%);backdrop-filter:blur(12px)}.view-toolbar button{min-height:36px;padding:.35rem .62rem;border:0;border-radius:.5rem;background:transparent;cursor:pointer;font-size:.72rem;font-weight:650}.view-toolbar button:hover,.view-toolbar button[aria-pressed=true]{color:#066684;background:var(--accent-soft)}.toolbar-divider{width:1px;height:20px;margin:0 .15rem;background:var(--line)}.axis-legend{position:absolute;z-index:5;top:1rem;right:1rem;display:flex;gap:.32rem;padding:.38rem;border:1px solid rgb(205 216 222 / 80%);border-radius:.65rem;background:#ffffffe0;box-shadow:0 6px 18px #1a2b361a;backdrop-filter:blur(10px)}.axis-legend[hidden]{display:none}.axis-legend span{display:grid;place-items:center;width:25px;height:25px;border-radius:50%;color:#fff;font-size:.68rem;font-weight:800}.axis-x{background:#a82929}.axis-y{background:#19743a}.axis-z{background:#2367ad}.navigation-hint{position:absolute;left:50%;bottom:10px;margin:0;color:#526571;font-size:.66rem;transform:translate(-50%);white-space:nowrap}.property-panel{display:grid;grid-template-rows:auto minmax(0,1fr) auto;border-left:1px solid var(--line)}.property-panel .panel-scroll{height:auto}.close-properties{visibility:hidden}.sheet-handle{display:none}.property-actions{display:flex;gap:.5rem;padding:.85rem 1rem max(.85rem,env(safe-area-inset-bottom));border-top:1px solid var(--line)}.property-actions button,.tree-actions button{flex:1;min-height:38px;padding:.45rem .7rem;border:1px solid #c8d4da;border-radius:.5rem;background:#fff;cursor:pointer;font-size:.75rem;font-weight:650}.property-actions button:hover:not(:disabled),.tree-actions button:hover{border-color:#72afc3;background:var(--accent-soft)}.property-actions button:disabled{opacity:.45;cursor:default}.empty-state{display:grid;justify-items:center;align-content:center;gap:.7rem;min-height:210px;padding:1.5rem;color:var(--muted);text-align:center}.empty-state span{font-size:2.4rem;color:#91a6b1}.empty-state p{max-width:240px;margin:0;font-size:.8rem;line-height:1.55}.property-section+.property-section{margin-top:1.35rem;padding-top:1.2rem;border-top:1px solid var(--line)}.property-section h3,.download-group h3{margin-bottom:.7rem;color:#4e626e;font-size:.68rem;letter-spacing:.1em;text-transform:uppercase}.property-section dl,.build-info{margin:0}.property-section dl{display:grid;grid-template-columns:minmax(82px,.85fr) minmax(0,1.45fr);gap:.58rem .75rem;font-size:.75rem}.property-section dt,.build-info dt{color:var(--muted)}.property-section dd,.build-info dd{margin:0;overflow-wrap:anywhere;font-weight:600}.tree-actions{display:flex;gap:.5rem;margin-bottom:1rem}.model-tree{display:grid;gap:.42rem}.model-tree details{overflow:hidden;border:1px solid var(--line);border-radius:.6rem;background:#fff}.model-tree summary{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:.55rem;min-height:42px;padding:.45rem .65rem;cursor:pointer;list-style:none;font-size:.75rem;font-weight:700}.model-tree summary::-webkit-details-marker{display:none}.model-tree summary:after{content:"⌄";grid-column:4;color:#788a95;transition:transform .15s}.model-tree details:not([open]) summary:after{transform:rotate(-90deg)}.category-visibility{width:16px;height:16px;margin:0;accent-color:var(--accent)}.category-count{min-width:1.65rem;padding:.15rem .35rem;border-radius:999px;color:var(--muted);background:#edf2f4;text-align:center;font-size:.64rem}.element-list{display:grid;padding:0 .42rem .42rem 2rem}.tree-element{padding:.45rem .55rem;overflow:hidden;border:0;border-radius:.4rem;background:transparent;cursor:pointer;text-align:left;text-overflow:ellipsis;white-space:nowrap;font-size:.72rem}.tree-element:hover,.tree-element.is-selected{color:#08627e;background:var(--accent-soft)}.drawing-card{margin-bottom:1rem;overflow:hidden;border:1px solid var(--line);border-radius:.7rem;background:#fff}.drawing-card img{display:block;width:100%;aspect-ratio:4 / 3;object-fit:contain;background:#f2f5f6}.file-link{display:flex;align-items:center;justify-content:space-between;gap:.8rem;min-height:46px;padding:.65rem .75rem;border:1px solid var(--line);border-radius:.55rem;color:var(--ink);background:#fff;text-decoration:none}.drawing-card .file-link{border:0;border-top:1px solid var(--line);border-radius:0}.file-link:hover{border-color:#72afc3;background:var(--accent-soft)}.file-link span{overflow:hidden;text-overflow:ellipsis;text-transform:capitalize;white-space:nowrap;font-size:.75rem;font-weight:700}.file-link small{flex:0 0 auto;color:var(--muted);font-size:.65rem}.download-group+.download-group{margin-top:1.3rem}.download-group .file-link+.file-link{margin-top:.4rem}.build-info{display:grid;grid-template-columns:95px minmax(0,1fr);gap:.75rem;font-size:.73rem}.build-info dd{overflow:hidden;text-overflow:ellipsis}@media(max-width:980px){.workspace{grid-template-columns:68px auto minmax(0,1fr) 300px}.aux-panel.is-open{width:280px}.offline-status{display:none}}@media(max-width:760px){.app-shell{grid-template-rows:58px minmax(0,1fr)}.app-header{padding-left:max(.75rem,env(safe-area-inset-left));padding-right:max(.75rem,env(safe-area-inset-right))}.brand-mark{width:34px;height:34px}.brand-block{gap:.55rem;min-width:0}h1{max-width:46vw;font-size:.9rem}.status-pill{padding:.32rem .5rem;font-size:.64rem}.workspace{position:relative;display:block}.viewport{position:absolute;inset:0 0 calc(64px + env(safe-area-inset-bottom))}.section-nav{position:absolute;z-index:30;right:0;bottom:0;left:0;height:calc(64px + env(safe-area-inset-bottom));flex-direction:row;justify-content:space-around;padding:.35rem max(.35rem,env(safe-area-inset-right)) env(safe-area-inset-bottom) max(.35rem,env(safe-area-inset-left))}.nav-button{flex:1;min-height:52px;padding:.35rem}.nav-button.is-active{box-shadow:inset 0 3px #20a4cf}.aux-panel{position:absolute;z-index:25;inset:auto 0 calc(64px + env(safe-area-inset-bottom)) 0;width:auto;height:min(62vh,520px);border:1px solid var(--line);border-width:1px 0 0;border-radius:1rem 1rem 0 0;box-shadow:var(--shadow);transform:translateY(calc(100% + 1px));transition:transform .22s ease}.aux-panel.is-open{width:auto;border-right-width:0;transform:translateY(0)}.panel-heading{min-height:64px;padding:.8rem 1rem .7rem}.aux-panel .panel-scroll{height:calc(100% - 64px);padding-bottom:1.25rem}.property-panel{position:absolute;z-index:27;right:0;bottom:calc(64px + env(safe-area-inset-bottom));left:0;display:grid;max-height:min(52vh,470px);border:1px solid var(--line);border-width:1px 0 0;border-radius:1rem 1rem 0 0;box-shadow:var(--shadow);transform:translateY(calc(100% + 80px));transition:transform .22s ease}.property-panel.has-selection{transform:translateY(0)}.property-panel .panel-heading{padding-top:.55rem}.property-panel .panel-scroll{min-height:0;padding-bottom:.5rem}.close-properties{visibility:visible}.sheet-handle{display:block;position:absolute;z-index:2;top:6px;left:50%;width:34px;height:4px;border-radius:2px;background:#bfccd2;transform:translate(-50%)}.view-toolbar{bottom:34px;gap:.08rem;max-width:calc(100% - 1rem);overflow-x:auto;padding:.25rem}.view-toolbar button{min-width:47px;min-height:38px;padding:.3rem .45rem}.navigation-hint{bottom:9px;font-size:.58rem}.axis-legend{top:.65rem;right:.65rem}}@media(max-width:430px){.view-toolbar button[data-view=front],.view-toolbar button[data-view=right]{display:none}.eyebrow{font-size:.58rem}.status-pill{max-width:108px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.header-status{display:none}.unit-control>span{display:none}.unit-control select{max-width:92px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}}
@@ -0,0 +1,57 @@
1
+ import{S as e}from"./index-B2zBEWsq.js";import{k as f}from"./kernelBlurVaryingDeclaration-YS8JpqdO.js";import{p as s}from"./packingFunctions-BHPwcGG2.js";const t="kernelBlurFragment",l=`#ifdef DOF
2
+ factor=sampleCoC(fragmentInputs.sampleCoord{X});
3
+ computedWeight=KERNEL_WEIGHT{X}*factor;sumOfWeights+=computedWeight;
4
+ #else
5
+ computedWeight=KERNEL_WEIGHT{X};
6
+ #endif
7
+ #ifdef PACKEDFLOAT
8
+ blend+=unpack(textureSample(textureSampler,textureSamplerSampler,fragmentInputs.sampleCoord{X}))*computedWeight;
9
+ #else
10
+ blend+=textureSample(textureSampler,textureSamplerSampler,fragmentInputs.sampleCoord{X})*computedWeight;
11
+ #endif
12
+ `;e.IncludesShadersStoreWGSL[t]||(e.IncludesShadersStoreWGSL[t]=l);const p={name:t,shader:l},n="kernelBlurFragment2",m=`#ifdef DOF
13
+ factor=sampleCoC(fragmentInputs.sampleCenter+uniforms.delta*KERNEL_DEP_OFFSET{X});computedWeight=KERNEL_DEP_WEIGHT{X}*factor;sumOfWeights+=computedWeight;
14
+ #else
15
+ computedWeight=KERNEL_DEP_WEIGHT{X};
16
+ #endif
17
+ #ifdef PACKEDFLOAT
18
+ blend+=unpack(textureSample(textureSampler,textureSamplerSampler,fragmentInputs.sampleCenter+uniforms.delta*KERNEL_DEP_OFFSET{X}))*computedWeight;
19
+ #else
20
+ blend+=textureSample(textureSampler,textureSamplerSampler,fragmentInputs.sampleCenter+uniforms.delta*KERNEL_DEP_OFFSET{X})*computedWeight;
21
+ #endif
22
+ `;e.IncludesShadersStoreWGSL[n]||(e.IncludesShadersStoreWGSL[n]=m);const o={name:n,shader:m},a="kernelBlurPixelShader",u=`var textureSamplerSampler: sampler;var textureSampler: texture_2d<f32>;uniform delta: vec2f;varying sampleCenter: vec2f;
23
+ #ifdef DOF
24
+ var circleOfConfusionSamplerSampler: sampler;var circleOfConfusionSampler: texture_2d<f32>;fn sampleCoC(offset: vec2f)->f32 {var coc: f32=textureSample(circleOfConfusionSampler,circleOfConfusionSamplerSampler,offset).r;return coc; }
25
+ #endif
26
+ #include<kernelBlurVaryingDeclaration>[0..varyingCount]
27
+ #ifdef PACKEDFLOAT
28
+ #include<packingFunctions>
29
+ #endif
30
+ #define CUSTOM_FRAGMENT_DEFINITIONS
31
+ @fragment
32
+ fn main(input: FragmentInputs)->FragmentOutputs {var computedWeight: f32=0.0;
33
+ #ifdef PACKEDFLOAT
34
+ var blend: f32=0.;
35
+ #else
36
+ var blend: vec4f= vec4f(0.);
37
+ #endif
38
+ #ifdef DOF
39
+ var sumOfWeights: f32=CENTER_WEIGHT;
40
+ var factor: f32=0.0;
41
+ #ifdef PACKEDFLOAT
42
+ blend+=unpack(textureSample(textureSampler,textureSamplerSampler,input.sampleCenter))*CENTER_WEIGHT;
43
+ #else
44
+ blend+=textureSample(textureSampler,textureSamplerSampler,input.sampleCenter)*CENTER_WEIGHT;
45
+ #endif
46
+ #endif
47
+ #include<kernelBlurFragment>[0..varyingCount]
48
+ #include<kernelBlurFragment2>[0..depCount]
49
+ #ifdef PACKEDFLOAT
50
+ fragmentOutputs.color=pack(blend);
51
+ #else
52
+ fragmentOutputs.color=blend;
53
+ #endif
54
+ #ifdef DOF
55
+ fragmentOutputs.color/=sumOfWeights;
56
+ #endif
57
+ }`;e.ShadersStoreWGSL[a]||(e.ShadersStoreWGSL[a]=u);const d=[f,s,p,o];for(const r of d)e.IncludesShadersStoreWGSL[r.name]||(e.IncludesShadersStoreWGSL[r.name]=r.shader);const E={name:a,shader:u};export{E as kernelBlurPixelShaderWGSL};
@@ -0,0 +1,57 @@
1
+ import{S as e}from"./index-B2zBEWsq.js";import{k as i}from"./kernelBlurVaryingDeclaration-CgBGaCHg.js";import{p as s}from"./packingFunctions-DTwzBRBx.js";const t="kernelBlurFragment",a=`#ifdef DOF
2
+ factor=sampleCoC(sampleCoord{X});
3
+ computedWeight=KERNEL_WEIGHT{X}*factor;sumOfWeights+=computedWeight;
4
+ #else
5
+ computedWeight=KERNEL_WEIGHT{X};
6
+ #endif
7
+ #ifdef PACKEDFLOAT
8
+ blend+=unpack(texture2D(textureSampler,sampleCoord{X}))*computedWeight;
9
+ #else
10
+ blend+=texture2D(textureSampler,sampleCoord{X})*computedWeight;
11
+ #endif
12
+ `;e.IncludesShadersStore[t]||(e.IncludesShadersStore[t]=a);const f={name:t,shader:a},n="kernelBlurFragment2",o=`#ifdef DOF
13
+ factor=sampleCoC(sampleCenter+delta*KERNEL_DEP_OFFSET{X});computedWeight=KERNEL_DEP_WEIGHT{X}*factor;sumOfWeights+=computedWeight;
14
+ #else
15
+ computedWeight=KERNEL_DEP_WEIGHT{X};
16
+ #endif
17
+ #ifdef PACKEDFLOAT
18
+ blend+=unpack(texture2D(textureSampler,sampleCenter+delta*KERNEL_DEP_OFFSET{X}))*computedWeight;
19
+ #else
20
+ blend+=texture2D(textureSampler,sampleCenter+delta*KERNEL_DEP_OFFSET{X})*computedWeight;
21
+ #endif
22
+ `;e.IncludesShadersStore[n]||(e.IncludesShadersStore[n]=o);const u={name:n,shader:o},l="kernelBlurPixelShader",d=`uniform sampler2D textureSampler;uniform vec2 delta;varying vec2 sampleCenter;
23
+ #ifdef DOF
24
+ uniform sampler2D circleOfConfusionSampler;float sampleCoC(in vec2 offset) {float coc=texture2D(circleOfConfusionSampler,offset).r;return coc; }
25
+ #endif
26
+ #include<kernelBlurVaryingDeclaration>[0..varyingCount]
27
+ #ifdef PACKEDFLOAT
28
+ #include<packingFunctions>
29
+ #endif
30
+ #define CUSTOM_FRAGMENT_DEFINITIONS
31
+ void main(void)
32
+ {float computedWeight=0.0;
33
+ #ifdef PACKEDFLOAT
34
+ float blend=0.;
35
+ #else
36
+ vec4 blend=vec4(0.);
37
+ #endif
38
+ #ifdef DOF
39
+ float sumOfWeights=CENTER_WEIGHT;
40
+ float factor=0.0;
41
+ #ifdef PACKEDFLOAT
42
+ blend+=unpack(texture2D(textureSampler,sampleCenter))*CENTER_WEIGHT;
43
+ #else
44
+ blend+=texture2D(textureSampler,sampleCenter)*CENTER_WEIGHT;
45
+ #endif
46
+ #endif
47
+ #include<kernelBlurFragment>[0..varyingCount]
48
+ #include<kernelBlurFragment2>[0..depCount]
49
+ #ifdef PACKEDFLOAT
50
+ gl_FragColor=pack(blend);
51
+ #else
52
+ gl_FragColor=blend;
53
+ #endif
54
+ #ifdef DOF
55
+ gl_FragColor/=sumOfWeights;
56
+ #endif
57
+ }`;e.ShadersStore[l]||(e.ShadersStore[l]=d);const c=[i,s,f,u];for(const r of c)e.IncludesShadersStore[r.name]||(e.IncludesShadersStore[r.name]=r.shader);const S={name:l,shader:d};export{S as kernelBlurPixelShader};
@@ -0,0 +1,11 @@
1
+ import{S as e}from"./index-B2zBEWsq.js";import{k as o}from"./kernelBlurVaryingDeclaration-YS8JpqdO.js";const t="kernelBlurVertex",s="vertexOutputs.sampleCoord{X}=vertexOutputs.sampleCenter+uniforms.delta*KERNEL_OFFSET{X};";e.IncludesShadersStoreWGSL[t]||(e.IncludesShadersStoreWGSL[t]=s);const d={name:t,shader:s},n="kernelBlurVertexShader",a=`attribute position: vec2f;uniform delta: vec2f;varying sampleCenter: vec2f;
2
+ #include<kernelBlurVaryingDeclaration>[0..varyingCount]
3
+ #define CUSTOM_VERTEX_DEFINITIONS
4
+ @vertex
5
+ fn main(input : VertexInputs)->FragmentInputs {const madd: vec2f= vec2f(0.5,0.5);
6
+ #define CUSTOM_VERTEX_MAIN_BEGIN
7
+ vertexOutputs.sampleCenter=(vertexInputs.position*madd+madd);
8
+ #include<kernelBlurVertex>[0..varyingCount]
9
+ vertexOutputs.position= vec4f(vertexInputs.position,0.0,1.0);
10
+ #define CUSTOM_VERTEX_MAIN_END
11
+ }`;e.ShadersStoreWGSL[n]||(e.ShadersStoreWGSL[n]=a);const i=[o,d];for(const r of i)e.IncludesShadersStoreWGSL[r.name]||(e.IncludesShadersStoreWGSL[r.name]=r.shader);const l={name:n,shader:a};export{l as kernelBlurVertexShaderWGSL};
@@ -0,0 +1,11 @@
1
+ import{S as e}from"./index-B2zBEWsq.js";import{k as d}from"./kernelBlurVaryingDeclaration-CgBGaCHg.js";const n="kernelBlurVertex",o="sampleCoord{X}=sampleCenter+delta*KERNEL_OFFSET{X};";e.IncludesShadersStore[n]||(e.IncludesShadersStore[n]=o);const s={name:n,shader:o},a="kernelBlurVertexShader",t=`attribute vec2 position;uniform vec2 delta;varying vec2 sampleCenter;
2
+ #include<kernelBlurVaryingDeclaration>[0..varyingCount]
3
+ const vec2 madd=vec2(0.5,0.5);
4
+ #define CUSTOM_VERTEX_DEFINITIONS
5
+ void main(void) {
6
+ #define CUSTOM_VERTEX_MAIN_BEGIN
7
+ sampleCenter=(position*madd+madd);
8
+ #include<kernelBlurVertex>[0..varyingCount]
9
+ gl_Position=vec4(position,0.0,1.0);
10
+ #define CUSTOM_VERTEX_MAIN_END
11
+ }`;e.ShadersStore[a]||(e.ShadersStore[a]=t);const i=[d,s];for(const r of i)e.IncludesShadersStore[r.name]||(e.IncludesShadersStore[r.name]=r.shader);const S={name:a,shader:t};export{S as kernelBlurVertexShader};
@@ -0,0 +1 @@
1
+ import{S as e}from"./index-B2zBEWsq.js";const r="kernelBlurVaryingDeclaration",a="varying vec2 sampleCoord{X};";e.IncludesShadersStore[r]||(e.IncludesShadersStore[r]=a);const o={name:r,shader:a};export{o as k};
@@ -0,0 +1 @@
1
+ import{S as e}from"./index-B2zBEWsq.js";const r="kernelBlurVaryingDeclaration",a="varying sampleCoord{X}: vec2f;";e.IncludesShadersStoreWGSL[r]||(e.IncludesShadersStoreWGSL[r]=a);const o={name:r,shader:a};export{o as k};
@@ -0,0 +1 @@
1
+ import{L as _,au as d,a_ as G}from"./index-B2zBEWsq.js";class n{constructor(s,e){if(this.data=s,this.isInvalid=!1,!n.IsValid(s)){this.isInvalid=!0,_.Error("texture missing KTX identifier");return}const a=Uint32Array.BYTES_PER_ELEMENT,r=new DataView(this.data.buffer,this.data.byteOffset+12,13*a),i=r.getUint32(0,!0)===67305985;if(this.glType=r.getUint32(1*a,i),this.glTypeSize=r.getUint32(2*a,i),this.glFormat=r.getUint32(3*a,i),this.glInternalFormat=r.getUint32(4*a,i),this.glBaseInternalFormat=r.getUint32(5*a,i),this.pixelWidth=r.getUint32(6*a,i),this.pixelHeight=r.getUint32(7*a,i),this.pixelDepth=r.getUint32(8*a,i),this.numberOfArrayElements=r.getUint32(9*a,i),this.numberOfFaces=r.getUint32(10*a,i),this.numberOfMipmapLevels=r.getUint32(11*a,i),this.bytesOfKeyValueData=r.getUint32(12*a,i),this.glType!==0){_.Error("only compressed formats currently supported"),this.isInvalid=!0;return}else this.numberOfMipmapLevels=Math.max(1,this.numberOfMipmapLevels);if(this.pixelHeight===0||this.pixelDepth!==0){_.Error("only 2D textures currently supported"),this.isInvalid=!0;return}if(this.numberOfArrayElements!==0){_.Error("texture arrays not currently supported"),this.isInvalid=!0;return}if(this.numberOfFaces!==e){_.Error("number of faces expected"+e+", but found "+this.numberOfFaces),this.isInvalid=!0;return}this.loadType=n.COMPRESSED_2D}uploadLevels(s,e){this.loadType===n.COMPRESSED_2D&&this._upload2DCompressedLevels(s,e)}_upload2DCompressedLevels(s,e){let a=n.HEADER_LEN+this.bytesOfKeyValueData,r=this.pixelWidth,c=this.pixelHeight;const i=e?this.numberOfMipmapLevels:1;for(let f=0;f<i;f++){const l=new Int32Array(this.data.buffer,this.data.byteOffset+a,1)[0];a+=4;for(let R=0;R<this.numberOfFaces;R++){const T=new Uint8Array(this.data.buffer,this.data.byteOffset+a,l);s.getEngine()._uploadCompressedDataToTextureDirectly(s,s.format,r,c,T,R,f),a+=l,a+=3-(l+3)%4}r=Math.max(1,r*.5),c=Math.max(1,c*.5)}}static IsValid(s){if(s.byteLength>=12){const e=new Uint8Array(s.buffer,s.byteOffset,12);if(e[0]===171&&e[1]===75&&e[2]===84&&e[3]===88&&e[4]===32&&e[5]===49&&e[6]===49&&e[7]===187&&e[8]===13&&e[9]===10&&e[10]===26&&e[11]===10)return!0}return!1}}n.HEADER_LEN=64;n.COMPRESSED_2D=0;n.COMPRESSED_3D=1;n.TEX_2D=2;n.TEX_3D=3;var h;(function(t){t[t.ETC1S=0]="ETC1S",t[t.UASTC4x4=1]="UASTC4x4"})(h||(h={}));var m;(function(t){t[t.ASTC_4X4_RGBA=0]="ASTC_4X4_RGBA",t[t.ASTC_4x4_RGBA=0]="ASTC_4x4_RGBA",t[t.BC7_RGBA=1]="BC7_RGBA",t[t.BC3_RGBA=2]="BC3_RGBA",t[t.BC1_RGB=3]="BC1_RGB",t[t.PVRTC1_4_RGBA=4]="PVRTC1_4_RGBA",t[t.PVRTC1_4_RGB=5]="PVRTC1_4_RGB",t[t.ETC2_RGBA=6]="ETC2_RGBA",t[t.ETC1_RGB=7]="ETC1_RGB",t[t.RGBA32=8]="RGBA32",t[t.R8=9]="R8",t[t.RG8=10]="RG8"})(m||(m={}));var U;(function(t){t[t.COMPRESSED_RGBA_BPTC_UNORM_EXT=36492]="COMPRESSED_RGBA_BPTC_UNORM_EXT",t[t.COMPRESSED_RGBA_ASTC_4X4_KHR=37808]="COMPRESSED_RGBA_ASTC_4X4_KHR",t[t.COMPRESSED_RGB_S3TC_DXT1_EXT=33776]="COMPRESSED_RGB_S3TC_DXT1_EXT",t[t.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779]="COMPRESSED_RGBA_S3TC_DXT5_EXT",t[t.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG=35842]="COMPRESSED_RGBA_PVRTC_4BPPV1_IMG",t[t.COMPRESSED_RGB_PVRTC_4BPPV1_IMG=35840]="COMPRESSED_RGB_PVRTC_4BPPV1_IMG",t[t.COMPRESSED_RGBA8_ETC2_EAC=37496]="COMPRESSED_RGBA8_ETC2_EAC",t[t.COMPRESSED_RGB8_ETC2=37492]="COMPRESSED_RGB8_ETC2",t[t.COMPRESSED_RGB_ETC1_WEBGL=36196]="COMPRESSED_RGB_ETC1_WEBGL",t[t.RGBA8Format=32856]="RGBA8Format",t[t.R8Format=33321]="R8Format",t[t.RG8Format=33323]="RG8Format"})(U||(U={}));function A(t,s){const e=s?.jsDecoderModule||KTX2DECODER;t&&(t.wasmBaseUrl&&(e.Transcoder.WasmBaseUrl=t.wasmBaseUrl),t.wasmUASTCToASTC&&(e.LiteTranscoder_UASTC_ASTC.WasmModuleURL=t.wasmUASTCToASTC),t.wasmUASTCToBC7&&(e.LiteTranscoder_UASTC_BC7.WasmModuleURL=t.wasmUASTCToBC7),t.wasmUASTCToRGBA_UNORM&&(e.LiteTranscoder_UASTC_RGBA_UNORM.WasmModuleURL=t.wasmUASTCToRGBA_UNORM),t.wasmUASTCToRGBA_SRGB&&(e.LiteTranscoder_UASTC_RGBA_SRGB.WasmModuleURL=t.wasmUASTCToRGBA_SRGB),t.wasmUASTCToR8_UNORM&&(e.LiteTranscoder_UASTC_R8_UNORM.WasmModuleURL=t.wasmUASTCToR8_UNORM),t.wasmUASTCToRG8_UNORM&&(e.LiteTranscoder_UASTC_RG8_UNORM.WasmModuleURL=t.wasmUASTCToRG8_UNORM),t.jsMSCTranscoder&&(e.MSCTranscoder.JSModuleURL=t.jsMSCTranscoder),t.wasmMSCTranscoder&&(e.MSCTranscoder.WasmModuleURL=t.wasmMSCTranscoder),t.wasmZSTDDecoder&&(e.ZSTDDecoder.WasmModuleURL=t.wasmZSTDDecoder)),s&&(s.wasmUASTCToASTC&&(e.LiteTranscoder_UASTC_ASTC.WasmBinary=s.wasmUASTCToASTC),s.wasmUASTCToBC7&&(e.LiteTranscoder_UASTC_BC7.WasmBinary=s.wasmUASTCToBC7),s.wasmUASTCToRGBA_UNORM&&(e.LiteTranscoder_UASTC_RGBA_UNORM.WasmBinary=s.wasmUASTCToRGBA_UNORM),s.wasmUASTCToRGBA_SRGB&&(e.LiteTranscoder_UASTC_RGBA_SRGB.WasmBinary=s.wasmUASTCToRGBA_SRGB),s.wasmUASTCToR8_UNORM&&(e.LiteTranscoder_UASTC_R8_UNORM.WasmBinary=s.wasmUASTCToR8_UNORM),s.wasmUASTCToRG8_UNORM&&(e.LiteTranscoder_UASTC_RG8_UNORM.WasmBinary=s.wasmUASTCToRG8_UNORM),s.jsMSCTranscoder&&(e.MSCTranscoder.JSModule=s.jsMSCTranscoder),s.wasmMSCTranscoder&&(e.MSCTranscoder.WasmBinary=s.wasmMSCTranscoder),s.wasmZSTDDecoder&&(e.ZSTDDecoder.WasmBinary=s.wasmZSTDDecoder))}function M(t){typeof t>"u"&&typeof KTX2DECODER<"u"&&(t=KTX2DECODER);let s;onmessage=e=>{if(e.data)switch(e.data.action){case"init":{const a=e.data.urls;a&&(a.jsDecoderModule&&typeof t>"u"&&(importScripts(a.jsDecoderModule),t=KTX2DECODER),A(a)),e.data.wasmBinaries&&A(void 0,{...e.data.wasmBinaries,jsDecoderModule:t}),s=new t.KTX2Decoder,postMessage({action:"init"});break}case"setDefaultDecoderOptions":{t.KTX2Decoder.DefaultDecoderOptions=e.data.options;break}case"decode":s.decode(e.data.data,e.data.caps,e.data.options).then(a=>{const r=[];for(let c=0;c<a.mipmaps.length;++c){const i=a.mipmaps[c];i&&i.data&&r.push(i.data.buffer)}postMessage({action:"decoded",success:!0,decodedData:a},r)}).catch(a=>{postMessage({action:"decoded",success:!1,msg:a})});break}}}async function y(t,s,e){return await new Promise((a,r)=>{const c=f=>{t.removeEventListener("error",c),t.removeEventListener("message",i),r(f)},i=f=>{f.data.action==="init"&&(t.removeEventListener("error",c),t.removeEventListener("message",i),a(t))};t.addEventListener("error",c),t.addEventListener("message",i),t.postMessage({action:"init",urls:e,wasmBinaries:s})})}class w{constructor(){this._isDirty=!0,this._useRGBAIfOnlyBC1BC3AvailableWhenUASTC=!0,this._ktx2DecoderOptions={}}get isDirty(){return this._isDirty}get useRGBAIfASTCBC7NotAvailableWhenUASTC(){return this._useRGBAIfASTCBC7NotAvailableWhenUASTC}set useRGBAIfASTCBC7NotAvailableWhenUASTC(s){this._useRGBAIfASTCBC7NotAvailableWhenUASTC!==s&&(this._useRGBAIfASTCBC7NotAvailableWhenUASTC=s,this._isDirty=!0)}get useRGBAIfOnlyBC1BC3AvailableWhenUASTC(){return this._useRGBAIfOnlyBC1BC3AvailableWhenUASTC}set useRGBAIfOnlyBC1BC3AvailableWhenUASTC(s){this._useRGBAIfOnlyBC1BC3AvailableWhenUASTC!==s&&(this._useRGBAIfOnlyBC1BC3AvailableWhenUASTC=s,this._isDirty=!0)}get forceRGBA(){return this._forceRGBA}set forceRGBA(s){this._forceRGBA!==s&&(this._forceRGBA=s,this._isDirty=!0)}get forceR8(){return this._forceR8}set forceR8(s){this._forceR8!==s&&(this._forceR8=s,this._isDirty=!0)}get forceRG8(){return this._forceRG8}set forceRG8(s){this._forceRG8!==s&&(this._forceRG8=s,this._isDirty=!0)}get bypassTranscoders(){return this._bypassTranscoders}set bypassTranscoders(s){this._bypassTranscoders!==s&&(this._bypassTranscoders=s,this._isDirty=!0)}_getKTX2DecoderOptions(){if(!this._isDirty)return this._ktx2DecoderOptions;this._isDirty=!1;const s={};return this._useRGBAIfASTCBC7NotAvailableWhenUASTC!==void 0&&(s.useRGBAIfASTCBC7NotAvailableWhenUASTC=this._useRGBAIfASTCBC7NotAvailableWhenUASTC),this._forceRGBA!==void 0&&(s.forceRGBA=this._forceRGBA),this._forceR8!==void 0&&(s.forceR8=this._forceR8),this._forceRG8!==void 0&&(s.forceRG8=this._forceRG8),this._bypassTranscoders!==void 0&&(s.bypassTranscoders=this._bypassTranscoders),this.useRGBAIfOnlyBC1BC3AvailableWhenUASTC&&(s.transcodeFormatDecisionTree={UASTC:{transcodeFormat:[m.BC1_RGB,m.BC3_RGBA],yes:{transcodeFormat:m.RGBA32,engineFormat:32856,roundToMultiple4:!1}}}),this._ktx2DecoderOptions=s,s}}class o{static GetDefaultNumWorkers(){return typeof navigator!="object"||!navigator.hardwareConcurrency?1:Math.min(Math.floor(navigator.hardwareConcurrency*.5),4)}static _Initialize(s){if(o._WorkerPoolPromise||o._DecoderModulePromise)return;const e={wasmBaseUrl:d.ScriptBaseUrl,jsDecoderModule:d.GetBabylonScriptURL(this.URLConfig.jsDecoderModule,!0),wasmUASTCToASTC:d.GetBabylonScriptURL(this.URLConfig.wasmUASTCToASTC,!0),wasmUASTCToBC7:d.GetBabylonScriptURL(this.URLConfig.wasmUASTCToBC7,!0),wasmUASTCToRGBA_UNORM:d.GetBabylonScriptURL(this.URLConfig.wasmUASTCToRGBA_UNORM,!0),wasmUASTCToRGBA_SRGB:d.GetBabylonScriptURL(this.URLConfig.wasmUASTCToRGBA_SRGB,!0),wasmUASTCToR8_UNORM:d.GetBabylonScriptURL(this.URLConfig.wasmUASTCToR8_UNORM,!0),wasmUASTCToRG8_UNORM:d.GetBabylonScriptURL(this.URLConfig.wasmUASTCToRG8_UNORM,!0),jsMSCTranscoder:d.GetBabylonScriptURL(this.URLConfig.jsMSCTranscoder,!0),wasmMSCTranscoder:d.GetBabylonScriptURL(this.URLConfig.wasmMSCTranscoder,!0),wasmZSTDDecoder:d.GetBabylonScriptURL(this.URLConfig.wasmZSTDDecoder,!0)};s&&typeof Worker=="function"&&typeof URL<"u"?o._WorkerPoolPromise=new Promise(a=>{const r=`${A}(${M})()`,c=URL.createObjectURL(new Blob([r],{type:"application/javascript"}));a(new G(s,async()=>await y(new Worker(c),void 0,e)))}):typeof o._KTX2DecoderModule>"u"?o._DecoderModulePromise=d.LoadBabylonScriptAsync(e.jsDecoderModule).then(()=>(o._KTX2DecoderModule=KTX2DECODER,o._KTX2DecoderModule.MSCTranscoder.UseFromWorkerThread=!1,o._KTX2DecoderModule.WASMMemoryManager.LoadBinariesFromCurrentThread=!0,A(e,o._KTX2DecoderModule),new o._KTX2DecoderModule.KTX2Decoder)):(o._KTX2DecoderModule.MSCTranscoder.UseFromWorkerThread=!1,o._KTX2DecoderModule.WASMMemoryManager.LoadBinariesFromCurrentThread=!0,o._DecoderModulePromise=Promise.resolve(new o._KTX2DecoderModule.KTX2Decoder))}constructor(s,e=o.DefaultNumWorkers){this._engine=s;const a=typeof e=="object"&&e.workerPool||o.WorkerPool;if(a)o._WorkerPoolPromise=Promise.resolve(a);else{typeof e=="object"?o._KTX2DecoderModule=e?.binariesAndModulesContainer?.jsDecoderModule:typeof KTX2DECODER<"u"&&(o._KTX2DecoderModule=KTX2DECODER);const r=typeof e=="number"?e:e.numWorkers??o.DefaultNumWorkers;o._Initialize(r)}}async _uploadAsync(s,e,a){const r=this._engine.getCaps(),c={astc:!!r.astc,bptc:!!r.bptc,s3tc:!!r.s3tc,pvrtc:!!r.pvrtc,etc2:!!r.etc2,etc1:!!r.etc1};if(o._WorkerPoolPromise){const i=await o._WorkerPoolPromise;return await new Promise((f,l)=>{i.push((R,T)=>{const C=S=>{R.removeEventListener("error",C),R.removeEventListener("message",p),l(S),T()},p=S=>{if(S.data.action==="decoded"){if(R.removeEventListener("error",C),R.removeEventListener("message",p),!S.data.success)l({message:S.data.msg});else try{this._createTexture(S.data.decodedData,e,a),f()}catch(u){l({message:u})}T()}};R.addEventListener("error",C),R.addEventListener("message",p),R.postMessage({action:"setDefaultDecoderOptions",options:o.DefaultDecoderOptions._getKTX2DecoderOptions()});const B=new Uint8Array(s.byteLength);B.set(new Uint8Array(s.buffer,s.byteOffset,s.byteLength)),R.postMessage({action:"decode",data:B,caps:c,options:a},[B.buffer])})})}else if(o._DecoderModulePromise){const i=await o._DecoderModulePromise;return o.DefaultDecoderOptions.isDirty&&(o._KTX2DecoderModule.KTX2Decoder.DefaultDecoderOptions=o.DefaultDecoderOptions._getKTX2DecoderOptions()),await new Promise((f,l)=>{i.decode(s,r).then(R=>{this._createTexture(R,e),f()}).catch(R=>{l({message:R})})})}throw new Error("KTX2 decoder module is not available")}_createTexture(s,e,a){this._engine._bindTextureDirectly(3553,e),a&&(a.transcodedFormat=s.transcodedFormat,a.isInGammaSpace=s.isInGammaSpace,a.hasAlpha=s.hasAlpha,a.transcoderName=s.transcoderName);let c=!0;switch(s.transcodedFormat){case 32856:e.type=0,e.format=5;break;case 33321:e.type=0,e.format=6;break;case 33323:e.type=0,e.format=7;break;default:e.format=s.transcodedFormat,c=!1;break}if(e._gammaSpace=s.isInGammaSpace,e.generateMipMaps=s.mipmaps.length>1,e.width=s.mipmaps[0].width,e.height=s.mipmaps[0].height,s.errors)throw new Error("KTX2 container - could not transcode the data. "+s.errors);for(let i=0;i<s.mipmaps.length;++i){const f=s.mipmaps[i];if(!f||!f.data)throw new Error("KTX2 container - could not transcode one of the image");c?(e.width=f.width,e.height=f.height,this._engine._uploadDataToTextureDirectly(e,f.data,0,i,void 0,!0)):this._engine._uploadCompressedDataToTextureDirectly(e,s.transcodedFormat,f.width,f.height,f.data,0,i)}e._extension=".ktx2",e.isReady=!0,this._engine._bindTextureDirectly(3553,null)}static IsValid(s){if(s.byteLength>=12){const e=new Uint8Array(s.buffer,s.byteOffset,12);if(e[0]===171&&e[1]===75&&e[2]===84&&e[3]===88&&e[4]===32&&e[5]===50&&e[6]===48&&e[7]===187&&e[8]===13&&e[9]===10&&e[10]===26&&e[11]===10)return!0}return!1}}o.URLConfig={jsDecoderModule:"https://cdn.babylonjs.com/babylon.ktx2Decoder.js",wasmUASTCToASTC:null,wasmUASTCToBC7:null,wasmUASTCToRGBA_UNORM:null,wasmUASTCToRGBA_SRGB:null,wasmUASTCToR8_UNORM:null,wasmUASTCToRG8_UNORM:null,jsMSCTranscoder:null,wasmMSCTranscoder:null,wasmZSTDDecoder:null};o.DefaultNumWorkers=o.GetDefaultNumWorkers();o.DefaultDecoderOptions=new w;function D(t){switch(t){case 35916:return 33776;case 35918:return 33778;case 35919:return 33779;case 37493:return 37492;case 37497:return 37496;case 37495:return 37494;case 37840:return 37808;case 37841:return 37809;case 37842:return 37810;case 37843:return 37811;case 37844:return 37812;case 37845:return 37813;case 37846:return 37814;case 37847:return 37815;case 37848:return 37816;case 37849:return 37817;case 37850:return 37818;case 37851:return 37819;case 37852:return 37820;case 37853:return 37821;case 36493:return 36492}return null}class O{constructor(){this.supportCascades=!1}loadCubeData(s,e,a,r){if(Array.isArray(s))return;e._invertVScale=!e.invertY;const c=e.getEngine(),i=new n(s,6),f=D(i.glInternalFormat);f!==null?(e.format=f,e._useSRGBBuffer=c._getUseSRGBBuffer(!0,!e.generateMipMaps),e._gammaSpace=!0):e.format=i.glInternalFormat;const l=i.numberOfMipmapLevels>1&&e.generateMipMaps;c._unpackFlipY(!0),i.uploadLevels(e,e.generateMipMaps),e.width=i.pixelWidth,e.height=i.pixelHeight,c._setCubeMapTextureParams(e,l,i.numberOfMipmapLevels-1),e.isReady=!0,e.onLoadedObservable.notifyObservers(e),e.onLoadedObservable.clear(),r&&r()}loadData(s,e,a,r){if(n.IsValid(s)){e._invertVScale=!e.invertY;const c=new n(s,1),i=D(c.glInternalFormat);i!==null?(e.format=i,e._useSRGBBuffer=e.getEngine()._getUseSRGBBuffer(!0,!e.generateMipMaps),e._gammaSpace=!0):e.format=c.glInternalFormat,a(c.pixelWidth,c.pixelHeight,e.generateMipMaps,!0,()=>{c.uploadLevels(e,e.generateMipMaps)},c.isInvalid)}else o.IsValid(s)?new o(e.getEngine())._uploadAsync(s,e,r).then(()=>{a(e.width,e.height,e.generateMipMaps,!0,()=>{},!1)},i=>{_.Warn(`Failed to load KTX2 texture data: ${i.message}`),a(0,0,!1,!1,()=>{},!0)}):(_.Error("texture missing KTX identifier"),a(0,0,!1,!1,()=>{},!0))}}export{O as _KTXTextureLoader};
@@ -0,0 +1,398 @@
1
+ import{S as e}from"./index-B2zBEWsq.js";const i="decalFragment",o=`#ifdef DECAL
2
+ var decalTempColor=decalColor.rgb;var decalTempAlpha=decalColor.a;
3
+ #ifdef GAMMADECAL
4
+ decalTempColor=toLinearSpaceVec3(decalColor.rgb);
5
+ #endif
6
+ #ifdef DECAL_SMOOTHALPHA
7
+ decalTempAlpha=decalColor.a*decalColor.a;
8
+ #endif
9
+ surfaceAlbedo=mix(surfaceAlbedo.rgb,decalTempColor,decalTempAlpha);
10
+ #endif
11
+ `;e.IncludesShadersStoreWGSL[i]||(e.IncludesShadersStoreWGSL[i]=o);const a={name:i,shader:o},t="lightFragment",n=`#ifdef LIGHT{X}
12
+ #if defined(SHADOWONLY) || defined(LIGHTMAP) && defined(LIGHTMAPEXCLUDED{X}) && defined(LIGHTMAPNOSPECULAR{X})
13
+ #else
14
+ var diffuse{X}: vec4f=light{X}.vLightDiffuse;
15
+ #define CUSTOM_LIGHT{X}_COLOR
16
+ #if defined(PBR) && defined(CLUSTLIGHT{X})
17
+ {let sliceIndex=min(getClusteredSliceIndex(light{X}.vSliceData,fragmentInputs.vViewDepth),CLUSTLIGHT_SLICES-1);info=computeClusteredLighting(
18
+ lightDataTexture{X},
19
+ &tileMaskBuffer{X},
20
+ light{X}.vLightData,
21
+ vec2u(light{X}.vSliceRanges[sliceIndex].xy),
22
+ viewDirectionW,
23
+ normalW,
24
+ fragmentInputs.vPositionW,
25
+ surfaceAlbedo,
26
+ reflectivityOut,
27
+ #ifdef IRIDESCENCE
28
+ iridescenceIntensity,
29
+ #endif
30
+ #ifdef SS_TRANSLUCENCY
31
+ subSurfaceOut,
32
+ #endif
33
+ #ifdef SPECULARTERM
34
+ AARoughnessFactors.x,
35
+ #endif
36
+ #ifdef ANISOTROPIC
37
+ anisotropicOut,
38
+ #endif
39
+ #ifdef SHEEN
40
+ sheenOut,
41
+ #endif
42
+ #ifdef CLEARCOAT
43
+ clearcoatOut,
44
+ #endif
45
+ );}
46
+ #elif defined(PBR)
47
+ #ifdef SPOTLIGHT{X}
48
+ preInfo=computePointAndSpotPreLightingInfo(light{X}.vLightData,viewDirectionW,normalW,fragmentInputs.vPositionW);
49
+ #elif defined(POINTLIGHT{X})
50
+ preInfo=computePointAndSpotPreLightingInfo(light{X}.vLightData,viewDirectionW,normalW,fragmentInputs.vPositionW);
51
+ #elif defined(HEMILIGHT{X})
52
+ preInfo=computeHemisphericPreLightingInfo(light{X}.vLightData,viewDirectionW,normalW);
53
+ #elif defined(DIRLIGHT{X})
54
+ preInfo=computeDirectionalPreLightingInfo(light{X}.vLightData,viewDirectionW,normalW);
55
+ #elif defined(AREALIGHT{X}) && defined(AREALIGHTUSED) && defined(AREALIGHTSUPPORTED)
56
+ #if defined(RECTAREALIGHTEMISSIONTEXTURE{X})
57
+ preInfo=computeAreaPreLightingInfoWithTexture(areaLightsLTC1Sampler,areaLightsLTC1SamplerSampler,areaLightsLTC2Sampler,areaLightsLTC2SamplerSampler,rectAreaLightEmissionTexture{X},rectAreaLightEmissionTexture{X}Sampler,viewDirectionW,normalW,fragmentInputs.vPositionW,light{X}.vLightData.xyz,light{X}.vLightWidth.xyz,light{X}.vLightHeight.xyz,roughness);
58
+ #else
59
+ preInfo=computeAreaPreLightingInfo(areaLightsLTC1Sampler,areaLightsLTC1SamplerSampler,areaLightsLTC2Sampler,areaLightsLTC2SamplerSampler,viewDirectionW,normalW,fragmentInputs.vPositionW,light{X}.vLightData.xyz,light{X}.vLightWidth.xyz,light{X}.vLightHeight.xyz,roughness);
60
+ #endif
61
+ #endif
62
+ preInfo.NdotV=NdotV;
63
+ #ifdef SPOTLIGHT{X}
64
+ #ifdef LIGHT_FALLOFF_GLTF{X}
65
+ preInfo.attenuation=computeDistanceLightFalloff_GLTF(preInfo.lightDistanceSquared,light{X}.vLightFalloff.y);
66
+ #ifdef IESLIGHTTEXTURE{X}
67
+ preInfo.attenuation*=computeDirectionalLightFalloff_IES(light{X}.vLightDirection.xyz,preInfo.L,iesLightTexture{X},iesLightTexture{X}Sampler);
68
+ #else
69
+ preInfo.attenuation*=computeDirectionalLightFalloff_GLTF(light{X}.vLightDirection.xyz,preInfo.L,light{X}.vLightFalloff.z,light{X}.vLightFalloff.w);
70
+ #endif
71
+ #elif defined(LIGHT_FALLOFF_PHYSICAL{X})
72
+ preInfo.attenuation=computeDistanceLightFalloff_Physical(preInfo.lightDistanceSquared);
73
+ #ifdef IESLIGHTTEXTURE{X}
74
+ preInfo.attenuation*=computeDirectionalLightFalloff_IES(light{X}.vLightDirection.xyz,preInfo.L,iesLightTexture{X},iesLightTexture{X}Sampler);
75
+ #else
76
+ preInfo.attenuation*=computeDirectionalLightFalloff_Physical(light{X}.vLightDirection.xyz,preInfo.L,light{X}.vLightDirection.w);
77
+ #endif
78
+ #elif defined(LIGHT_FALLOFF_STANDARD{X})
79
+ preInfo.attenuation=computeDistanceLightFalloff_Standard(preInfo.lightOffset,light{X}.vLightFalloff.x);
80
+ #ifdef IESLIGHTTEXTURE{X}
81
+ preInfo.attenuation*=computeDirectionalLightFalloff_IES(light{X}.vLightDirection.xyz,preInfo.L,iesLightTexture{X},iesLightTexture{X}Sampler);
82
+ #else
83
+ preInfo.attenuation*=computeDirectionalLightFalloff_Standard(light{X}.vLightDirection.xyz,preInfo.L,light{X}.vLightDirection.w,light{X}.vLightData.w);
84
+ #endif
85
+ #else
86
+ preInfo.attenuation=computeDistanceLightFalloff(preInfo.lightOffset,preInfo.lightDistanceSquared,light{X}.vLightFalloff.x,light{X}.vLightFalloff.y);
87
+ #ifdef IESLIGHTTEXTURE{X}
88
+ preInfo.attenuation*=computeDirectionalLightFalloff_IES(light{X}.vLightDirection.xyz,preInfo.L,iesLightTexture{X},iesLightTexture{X}Sampler);
89
+ #else
90
+ preInfo.attenuation*=computeDirectionalLightFalloff(light{X}.vLightDirection.xyz,preInfo.L,light{X}.vLightDirection.w,light{X}.vLightData.w,light{X}.vLightFalloff.z,light{X}.vLightFalloff.w);
91
+ #endif
92
+ #endif
93
+ #elif defined(POINTLIGHT{X})
94
+ #ifdef LIGHT_FALLOFF_GLTF{X}
95
+ preInfo.attenuation=computeDistanceLightFalloff_GLTF(preInfo.lightDistanceSquared,light{X}.vLightFalloff.y);
96
+ #elif defined(LIGHT_FALLOFF_PHYSICAL{X})
97
+ preInfo.attenuation=computeDistanceLightFalloff_Physical(preInfo.lightDistanceSquared);
98
+ #elif defined(LIGHT_FALLOFF_STANDARD{X})
99
+ preInfo.attenuation=computeDistanceLightFalloff_Standard(preInfo.lightOffset,light{X}.vLightFalloff.x);
100
+ #else
101
+ preInfo.attenuation=computeDistanceLightFalloff(preInfo.lightOffset,preInfo.lightDistanceSquared,light{X}.vLightFalloff.x,light{X}.vLightFalloff.y);
102
+ #endif
103
+ #else
104
+ preInfo.attenuation=1.0;
105
+ #endif
106
+ #if defined(HEMILIGHT{X})
107
+ preInfo.roughness=roughness;
108
+ #elif defined(AREALIGHT{X}) && defined(AREALIGHTUSED) && defined(AREALIGHTSUPPORTED)
109
+ preInfo.roughness=roughness;
110
+ #else
111
+ preInfo.roughness=adjustRoughnessFromLightProperties(roughness,light{X}.vLightSpecular.a,preInfo.lightDistance);
112
+ #endif
113
+ preInfo.diffuseRoughness=diffuseRoughness;preInfo.surfaceAlbedo=surfaceAlbedo;
114
+ #ifdef IRIDESCENCE
115
+ preInfo.iridescenceIntensity=iridescenceIntensity;
116
+ #endif
117
+ #ifdef SS_TRANSLUCENCY
118
+ info.diffuseTransmission=vec3f(0.0);
119
+ #endif
120
+ #ifdef HEMILIGHT{X}
121
+ info.diffuse=computeHemisphericDiffuseLighting(preInfo,diffuse{X}.rgb,light{X}.vLightGround);
122
+ #elif defined(AREALIGHT{X}) && defined(AREALIGHTUSED) && defined(AREALIGHTSUPPORTED)
123
+ info.diffuse=computeAreaDiffuseLighting(preInfo,diffuse{X}.rgb);
124
+ #elif defined(SS_TRANSLUCENCY)
125
+ #ifndef SS_TRANSLUCENCY_LEGACY
126
+ info.diffuse=computeDiffuseLighting(preInfo,diffuse{X}.rgb)*(1.0-subSurfaceOut.translucencyIntensity);info.diffuseTransmission=computeDiffuseTransmittedLighting(preInfo,diffuse{X}.rgb,subSurfaceOut.transmittance);
127
+ #else
128
+ info.diffuse=computeDiffuseTransmittedLighting(preInfo,diffuse{X}.rgb,subSurfaceOut.transmittance);
129
+ #endif
130
+ #else
131
+ info.diffuse=computeDiffuseLighting(preInfo,diffuse{X}.rgb);
132
+ #endif
133
+ #ifdef SPECULARTERM
134
+ #if defined(AREALIGHT{X}) && defined(AREALIGHTUSED) && defined(AREALIGHTSUPPORTED)
135
+ info.specular=computeAreaSpecularLighting(preInfo,light{X}.vLightSpecular.rgb,clearcoatOut.specularEnvironmentR0,reflectivityOut.colorReflectanceF90);
136
+ #else
137
+ #if (CONDUCTOR_SPECULAR_MODEL==CONDUCTOR_SPECULAR_MODEL_OPENPBR)
138
+ {let metalFresnel: vec3f=vec3f(reflectivityOut.specularWeight)*getF82Specular(preInfo.VdotH,clearcoatOut.specularEnvironmentR0,reflectivityOut.colorReflectanceF90,reflectivityOut.roughness);let dielectricFresnel: vec3f=fresnelSchlickGGXVec3(preInfo.VdotH,reflectivityOut.dielectricColorF0,reflectivityOut.colorReflectanceF90);coloredFresnel=mix(dielectricFresnel,metalFresnel,reflectivityOut.metallic);}
139
+ #else
140
+ coloredFresnel=fresnelSchlickGGXVec3(preInfo.VdotH,clearcoatOut.specularEnvironmentR0,reflectivityOut.colorReflectanceF90);
141
+ #endif
142
+ #ifndef LEGACY_SPECULAR_ENERGY_CONSERVATION
143
+ {let NdotH: f32=dot(normalW,preInfo.H);let fresnel: vec3f=fresnelSchlickGGXVec3(NdotH,vec3f(reflectanceF0),specularEnvironmentR90);info.diffuse*=(vec3f(1.0)-fresnel);}
144
+ #endif
145
+ #ifdef ANISOTROPIC
146
+ info.specular=computeAnisotropicSpecularLighting(preInfo,viewDirectionW,normalW,anisotropicOut.anisotropicTangent,anisotropicOut.anisotropicBitangent,anisotropicOut.anisotropy,clearcoatOut.specularEnvironmentR0,specularEnvironmentR90,AARoughnessFactors.x,diffuse{X}.rgb);
147
+ #else
148
+ info.specular=computeSpecularLighting(preInfo,normalW,clearcoatOut.specularEnvironmentR0,coloredFresnel,AARoughnessFactors.x,diffuse{X}.rgb);
149
+ #endif
150
+ #endif
151
+ #endif
152
+ #ifndef AREALIGHT{X}
153
+ #ifdef SHEEN
154
+ #ifdef SHEEN_LINKWITHALBEDO
155
+ preInfo.roughness=sheenOut.sheenIntensity;
156
+ #else
157
+ #ifdef HEMILIGHT{X}
158
+ preInfo.roughness=sheenOut.sheenRoughness;
159
+ #else
160
+ preInfo.roughness=adjustRoughnessFromLightProperties(sheenOut.sheenRoughness,light{X}.vLightSpecular.a,preInfo.lightDistance);
161
+ #endif
162
+ #endif
163
+ info.sheen=computeSheenLighting(preInfo,normalW,sheenOut.sheenColor,specularEnvironmentR90,AARoughnessFactors.x,diffuse{X}.rgb);
164
+ #endif
165
+ #ifdef CLEARCOAT
166
+ #ifdef HEMILIGHT{X}
167
+ preInfo.roughness=clearcoatOut.clearCoatRoughness;
168
+ #else
169
+ preInfo.roughness=adjustRoughnessFromLightProperties(clearcoatOut.clearCoatRoughness,light{X}.vLightSpecular.a,preInfo.lightDistance);
170
+ #endif
171
+ info.clearCoat=computeClearCoatLighting(preInfo,clearcoatOut.clearCoatNormalW,clearcoatOut.clearCoatAARoughnessFactors.x,clearcoatOut.clearCoatIntensity,diffuse{X}.rgb);
172
+ #ifdef CLEARCOAT_TINT
173
+ absorption=computeClearCoatLightingAbsorption(clearcoatOut.clearCoatNdotVRefract,preInfo.L,clearcoatOut.clearCoatNormalW,clearcoatOut.clearCoatColor,clearcoatOut.clearCoatThickness,clearcoatOut.clearCoatIntensity);info.diffuse*=absorption;
174
+ #ifdef SS_TRANSLUCENCY
175
+ info.diffuseTransmission*=absorption;
176
+ #endif
177
+ #ifdef SPECULARTERM
178
+ info.specular*=absorption;
179
+ #endif
180
+ #endif
181
+ info.diffuse*=info.clearCoat.w;
182
+ #ifdef SS_TRANSLUCENCY
183
+ info.diffuseTransmission*=info.clearCoat.w;
184
+ #endif
185
+ #ifdef SPECULARTERM
186
+ info.specular*=info.clearCoat.w;
187
+ #endif
188
+ #ifdef SHEEN
189
+ info.sheen*=info.clearCoat.w;
190
+ #endif
191
+ #endif
192
+ #endif
193
+ #else
194
+ #ifdef SPOTLIGHT{X}
195
+ #ifdef IESLIGHTTEXTURE{X}
196
+ info=computeIESSpotLighting(viewDirectionW,normalW,light{X}.vLightData,light{X}.vLightDirection,diffuse{X}.rgb,light{X}.vLightSpecular.rgb,diffuse{X}.a,glossiness,iesLightTexture{X},iesLightTexture{X}Sampler);
197
+ #else
198
+ info=computeSpotLighting(viewDirectionW,normalW,light{X}.vLightData,light{X}.vLightDirection,diffuse{X}.rgb,light{X}.vLightSpecular.rgb,diffuse{X}.a,glossiness);
199
+ #endif
200
+ #elif defined(HEMILIGHT{X})
201
+ info=computeHemisphericLighting(viewDirectionW,normalW,light{X}.vLightData,diffuse{X}.rgb,light{X}.vLightSpecular.rgb,light{X}.vLightGround,glossiness);
202
+ #elif defined(POINTLIGHT{X}) || defined(DIRLIGHT{X})
203
+ info=computeLighting(viewDirectionW,normalW,light{X}.vLightData,diffuse{X}.rgb,light{X}.vLightSpecular.rgb,diffuse{X}.a,glossiness);
204
+ #elif define(AREALIGHT{X}) && defined(AREALIGHTSUPPORTED)
205
+ #if defined(RECTAREALIGHTEMISSIONTEXTURE{X})
206
+ info=computeAreaLightingWithTexture(areaLightsLTC1Sampler,areaLightsLTC1SamplerSampler,areaLightsLTC2Sampler,areaLightsLTC2SamplerSampler,rectAreaLightEmissionTexture{X},rectAreaLightEmissionTexture{X}Sampler,viewDirectionW,normalW,fragmentInputs.vPositionW,light{X}.vLightData.xyz,light{X}.vLightWidth.xyz,light{X}.vLightHeight.xyz,diffuse{X}.rgb,light{X}.vLightSpecular.rgb,
207
+ #ifdef AREALIGHTNOROUGHTNESS
208
+ 0.5
209
+ #else
210
+ uniforms.vReflectionInfos.y
211
+ #endif
212
+ );
213
+ #else
214
+ info=computeAreaLighting(areaLightsLTC1Sampler,areaLightsLTC1SamplerSampler,areaLightsLTC2Sampler,areaLightsLTC2SamplerSampler,viewDirectionW,normalW,fragmentInputs.vPositionW,light{X}.vLightData.xyz,light{X}.vLightWidth.xyz,light{X}.vLightHeight.xyz,diffuse{X}.rgb,light{X}.vLightSpecular.rgb,
215
+ #ifdef AREALIGHTNOROUGHTNESS
216
+ 0.5
217
+ #else
218
+ uniforms.vReflectionInfos.y
219
+ #endif
220
+ );
221
+ #endif
222
+ #elif defined(CLUSTLIGHT{X})
223
+ {let sliceIndex=min(getClusteredSliceIndex(light{X}.vSliceData,fragmentInputs.vViewDepth),CLUSTLIGHT_SLICES-1);info=computeClusteredLighting(lightDataTexture{X},&tileMaskBuffer{X},viewDirectionW,normalW,light{X}.vLightData,vec2u(light{X}.vSliceRanges[sliceIndex].xy),glossiness);}
224
+ #endif
225
+ #endif
226
+ #ifdef PROJECTEDLIGHTTEXTURE{X}
227
+ info.diffuse*=computeProjectionTextureDiffuseLighting(projectionLightTexture{X},projectionLightTexture{X}Sampler,uniforms.textureProjectionMatrix{X},fragmentInputs.vPositionW);
228
+ #endif
229
+ #endif
230
+ #ifdef SHADOW{X}
231
+ #ifdef SHADOWCSMDEBUG{X}
232
+ var shadowDebug{X}: vec3f;
233
+ #endif
234
+ #ifdef SHADOWCSM{X}
235
+ #ifdef SHADOWCSMUSESHADOWMAXZ{X}
236
+ var index{X}: i32=-1;
237
+ #else
238
+ var index{X}: i32=SHADOWCSMNUM_CASCADES{X}-1;
239
+ #endif
240
+ var diff{X}: f32=0.;vPositionFromLight{X}[0]=fragmentInputs.vPositionFromLight{X}_0;vPositionFromLight{X}[1]=fragmentInputs.vPositionFromLight{X}_1;vPositionFromLight{X}[2]=fragmentInputs.vPositionFromLight{X}_2;vPositionFromLight{X}[3]=fragmentInputs.vPositionFromLight{X}_3;vDepthMetric{X}[0]=fragmentInputs.vDepthMetric{X}_0;vDepthMetric{X}[1]=fragmentInputs.vDepthMetric{X}_1;vDepthMetric{X}[2]=fragmentInputs.vDepthMetric{X}_2;vDepthMetric{X}[3]=fragmentInputs.vDepthMetric{X}_3;for (var i:i32=0; i<SHADOWCSMNUM_CASCADES{X}; i++)
241
+ {
242
+ #ifdef SHADOWCSM_RIGHTHANDED{X}
243
+ diff{X}=uniforms.viewFrustumZ{X}[i]+fragmentInputs.vPositionFromCamera{X}.z;
244
+ #else
245
+ diff{X}=uniforms.viewFrustumZ{X}[i]-fragmentInputs.vPositionFromCamera{X}.z;
246
+ #endif
247
+ if (diff{X}>=0.) {index{X}=i;break;}}
248
+ #ifdef SHADOWCSMUSESHADOWMAXZ{X}
249
+ if (index{X}>=0)
250
+ #endif
251
+ {
252
+ #if defined(SHADOWPCF{X})
253
+ #if defined(SHADOWLOWQUALITY{X})
254
+ shadow=computeShadowWithCSMPCF1(index{X},vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],shadowTexture{X},shadowTexture{X}Sampler,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);
255
+ #elif defined(SHADOWMEDIUMQUALITY{X})
256
+ shadow=computeShadowWithCSMPCF3(index{X},vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],shadowTexture{X},shadowTexture{X}Sampler,light{X}.shadowsInfo.yz,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);
257
+ #else
258
+ shadow=computeShadowWithCSMPCF5(index{X},vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],shadowTexture{X},shadowTexture{X}Sampler,light{X}.shadowsInfo.yz,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);
259
+ #endif
260
+ #elif defined(SHADOWPCSS{X})
261
+ #if defined(SHADOWLOWQUALITY{X})
262
+ shadow=computeShadowWithCSMPCSS16(index{X},vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],depthTexture{X},depthTexture{X}Sampler,shadowTexture{X},shadowTexture{X}Sampler,light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w,uniforms.lightSizeUVCorrection{X}[index{X}],uniforms.depthCorrection{X}[index{X}],uniforms.penumbraDarkness{X});
263
+ #elif defined(SHADOWMEDIUMQUALITY{X})
264
+ shadow=computeShadowWithCSMPCSS32(index{X},vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],depthTexture{X},depthTexture{X}Sampler,shadowTexture{X},shadowTexture{X}Sampler,light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w,uniforms.lightSizeUVCorrection{X}[index{X}],uniforms.depthCorrection{X}[index{X}],uniforms.penumbraDarkness{X});
265
+ #else
266
+ shadow=computeShadowWithCSMPCSS64(index{X},vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],depthTexture{X},depthTexture{X}Sampler,shadowTexture{X},shadowTexture{X}Sampler,light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w,uniforms.lightSizeUVCorrection{X}[index{X}],uniforms.depthCorrection{X}[index{X}],uniforms.penumbraDarkness{X});
267
+ #endif
268
+ #else
269
+ shadow=computeShadowCSM(index{X},vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],shadowTexture{X},shadowTexture{X}Sampler,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);
270
+ #endif
271
+ #ifdef SHADOWCSMDEBUG{X}
272
+ shadowDebug{X}=vec3f(shadow)*vCascadeColorsMultiplier{X}[index{X}];
273
+ #endif
274
+ #ifndef SHADOWCSMNOBLEND{X}
275
+ var frustumLength:f32=uniforms.frustumLengths{X}[index{X}];var diffRatio:f32=clamp(diff{X}/frustumLength,0.,1.)*uniforms.cascadeBlendFactor{X};if (index{X}<(SHADOWCSMNUM_CASCADES{X}-1) && diffRatio<1.)
276
+ {index{X}+=1;var nextShadow: f32=0.;
277
+ #if defined(SHADOWPCF{X})
278
+ #if defined(SHADOWLOWQUALITY{X})
279
+ nextShadow=computeShadowWithCSMPCF1(index{X},vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],,shadowTexture{X}Sampler,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);
280
+ #elif defined(SHADOWMEDIUMQUALITY{X})
281
+ nextShadow=computeShadowWithCSMPCF3(index{X},vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],shadowTexture{X},shadowTexture{X}Sampler,light{X}.shadowsInfo.yz,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);
282
+ #else
283
+ nextShadow=computeShadowWithCSMPCF5(index{X},vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],shadowTexture{X},shadowTexture{X}Sampler,light{X}.shadowsInfo.yz,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);
284
+ #endif
285
+ #elif defined(SHADOWPCSS{X})
286
+ #if defined(SHADOWLOWQUALITY{X})
287
+ nextShadow=computeShadowWithCSMPCSS16(index{X},vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],depthTexture{X},depthTexture{X}Sampler,shadowTexture{X},shadowTexture{X}Sampler,light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w,uniforms.lightSizeUVCorrection{X}[index{X}],uniforms.depthCorrection{X}[index{X}],uniforms.penumbraDarkness{X});
288
+ #elif defined(SHADOWMEDIUMQUALITY{X})
289
+ nextShadow=computeShadowWithCSMPCSS32(index{X},vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],depthTexture{X},depthTexture{X}Sampler,shadowTexture{X},shadowTexture{X}Sampler,light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w,uniforms.lightSizeUVCorrection{X}[index{X}],uniforms.depthCorrection{X}[index{X}],uniforms.penumbraDarkness{X});
290
+ #else
291
+ nextShadow=computeShadowWithCSMPCSS64(index{X},vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],depthTexture{X},depthTexture{X}Sampler,shadowTexture{X},shadowTexture{X}Sampler,light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w,uniforms.lightSizeUVCorrection{X}[index{X}],uniforms.depthCorrection{X}[index{X}],uniforms.penumbraDarkness{X});
292
+ #endif
293
+ #else
294
+ nextShadow=computeShadowCSM(index{X},vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],shadowTexture{X},shadowTexture{X}Sampler,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);
295
+ #endif
296
+ shadow=mix(nextShadow,shadow,diffRatio);
297
+ #ifdef SHADOWCSMDEBUG{X}
298
+ shadowDebug{X}=mix(vec3(nextShadow)*vCascadeColorsMultiplier{X}[index{X}],shadowDebug{X},diffRatio);
299
+ #endif
300
+ }
301
+ #endif
302
+ }
303
+ #elif defined(SHADOWCLOSEESM{X})
304
+ #if defined(SHADOWCUBE{X})
305
+ shadow=computeShadowWithCloseESMCube(fragmentInputs.vPositionW,light{X}.vLightData.xyz,shadowTexture{X},shadowTexture{X}Sampler,light{X}.shadowsInfo.x,light{X}.shadowsInfo.z,light{X}.depthValues);
306
+ #else
307
+ shadow=computeShadowWithCloseESM(fragmentInputs.vPositionFromLight{X},fragmentInputs.vDepthMetric{X},shadowTexture{X},shadowTexture{X}Sampler,light{X}.shadowsInfo.x,light{X}.shadowsInfo.z,light{X}.shadowsInfo.w);
308
+ #endif
309
+ #elif defined(SHADOWESM{X})
310
+ #if defined(SHADOWCUBE{X})
311
+ shadow=computeShadowWithESMCube(fragmentInputs.vPositionW,light{X}.vLightData.xyz,shadowTexture{X},shadowTexture{X}Sampler,light{X}.shadowsInfo.x,light{X}.shadowsInfo.z,light{X}.depthValues);
312
+ #else
313
+ shadow=computeShadowWithESM(fragmentInputs.vPositionFromLight{X},fragmentInputs.vDepthMetric{X},shadowTexture{X},shadowTexture{X}Sampler,light{X}.shadowsInfo.x,light{X}.shadowsInfo.z,light{X}.shadowsInfo.w);
314
+ #endif
315
+ #elif defined(SHADOWPOISSON{X})
316
+ #if defined(SHADOWCUBE{X})
317
+ shadow=computeShadowWithPoissonSamplingCube(fragmentInputs.vPositionW,light{X}.vLightData.xyz,shadowTexture{X},shadowTexture{X}Sampler,light{X}.shadowsInfo.y,light{X}.shadowsInfo.x,light{X}.depthValues);
318
+ #else
319
+ shadow=computeShadowWithPoissonSampling(fragmentInputs.vPositionFromLight{X},fragmentInputs.vDepthMetric{X},shadowTexture{X},shadowTexture{X}Sampler,light{X}.shadowsInfo.y,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);
320
+ #endif
321
+ #elif defined(SHADOWPCF{X})
322
+ #if defined(SHADOWLOWQUALITY{X})
323
+ shadow=computeShadowWithPCF1(fragmentInputs.vPositionFromLight{X},fragmentInputs.vDepthMetric{X},shadowTexture{X},shadowTexture{X}Sampler,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);
324
+ #elif defined(SHADOWMEDIUMQUALITY{X})
325
+ shadow=computeShadowWithPCF3(fragmentInputs.vPositionFromLight{X},fragmentInputs.vDepthMetric{X},shadowTexture{X},shadowTexture{X}Sampler,light{X}.shadowsInfo.yz,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);
326
+ #else
327
+ shadow=computeShadowWithPCF5(fragmentInputs.vPositionFromLight{X},fragmentInputs.vDepthMetric{X},shadowTexture{X},shadowTexture{X}Sampler,light{X}.shadowsInfo.yz,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);
328
+ #endif
329
+ #elif defined(SHADOWPCSS{X})
330
+ #if defined(SHADOWLOWQUALITY{X})
331
+ shadow=computeShadowWithPCSS16(fragmentInputs.vPositionFromLight{X},fragmentInputs.vDepthMetric{X},depthTexture{X},depthTexture{X}Sampler,shadowTexture{X},shadowTexture{X}Sampler,light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);
332
+ #elif defined(SHADOWMEDIUMQUALITY{X})
333
+ shadow=computeShadowWithPCSS32(fragmentInputs.vPositionFromLight{X},fragmentInputs.vDepthMetric{X},depthTexture{X},depthTexture{X}Sampler,shadowTexture{X},shadowTexture{X}Sampler,light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);
334
+ #else
335
+ shadow=computeShadowWithPCSS64(fragmentInputs.vPositionFromLight{X},fragmentInputs.vDepthMetric{X},depthTexture{X},depthTexture{X}Sampler,shadowTexture{X},shadowTexture{X}Sampler,light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);
336
+ #endif
337
+ #else
338
+ #if defined(SHADOWCUBE{X})
339
+ shadow=computeShadowCube(fragmentInputs.vPositionW,light{X}.vLightData.xyz,shadowTexture{X},shadowTexture{X}Sampler,light{X}.shadowsInfo.x,light{X}.depthValues);
340
+ #else
341
+ shadow=computeShadow(fragmentInputs.vPositionFromLight{X},fragmentInputs.vDepthMetric{X},shadowTexture{X},shadowTexture{X}Sampler,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);
342
+ #endif
343
+ #endif
344
+ #ifdef SHADOWONLY
345
+ #ifndef SHADOWINUSE
346
+ #define SHADOWINUSE
347
+ #endif
348
+ globalShadow+=shadow;shadowLightCount+=1.0;
349
+ #endif
350
+ #else
351
+ shadow=1.;
352
+ #endif
353
+ aggShadow+=shadow;numLights+=1.0;
354
+ #ifndef SHADOWONLY
355
+ #ifdef CUSTOMUSERLIGHTING
356
+ diffuseBase+=computeCustomDiffuseLighting(info,diffuseBase,shadow);
357
+ #ifdef SPECULARTERM
358
+ specularBase+=computeCustomSpecularLighting(info,specularBase,shadow);
359
+ #endif
360
+ #elif defined(LIGHTMAP) && defined(LIGHTMAPEXCLUDED{X})
361
+ diffuseBase+=lightmapColor.rgb*shadow;
362
+ #ifdef SPECULARTERM
363
+ #ifndef LIGHTMAPNOSPECULAR{X}
364
+ specularBase+=info.specular*shadow*lightmapColor.rgb;
365
+ #endif
366
+ #endif
367
+ #ifdef CLEARCOAT
368
+ #ifndef LIGHTMAPNOSPECULAR{X}
369
+ clearCoatBase+=info.clearCoat.rgb*shadow*lightmapColor.rgb;
370
+ #endif
371
+ #endif
372
+ #ifdef SHEEN
373
+ #ifndef LIGHTMAPNOSPECULAR{X}
374
+ sheenBase+=info.sheen.rgb*shadow;
375
+ #endif
376
+ #endif
377
+ #else
378
+ #ifdef SHADOWCSMDEBUG{X}
379
+ diffuseBase+=info.diffuse*shadowDebug{X};
380
+ #else
381
+ diffuseBase+=info.diffuse*shadow;
382
+ #endif
383
+ #ifdef SS_TRANSLUCENCY
384
+ diffuseTransmissionBase+=info.diffuseTransmission*shadow;
385
+ #endif
386
+ #ifdef SPECULARTERM
387
+ specularBase+=info.specular*shadow;
388
+ #endif
389
+ #ifdef CLEARCOAT
390
+ clearCoatBase+=info.clearCoat.rgb*shadow;
391
+ #endif
392
+ #ifdef SHEEN
393
+ sheenBase+=info.sheen.rgb*shadow;
394
+ #endif
395
+ #endif
396
+ #endif
397
+ #endif
398
+ `;e.IncludesShadersStoreWGSL[t]||(e.IncludesShadersStoreWGSL[t]=n);const s={name:t,shader:n};export{a as d,s as l};
@@ -0,0 +1,4 @@
1
+ import{S as t}from"./index-B2zBEWsq.js";const e="logDepthDeclaration",o=`#ifdef LOGARITHMICDEPTH
2
+ uniform logarithmicDepthConstant: f32;varying vFragmentDepth: f32;
3
+ #endif
4
+ `;t.IncludesShadersStoreWGSL[e]||(t.IncludesShadersStoreWGSL[e]=o);const a={name:e,shader:o};export{a as l};
@@ -0,0 +1,14 @@
1
+ import{S as e}from"./index-B2zBEWsq.js";const t="fogVertexDeclaration",o=`#ifdef FOG
2
+ varying vFogDistance: vec3f;
3
+ #endif
4
+ `;e.IncludesShadersStoreWGSL[t]||(e.IncludesShadersStoreWGSL[t]=o);const i={name:t,shader:o},s="fogVertex",n=`#ifdef FOG
5
+ #ifdef SCENE_UBO
6
+ vertexOutputs.vFogDistance=(scene.view*worldPos).xyz;
7
+ #else
8
+ vertexOutputs.vFogDistance=(uniforms.view*worldPos).xyz;
9
+ #endif
10
+ #endif
11
+ `;e.IncludesShadersStoreWGSL[s]||(e.IncludesShadersStoreWGSL[s]=n);const S={name:s,shader:n},r="logDepthVertex",a=`#ifdef LOGARITHMICDEPTH
12
+ vertexOutputs.vFragmentDepth=1.0+vertexOutputs.position.w;vertexOutputs.position.z=log2(max(0.000001,vertexOutputs.vFragmentDepth))*uniforms.logarithmicDepthConstant;
13
+ #endif
14
+ `;e.IncludesShadersStoreWGSL[r]||(e.IncludesShadersStoreWGSL[r]=a);const f={name:r,shader:a};export{S as a,i as f,f as l};
@@ -0,0 +1,4 @@
1
+ import{S as e}from"./index-B2zBEWsq.js";const a="mainUVVaryingDeclaration",n=`#ifdef MAINUV{X}
2
+ varying vMainUV{X}: vec2f;
3
+ #endif
4
+ `;e.IncludesShadersStoreWGSL[a]||(e.IncludesShadersStoreWGSL[a]=n);const i={name:a,shader:n};export{i as m};
@@ -0,0 +1 @@
1
+ function l(o){return Math.floor(o/8)}function y(o){return 1<<o%8}class x{constructor(e){this.size=e,this._byteArray=new Uint8Array(Math.ceil(this.size/8))}get(e){if(e>=this.size)throw new RangeError("Bit index out of range");const n=l(e),r=y(e);return(this._byteArray[n]&r)!==0}set(e,n){if(e>=this.size)throw new RangeError("Bit index out of range");const r=l(e),s=y(e);n?this._byteArray[r]|=s:this._byteArray[r]&=~s}}function w(o){const e=[],n=o.length/3;for(let t=0;t<n;t++)e.push([o[t*3],o[t*3+1],o[t*3+2]]);const r=new Map;for(let t=0;t<e.length;t++){const a=e[t];for(const c of a){let f=r.get(c);f||r.set(c,f=[]),f.push(t)}}const s=new x(n),h=[],p=t=>{const a=[t];for(;a.length>0;){const c=a.pop();if(!s.get(c)){s.set(c,!0),h.push(e[c]);for(const f of e[c]){const u=r.get(f);if(!u)return;for(const g of u)s.get(g)||a.push(g)}}}};for(let t=0;t<n;t++)s.get(t)||p(t);let i=0;for(const t of h)o[i++]=t[0],o[i++]=t[1],o[i++]=t[2]}export{w as OptimizeIndices};