@babylonjs/lite 1.2.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (210) hide show
  1. package/{_mat4-storage-f64-WeexU-hd.js → _mat4-storage-f64-BqqOLkos.js} +2 -2
  2. package/{_mat4-storage-f64-WeexU-hd.js.map → _mat4-storage-f64-BqqOLkos.js.map} +1 -1
  3. package/{alpha-test-fragment-x2mnjLgC.js → alpha-test-fragment-D8oeUpvv.js} +2 -2
  4. package/{alpha-test-fragment-x2mnjLgC.js.map → alpha-test-fragment-D8oeUpvv.js.map} +1 -1
  5. package/{background-dds-skybox-BpcDr-9c.js → background-dds-skybox-Cv92mmdC.js} +3 -4
  6. package/{background-dds-skybox-BpcDr-9c.js.map → background-dds-skybox-Cv92mmdC.js.map} +1 -1
  7. package/{background-ground-Bm6gjWqx.js → background-ground-ClcWiDuF.js} +2 -3
  8. package/{background-ground-Bm6gjWqx.js.map → background-ground-ClcWiDuF.js.map} +1 -1
  9. package/{background-hdr-skybox-CSFo8RX6.js → background-hdr-skybox-MfAwLhVx.js} +3 -3
  10. package/{background-hdr-skybox-CSFo8RX6.js.map → background-hdr-skybox-MfAwLhVx.js.map} +1 -1
  11. package/{background-solid-skybox-DOOBeDIz.js → background-solid-skybox-CkmGuOn5.js} +2 -3
  12. package/{background-solid-skybox-DOOBeDIz.js.map → background-solid-skybox-CkmGuOn5.js.map} +1 -1
  13. package/{billboard-renderable-IJfCpeDS.js → billboard-renderable-CmIfD7IP.js} +2 -2
  14. package/{billboard-renderable-IJfCpeDS.js.map → billboard-renderable-CmIfD7IP.js.map} +1 -1
  15. package/{clamp-block-BD_t8I89.js → clamp-block-Bupvx5sX.js} +2 -2
  16. package/{clamp-block-BD_t8I89.js.map → clamp-block-Bupvx5sX.js.map} +1 -1
  17. package/{clearcoat-fragment-Dj7vGX2u.js → clearcoat-fragment-wfkXOHHZ.js} +2 -2
  18. package/{clearcoat-fragment-Dj7vGX2u.js.map → clearcoat-fragment-wfkXOHHZ.js.map} +1 -1
  19. package/{create-skeleton-s0hjrC3A.js → create-skeleton-41NqPV9u.js} +2 -2
  20. package/{create-skeleton-s0hjrC3A.js.map → create-skeleton-41NqPV9u.js.map} +1 -1
  21. package/{cubemap-skybox-material-8lzbgi7K.js → cubemap-skybox-material-BWGdKMLi.js} +2 -2
  22. package/{cubemap-skybox-material-8lzbgi7K.js.map → cubemap-skybox-material-BWGdKMLi.js.map} +1 -1
  23. package/{curve-block-Ditr4R7V.js → curve-block-CeLMJE2N.js} +2 -2
  24. package/{curve-block-Ditr4R7V.js.map → curve-block-CeLMJE2N.js.map} +1 -1
  25. package/{emissive-fragment-BOAezkfk.js → emissive-fragment-CDJhX8ad.js} +2 -2
  26. package/{emissive-fragment-BOAezkfk.js.map → emissive-fragment-CDJhX8ad.js.map} +1 -1
  27. package/{esm-shadow-view-JCPaOOi7.js → esm-shadow-view-CcX1jdrL.js} +2 -2
  28. package/{esm-shadow-view-JCPaOOi7.js.map → esm-shadow-view-CcX1jdrL.js.map} +1 -1
  29. package/{esm-shadow-view-DRpyRAfa.js → esm-shadow-view-Cf2PwVNs.js} +2 -2
  30. package/{esm-shadow-view-DRpyRAfa.js.map → esm-shadow-view-Cf2PwVNs.js.map} +1 -1
  31. package/{esm-shadow-view-DmIORQGZ.js → esm-shadow-view-KyVyZnKZ.js} +2 -2
  32. package/{esm-shadow-view-DmIORQGZ.js.map → esm-shadow-view-KyVyZnKZ.js.map} +1 -1
  33. package/{gaussian-splatting-pipeline-sh-B30Mu56i.js → gaussian-splatting-pipeline-sh-lM48JDca.js} +2 -2
  34. package/{gaussian-splatting-pipeline-sh-B30Mu56i.js.map → gaussian-splatting-pipeline-sh-lM48JDca.js.map} +1 -1
  35. package/{geometry-texture-output-DURiaJ_n.js → geometry-texture-output-DSeH_3G_.js} +2 -2
  36. package/{geometry-texture-output-DURiaJ_n.js.map → geometry-texture-output-DSeH_3G_.js.map} +1 -1
  37. package/{geometry-view-DRrscyWU.js → geometry-view-L27hzPQF.js} +3 -4
  38. package/{geometry-view-DRrscyWU.js.map → geometry-view-L27hzPQF.js.map} +1 -1
  39. package/{gltf-animation-BjnXkop6.js → gltf-animation-Db8PwXmY.js} +6 -5
  40. package/gltf-animation-Db8PwXmY.js.map +1 -0
  41. package/{gltf-ext-basisu-DtzVV1Xx.js → gltf-ext-basisu-BARpgeiU.js} +2 -2
  42. package/{gltf-ext-basisu-DtzVV1Xx.js.map → gltf-ext-basisu-BARpgeiU.js.map} +1 -1
  43. package/{gltf-ext-node-visibility-BhX0DmiP.js → gltf-ext-node-visibility-Cv7HyWR_.js} +2 -2
  44. package/{gltf-ext-node-visibility-BhX0DmiP.js.map → gltf-ext-node-visibility-Cv7HyWR_.js.map} +1 -1
  45. package/{gltf-ext-quantization-DaymajCR.js → gltf-ext-quantization-DIYKR7_3.js} +2 -2
  46. package/{gltf-ext-quantization-DaymajCR.js.map → gltf-ext-quantization-DIYKR7_3.js.map} +1 -1
  47. package/{gltf-ext-uv-transform-DFmNJ8kA.js → gltf-ext-uv-transform-qU-LScDy.js} +2 -2
  48. package/{gltf-ext-uv-transform-DFmNJ8kA.js.map → gltf-ext-uv-transform-qU-LScDy.js.map} +1 -1
  49. package/gltf-feature-animation-pointer-nDf6dGpL.js +161 -0
  50. package/gltf-feature-animation-pointer-nDf6dGpL.js.map +1 -0
  51. package/{gltf-feature-animations-v0S_yb4T.js → gltf-feature-animations-Dr9AsgIN.js} +3 -3
  52. package/{gltf-feature-animations-v0S_yb4T.js.map → gltf-feature-animations-Dr9AsgIN.js.map} +1 -1
  53. package/gltf-feature-draco-CRgxNaK1.js +33 -0
  54. package/gltf-feature-draco-CRgxNaK1.js.map +1 -0
  55. package/{gltf-feature-gpu-instancing-BoeSm6Tn.js → gltf-feature-gpu-instancing-QfJNFW1R.js} +2 -2
  56. package/{gltf-feature-gpu-instancing-BoeSm6Tn.js.map → gltf-feature-gpu-instancing-QfJNFW1R.js.map} +1 -1
  57. package/{gltf-feature-lights-punctual-BCTwgyi_.js → gltf-feature-lights-punctual-B3xbCshn.js} +5 -5
  58. package/{gltf-feature-lights-punctual-BCTwgyi_.js.map → gltf-feature-lights-punctual-B3xbCshn.js.map} +1 -1
  59. package/{gltf-feature-meshopt-DItMkOMt.js → gltf-feature-meshopt-DBvtC2n2.js} +2 -34
  60. package/gltf-feature-meshopt-DBvtC2n2.js.map +1 -0
  61. package/{gltf-feature-morph-Cv0mEYIq.js → gltf-feature-morph-DE63vfIE.js} +3 -3
  62. package/{gltf-feature-morph-Cv0mEYIq.js.map → gltf-feature-morph-DE63vfIE.js.map} +1 -1
  63. package/{gltf-feature-registry-wNbt6UC-.js → gltf-feature-registry-DfOiNmhR.js} +15 -15
  64. package/{gltf-feature-registry-wNbt6UC-.js.map → gltf-feature-registry-DfOiNmhR.js.map} +1 -1
  65. package/{gltf-feature-skeleton-Deh2UBAn.js → gltf-feature-skeleton-IHj-DuKx.js} +12 -3
  66. package/gltf-feature-skeleton-IHj-DuKx.js.map +1 -0
  67. package/{gltf-feature-variants-DGSdFNJq.js → gltf-feature-variants-C-eyBru5.js} +2 -2
  68. package/{gltf-feature-variants-DGSdFNJq.js.map → gltf-feature-variants-C-eyBru5.js.map} +1 -1
  69. package/{gltf-glb-parser-DSQWsT4r.js → gltf-glb-parser-DXMAJA8e.js} +2 -2
  70. package/{gltf-glb-parser-DSQWsT4r.js.map → gltf-glb-parser-DXMAJA8e.js.map} +1 -1
  71. package/{gltf-interleave-OBqmlu-h.js → gltf-interleave-BdKrRH3j.js} +4 -4
  72. package/gltf-interleave-BdKrRH3j.js.map +1 -0
  73. package/{gltf-pbr-builder-ext-3imk8Tev.js → gltf-pbr-builder-ext-DJ8Jm7jo.js} +2 -2
  74. package/{gltf-pbr-builder-ext-3imk8Tev.js.map → gltf-pbr-builder-ext-DJ8Jm7jo.js.map} +1 -1
  75. package/{gltf-variants-Dyr54wwg.js → gltf-variants-C0HetOre.js} +4 -4
  76. package/{gltf-variants-Dyr54wwg.js.map → gltf-variants-C0HetOre.js.map} +1 -1
  77. package/{gpu-task-timer-DVBNZfq5.js → gpu-task-timer-C-3sLTxO.js} +2 -2
  78. package/{gpu-task-timer-DVBNZfq5.js.map → gpu-task-timer-C-3sLTxO.js.map} +1 -1
  79. package/{gs-picking-pipeline-CERN-Trj.js → gs-picking-pipeline-DlogO8fI.js} +2 -2
  80. package/{gs-picking-pipeline-CERN-Trj.js.map → gs-picking-pipeline-DlogO8fI.js.map} +1 -1
  81. package/{havok-floating-origin-VVdJRUYc.js → havok-floating-origin-CQ7yE-XD.js} +2 -2
  82. package/{havok-floating-origin-VVdJRUYc.js.map → havok-floating-origin-CQ7yE-XD.js.map} +1 -1
  83. package/{index-BgY3QEzL.js → index-C2sM8ERH.js} +2697 -932
  84. package/index-C2sM8ERH.js.map +1 -0
  85. package/index.d.ts +443 -12
  86. package/index.js +525 -507
  87. package/{input-block-DjdlndCL.js → input-block-DfFVJB-8.js} +2 -2
  88. package/{input-block-DjdlndCL.js.map → input-block-DfFVJB-8.js.map} +1 -1
  89. package/{iridescence-fragment-kfsCs8lN.js → iridescence-fragment-CQwzyZ3W.js} +2 -2
  90. package/{iridescence-fragment-kfsCs8lN.js.map → iridescence-fragment-CQwzyZ3W.js.map} +1 -1
  91. package/{light-block-qjCrz3de.js → light-block-othUHIHC.js} +2 -2
  92. package/{light-block-qjCrz3de.js.map → light-block-othUHIHC.js.map} +1 -1
  93. package/{loop-block-C8vkQ2bz.js → loop-block-DgHyTx97.js} +2 -2
  94. package/{loop-block-C8vkQ2bz.js.map → loop-block-DgHyTx97.js.map} +1 -1
  95. package/{morph-fragment-NpZYyIIU.js → morph-fragment-D_rgysrc.js} +2 -2
  96. package/{morph-fragment-NpZYyIIU.js.map → morph-fragment-D_rgysrc.js.map} +1 -1
  97. package/{multilight-wgsl-I5SncF0q.js → multilight-wgsl-DRmyM3cC.js} +2 -2
  98. package/{multilight-wgsl-I5SncF0q.js.map → multilight-wgsl-DRmyM3cC.js.map} +1 -1
  99. package/{node-env-D7Aee08u.js → node-env-B-Ca2DL0.js} +2 -2
  100. package/{node-env-D7Aee08u.js.map → node-env-B-Ca2DL0.js.map} +1 -1
  101. package/{node-geometry-view-DfKXWNfV.js → node-geometry-view-BJDB-lrf.js} +3 -3
  102. package/{node-geometry-view-DfKXWNfV.js.map → node-geometry-view-BJDB-lrf.js.map} +1 -1
  103. package/{node-registry-extra-compat-CDLeBR1P.js → node-registry-extra-compat-SwS962Ax.js} +2 -2
  104. package/{node-registry-extra-compat-CDLeBR1P.js.map → node-registry-extra-compat-SwS962Ax.js.map} +1 -1
  105. package/{node-registry-extra-math-BA8_l4lB.js → node-registry-extra-math-Bsj4UAE5.js} +2 -2
  106. package/{node-registry-extra-math-BA8_l4lB.js.map → node-registry-extra-math-Bsj4UAE5.js.map} +1 -1
  107. package/{node-renderable-EwLLnaL1.js → node-renderable-BOIc3hM1.js} +2 -2
  108. package/{node-renderable-EwLLnaL1.js.map → node-renderable-BOIc3hM1.js.map} +1 -1
  109. package/{node-shadow-CeTmT6g4.js → node-shadow-DE--Q2V1.js} +2 -2
  110. package/{node-shadow-CeTmT6g4.js.map → node-shadow-DE--Q2V1.js.map} +1 -1
  111. package/{normal-map-fragment-BHImLyM-.js → normal-map-fragment-Cjm-v9uq.js} +2 -3
  112. package/{normal-map-fragment-BHImLyM-.js.map → normal-map-fragment-Cjm-v9uq.js.map} +1 -1
  113. package/package.json +3 -3
  114. package/{parse-camera-5IGdctAS.js → parse-camera-uQ8oKgeH.js} +2 -2
  115. package/{parse-camera-5IGdctAS.js.map → parse-camera-uQ8oKgeH.js.map} +1 -1
  116. package/{pbr-fog-wgsl-BqdCid6r.js → pbr-fog-wgsl-B5LrMToX.js} +2 -2
  117. package/{pbr-fog-wgsl-BqdCid6r.js.map → pbr-fog-wgsl-B5LrMToX.js.map} +1 -1
  118. package/{pbr-geometry-view-Dthf9Aut.js → pbr-geometry-view-BI52zgUI.js} +9 -11
  119. package/pbr-geometry-view-BI52zgUI.js.map +1 -0
  120. package/{pbr-metallic-roughness-block-g7wjzwN_.js → pbr-metallic-roughness-block-C7s1jL4q.js} +2 -2
  121. package/{pbr-metallic-roughness-block-g7wjzwN_.js.map → pbr-metallic-roughness-block-C7s1jL4q.js.map} +1 -1
  122. package/{pbr-metallic-roughness-block-full-DD6zI_Lx.js → pbr-metallic-roughness-block-full-BuhhVBFO.js} +2 -2
  123. package/{pbr-metallic-roughness-block-full-DD6zI_Lx.js.map → pbr-metallic-roughness-block-full-BuhhVBFO.js.map} +1 -1
  124. package/{pbr-mr-helper-core-CWROQ7OA.js → pbr-mr-helper-core-XeyKg-g6.js} +2 -2
  125. package/{pbr-mr-helper-core-CWROQ7OA.js.map → pbr-mr-helper-core-XeyKg-g6.js.map} +1 -1
  126. package/{pbr-refraction-Dxsm_gii.js → pbr-refraction-Bxz4GDeh.js} +2 -2
  127. package/{pbr-refraction-Dxsm_gii.js.map → pbr-refraction-Bxz4GDeh.js.map} +1 -1
  128. package/{pbr-renderable-CuKWalEM.js → pbr-renderable-B0elfRlX.js} +41 -189
  129. package/pbr-renderable-B0elfRlX.js.map +1 -0
  130. package/{pbr-shadow-fragment-waeIBQUq.js → pbr-shadow-fragment-QHbgqVlc.js} +2 -2
  131. package/{pbr-shadow-fragment-waeIBQUq.js.map → pbr-shadow-fragment-QHbgqVlc.js.map} +1 -1
  132. package/{pbr-tracking-CdeqbBrh.js → pbr-tracking-BWWSjls_.js} +2 -2
  133. package/{pbr-tracking-CdeqbBrh.js.map → pbr-tracking-BWWSjls_.js.map} +1 -1
  134. package/{pbr-transmission-ext-BNiXngZc.js → pbr-transmission-ext-DiEBLim-.js} +2 -2
  135. package/{pbr-transmission-ext-BNiXngZc.js.map → pbr-transmission-ext-DiEBLim-.js.map} +1 -1
  136. package/{reflectance-fragment-BQFZ_pgy.js → reflectance-fragment-wBk8UtBP.js} +2 -2
  137. package/{reflectance-fragment-BQFZ_pgy.js.map → reflectance-fragment-wBk8UtBP.js.map} +1 -1
  138. package/{rgbd-decode-duTlXMWd.js → rgbd-decode-CAQ7XSwl.js} +2 -2
  139. package/{rgbd-decode-duTlXMWd.js.map → rgbd-decode-CAQ7XSwl.js.map} +1 -1
  140. package/{screenshot-readback-DnxR4rhp.js → screenshot-readback-NxsFpnE4.js} +2 -2
  141. package/{screenshot-readback-DnxR4rhp.js.map → screenshot-readback-NxsFpnE4.js.map} +1 -1
  142. package/{shader-renderable-DVMVD6zP.js → shader-renderable-CUlJSove.js} +4 -196
  143. package/shader-renderable-CUlJSove.js.map +1 -0
  144. package/{shader-thin-instance-CsDo3ULk.js → shader-thin-instance-BjIbuYdv.js} +2 -2
  145. package/{shader-thin-instance-CsDo3ULk.js.map → shader-thin-instance-BjIbuYdv.js.map} +1 -1
  146. package/{sheen-fragment-B_Jd7wrr.js → sheen-fragment-ef8myYaq.js} +2 -2
  147. package/{sheen-fragment-B_Jd7wrr.js.map → sheen-fragment-ef8myYaq.js.map} +1 -1
  148. package/{singlelight-directional-wgsl-Bw84txva.js → singlelight-directional-wgsl-BvFBA1MO.js} +2 -2
  149. package/{singlelight-directional-wgsl-Bw84txva.js.map → singlelight-directional-wgsl-BvFBA1MO.js.map} +1 -1
  150. package/{singlelight-hemispheric-wgsl-DjxhgI8r.js → singlelight-hemispheric-wgsl-BEsGCqSN.js} +2 -2
  151. package/{singlelight-hemispheric-wgsl-DjxhgI8r.js.map → singlelight-hemispheric-wgsl-BEsGCqSN.js.map} +1 -1
  152. package/{singlelight-point-wgsl-iA1aRkXA.js → singlelight-point-wgsl-CvMr18Zf.js} +2 -2
  153. package/{singlelight-point-wgsl-iA1aRkXA.js.map → singlelight-point-wgsl-CvMr18Zf.js.map} +1 -1
  154. package/{singlelight-spot-wgsl-MDdTdstF.js → singlelight-spot-wgsl-jYIr13wU.js} +2 -2
  155. package/{singlelight-spot-wgsl-MDdTdstF.js.map → singlelight-spot-wgsl-jYIr13wU.js.map} +1 -1
  156. package/{skeleton-fragment-COdHWFcK.js → skeleton-fragment-B9M_ddNC.js} +2 -2
  157. package/{skeleton-fragment-COdHWFcK.js.map → skeleton-fragment-B9M_ddNC.js.map} +1 -1
  158. package/{skybox-renderable-DJYkfw32.js → skybox-renderable-lbMC32aI.js} +2 -3
  159. package/{skybox-renderable-DJYkfw32.js.map → skybox-renderable-lbMC32aI.js.map} +1 -1
  160. package/{splat-ply-compressed-SxMlsKNK.js → splat-ply-compressed-B_w2N_V7.js} +2 -2
  161. package/{splat-ply-compressed-SxMlsKNK.js.map → splat-ply-compressed-B_w2N_V7.js.map} +1 -1
  162. package/{standard-renderable-BAc-i-ig.js → standard-renderable-AYZ-Pdcm.js} +3 -4
  163. package/standard-renderable-AYZ-Pdcm.js.map +1 -0
  164. package/{std-ambient-fragment-P8dHZ4An.js → std-ambient-fragment-BXl-88sn.js} +2 -2
  165. package/{std-ambient-fragment-P8dHZ4An.js.map → std-ambient-fragment-BXl-88sn.js.map} +1 -1
  166. package/{std-cube-reflection-fragment-CF03MuQt.js → std-cube-reflection-fragment-Dn34WuMa.js} +2 -2
  167. package/{std-cube-reflection-fragment-CF03MuQt.js.map → std-cube-reflection-fragment-Dn34WuMa.js.map} +1 -1
  168. package/{std-emissive-fragment-P8yJGclx.js → std-emissive-fragment-CK7TwRAt.js} +2 -2
  169. package/{std-emissive-fragment-P8yJGclx.js.map → std-emissive-fragment-CK7TwRAt.js.map} +1 -1
  170. package/{std-lightmap-fragment-CymEG79z.js → std-lightmap-fragment-BSeS8K-4.js} +2 -2
  171. package/{std-lightmap-fragment-CymEG79z.js.map → std-lightmap-fragment-BSeS8K-4.js.map} +1 -1
  172. package/{std-opacity-fragment-DLa1zV06.js → std-opacity-fragment-DnLaWH9w.js} +2 -2
  173. package/{std-opacity-fragment-DLa1zV06.js.map → std-opacity-fragment-DnLaWH9w.js.map} +1 -1
  174. package/{std-reflection-fragment-BLySsYos.js → std-reflection-fragment-BToYPemd.js} +2 -2
  175. package/{std-reflection-fragment-BLySsYos.js.map → std-reflection-fragment-BToYPemd.js.map} +1 -1
  176. package/{std-shadow-fragment-C_q27Mdi.js → std-shadow-fragment-9b0rFY7F.js} +2 -2
  177. package/{std-shadow-fragment-C_q27Mdi.js.map → std-shadow-fragment-9b0rFY7F.js.map} +1 -1
  178. package/{std-specular-fragment-CaBXyAWY.js → std-specular-fragment-OBO-zxGh.js} +2 -2
  179. package/{std-specular-fragment-CaBXyAWY.js.map → std-specular-fragment-OBO-zxGh.js.map} +1 -1
  180. package/{std-tracking-Bw61Dv98.js → std-tracking-4SHTntWt.js} +2 -2
  181. package/{std-tracking-Bw61Dv98.js.map → std-tracking-4SHTntWt.js.map} +1 -1
  182. package/{subsurface-fragment-BNQoG9gr.js → subsurface-fragment-D7QRWN_d.js} +2 -2
  183. package/{subsurface-fragment-BNQoG9gr.js.map → subsurface-fragment-D7QRWN_d.js.map} +1 -1
  184. package/{thin-instance-cull-binding-BNC5JiGw.js → thin-instance-cull-binding-D-p2Yxfg.js} +3 -3
  185. package/{thin-instance-cull-binding-BNC5JiGw.js.map → thin-instance-cull-binding-D-p2Yxfg.js.map} +1 -1
  186. package/{thin-instance-gpu-C1DGstap.js → thin-instance-gpu-QETC_NyQ.js} +2 -2
  187. package/{thin-instance-gpu-C1DGstap.js.map → thin-instance-gpu-QETC_NyQ.js.map} +1 -1
  188. package/{tracking-primitives-CMBWLxGr.js → tracking-primitives-CqIIi7Ej.js} +2 -2
  189. package/{tracking-primitives-CMBWLxGr.js.map → tracking-primitives-CqIIi7Ej.js.map} +1 -1
  190. package/{unlit-fragment-BsHrS9XX.js → unlit-fragment-DPWDQLxo.js} +2 -2
  191. package/{unlit-fragment-BsHrS9XX.js.map → unlit-fragment-DPWDQLxo.js.map} +1 -1
  192. package/gltf-animation-BjnXkop6.js.map +0 -1
  193. package/gltf-feature-animation-pointer-C40tqOhL.js +0 -88
  194. package/gltf-feature-animation-pointer-C40tqOhL.js.map +0 -1
  195. package/gltf-feature-draco-CljWrsna.js +0 -125
  196. package/gltf-feature-draco-CljWrsna.js.map +0 -1
  197. package/gltf-feature-meshopt-DItMkOMt.js.map +0 -1
  198. package/gltf-feature-skeleton-Deh2UBAn.js.map +0 -1
  199. package/gltf-interleave-OBqmlu-h.js.map +0 -1
  200. package/index-BgY3QEzL.js.map +0 -1
  201. package/pbr-geometry-view-Dthf9Aut.js.map +0 -1
  202. package/pbr-renderable-CuKWalEM.js.map +0 -1
  203. package/shader-composer-CBy2i8nU.js +0 -293
  204. package/shader-composer-CBy2i8nU.js.map +0 -1
  205. package/shader-renderable-DVMVD6zP.js.map +0 -1
  206. package/standard-pipeline-DXFOUqU_.js +0 -391
  207. package/standard-pipeline-DXFOUqU_.js.map +0 -1
  208. package/standard-renderable-BAc-i-ig.js.map +0 -1
  209. package/wgsl-helpers-D8sl1VVA.js +0 -48
  210. package/wgsl-helpers-D8sl1VVA.js.map +0 -1
@@ -238,7 +238,7 @@ async function createEngine(canvas, options) {
238
238
  throw new Error("Babylon Lite: useFloatingOrigin requires useHighPrecisionMatrix on the engine.");
239
239
  }
240
240
  if (useHpm) {
241
- const { allocateF64Mat4 } = await import("./_mat4-storage-f64-WeexU-hd.js");
241
+ const { allocateF64Mat4 } = await import("./_mat4-storage-f64-BqqOLkos.js");
242
242
  _setHpmAllocator(allocateF64Mat4);
243
243
  }
244
244
  let _wrapRenderableForFO;
@@ -443,7 +443,7 @@ async function setRenderTaskGpuTimingEnabled(engine, enabled) {
443
443
  engine._gpuTaskTimerEpoch = epoch;
444
444
  engine._gpuTaskTimerWanted = true;
445
445
  engine._gpuTaskTimingResult = makeTimingSnapshot("pending", true, true, 0, [], 0);
446
- const { createGpuTaskTimer, installGpuTaskTimer } = await import("./gpu-task-timer-DVBNZfq5.js");
446
+ const { createGpuTaskTimer, installGpuTaskTimer } = await import("./gpu-task-timer-C-3sLTxO.js");
447
447
  if (!engine._gpuTaskTimerWanted || engine._gpuTaskTimerEpoch !== epoch) {
448
448
  return getRenderTaskGpuTimings(engine);
449
449
  }
@@ -471,7 +471,7 @@ function captureScreenshot(surface) {
471
471
  (surface._captureQueue ?? (surface._captureQueue = [])).push({ resolve, reject });
472
472
  });
473
473
  if (!surface._captureService) {
474
- void import("./screenshot-readback-DnxR4rhp.js").then(({ createCaptureService, createCapturePreFrame }) => {
474
+ void import("./screenshot-readback-NxsFpnE4.js").then(({ createCaptureService, createCapturePreFrame }) => {
475
475
  surface._captureService ?? (surface._captureService = createCaptureService());
476
476
  surface._capturePreFrame ?? (surface._capturePreFrame = createCapturePreFrame());
477
477
  });
@@ -702,13 +702,13 @@ function getEffectiveAspectRatio(camera, targetWidth, targetHeight) {
702
702
  return targetWidth / targetHeight * (v2 ? v2.width / v2.height : 1);
703
703
  }
704
704
  let _cachedSceneBGL = null;
705
- let _cachedDevice$3 = null;
705
+ let _cachedDevice$5 = null;
706
706
  function getSceneBindGroupLayout(engine) {
707
707
  const device = engine._device;
708
- if (_cachedSceneBGL && _cachedDevice$3 === device) {
708
+ if (_cachedSceneBGL && _cachedDevice$5 === device) {
709
709
  return _cachedSceneBGL;
710
710
  }
711
- _cachedDevice$3 = device;
711
+ _cachedDevice$5 = device;
712
712
  _cachedSceneBGL = device.createBindGroupLayout({
713
713
  label: "scene",
714
714
  entries: [
@@ -720,7 +720,7 @@ function getSceneBindGroupLayout(engine) {
720
720
  }
721
721
  function clearSceneBGLCache() {
722
722
  _cachedSceneBGL = null;
723
- _cachedDevice$3 = null;
723
+ _cachedDevice$5 = null;
724
724
  }
725
725
  function createDefaultPipelineDescriptor(opts) {
726
726
  const target = opts._blend ? { format: opts._format, blend: opts._blend } : { format: opts._format };
@@ -3047,7 +3047,7 @@ function createGeometryRendererTask(config, engine, scene) {
3047
3047
  if (hasStandard) {
3048
3048
  loads.push(
3049
3049
  (async () => {
3050
- const [viewMod, matMod] = await Promise.all([import("./geometry-view-DRrscyWU.js"), Promise.resolve().then(() => standardMaterial)]);
3050
+ const [viewMod, matMod] = await Promise.all([import("./geometry-view-L27hzPQF.js"), Promise.resolve().then(() => standardMaterial)]);
3051
3051
  task._createStandardGeometryView = viewMod.createStandardGeometryMaterialView;
3052
3052
  task._computeStandardFeatures = matMod._computeStandardMaterialFeatures;
3053
3053
  })()
@@ -3056,7 +3056,7 @@ function createGeometryRendererTask(config, engine, scene) {
3056
3056
  if (hasPbr) {
3057
3057
  loads.push(
3058
3058
  (async () => {
3059
- const [viewMod, matMod] = await Promise.all([import("./pbr-geometry-view-Dthf9Aut.js"), Promise.resolve().then(() => pbrMaterial)]);
3059
+ const [viewMod, matMod] = await Promise.all([import("./pbr-geometry-view-BI52zgUI.js"), Promise.resolve().then(() => pbrMaterial)]);
3060
3060
  task._createPbrGeometryView = viewMod.createPbrGeometryMaterialView;
3061
3061
  task._computePbrFeatures = matMod._computePbrMaterialFeatures;
3062
3062
  })()
@@ -3065,7 +3065,7 @@ function createGeometryRendererTask(config, engine, scene) {
3065
3065
  if (hasNode) {
3066
3066
  loads.push(
3067
3067
  (async () => {
3068
- const viewMod = await import("./node-geometry-view-DfKXWNfV.js");
3068
+ const viewMod = await import("./node-geometry-view-BJDB-lrf.js");
3069
3069
  task._createNodeGeometryView = viewMod.createNodeGeometryMaterialView;
3070
3070
  })()
3071
3071
  );
@@ -11565,6 +11565,23 @@ const GL_RGBA8 = 32856;
11565
11565
  const GL_R8 = 33321;
11566
11566
  const GL_RG8 = 33323;
11567
11567
  const RGBA_CAPS = { astc: false, bptc: false, s3tc: false, pvrtc: false, etc2: false, etc1: false };
11568
+ function deviceKtx2Caps(engine) {
11569
+ const f = engine._device.features;
11570
+ const bc = f.has("texture-compression-bc");
11571
+ const etc2 = f.has("texture-compression-etc2");
11572
+ return {
11573
+ astc: f.has("texture-compression-astc"),
11574
+ bptc: bc,
11575
+ // BC6H/BC7
11576
+ s3tc: bc,
11577
+ // BC1/BC2/BC3
11578
+ pvrtc: false,
11579
+ // unsupported on WebGPU
11580
+ etc2,
11581
+ etc1: etc2
11582
+ // ETC1 content transcodes on ETC2-capable GPUs
11583
+ };
11584
+ }
11568
11585
  function loadKtx2Decoder() {
11569
11586
  if (_ktx2DecoderPromise) {
11570
11587
  return _ktx2DecoderPromise;
@@ -11747,7 +11764,7 @@ function uploadUncompressed(engine, mips, info, sRGB) {
11747
11764
  }
11748
11765
  async function uploadKtx2Texture2D(engine, buffer, sRGB) {
11749
11766
  const decoder = await loadKtx2Decoder();
11750
- const decoded = await decoder.decode(new U8(buffer), RGBA_CAPS, { forceRGBA: true });
11767
+ const decoded = await decoder.decode(new U8(buffer), deviceKtx2Caps(engine));
11751
11768
  const mips = validateDecoded(decoded);
11752
11769
  const compressed = getCompressedFormat(decoded.transcodedFormat);
11753
11770
  if (compressed) {
@@ -11759,6 +11776,13 @@ async function uploadKtx2Texture2D(engine, buffer, sRGB) {
11759
11776
  }
11760
11777
  throw new Error(`KTX2: unsupported transcoded format 0x${decoded.transcodedFormat.toString(16)}`);
11761
11778
  }
11779
+ async function loadKtx2Texture2D(engine, url, sRGB = false) {
11780
+ const resp = await fetch(url);
11781
+ if (!resp.ok) {
11782
+ throw new Error(`KTX2 fetch failed: ${resp.status} for ${url}`);
11783
+ }
11784
+ return uploadKtx2Texture2D(engine, await resp.arrayBuffer(), sRGB);
11785
+ }
11762
11786
  async function decodeKtx2ImageBitmapFromBuffer(buffer) {
11763
11787
  const decoder = await loadKtx2Decoder();
11764
11788
  const decoded = await decoder.decode(new U8(buffer), RGBA_CAPS, { forceRGBA: true });
@@ -11812,14 +11836,14 @@ function _getStdExtsSorted() {
11812
11836
  const NEEDS_UV = HAS_DIFFUSE_TEXTURE | HAS_EMISSIVE_TEXTURE | HAS_BUMP_TEXTURE | HAS_SPECULAR_TEXTURE | HAS_AMBIENT_TEXTURE | HAS_LIGHTMAP_TEXTURE | HAS_OPACITY_TEXTURE;
11813
11837
  const NEEDS_UV2 = LIGHTMAP_USES_UV2 | AMBIENT_USES_UV2 | DIFFUSE_USES_UV2 | SPECULAR_USES_UV2;
11814
11838
  const _STD_MAT_EXTS = [
11815
- ["bumpTexture", () => import("./normal-map-fragment-BHImLyM-.js"), "bumpStdExt"],
11816
- ["emissiveTexture", () => import("./std-emissive-fragment-P8yJGclx.js"), "stdEmissiveExt"],
11817
- ["specularTexture", () => import("./std-specular-fragment-CaBXyAWY.js"), "stdSpecularExt"],
11818
- ["ambientTexture", () => import("./std-ambient-fragment-P8dHZ4An.js"), "stdAmbientExt"],
11819
- ["lightmapTexture", () => import("./std-lightmap-fragment-CymEG79z.js"), "stdLightmapExt"],
11820
- ["opacityTexture", () => import("./std-opacity-fragment-DLa1zV06.js"), "stdOpacityExt"],
11821
- ["reflectionTexture", () => import("./std-reflection-fragment-BLySsYos.js"), "stdReflectionExt"],
11822
- ["reflectionCubeTexture", () => import("./std-cube-reflection-fragment-CF03MuQt.js"), "stdCubeReflectionExt"]
11839
+ ["bumpTexture", () => import("./normal-map-fragment-Cjm-v9uq.js"), "bumpStdExt"],
11840
+ ["emissiveTexture", () => import("./std-emissive-fragment-CK7TwRAt.js"), "stdEmissiveExt"],
11841
+ ["specularTexture", () => import("./std-specular-fragment-OBO-zxGh.js"), "stdSpecularExt"],
11842
+ ["ambientTexture", () => import("./std-ambient-fragment-BXl-88sn.js"), "stdAmbientExt"],
11843
+ ["lightmapTexture", () => import("./std-lightmap-fragment-BSeS8K-4.js"), "stdLightmapExt"],
11844
+ ["opacityTexture", () => import("./std-opacity-fragment-DnLaWH9w.js"), "stdOpacityExt"],
11845
+ ["reflectionTexture", () => import("./std-reflection-fragment-BToYPemd.js"), "stdReflectionExt"],
11846
+ ["reflectionCubeTexture", () => import("./std-cube-reflection-fragment-Dn34WuMa.js"), "stdCubeReflectionExt"]
11823
11847
  ];
11824
11848
  const standardGroupBuilder = async (scene, meshes) => {
11825
11849
  const hasTI = meshes.some((m2) => !!m2.thinInstances);
@@ -11835,7 +11859,7 @@ const standardGroupBuilder = async (scene, meshes) => {
11835
11859
  const imports = [];
11836
11860
  if (hasTI) {
11837
11861
  imports.push(
11838
- import("./thin-instance-gpu-C1DGstap.js").then((m2) => {
11862
+ import("./thin-instance-gpu-QETC_NyQ.js").then((m2) => {
11839
11863
  tiSync = m2.syncThinInstanceBuffers;
11840
11864
  }),
11841
11865
  import("./thin-instance-fragment-hsv-RyDs.js").then((m2) => {
@@ -11844,7 +11868,7 @@ const standardGroupBuilder = async (scene, meshes) => {
11844
11868
  );
11845
11869
  if (hasCulling) {
11846
11870
  imports.push(
11847
- import("./thin-instance-cull-binding-BNC5JiGw.js").then((m2) => {
11871
+ import("./thin-instance-cull-binding-D-p2Yxfg.js").then((m2) => {
11848
11872
  cull = m2;
11849
11873
  })
11850
11874
  );
@@ -11852,7 +11876,7 @@ const standardGroupBuilder = async (scene, meshes) => {
11852
11876
  }
11853
11877
  if (hasShadow) {
11854
11878
  imports.push(
11855
- import("./std-shadow-fragment-C_q27Mdi.js").then((m2) => {
11879
+ import("./std-shadow-fragment-9b0rFY7F.js").then((m2) => {
11856
11880
  shadowFragment = m2.createStdShadowFragment;
11857
11881
  })
11858
11882
  );
@@ -11865,7 +11889,7 @@ const standardGroupBuilder = async (scene, meshes) => {
11865
11889
  if (imports.length > 0) {
11866
11890
  await Promise.all(imports);
11867
11891
  }
11868
- const renderableMod = await import("./standard-renderable-BAc-i-ig.js");
11892
+ const renderableMod = await import("./standard-renderable-AYZ-Pdcm.js");
11869
11893
  const result = renderableMod.buildStandardMeshRenderables(scene, meshes, { tiSync, tiFragment, shadowFragment, cull });
11870
11894
  standardGroupBuilder._rebuildSingle = result.rebuildSingle;
11871
11895
  return result;
@@ -11916,9 +11940,218 @@ const noColorView$3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defin
11916
11940
  __proto__: null,
11917
11941
  createStandardNoColorMaterialView: createStandardNoColorMaterialView$1
11918
11942
  }, Symbol.toStringTag, { value: "Module" }));
11943
+ const MSH_HAS_TANGENTS = 1 << 0;
11944
+ const MSH_HAS_SKELETON = 1 << 1;
11945
+ const MSH_HAS_SKELETON_8 = 1 << 2;
11946
+ const MSH_HAS_MORPH_TARGETS = 1 << 3;
11947
+ const MSH_HAS_THIN_INSTANCES = 1 << 4;
11948
+ const MSH_HAS_INSTANCE_COLOR = 1 << 5;
11949
+ const MSH_HAS_VERTEX_COLOR = 1 << 6;
11950
+ const MSH_HAS_UV2 = 1 << 7;
11951
+ const MSH_RECEIVE_SHADOWS = 1 << 8;
11952
+ const MSH_VAT = 1 << 9;
11953
+ function _computeMeshFeatures(mesh, receiveShadows = false) {
11954
+ const gpu = mesh._gpu;
11955
+ let features = 0;
11956
+ if (gpu.tangentBuffer) {
11957
+ features |= MSH_HAS_TANGENTS;
11958
+ }
11959
+ if (mesh.vat) {
11960
+ features |= MSH_VAT;
11961
+ if (mesh.vat.joints1Buffer) {
11962
+ features |= MSH_HAS_SKELETON_8;
11963
+ }
11964
+ } else if (mesh.skeleton) {
11965
+ features |= MSH_HAS_SKELETON;
11966
+ if (mesh.skeleton.joints1Buffer) {
11967
+ features |= MSH_HAS_SKELETON_8;
11968
+ }
11969
+ }
11970
+ if (mesh.morphTargets) {
11971
+ features |= MSH_HAS_MORPH_TARGETS;
11972
+ }
11973
+ if (mesh.thinInstances) {
11974
+ features |= MSH_HAS_THIN_INSTANCES;
11975
+ if (mesh.thinInstances.colors) {
11976
+ features |= MSH_HAS_INSTANCE_COLOR;
11977
+ }
11978
+ }
11979
+ if (gpu.colorBuffer) {
11980
+ features |= MSH_HAS_VERTEX_COLOR;
11981
+ }
11982
+ if (gpu.uv2Buffer) {
11983
+ features |= MSH_HAS_UV2;
11984
+ }
11985
+ if (receiveShadows) {
11986
+ features |= MSH_RECEIVE_SHADOWS;
11987
+ }
11988
+ return features;
11989
+ }
11990
+ let _stencilResolver$2 = null;
11991
+ function _installPbrStencilResolver(resolve) {
11992
+ _stencilResolver$2 = resolve;
11993
+ }
11994
+ let _pbrFallbackResolver = null;
11995
+ function _installPbrFallbackResolver(resolve) {
11996
+ _pbrFallbackResolver = resolve;
11997
+ }
11998
+ const _bindingsCache$1 = /* @__PURE__ */ new Map();
11999
+ let _cachedDevice$4 = null;
12000
+ function ensureDevice$2(engine) {
12001
+ if (_cachedDevice$4 !== engine._device) {
12002
+ _bindingsCache$1.clear();
12003
+ _cachedDevice$4 = engine._device;
12004
+ }
12005
+ }
12006
+ function clearPbrPipelineCache() {
12007
+ _bindingsCache$1.clear();
12008
+ _cachedDevice$4 = null;
12009
+ }
12010
+ function getOrCreatePbrBindings(engine, features, features2, meshFeatures, sceneFeatures, composed, shaderKey = "", stencil = null) {
12011
+ ensureDevice$2(engine);
12012
+ const resolvedStencil = stencil && _stencilResolver$2 ? _stencilResolver$2(stencil) : null;
12013
+ const key = `${features}:${features2}:${meshFeatures}:${sceneFeatures}:${shaderKey}${resolvedStencil ? resolvedStencil._key : ""}`;
12014
+ const cached = _bindingsCache$1.get(key);
12015
+ if (cached) {
12016
+ return cached;
12017
+ }
12018
+ const device = engine._device;
12019
+ const meshBGL = device.createBindGroupLayout(composed._meshBGLDescriptor);
12020
+ let shadowBGL = null;
12021
+ if (composed._shadowBGLDescriptor) {
12022
+ shadowBGL = device.createBindGroupLayout(composed._shadowBGLDescriptor);
12023
+ }
12024
+ const bindings = {
12025
+ _features: features,
12026
+ _features2: features2,
12027
+ _meshFeatures: meshFeatures,
12028
+ _meshBGL: meshBGL,
12029
+ _shadowBGL: shadowBGL,
12030
+ _composed: composed,
12031
+ _pipelines: /* @__PURE__ */ new Map()
12032
+ };
12033
+ if (resolvedStencil) {
12034
+ bindings._stencil = resolvedStencil._desc;
12035
+ }
12036
+ _bindingsCache$1.set(key, bindings);
12037
+ return bindings;
12038
+ }
12039
+ function getOrCreatePbrPipeline(engine, sig, bindings) {
12040
+ ensureDevice$2(engine);
12041
+ const key = targetSignatureKey(sig);
12042
+ const cached = bindings._pipelines.get(key);
12043
+ if (cached) {
12044
+ return cached;
12045
+ }
12046
+ const device = engine._device;
12047
+ const { _features: features, _features2: features2, _composed: composed } = bindings;
12048
+ const esmShadowOutput = (features2 & PBR2_ESM_SHADOW_OUTPUT) !== 0;
12049
+ const hasAlpha = !esmShadowOutput && (features & PBR_HAS_ALPHA_BLEND) !== 0;
12050
+ const hasDoubleSided = (features & PBR_HAS_DOUBLE_SIDED) !== 0;
12051
+ const sceneBGL = getSceneBindGroupLayout(engine);
12052
+ const bgls = bindings._shadowBGL ? [sceneBGL, bindings._meshBGL, bindings._shadowBGL] : [sceneBGL, bindings._meshBGL];
12053
+ const vertModule = device.createShaderModule({ code: composed._vertexWGSL });
12054
+ const noColorOutput = (features2 & PBR2_NO_COLOR_OUTPUT) !== 0;
12055
+ const fragModule = !sig._colorFormat && !noColorOutput ? null : device.createShaderModule({ code: composed._fragmentWGSL });
12056
+ const fragTarget = noColorOutput ? null : { format: sig._colorFormat, writeMask: CW$1.ALL };
12057
+ if (hasAlpha && fragTarget) {
12058
+ fragTarget.blend = {
12059
+ color: { srcFactor: "src-alpha", dstFactor: "one-minus-src-alpha", operation: "add" },
12060
+ alpha: { srcFactor: "one", dstFactor: "one", operation: "add" }
12061
+ };
12062
+ }
12063
+ const pipeline = device.createRenderPipeline({
12064
+ layout: device.createPipelineLayout({ bindGroupLayouts: bgls }),
12065
+ vertex: { module: vertModule, entryPoint: "main", buffers: composed._vertexBufferLayouts },
12066
+ ...fragModule ? { fragment: { module: fragModule, entryPoint: "main", targets: fragTarget ? [fragTarget] : [] } } : {},
12067
+ ...sig._depthStencilFormat ? {
12068
+ depthStencil: {
12069
+ format: sig._depthStencilFormat,
12070
+ depthCompare: sig._depthCompare ?? REVERSE_DEPTH_COMPARE,
12071
+ depthWriteEnabled: noColorOutput || esmShadowOutput || !hasAlpha,
12072
+ // Pre-baked stencil sub-fields, applied only on a stencil-capable target — the same
12073
+ // material in the depth32float shadow/depth pass keeps plain depth state (no stencil → no
12074
+ // format mismatch). Gated on `_stencilResolver` (the opt-in hook) so the entire branch —
12075
+ // including the `bindings._stencil` reads — folds out of stencil-free bundles.
12076
+ ..._stencilResolver$2 && bindings._stencil && sig._depthStencilFormat.includes("stencil") ? bindings._stencil : {}
12077
+ }
12078
+ } : {},
12079
+ multisample: { count: sig._sampleCount },
12080
+ primitive: { topology: "triangle-list", cullMode: hasDoubleSided ? "none" : "back", frontFace: "ccw" }
12081
+ });
12082
+ bindings._pipelines.set(key, pipeline);
12083
+ return pipeline;
12084
+ }
12085
+ function createPbrMeshBindGroup(engine, bindings, composed, meshUBO, materialUBO, material, env, meshCtx, refractionTexture) {
12086
+ const device = engine._device;
12087
+ const features = bindings._features;
12088
+ const features2 = bindings._features2;
12089
+ const meshFeatures = bindings._meshFeatures;
12090
+ const hasNormal = (features & PBR_HAS_NORMAL_MAP) !== 0 && (meshFeatures & MSH_HAS_TANGENTS) !== 0;
12091
+ const hasCotangentNormal = (features & PBR_HAS_NORMAL_MAP) !== 0 && (meshFeatures & MSH_HAS_TANGENTS) === 0;
12092
+ const hasAnyNormal = hasNormal || hasCotangentNormal;
12093
+ const hasEmissive = (features & PBR_HAS_EMISSIVE) !== 0;
12094
+ const hasSpecGloss = (features & PBR_HAS_SPEC_GLOSS) !== 0;
12095
+ const esmShadowOutput = (features2 & PBR2_ESM_SHADOW_OUTPUT) !== 0;
12096
+ const entries = [];
12097
+ let b = 0;
12098
+ const addTex = (t) => {
12099
+ entries.push({ binding: b++, resource: t.view });
12100
+ entries.push({ binding: b++, resource: t.sampler });
12101
+ };
12102
+ const ctx = {
12103
+ _engine: engine,
12104
+ _features: features,
12105
+ _features2: features2,
12106
+ _meshFeatures: meshFeatures,
12107
+ _material: material,
12108
+ _mesh: meshCtx ?? void 0,
12109
+ _env: env,
12110
+ _refractionTexture: refractionTexture
12111
+ };
12112
+ const sortedExts = _getPbrExtsSorted();
12113
+ const fragIds = composed._fragmentKey ? composed._fragmentKey.split("|").filter((s) => s.length > 0) : [];
12114
+ entries.push({ binding: b++, resource: { buffer: meshUBO } });
12115
+ entries.push({ binding: b++, resource: { buffer: materialUBO } });
12116
+ for (const ext of sortedExts) {
12117
+ if (ext.phase === "vertex" && ext.bind) {
12118
+ b = ext.bind(ctx, entries, b);
12119
+ }
12120
+ }
12121
+ addTex(material.baseColorTexture ?? (_pbrFallbackResolver == null ? void 0 : _pbrFallbackResolver(engine)));
12122
+ if (hasAnyNormal) {
12123
+ addTex(material.normalTexture);
12124
+ }
12125
+ addTex(material.ormTexture ?? (_pbrFallbackResolver == null ? void 0 : _pbrFallbackResolver(engine)));
12126
+ if ((features2 & PBR2_HAS_UV2) !== 0 && (meshFeatures & MSH_HAS_UV2) !== 0 && material.occlusionTexture) {
12127
+ addTex(material.occlusionTexture);
12128
+ }
12129
+ if (hasEmissive) {
12130
+ addTex(material.emissiveTexture);
12131
+ }
12132
+ if (hasSpecGloss) {
12133
+ addTex(material.specGlossTexture);
12134
+ }
12135
+ if (esmShadowOutput) {
12136
+ entries.push({
12137
+ binding: b++,
12138
+ resource: { buffer: material._esmShadowParamsUBO }
12139
+ });
12140
+ }
12141
+ const seenExts = [];
12142
+ for (const fid of fragIds) {
12143
+ const ext = sortedExts.find((e) => e.id === fid || fid.startsWith(e.id + "-"));
12144
+ if (!ext || ext.phase === "vertex" || !ext.bind || seenExts.includes(ext)) {
12145
+ continue;
12146
+ }
12147
+ seenExts.push(ext);
12148
+ b = ext.bind(ctx, entries, b);
12149
+ }
12150
+ return device.createBindGroup({ layout: bindings._meshBGL, entries });
12151
+ }
11919
12152
  const pbrGroupBuilder = async (scene, meshes) => {
11920
12153
  const envTex = scene._envTextures;
11921
- const renderableMod = await import("./pbr-renderable-CuKWalEM.js").then((n3) => n3.p);
12154
+ const renderableMod = await import("./pbr-renderable-B0elfRlX.js");
11922
12155
  const result = await renderableMod.buildPbrRenderables(scene, meshes, envTex);
11923
12156
  pbrGroupBuilder._rebuildSingle = result.rebuildSingle;
11924
12157
  return result;
@@ -11962,6 +12195,7 @@ function _computePbrMaterialFeatures(mat) {
11962
12195
  return { features, features2 };
11963
12196
  }
11964
12197
  function createPbrMaterial(props) {
12198
+ _installPbrFallbackResolver((engine) => engine._pbrFallbackTex ?? (engine._pbrFallbackTex = createSolidTexture2D(engine, 1, 1, 1)));
11965
12199
  const mat = {
11966
12200
  ...props,
11967
12201
  _buildGroup: pbrGroupBuilder,
@@ -12003,7 +12237,7 @@ const pbrMaterial = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
12003
12237
  pbrGroupBuilder
12004
12238
  }, Symbol.toStringTag, { value: "Module" }));
12005
12239
  const shaderGroupBuilder = async (scene, meshes) => {
12006
- const { buildShaderGroup } = await import("./shader-renderable-DVMVD6zP.js");
12240
+ const { buildShaderGroup } = await import("./shader-renderable-CUlJSove.js");
12007
12241
  const result = await buildShaderGroup(scene, meshes);
12008
12242
  shaderGroupBuilder._rebuildSingle = result.rebuildSingle;
12009
12243
  return result;
@@ -12688,11 +12922,11 @@ const SENTINEL_FRONT_FACING = "_NME_FRONT_FACING_";
12688
12922
  const SENTINEL_FRAG_COORD = "_NME_FRAG_COORD_";
12689
12923
  const SENTINEL_SCREEN_SIZE = "_NME_SCREEN_SIZE_";
12690
12924
  let _cache$2 = null;
12691
- let _cachedDevice$2 = null;
12925
+ let _cachedDevice$3 = null;
12692
12926
  function getCache(engine) {
12693
- if (!_cache$2 || _cachedDevice$2 !== engine._device) {
12927
+ if (!_cache$2 || _cachedDevice$3 !== engine._device) {
12694
12928
  _cache$2 = /* @__PURE__ */ new Map();
12695
- _cachedDevice$2 = engine._device;
12929
+ _cachedDevice$3 = engine._device;
12696
12930
  }
12697
12931
  return _cache$2;
12698
12932
  }
@@ -13050,12 +13284,12 @@ async function parseNodeMaterialFromSnippet(engine, snippetId, options = {}) {
13050
13284
  let envHelpers = null;
13051
13285
  let _envEmitter;
13052
13286
  if (state.usesEnv) {
13053
- envHelpers = await import("./node-env-D7Aee08u.js");
13287
+ envHelpers = await import("./node-env-B-Ca2DL0.js");
13054
13288
  _envEmitter = envHelpers.emitEnv;
13055
13289
  }
13056
13290
  let _shadowEmitter;
13057
13291
  if (options.shadowGenerators && options.shadowGenerators.length > 0) {
13058
- _shadowEmitter = (await import("./node-shadow-CeTmT6g4.js")).emitShadow;
13292
+ _shadowEmitter = (await import("./node-shadow-DE--Q2V1.js")).emitShadow;
13059
13293
  }
13060
13294
  const compile = compileNodePipeline(state, vertexWgsl, fragmentWgsl, {
13061
13295
  _engine: engine,
@@ -13144,7 +13378,7 @@ async function parseNodeMaterialFromSnippet(engine, snippetId, options = {}) {
13144
13378
  inputs[tb._name] = handle;
13145
13379
  }
13146
13380
  const _buildGroup = async (scene, meshes) => {
13147
- const { buildNodeMeshRenderables } = await import("./node-renderable-EwLLnaL1.js");
13381
+ const { buildNodeMeshRenderables } = await import("./node-renderable-BOIc3hM1.js");
13148
13382
  const result = buildNodeMeshRenderables(scene, meshes);
13149
13383
  _buildGroup._rebuildSingle = result.rebuildSingle;
13150
13384
  return result;
@@ -13184,7 +13418,7 @@ async function resolvePbrMrHelpers(state) {
13184
13418
  if (state.pbrMrHelperRequests.some((request) => !isCorePbrMrRequest(request))) {
13185
13419
  throw new Error("NodeMaterial: advanced PBR-MR helper request must be emitted by the full PBR-MR block");
13186
13420
  }
13187
- const core = await import("./pbr-mr-helper-core-CWROQ7OA.js");
13421
+ const core = await import("./pbr-mr-helper-core-XeyKg-g6.js");
13188
13422
  for (const request of state.pbrMrHelperRequests) {
13189
13423
  state.fragment.helpers.set(request.key, core.buildPbrMrHelperCore(request));
13190
13424
  }
@@ -13302,7 +13536,7 @@ function hasBlockEmitter(key) {
13302
13536
  function baseBlockLoader(key) {
13303
13537
  switch (key) {
13304
13538
  case "InputBlock":
13305
- return () => import("./input-block-DjdlndCL.js");
13539
+ return () => import("./input-block-DfFVJB-8.js");
13306
13540
  case "VectorMergerBlock":
13307
13541
  return () => import("./vector-merger-CrW-ONB0.js");
13308
13542
  case "FragmentOutputBlock":
@@ -13334,7 +13568,7 @@ function baseBlockLoader(key) {
13334
13568
  case "LerpBlock":
13335
13569
  return () => import("./lerp-block-DjI2SfmI.js");
13336
13570
  case "ClampBlock":
13337
- return () => import("./clamp-block-BD_t8I89.js");
13571
+ return () => import("./clamp-block-Bupvx5sX.js");
13338
13572
  case "SmoothStepBlock":
13339
13573
  return () => import("./smoothstep-block-Di4t37x-.js");
13340
13574
  case "RemapBlock":
@@ -13358,7 +13592,7 @@ function baseBlockLoader(key) {
13358
13592
  case "ViewDirectionBlock":
13359
13593
  return () => import("./view-direction-CWVucfnT.js");
13360
13594
  case "LightBlock":
13361
- return () => import("./light-block-qjCrz3de.js");
13595
+ return () => import("./light-block-othUHIHC.js");
13362
13596
  case "LightInformationBlock":
13363
13597
  return () => import("./light-information-VJbW0jbs.js");
13364
13598
  case "FogBlock":
@@ -13378,9 +13612,9 @@ function baseBlockLoader(key) {
13378
13612
  case "ReflectionTextureBlock":
13379
13613
  return () => import("./reflection-texture-block-C3QtzoV8.js");
13380
13614
  case "PBRMetallicRoughnessBlock":
13381
- return () => import("./pbr-metallic-roughness-block-g7wjzwN_.js");
13615
+ return () => import("./pbr-metallic-roughness-block-C7s1jL4q.js");
13382
13616
  case "PBRMetallicRoughnessBlock__full":
13383
- return () => import("./pbr-metallic-roughness-block-full-DD6zI_Lx.js");
13617
+ return () => import("./pbr-metallic-roughness-block-full-BuhhVBFO.js");
13384
13618
  case "ReflectionBlock":
13385
13619
  return () => import("./reflection-block-DqcwyYqr.js");
13386
13620
  case "ClearCoatBlock":
@@ -13422,7 +13656,7 @@ function extraRegistryLoader(key) {
13422
13656
  case "CurveBlock":
13423
13657
  case "WaveBlock":
13424
13658
  case "RandomNumberBlock":
13425
- return () => import("./node-registry-extra-math-BA8_l4lB.js");
13659
+ return () => import("./node-registry-extra-math-Bsj4UAE5.js");
13426
13660
  case "ColorMergerBlock":
13427
13661
  case "ColorConverterBlock":
13428
13662
  case "DesaturateBlock":
@@ -13465,7 +13699,7 @@ function extraRegistryLoader(key) {
13465
13699
  case "LoopBlock":
13466
13700
  case "StorageReadBlock":
13467
13701
  case "StorageWriteBlock":
13468
- return () => import("./node-registry-extra-compat-CDLeBR1P.js");
13702
+ return () => import("./node-registry-extra-compat-SwS962Ax.js");
13469
13703
  default:
13470
13704
  return null;
13471
13705
  }
@@ -13477,7 +13711,7 @@ const nodeRegistry = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.define
13477
13711
  }, Symbol.toStringTag, { value: "Module" }));
13478
13712
  async function loadNodeBlockEmitterWithGeometry(className) {
13479
13713
  if (className === "GeometryTextureOutputBlock") {
13480
- return (await import("./geometry-texture-output-DURiaJ_n.js")).emitter;
13714
+ return (await import("./geometry-texture-output-DSeH_3G_.js")).emitter;
13481
13715
  }
13482
13716
  return loadBlockEmitter(className);
13483
13717
  }
@@ -13550,7 +13784,7 @@ function rebuildSceneMesh(ctx, mesh) {
13550
13784
  }
13551
13785
  ctx._renderables.splice(i, 0, renderable);
13552
13786
  }
13553
- const STAGE_FRAGMENT$1 = 2;
13787
+ const STAGE_FRAGMENT$3 = 2;
13554
13788
  const STD_PLUGIN_UBO = "pluginUbo";
13555
13789
  const FRAG_POINT_TO_SLOTS = {
13556
13790
  CUSTOM_FRAGMENT_MAIN_BEGIN: ["SV"],
@@ -13637,8 +13871,8 @@ function buildPluginFragment(plugins, index, forStandard) {
13637
13871
  if (samplers) {
13638
13872
  for (const s of samplers) {
13639
13873
  bindings.push(
13640
- { _name: s.texture, _type: { _kind: "texture", _textureType: s.textureType ?? "texture_2d<f32>" }, _visibility: STAGE_FRAGMENT$1 },
13641
- { _name: s.sampler, _type: { _kind: "sampler", _samplerType: s.samplerType ?? "sampler" }, _visibility: STAGE_FRAGMENT$1 }
13874
+ { _name: s.texture, _type: { _kind: "texture", _textureType: s.textureType ?? "texture_2d<f32>" }, _visibility: STAGE_FRAGMENT$3 },
13875
+ { _name: s.sampler, _type: { _kind: "sampler", _samplerType: s.samplerType ?? "sampler" }, _visibility: STAGE_FRAGMENT$3 }
13642
13876
  );
13643
13877
  }
13644
13878
  }
@@ -13651,7 +13885,7 @@ function buildPluginFragment(plugins, index, forStandard) {
13651
13885
  ${stdUboSpec._structBody}
13652
13886
  }
13653
13887
  ` + helpers;
13654
- bindings.unshift({ _name: STD_PLUGIN_UBO, _type: { _kind: "uniform-buffer" }, _group: "mesh", _visibility: STAGE_FRAGMENT$1 });
13888
+ bindings.unshift({ _name: STD_PLUGIN_UBO, _type: { _kind: "uniform-buffer" }, _group: "mesh", _visibility: STAGE_FRAGMENT$3 });
13655
13889
  stdUboFields = void 0;
13656
13890
  }
13657
13891
  return {
@@ -13918,13 +14152,956 @@ function enableMaterialPlugins(scene) {
13918
14152
  registerPbrPlugins(_registerPbrExt);
13919
14153
  registerStdPlugins(scene.meshes, scene.surface.engine, _registerStdExt);
13920
14154
  }
14155
+ function _resolveStencil(stencil) {
14156
+ const op = {
14157
+ compare: stencil.compare ?? "always",
14158
+ passOp: stencil.passOp ?? "keep",
14159
+ failOp: stencil.failOp ?? "keep",
14160
+ depthFailOp: stencil.depthFailOp ?? "keep"
14161
+ };
14162
+ const readMask = stencil.readMask ?? 255;
14163
+ const writeMask = stencil.writeMask ?? 255;
14164
+ return {
14165
+ // Front and back share the same ops object — GPUStencilFaceState is read by value at pipeline creation.
14166
+ _desc: { stencilFront: op, stencilBack: op, stencilReadMask: readMask, stencilWriteMask: writeMask },
14167
+ _key: `st:${op.compare}:${op.passOp}:${op.failOp}:${op.depthFailOp}:${readMask}:${writeMask}`
14168
+ };
14169
+ }
14170
+ const WGSL_PERTURB_NORMAL = `
14171
+ fn perturbNormal(vNormalW: vec3<f32>, positionW: vec3<f32>, uv: vec2<f32>, bumpScale: f32) -> vec3<f32> {
14172
+ let normalSample = textureSample(bT, bS, uv).rgb * 2.0 - 1.0;
14173
+ let N = normalize(vNormalW) * bumpScale;
14174
+ let dp1 = dpdx(positionW);
14175
+ let dp2 = -dpdy(positionW);
14176
+ let duv1 = dpdx(uv);
14177
+ let duv2 = -dpdy(uv);
14178
+ let dp2perp = cross(dp2, N);
14179
+ let dp1perp = cross(N, dp1);
14180
+ var tangent = dp2perp * duv1.x + dp1perp * duv2.x;
14181
+ var bitangent = dp2perp * duv1.y + dp1perp * duv2.y;
14182
+ let det = max(dot(tangent, tangent), dot(bitangent, bitangent));
14183
+ let invmax = select(inverseSqrt(det), 0.0, det == 0.0);
14184
+ let cotangentFrame = mat3x3<f32>(tangent * invmax, bitangent * invmax, N);
14185
+ return normalize(cotangentFrame * normalSample);
14186
+ }
14187
+ `;
14188
+ const WGSL_FOG = `
14189
+ const E_FOG: f32 = 2.71828;
14190
+ fn calcFogFactor(fogDistance: vec3<f32>) -> f32 {
14191
+ var fogCoeff: f32 = 1.0;
14192
+ let fogMode = scene.vFogInfos.x;
14193
+ let fogStart = scene.vFogInfos.y;
14194
+ let fogEnd = scene.vFogInfos.z;
14195
+ let fogDensity = scene.vFogInfos.w;
14196
+ let dist = length(fogDistance);
14197
+ if (fogMode == 3.0) { fogCoeff = (fogEnd - dist) / (fogEnd - fogStart); }
14198
+ else if (fogMode == 1.0) { fogCoeff = 1.0 / pow(E_FOG, dist * fogDensity); }
14199
+ else if (fogMode == 2.0) { fogCoeff = 1.0 / pow(E_FOG, dist * dist * fogDensity * fogDensity); }
14200
+ return clamp(fogCoeff, 0.0, 1.0);
14201
+ }
14202
+ `;
14203
+ const WGSL_DITHER = `
14204
+ fn dither(seed: vec2<f32>, varianceAmount: f32) -> f32 {
14205
+ let rand = fract(sin(dot(seed, vec2<f32>(12.9898, 78.233))) * 43758.5453);
14206
+ let normVariance = varianceAmount / 255.0;
14207
+ return mix(-normVariance, normVariance, rand);
14208
+ }
14209
+ `;
14210
+ const WGSL_NO_DITHER = "fn dither(a:vec2<f32>,b:f32)->f32{return 0.0;}";
14211
+ const STAGE_VERTEX$2 = 1;
14212
+ const STAGE_FRAGMENT$2 = 2;
14213
+ const LIGHTING_FN = `
14214
+ fn computeLighting(viewDir: vec3<f32>, N: vec3<f32>, L: LightEntry, g: f32, P: vec3<f32>) -> array<vec3<f32>, 2> {
14215
+ var lv: vec3<f32>;
14216
+ var a: f32 = 1.0;
14217
+ let t = u32(L.vLightData.w);
14218
+ if (t == 3u) {
14219
+ let nl = 0.5 + 0.5 * dot(N, normalize(L.vLightData.xyz));
14220
+ let diff = mix(L.vLightDirection.xyz, L.vLightDiffuse.rgb, nl);
14221
+ let h = normalize(viewDir + normalize(L.vLightData.xyz));
14222
+ var s = pow(max(0.0, dot(N, h)), max(1.0, g));
14223
+ return array<vec3<f32>, 2>(diff, s * L.vLightSpecular.rgb);
14224
+ }
14225
+ if (t == 1u) {
14226
+ lv = normalize(-L.vLightData.xyz);
14227
+ } else {
14228
+ let d = L.vLightData.xyz - P;
14229
+ a = max(0.0, 1.0 - length(d) / L.vLightDiffuse.a);
14230
+ lv = normalize(d);
14231
+ if (t == 2u) {
14232
+ let c = max(0.0, dot(L.vLightDirection.xyz, -lv));
14233
+ if (c >= L.vLightDirection.w) { a *= max(0.0, pow(c, L.vLightSpecular.a)); } else { a = 0.0; }
14234
+ }
14235
+ }
14236
+ let nl = max(0.0, dot(N, lv));
14237
+ let diff = nl * L.vLightDiffuse.rgb * a;
14238
+ let h = normalize(viewDir + lv);
14239
+ var s = max(0.0, dot(N, h));
14240
+ s = pow(s, max(1.0, g));
14241
+ return array<vec3<f32>, 2>(diff, s * L.vLightSpecular.rgb * a);
14242
+ }
14243
+ `;
14244
+ function createStandardTemplate(config, esmShadowDepthCode = "") {
14245
+ const { _diffuse, _needsUV, _needsUV2, _diffuseUsesUV2, _disableLighting, _noColorOutput, _esmShadowOutput } = config;
14246
+ const _baseVertexAttributes = [
14247
+ { _name: "position", _type: "vec3<f32>", _gpuFormat: "float32x3", _arrayStride: 12 },
14248
+ { _name: "normal", _type: "vec3<f32>", _gpuFormat: "float32x3", _arrayStride: 12 }
14249
+ ];
14250
+ if (_needsUV) {
14251
+ _baseVertexAttributes.push({ _name: "uv", _type: "vec2<f32>", _gpuFormat: "float32x2", _arrayStride: 8 });
14252
+ }
14253
+ if (_needsUV2) {
14254
+ _baseVertexAttributes.push({ _name: "uv2", _type: "vec2<f32>", _gpuFormat: "float32x2", _arrayStride: 8 });
14255
+ }
14256
+ const _baseVaryings = [
14257
+ { _name: "vp", _type: "vec3<f32>" },
14258
+ { _name: "vn", _type: "vec3<f32>" },
14259
+ { _name: "vf", _type: "vec3<f32>" }
14260
+ ];
14261
+ if (_needsUV) {
14262
+ _baseVaryings.push({ _name: "vu", _type: "vec2<f32>" });
14263
+ }
14264
+ if (_needsUV2) {
14265
+ _baseVaryings.push({ _name: "vv", _type: "vec2<f32>" });
14266
+ }
14267
+ const _baseMeshUboFields = [{ _name: "world", _type: "mat4x4<f32>" }];
14268
+ appendMeshLightUboFields(_baseMeshUboFields);
14269
+ const _baseBindings = [{ _name: "mat", _type: { _kind: "uniform-buffer" }, _visibility: STAGE_FRAGMENT$2 }];
14270
+ if (_diffuse) {
14271
+ _baseBindings.push(
14272
+ { _name: "dT", _type: { _kind: "texture", _textureType: "texture_2d<f32>" }, _visibility: STAGE_FRAGMENT$2 },
14273
+ { _name: "dS", _type: { _kind: "sampler", _samplerType: "sampler" }, _visibility: STAGE_FRAGMENT$2 }
14274
+ );
14275
+ }
14276
+ if (_needsUV) {
14277
+ _baseBindings.push({ _name: "up", _type: { _kind: "uniform-buffer" }, _visibility: STAGE_VERTEX$2 });
14278
+ }
14279
+ if (_esmShadowOutput) {
14280
+ _baseBindings.push({ _name: "shadowParams", _type: { _kind: "uniform-buffer" }, _visibility: STAGE_FRAGMENT$2 });
14281
+ }
14282
+ const uvPassthrough = _needsUV ? `out.vu = uv * up.u.xy + up.u.zw;` : "";
14283
+ const uv2Passthrough = _needsUV2 ? `out.vv = uv2;` : "";
14284
+ const vertexUboStructs = _needsUV ? `struct upUniforms { u: vec4<f32>, }` : "";
14285
+ const _vertexTemplate = `/*SU*/
14286
+ /*MU*/
14287
+ @group(1) @binding(0) var<uniform> mesh: MeshUniforms;
14288
+ ${vertexUboStructs}
14289
+ /*VH*/
14290
+ /*VD*/
14291
+ /*VO*/
14292
+ @vertex fn main(
14293
+ /*VP*/
14294
+ ) -> VertexOutput {
14295
+ var out: VertexOutput;
14296
+ /*VR*/
14297
+ var finalWorld = mesh.world;
14298
+ /*VW*/
14299
+ let worldPos4 = finalWorld * vec4<f32>(position, 1.0);
14300
+ out.vp = worldPos4.xyz;
14301
+ let normalWorld = mat3x3<f32>(finalWorld[0].xyz, finalWorld[1].xyz, finalWorld[2].xyz);
14302
+ out.vn = normalize(normalWorld * normal);
14303
+ out.clipPos = scene.viewProjection * worldPos4;
14304
+ out.vf = (scene.view * worldPos4).xyz;
14305
+ ${uvPassthrough}
14306
+ ${uv2Passthrough}
14307
+ /*VB*/
14308
+ return out;
14309
+ }`;
14310
+ const lightsStructs = `
14311
+ struct LightEntry { vLightData: vec4<f32>, vLightDiffuse: vec4<f32>, vLightSpecular: vec4<f32>, vLightDirection: vec4<f32> };
14312
+ struct lightsUniforms { count: u32, _p0: u32, _p1: u32, _p2: u32, lights: array<LightEntry, ${MAX_LIGHTS}> };
14313
+ @group(0) @binding(1) var<uniform> lights: lightsUniforms;
14314
+ `;
14315
+ const materialStruct = `
14316
+ struct matUniforms {
14317
+ dc: vec4<f32>,
14318
+ sc: vec4<f32>,
14319
+ ec: vec3<f32>,
14320
+ bs: f32,
14321
+ ac: vec3<f32>,
14322
+ tl: f32,
14323
+ ambTexLvl: f32,
14324
+ lmLvl: f32,
14325
+ opLvl: f32,
14326
+ aCut: f32,
14327
+ rLvl: f32,
14328
+ rCm: f32,
14329
+ _0: f32,
14330
+ _1: f32,
14331
+ };
14332
+ `;
14333
+ const helpers = _disableLighting ? WGSL_FOG : WGSL_FOG + LIGHTING_FN;
14334
+ const doubleSidedEntry = `@fragment fn main(input: FragmentInput)${_noColorOutput ? "" : " -> @location(0) vec4<f32>"} {`;
14335
+ const viewDirCode = !_disableLighting ? `let viewDirectionW = normalize(scene.vEyePosition.xyz - input.vp);` : "";
14336
+ const normalCode = _disableLighting ? "" : `var normalW = normalize(input.vn);`;
14337
+ const opacityCode = `var alpha = mat.dc.a;`;
14338
+ const baseColorCode = _diffuse ? `let _ds = textureSample(dT, dS, ${_diffuseUsesUV2 ? "input.vv" : "input.vu"});
14339
+ if (_ds.a < mat.aCut) { discard; }
14340
+ var baseColor = _ds.rgb * mat.tl;` : `var baseColor = vec3<f32>(1.0, 1.0, 1.0);`;
14341
+ const diffuseColorCode = `let diffuseColor = mat.dc.rgb;`;
14342
+ const emissiveCode = `var emissiveContrib = mat.ec;`;
14343
+ const specularColorCode = !_disableLighting ? `var specularColor = mat.sc.rgb;` : "";
14344
+ let lightingBlock;
14345
+ if (!_disableLighting) {
14346
+ lightingBlock = `var glossiness = mat.sc.a;
14347
+ var diffuseBase = vec3<f32>(0.0);
14348
+ var specularBase = vec3<f32>(0.0);
14349
+ var shadowFactors = array<f32, ${MAX_LIGHTS}>(${new Array(MAX_LIGHTS).fill("1.0").join(", ")});
14350
+ var baseAmbientColor = vec3<f32>(1.0, 1.0, 1.0);
14351
+ var reflectionColor = vec3<f32>(0.0);
14352
+ let lc = min(mesh.lc, ${MAX_LIGHTS}u);
14353
+ /*AD*/
14354
+ for (var li = 0u; li < lc; li++) {
14355
+ let lightIndex = mli(li);
14356
+ let r = computeLighting(viewDirectionW, normalW, lights.lights[lightIndex], glossiness, input.vp);
14357
+ let sf = shadowFactors[lightIndex];
14358
+ diffuseBase += r[0] * sf;
14359
+ specularBase += r[1] * sf;
14360
+ }
14361
+ let finalDiffuse = clamp(diffuseBase * diffuseColor + emissiveContrib + mat.ac, vec3<f32>(0.0), vec3<f32>(1.0)) * baseColor;
14362
+ let finalSpecular = specularBase * specularColor;
14363
+ var color = vec4<f32>(finalDiffuse * baseAmbientColor + finalSpecular + reflectionColor, alpha);`;
14364
+ } else {
14365
+ lightingBlock = `var color = vec4<f32>(clamp(emissiveContrib * diffuseColor, vec3<f32>(0.0), vec3<f32>(1.0)) * baseColor, alpha);`;
14366
+ }
14367
+ const _fragmentTemplate = `/*SU*/
14368
+ ${lightsStructs}
14369
+ ${materialStruct}
14370
+ ${_esmShadowOutput ? "struct shadowParamsUniforms { biasAndScale: vec4<f32>, depthValues: vec4<f32>, }" : ""}
14371
+ /*MU*/
14372
+ @group(1) @binding(0) var<uniform> mesh: MeshUniforms;
14373
+ ${!_disableLighting ? meshLightIndexWGSL("mesh") : ""}
14374
+ ${helpers}
14375
+ /*HF*/
14376
+ /*FB*/
14377
+ /*FI*/
14378
+ ${doubleSidedEntry}
14379
+ /*SV*/
14380
+ ${viewDirCode}
14381
+ ${normalCode}
14382
+ /*AC*/
14383
+ ${opacityCode}
14384
+ ${baseColorCode}
14385
+ ${diffuseColorCode}
14386
+ ${emissiveCode}
14387
+ ${specularColorCode}
14388
+ /*AT*/
14389
+ ${_noColorOutput ? "return;" : _esmShadowOutput ? esmShadowDepthCode : ""}
14390
+ ${lightingBlock}
14391
+ /*BC*/
14392
+ color = vec4<f32>(max(color.rgb, vec3<f32>(0.0)), color.a);
14393
+ if (scene.vFogInfos.x > 0.0) {
14394
+ let fog = calcFogFactor(input.vf);
14395
+ color = vec4<f32>(mix(scene.vFogColor.rgb, color.rgb, fog), color.a);
14396
+ }
14397
+ /*BA*/
14398
+ ${_noColorOutput ? "" : "return color;"}
14399
+ }`;
14400
+ return {
14401
+ _vertexTemplate,
14402
+ _fragmentTemplate,
14403
+ _baseMeshUboFields,
14404
+ _baseVertexAttributes,
14405
+ _baseVaryings,
14406
+ _baseBindings
14407
+ };
14408
+ }
14409
+ const STAGE_VERTEX$1 = 1;
14410
+ const STAGE_FRAGMENT$1 = 2;
14411
+ function topoSort(fragments) {
14412
+ const byId = /* @__PURE__ */ new Map();
14413
+ for (const f of fragments) {
14414
+ if (byId.has(f._id)) {
14415
+ throw Error();
14416
+ }
14417
+ byId.set(f._id, f);
14418
+ }
14419
+ const inDeg = /* @__PURE__ */ new Map();
14420
+ const deps = /* @__PURE__ */ new Map();
14421
+ for (const f of fragments) {
14422
+ if (!inDeg.has(f._id)) {
14423
+ inDeg.set(f._id, 0);
14424
+ }
14425
+ for (const d of f._dependencies ?? []) {
14426
+ if (!byId.has(d)) {
14427
+ throw Error();
14428
+ }
14429
+ inDeg.set(f._id, (inDeg.get(f._id) ?? 0) + 1);
14430
+ let arr = deps.get(d);
14431
+ if (!arr) {
14432
+ arr = [];
14433
+ deps.set(d, arr);
14434
+ }
14435
+ arr.push(f._id);
14436
+ }
14437
+ }
14438
+ const q = [];
14439
+ for (const [id, d] of inDeg) {
14440
+ if (d === 0) {
14441
+ q.push(id);
14442
+ }
14443
+ }
14444
+ q.sort();
14445
+ const out = [];
14446
+ let qi = 0;
14447
+ while (qi < q.length) {
14448
+ const id = q[qi++];
14449
+ out.push(byId.get(id));
14450
+ for (const d of deps.get(id) ?? []) {
14451
+ const nd = (inDeg.get(d) ?? 1) - 1;
14452
+ inDeg.set(d, nd);
14453
+ if (nd === 0) {
14454
+ let i = qi;
14455
+ while (i < q.length && q[i] < d) {
14456
+ i++;
14457
+ }
14458
+ q.splice(i, 0, d);
14459
+ }
14460
+ }
14461
+ }
14462
+ if (out.length !== fragments.length) {
14463
+ throw Error();
14464
+ }
14465
+ return out;
14466
+ }
14467
+ function dedup(base, extra) {
14468
+ const seen = /* @__PURE__ */ new Set();
14469
+ const all = [];
14470
+ for (const v2 of base) {
14471
+ if (!seen.has(v2._name)) {
14472
+ seen.add(v2._name);
14473
+ all.push(v2);
14474
+ }
14475
+ }
14476
+ for (const v2 of extra) {
14477
+ if (!seen.has(v2._name)) {
14478
+ seen.add(v2._name);
14479
+ all.push(v2);
14480
+ }
14481
+ }
14482
+ return all;
14483
+ }
14484
+ function bglEntry(binding, decl) {
14485
+ const e = { binding, visibility: decl._visibility };
14486
+ switch (decl._type._kind) {
14487
+ case "uniform-buffer":
14488
+ e.buffer = { type: "uniform" };
14489
+ break;
14490
+ case "texture": {
14491
+ const def = decl._type._textureType === "texture_depth_2d" ? "depth" : decl._type._textureType === "texture_2d<u32>" ? "uint" : "float";
14492
+ e.texture = {
14493
+ sampleType: decl._type._sampleType ?? def,
14494
+ viewDimension: decl._type._textureType.includes("array") ? "2d-array" : decl._type._textureType.includes("cube") ? "cube" : "2d"
14495
+ };
14496
+ break;
14497
+ }
14498
+ case "sampler":
14499
+ e.sampler = {
14500
+ type: decl._type._samplerType === "sampler_comparison" ? "comparison" : decl._type._samplerType === "sampler_non_filtering" ? "non-filtering" : "filtering"
14501
+ };
14502
+ break;
14503
+ case "storage-texture":
14504
+ e.storageTexture = { access: decl._type._access, format: decl._type._format };
14505
+ break;
14506
+ }
14507
+ return e;
14508
+ }
14509
+ function declWGSL(g, b, d) {
14510
+ switch (d._type._kind) {
14511
+ case "uniform-buffer":
14512
+ return `@group(${g})@binding(${b}) var<uniform> ${d._name}:${d._name}Uniforms;`;
14513
+ case "texture":
14514
+ return `@group(${g})@binding(${b}) var ${d._name}:${d._type._textureType};`;
14515
+ case "sampler":
14516
+ return `@group(${g})@binding(${b}) var ${d._name}:${d._type._samplerType === "sampler_non_filtering" ? "sampler" : d._type._samplerType};`;
14517
+ case "storage-texture":
14518
+ return `@group(${g})@binding(${b}) var ${d._name}:texture_storage_2d<${d._type._format},${d._type._access}>;`;
14519
+ }
14520
+ }
14521
+ const SLOT_RE = /\/\*([A-Z_0-9]+)\*\//g;
14522
+ function injectSlots(tpl, sorted, key) {
14523
+ return tpl.replace(SLOT_RE, (_, slot) => {
14524
+ const parts = [];
14525
+ for (const f of sorted) {
14526
+ const s = f[key];
14527
+ if (s == null ? void 0 : s[slot]) {
14528
+ parts.push(s[slot]);
14529
+ }
14530
+ }
14531
+ return parts.join("\n");
14532
+ });
14533
+ }
14534
+ function composeShader(template, fragments) {
14535
+ var _a;
14536
+ const sorted = topoSort(fragments);
14537
+ const fragAttrs = [];
14538
+ const fragVaryings = [];
14539
+ const helpers = [];
14540
+ const vHelpers = [];
14541
+ const vBuiltins = [];
14542
+ for (const f of sorted) {
14543
+ if (f._vertexAttributes) {
14544
+ fragAttrs.push(...f._vertexAttributes);
14545
+ }
14546
+ if (f._varyings) {
14547
+ fragVaryings.push(...f._varyings);
14548
+ }
14549
+ if (f._helperFunctions) {
14550
+ helpers.push(f._helperFunctions);
14551
+ }
14552
+ if (f._vertexHelperFunctions) {
14553
+ vHelpers.push(f._vertexHelperFunctions);
14554
+ }
14555
+ for (const b of f._vertexBuiltins ?? []) {
14556
+ vBuiltins.push(`@builtin(${b._builtin}) ${b._name}:${b._type},`);
14557
+ }
14558
+ }
14559
+ const allAttrs = dedup(template._baseVertexAttributes, fragAttrs);
14560
+ const inputLines = [];
14561
+ const _vertexBufferLayouts = [];
14562
+ const groups = /* @__PURE__ */ new Map();
14563
+ const firstOfGroup = /* @__PURE__ */ new Map();
14564
+ for (let i = 0; i < allAttrs.length; i++) {
14565
+ const a = allAttrs[i];
14566
+ inputLines.push(`@location(${i}) ${a._name}:${a._type},`);
14567
+ if (a._bufferGroup) {
14568
+ if (!groups.has(a._bufferGroup)) {
14569
+ groups.set(a._bufferGroup, []);
14570
+ firstOfGroup.set(a._bufferGroup, a);
14571
+ }
14572
+ groups.get(a._bufferGroup).push({ loc: i, off: a._offset ?? 0, fmt: a._gpuFormat });
14573
+ } else {
14574
+ _vertexBufferLayouts.push({
14575
+ arrayStride: a._arrayStride,
14576
+ stepMode: a._stepMode ?? "vertex",
14577
+ attributes: [{ shaderLocation: i, offset: a._offset ?? 0, format: a._gpuFormat }]
14578
+ });
14579
+ }
14580
+ }
14581
+ for (const [grp, attrs] of groups) {
14582
+ const f = firstOfGroup.get(grp);
14583
+ _vertexBufferLayouts.push({
14584
+ arrayStride: f._arrayStride,
14585
+ stepMode: f._stepMode ?? "vertex",
14586
+ attributes: attrs.map((a) => ({ shaderLocation: a.loc, offset: a.off, format: a.fmt }))
14587
+ });
14588
+ }
14589
+ let nextLoc = allAttrs.length;
14590
+ for (const f of sorted) {
14591
+ if (f._pipelineVertexBuffers) {
14592
+ const r = f._pipelineVertexBuffers(nextLoc);
14593
+ _vertexBufferLayouts.push(...r._buffers);
14594
+ nextLoc = r._nextLoc;
14595
+ }
14596
+ }
14597
+ const allVary = dedup(template._baseVaryings, fragVaryings);
14598
+ const varyBody = `@builtin(position) clipPos:vec4f,
14599
+ ` + allVary.map((v2, i) => `@location(${i}) ${v2._name}:${v2._type},`).join("\n");
14600
+ const hasMaterialUbo = !!(template._baseMaterialUboFields && template._baseMaterialUboFields.length > 0);
14601
+ const meshFields = [...template._baseMeshUboFields];
14602
+ const materialFields = hasMaterialUbo ? [...template._baseMaterialUboFields] : [];
14603
+ for (const f of sorted) {
14604
+ if ((_a = f._uboFields) == null ? void 0 : _a.length) {
14605
+ (hasMaterialUbo ? materialFields : meshFields).push(...f._uboFields);
14606
+ }
14607
+ }
14608
+ const _meshUboSpec = computeUboLayout(meshFields);
14609
+ const _materialUboSpec = hasMaterialUbo ? computeUboLayout(materialFields) : void 0;
14610
+ const meshBGL = [{ binding: 0, visibility: STAGE_VERTEX$1 | STAGE_FRAGMENT$1, buffer: { type: "uniform" } }];
14611
+ if (hasMaterialUbo) {
14612
+ meshBGL.push({ binding: 1, visibility: STAGE_FRAGMENT$1, buffer: { type: "uniform" } });
14613
+ }
14614
+ const shadowBGL = [];
14615
+ const vDecls = [];
14616
+ const fDecls = [];
14617
+ let mb = hasMaterialUbo ? 2 : 1, sb = 0;
14618
+ function addBinding(d, _isVertex) {
14619
+ const isShadow = d._group === "shadow";
14620
+ const b = isShadow ? sb++ : mb++;
14621
+ const g = isShadow ? 2 : 1;
14622
+ (isShadow ? shadowBGL : meshBGL).push(bglEntry(b, d));
14623
+ const w = declWGSL(g, b, d);
14624
+ if (d._visibility & STAGE_VERTEX$1) {
14625
+ vDecls.push(w);
14626
+ }
14627
+ if (d._visibility & STAGE_FRAGMENT$1) {
14628
+ fDecls.push(w);
14629
+ }
14630
+ }
14631
+ for (const d of template._baseVertexBindings ?? []) {
14632
+ addBinding(d);
14633
+ }
14634
+ for (const f of sorted) {
14635
+ for (const d of f._vertexBindings ?? []) {
14636
+ addBinding(d);
14637
+ }
14638
+ }
14639
+ for (const d of template._baseBindings ?? []) {
14640
+ addBinding(d);
14641
+ }
14642
+ for (const f of sorted) {
14643
+ for (const d of (f._bindings ?? []).filter((b) => (b._group ?? "mesh") === "mesh")) {
14644
+ addBinding(d);
14645
+ }
14646
+ }
14647
+ for (const f of sorted) {
14648
+ for (const d of (f._bindings ?? []).filter((b) => b._group === "shadow")) {
14649
+ addBinding(d);
14650
+ }
14651
+ }
14652
+ const _fragmentKey = sorted.map((f) => f._id).join("|");
14653
+ const vParams = (vBuiltins.length ? vBuiltins.join("\n") + "\n" : "") + inputLines.join("\n");
14654
+ const meshStruct = `struct MeshUniforms{
14655
+ ${_meshUboSpec._structBody}
14656
+ }`;
14657
+ const materialStruct = _materialUboSpec ? `
14658
+ struct MaterialUniforms{
14659
+ ${_materialUboSpec._structBody}
14660
+ }
14661
+ @group(1)@binding(1) var<uniform> material:MaterialUniforms;` : "";
14662
+ let _vertexWGSL = template._vertexTemplate;
14663
+ _vertexWGSL = _vertexWGSL.replace("/*SU*/", SCENE_UBO_WGSL);
14664
+ _vertexWGSL = _vertexWGSL.replace("/*MU*/", meshStruct);
14665
+ _vertexWGSL = _vertexWGSL.replace("/*VI*/", `struct VertexInput{
14666
+ ${inputLines.join("\n")}
14667
+ }`);
14668
+ _vertexWGSL = _vertexWGSL.replace("/*VO*/", `struct VertexOutput{
14669
+ ${varyBody}
14670
+ }`);
14671
+ _vertexWGSL = _vertexWGSL.replace("/*VD*/", vDecls.join("\n"));
14672
+ _vertexWGSL = _vertexWGSL.replace("/*VP*/", vParams);
14673
+ _vertexWGSL = _vertexWGSL.replace("/*VH*/", vHelpers.join("\n"));
14674
+ _vertexWGSL = injectSlots(_vertexWGSL, sorted, "_vertexSlots");
14675
+ let _fragmentWGSL = template._fragmentTemplate;
14676
+ _fragmentWGSL = _fragmentWGSL.replace("/*SU*/", SCENE_UBO_WGSL);
14677
+ _fragmentWGSL = _fragmentWGSL.replace("/*MU*/", meshStruct + materialStruct);
14678
+ _fragmentWGSL = _fragmentWGSL.replace("/*FI*/", `struct FragmentInput{
14679
+ ${varyBody}
14680
+ }`);
14681
+ _fragmentWGSL = _fragmentWGSL.replace("/*HF*/", helpers.join("\n"));
14682
+ _fragmentWGSL = _fragmentWGSL.replace("/*FB*/", fDecls.join("\n"));
14683
+ _fragmentWGSL = injectSlots(_fragmentWGSL, sorted, "_fragmentSlots");
14684
+ const _meshBGLDescriptor = { entries: meshBGL };
14685
+ const _shadowBGLDescriptor = shadowBGL.length ? { entries: shadowBGL } : null;
14686
+ return {
14687
+ _vertexWGSL,
14688
+ _fragmentWGSL,
14689
+ _meshBGLDescriptor,
14690
+ _shadowBGLDescriptor,
14691
+ _vertexBufferLayouts,
14692
+ _meshUboSpec,
14693
+ _materialUboSpec,
14694
+ _fragmentKey
14695
+ };
14696
+ }
14697
+ let _stencilResolver$1 = null;
14698
+ function _installStandardStencilResolver(resolve) {
14699
+ _stencilResolver$1 = resolve;
14700
+ }
14701
+ function composeStandardShader(features, _meshFeatures = 0, fragments = [], esmShadowDepthCode = "") {
14702
+ const has = (bit) => (features & bit) !== 0;
14703
+ const template = createStandardTemplate(
14704
+ {
14705
+ _diffuse: has(HAS_DIFFUSE_TEXTURE),
14706
+ _needsUV: has(NEEDS_UV),
14707
+ _needsUV2: has(NEEDS_UV2),
14708
+ _diffuseUsesUV2: has(DIFFUSE_USES_UV2),
14709
+ _disableLighting: has(DISABLE_LIGHTING),
14710
+ _noColorOutput: has(NO_COLOR_OUTPUT),
14711
+ _esmShadowOutput: has(ESM_SHADOW_OUTPUT)
14712
+ },
14713
+ esmShadowDepthCode
14714
+ );
14715
+ return composeShader(template, fragments);
14716
+ }
14717
+ const _bindingsCache = /* @__PURE__ */ new Map();
14718
+ let _composedCache = null;
14719
+ let _cachedDevice$2 = null;
14720
+ function getComposedCache() {
14721
+ if (!_composedCache) {
14722
+ _composedCache = /* @__PURE__ */ new Map();
14723
+ }
14724
+ return _composedCache;
14725
+ }
14726
+ function ensureDevice$1(engine) {
14727
+ if (_cachedDevice$2 !== engine._device) {
14728
+ _bindingsCache.clear();
14729
+ _composedCache == null ? void 0 : _composedCache.clear();
14730
+ clearSceneBGLCache();
14731
+ _cachedDevice$2 = engine._device;
14732
+ }
14733
+ }
14734
+ function clearStandardPipelineCache() {
14735
+ _bindingsCache.clear();
14736
+ _composedCache == null ? void 0 : _composedCache.clear();
14737
+ clearSceneBGLCache();
14738
+ _cachedDevice$2 = null;
14739
+ }
14740
+ function getOrCreateStandardBindings(engine, features, meshFeatures, fragments = [], shaderKey = "", esmShadowDepthCode = "", stencil = null) {
14741
+ ensureDevice$1(engine);
14742
+ const resolvedStencil = stencil && _stencilResolver$1 ? _stencilResolver$1(stencil) : null;
14743
+ const key = _standardFeatureKey(features, meshFeatures, shaderKey) + (resolvedStencil ? resolvedStencil._key : "");
14744
+ const cached = _bindingsCache.get(key);
14745
+ if (cached) {
14746
+ return cached;
14747
+ }
14748
+ const cc = getComposedCache();
14749
+ let composed = cc.get(key);
14750
+ if (!composed) {
14751
+ composed = composeStandardShader(features, meshFeatures, fragments, esmShadowDepthCode);
14752
+ cc.set(key, composed);
14753
+ }
14754
+ const device = engine._device;
14755
+ const meshBGL = device.createBindGroupLayout(composed._meshBGLDescriptor);
14756
+ let shadowBGL = null;
14757
+ const hasShadow = (meshFeatures & MSH_RECEIVE_SHADOWS) !== 0;
14758
+ if (hasShadow && composed._shadowBGLDescriptor) {
14759
+ shadowBGL = device.createBindGroupLayout(composed._shadowBGLDescriptor);
14760
+ }
14761
+ const bindings = {
14762
+ _features: features,
14763
+ _meshFeatures: meshFeatures,
14764
+ _meshBGL: meshBGL,
14765
+ _shadowBGL: shadowBGL,
14766
+ _composed: composed,
14767
+ _pipelines: /* @__PURE__ */ new Map()
14768
+ };
14769
+ if (resolvedStencil) {
14770
+ bindings._stencil = resolvedStencil._desc;
14771
+ }
14772
+ _bindingsCache.set(key, bindings);
14773
+ return bindings;
14774
+ }
14775
+ function getOrCreateStandardPipeline(engine, sig, bindings) {
14776
+ ensureDevice$1(engine);
14777
+ const key = targetSignatureKey(sig);
14778
+ const cached = bindings._pipelines.get(key);
14779
+ if (cached) {
14780
+ return cached;
14781
+ }
14782
+ const device = engine._device;
14783
+ const composed = bindings._composed;
14784
+ const features = bindings._features;
14785
+ const sceneBGL = getSceneBindGroupLayout(engine);
14786
+ const bgls = bindings._shadowBGL ? [sceneBGL, bindings._meshBGL, bindings._shadowBGL] : [sceneBGL, bindings._meshBGL];
14787
+ const vertModule = device.createShaderModule({ code: composed._vertexWGSL });
14788
+ const noColorOutput = (features & NO_COLOR_OUTPUT) !== 0;
14789
+ const esmShadowOutput = (features & ESM_SHADOW_OUTPUT) !== 0;
14790
+ const fragModule = !sig._colorFormat && !noColorOutput ? null : device.createShaderModule({ code: composed._fragmentWGSL });
14791
+ const needsBlend = !esmShadowOutput && ((features & HAS_OPACITY_TEXTURE) !== 0 || (features & MATERIAL_ALPHA_BLEND) !== 0);
14792
+ const colorTarget = noColorOutput ? null : needsBlend ? {
14793
+ format: sig._colorFormat,
14794
+ blend: {
14795
+ color: { srcFactor: "src-alpha", dstFactor: "one-minus-src-alpha" },
14796
+ alpha: { srcFactor: "one", dstFactor: "one-minus-src-alpha" }
14797
+ }
14798
+ } : { format: sig._colorFormat };
14799
+ const pipeline = device.createRenderPipeline({
14800
+ layout: device.createPipelineLayout({ bindGroupLayouts: bgls }),
14801
+ vertex: { module: vertModule, entryPoint: "main", buffers: composed._vertexBufferLayouts },
14802
+ ...fragModule ? { fragment: { module: fragModule, entryPoint: "main", targets: colorTarget ? [colorTarget] : [] } } : {},
14803
+ ...sig._depthStencilFormat ? {
14804
+ depthStencil: {
14805
+ format: sig._depthStencilFormat,
14806
+ depthCompare: sig._depthCompare ?? REVERSE_DEPTH_COMPARE,
14807
+ depthWriteEnabled: noColorOutput || esmShadowOutput || !needsBlend,
14808
+ // Pre-baked stencil sub-fields, applied only on a stencil-capable target — the same
14809
+ // material in the depth32float shadow/depth pass keeps plain depth state (no stencil → no
14810
+ // format mismatch). Gated on `_stencilResolver` (the opt-in hook) so the entire branch —
14811
+ // including the `bindings._stencil` reads — folds out of stencil-free bundles.
14812
+ ..._stencilResolver$1 && bindings._stencil && sig._depthStencilFormat.includes("stencil") ? bindings._stencil : {}
14813
+ }
14814
+ } : {},
14815
+ multisample: { count: sig._sampleCount },
14816
+ primitive: { topology: "triangle-list", cullMode: features & DOUBLE_SIDED ? "none" : "back", frontFace: "ccw" }
14817
+ });
14818
+ bindings._pipelines.set(key, pipeline);
14819
+ return pipeline;
14820
+ }
14821
+ function createStandardMeshBindGroup(engine, bindings, meshUBO, materialUBO, material) {
14822
+ var _a;
14823
+ const device = engine._device;
14824
+ const features = bindings._features;
14825
+ const needsUV = (features & NEEDS_UV) !== 0;
14826
+ const hasDiffuseTex = (features & HAS_DIFFUSE_TEXTURE) !== 0;
14827
+ const esmShadowOutput = (features & ESM_SHADOW_OUTPUT) !== 0;
14828
+ let nextBinding = 0;
14829
+ const entries = [
14830
+ { binding: nextBinding++, resource: { buffer: meshUBO } },
14831
+ { binding: nextBinding++, resource: { buffer: materialUBO } }
14832
+ ];
14833
+ if (hasDiffuseTex) {
14834
+ const tex = material.diffuseTexture;
14835
+ entries.push({ binding: nextBinding++, resource: tex.texture.createView() }, { binding: nextBinding++, resource: tex.sampler });
14836
+ }
14837
+ if (needsUV) {
14838
+ const uvData = new F32(4);
14839
+ const scaleX = material.uvScale[0];
14840
+ let scaleY = material.uvScale[1];
14841
+ let offsetY = 0;
14842
+ if ((_a = material.diffuseTexture) == null ? void 0 : _a.invertY) {
14843
+ offsetY = scaleY;
14844
+ scaleY = -scaleY;
14845
+ }
14846
+ uvData[0] = scaleX;
14847
+ uvData[1] = scaleY;
14848
+ uvData[2] = 0;
14849
+ uvData[3] = offsetY;
14850
+ entries.push({ binding: nextBinding++, resource: { buffer: createUniformBuffer$1(engine, uvData) } });
14851
+ }
14852
+ if (esmShadowOutput) {
14853
+ entries.push({
14854
+ binding: nextBinding++,
14855
+ resource: { buffer: material._esmShadowParamsUBO }
14856
+ });
14857
+ }
14858
+ const sortedExts = _getStdExtsSorted();
14859
+ for (const ext of sortedExts) {
14860
+ if (features & ext._feature && ext._bind) {
14861
+ nextBinding = ext._bind(material, entries, nextBinding);
14862
+ }
14863
+ }
14864
+ return device.createBindGroup({ layout: bindings._meshBGL, entries });
14865
+ }
14866
+ function writeStdMaterialData(data, mat, textureLevel) {
14867
+ const { diffuseColor: dc, specularColor: sc, emissiveColor: ec, ambientColor: ac } = mat;
14868
+ data[0] = dc[0];
14869
+ data[1] = dc[1];
14870
+ data[2] = dc[2];
14871
+ data[3] = mat.alpha;
14872
+ data[4] = sc[0];
14873
+ data[5] = sc[1];
14874
+ data[6] = sc[2];
14875
+ data[7] = mat.specularPower;
14876
+ data[8] = ec[0];
14877
+ data[9] = ec[1];
14878
+ data[10] = ec[2];
14879
+ data[11] = 1 / mat.bumpLevel;
14880
+ data[12] = ac[0];
14881
+ data[13] = ac[1];
14882
+ data[14] = ac[2];
14883
+ data[15] = textureLevel;
14884
+ data[16] = mat.ambientTexLevel;
14885
+ data[17] = mat.lightmapLevel;
14886
+ data[18] = mat.opacityLevel;
14887
+ data[19] = mat.alphaCutOff;
14888
+ data[20] = mat.reflectionLevel;
14889
+ data[21] = mat.reflectionCoordMode;
14890
+ }
14891
+ let _stencilResolver = null;
14892
+ function _installShaderStencilResolver(resolve) {
14893
+ _stencilResolver = resolve;
14894
+ }
14895
+ const SHADER_STAGE_ALL = SS.VERTEX | SS.FRAGMENT;
14896
+ function getOrCreateShaderPipelineBindings(engine, material) {
14897
+ const state = material;
14898
+ if (state._shaderBindings && state._shaderDevice === engine._device) {
14899
+ return state._shaderBindings;
14900
+ }
14901
+ state._shaderDevice = engine._device;
14902
+ const systemFields = material.uniformDecls.filter((u) => _isShaderSystemUniform(u.name)).map(toUboField);
14903
+ const customFields = material.uniformDecls.filter((u) => !_isShaderSystemUniform(u.name)).map(toUboField);
14904
+ const systemSpec = computeUboLayout(systemFields.length > 0 ? systemFields : [{ _name: "_pad", _type: "vec4<f32>" }]);
14905
+ const customSpec = customFields.length > 0 ? computeUboLayout(customFields) : null;
14906
+ const group1BGL = engine._device.createBindGroupLayout({
14907
+ label: "shader-material-group1",
14908
+ entries: buildBindGroupLayoutEntries(material.samplerDecls, material.storageBufferDecls, customSpec !== null)
14909
+ });
14910
+ const bindings = {
14911
+ group1BGL,
14912
+ systemSpec,
14913
+ customSpec,
14914
+ vertexBuffers: material.attributes.map(attributeLayout),
14915
+ pipelines: /* @__PURE__ */ new Map()
14916
+ };
14917
+ state._shaderBindings = bindings;
14918
+ state._shaderCustomSpec = customSpec;
14919
+ state._shaderCustomUbo = null;
14920
+ state._shaderCustomData = null;
14921
+ state._shaderCustomVersion = -1;
14922
+ return bindings;
14923
+ }
14924
+ function getOrCreateShaderPipeline(engine, sig, material, bindings, variantKey = "", vertexBuffers = bindings.vertexBuffers, instanceAttrs = "") {
14925
+ const key = `${targetSignatureKey(sig)}${variantKey}`;
14926
+ const cached = bindings.pipelines.get(key);
14927
+ if (cached) {
14928
+ return cached;
14929
+ }
14930
+ const stencil = material.stencil && _stencilResolver ? _stencilResolver(material.stencil) : null;
14931
+ const device = engine._device;
14932
+ const prelude = buildShaderPrelude(material, bindings.systemSpec, bindings.customSpec, instanceAttrs);
14933
+ const vertModule = device.createShaderModule({ label: `${material.name ?? "shader"}-vertex`, code: `${prelude}
14934
+ ${material.vertexSource}` });
14935
+ const wantsFragment = !!sig._colorFormat || material.depthOnlyFragment;
14936
+ const fragModule = wantsFragment ? device.createShaderModule({ label: `${material.name ?? "shader"}-fragment`, code: `${prelude}
14937
+ ${material.fragmentSource}` }) : null;
14938
+ const colorTarget = sig._colorFormat ? {
14939
+ format: sig._colorFormat,
14940
+ ...material.needAlphaBlending ? {
14941
+ blend: material.blendMode === "additive" ? {
14942
+ color: { srcFactor: "src-alpha", dstFactor: "one", operation: "add" },
14943
+ alpha: { srcFactor: "one", dstFactor: "one", operation: "add" }
14944
+ } : {
14945
+ color: { srcFactor: "src-alpha", dstFactor: "one-minus-src-alpha", operation: "add" },
14946
+ alpha: { srcFactor: "one", dstFactor: "one-minus-src-alpha", operation: "add" }
14947
+ }
14948
+ } : {}
14949
+ } : null;
14950
+ const pipeline = device.createRenderPipeline({
14951
+ label: `${material.name ?? "shader"}-pipeline`,
14952
+ layout: device.createPipelineLayout({ bindGroupLayouts: [getSceneBindGroupLayout(engine), bindings.group1BGL] }),
14953
+ vertex: { module: vertModule, entryPoint: "mainVertex", buffers: vertexBuffers },
14954
+ ...fragModule ? { fragment: { module: fragModule, entryPoint: "mainFragment", targets: colorTarget ? [colorTarget] : [] } } : {},
14955
+ ...sig._depthStencilFormat ? {
14956
+ depthStencil: {
14957
+ format: sig._depthStencilFormat,
14958
+ // The target's declared depth convention wins over the material default: a depth-only
14959
+ // caster authored for the forward-Z shadow map ("less-equal") must still depth-test
14960
+ // correctly when drawn into a reverse-Z camera depth prepass that declares
14961
+ // "greater-equal" — otherwise every fragment fails against the 0-cleared buffer.
14962
+ depthCompare: sig._depthCompare ?? material.depthCompare,
14963
+ depthWriteEnabled: material.needAlphaBlending ? false : material.depthWrite,
14964
+ ...material.depthBias ? { depthBias: material.depthBias } : {},
14965
+ ...material.depthBiasSlopeScale ? { depthBiasSlopeScale: material.depthBiasSlopeScale } : {},
14966
+ // Pre-baked stencil sub-fields, resolved through the opt-in `_stencilResolver` hook above;
14967
+ // applied only on a stencil-capable target — a material reused in the depth32float
14968
+ // shadow/depth pass keeps plain depth state (no stencil → no format mismatch). `stencil`
14969
+ // is a local const that folds to null in stencil-free bundles, so this branch disappears.
14970
+ ...stencil && sig._depthStencilFormat.includes("stencil") ? stencil._desc : {}
14971
+ }
14972
+ } : {},
14973
+ multisample: { count: sig._sampleCount },
14974
+ primitive: { topology: "triangle-list", cullMode: material.backFaceCulling ? "back" : "none", frontFace: "ccw" }
14975
+ });
14976
+ bindings.pipelines.set(key, pipeline);
14977
+ return pipeline;
14978
+ }
14979
+ function toUboField(decl) {
14980
+ return { _name: decl.name, _type: decl.type };
14981
+ }
14982
+ function buildBindGroupLayoutEntries(samplers, storageBuffers, hasCustomUbo) {
14983
+ const entries = [{ binding: 0, visibility: SHADER_STAGE_ALL, buffer: { type: "uniform" } }];
14984
+ let nextBinding = 1;
14985
+ if (hasCustomUbo) {
14986
+ entries.push({ binding: nextBinding++, visibility: SHADER_STAGE_ALL, buffer: { type: "uniform" } });
14987
+ }
14988
+ for (const sampler of samplers) {
14989
+ const isArray = sampler.viewDimension === "2d-array";
14990
+ const sampleType = sampler.comparison === true ? "depth" : sampler.sampleType ?? "float";
14991
+ entries.push({
14992
+ binding: nextBinding++,
14993
+ visibility: SHADER_STAGE_ALL,
14994
+ texture: {
14995
+ sampleType,
14996
+ viewDimension: isArray ? "2d-array" : "2d"
14997
+ }
14998
+ });
14999
+ entries.push({
15000
+ binding: nextBinding++,
15001
+ visibility: SHADER_STAGE_ALL,
15002
+ sampler: { type: sampler.comparison === true ? "comparison" : sampleType === "float" ? "filtering" : "non-filtering" }
15003
+ });
15004
+ }
15005
+ for (const _storage of storageBuffers) {
15006
+ entries.push({
15007
+ binding: nextBinding++,
15008
+ visibility: SHADER_STAGE_ALL,
15009
+ buffer: { type: "read-only-storage" }
15010
+ });
15011
+ }
15012
+ return entries;
15013
+ }
15014
+ function attributeLayout(name, shaderLocation) {
15015
+ switch (name) {
15016
+ case "position":
15017
+ case "normal":
15018
+ return { arrayStride: 12, attributes: [{ shaderLocation, offset: 0, format: "float32x3" }] };
15019
+ case "uv":
15020
+ case "uv2":
15021
+ return { arrayStride: 8, attributes: [{ shaderLocation, offset: 0, format: "float32x2" }] };
15022
+ case "tangent":
15023
+ case "color":
15024
+ return { arrayStride: 16, attributes: [{ shaderLocation, offset: 0, format: "float32x4" }] };
15025
+ }
15026
+ }
15027
+ function buildShaderPrelude(material, systemSpec, customSpec, instanceAttrs = "") {
15028
+ let wgsl = `${SCENE_UBO_WGSL}
15029
+ struct ShaderSystemUniforms {
15030
+ ${systemSpec._structBody}
15031
+ }
15032
+ @group(1) @binding(0) var<uniform> shaderSystem: ShaderSystemUniforms;
15033
+ `;
15034
+ if (customSpec) {
15035
+ wgsl += `struct ShaderUniforms {
15036
+ ${customSpec._structBody}
15037
+ }
15038
+ @group(1) @binding(1) var<uniform> shaderUniforms: ShaderUniforms;
15039
+ `;
15040
+ }
15041
+ let nextBinding = customSpec ? 2 : 1;
15042
+ for (const sampler of material.samplerDecls) {
15043
+ const isArray = sampler.viewDimension === "2d-array";
15044
+ const isDepth = sampler.comparison === true || sampler.sampleType === "depth";
15045
+ const texType = isDepth ? isArray ? "texture_depth_2d_array" : "texture_depth_2d" : isArray ? "texture_2d_array<f32>" : "texture_2d<f32>";
15046
+ const samplerType = sampler.comparison === true ? "sampler_comparison" : "sampler";
15047
+ wgsl += `@group(1) @binding(${nextBinding++}) var ${sampler.name}: ${texType};
15048
+ @group(1) @binding(${nextBinding++}) var ${sampler.name}Sampler: ${samplerType};
15049
+ `;
15050
+ }
15051
+ for (const storage of material.storageBufferDecls) {
15052
+ wgsl += `@group(1) @binding(${nextBinding++}) var<storage, read> ${storage.name}: ${storage.type};
15053
+ `;
15054
+ }
15055
+ for (const define of material.defines) {
15056
+ wgsl += `const ${define.name}: ${typeof define.value === "boolean" ? "bool" : "f32"} = ${formatDefineValue(define.value)};
15057
+ `;
15058
+ }
15059
+ wgsl += `struct VertexInput {
15060
+ `;
15061
+ for (let i = 0; i < material.attributes.length; i++) {
15062
+ const attr = material.attributes[i];
15063
+ wgsl += `@location(${i}) ${attr}: ${attributeWgslType(attr)},
15064
+ `;
15065
+ }
15066
+ wgsl += instanceAttrs;
15067
+ wgsl += `};
15068
+ `;
15069
+ return wgsl;
15070
+ }
15071
+ function formatDefineValue(value) {
15072
+ if (typeof value === "boolean") {
15073
+ return value ? "true" : "false";
15074
+ }
15075
+ if (Number.isInteger(value)) {
15076
+ return `${value}.0`;
15077
+ }
15078
+ return String(value);
15079
+ }
15080
+ function attributeWgslType(name) {
15081
+ switch (name) {
15082
+ case "position":
15083
+ case "normal":
15084
+ return "vec3<f32>";
15085
+ case "uv":
15086
+ case "uv2":
15087
+ return "vec2<f32>";
15088
+ case "tangent":
15089
+ case "color":
15090
+ return "vec4<f32>";
15091
+ }
15092
+ }
15093
+ function enableMaterialStencil() {
15094
+ _installPbrStencilResolver(_resolveStencil);
15095
+ _installStandardStencilResolver(_resolveStencil);
15096
+ _installShaderStencilResolver(_resolveStencil);
15097
+ }
13921
15098
  async function enableMaterialTracking(material) {
13922
15099
  const source = getMaterialSource(material);
13923
15100
  if ("specularPower" in source) {
13924
- const { installStdTracking } = await import("./std-tracking-Bw61Dv98.js");
15101
+ const { installStdTracking } = await import("./std-tracking-4SHTntWt.js");
13925
15102
  installStdTracking(source);
13926
15103
  } else {
13927
- const { installPbrTracking } = await import("./pbr-tracking-CdeqbBrh.js");
15104
+ const { installPbrTracking } = await import("./pbr-tracking-BWWSjls_.js");
13928
15105
  installPbrTracking(source);
13929
15106
  }
13930
15107
  }
@@ -14005,24 +15182,28 @@ const TYPE_SIZES = {
14005
15182
  };
14006
15183
  function resolveAccessor(json, binChunk, accessorIdx) {
14007
15184
  const accessor = json.accessors[accessorIdx];
14008
- const bufferView = json.bufferViews[accessor.bufferView];
14009
15185
  const componentCount = TYPE_SIZES[accessor.type] ?? 1;
14010
- const byteOffset = (bufferView.byteOffset ?? 0) + (accessor.byteOffset ?? 0);
14011
15186
  const count = accessor.count;
14012
- const baseOffset = binChunk.byteOffset + byteOffset;
14013
- const ab2 = binChunk.buffer;
15187
+ const len2 = count * componentCount;
15188
+ let Ctor;
14014
15189
  switch (accessor.componentType) {
14015
15190
  case FLOAT:
14016
- return { _data: new F32(ab2, baseOffset, count * componentCount), _count: count, _componentCount: componentCount };
15191
+ Ctor = F32;
15192
+ break;
14017
15193
  case UNSIGNED_SHORT:
14018
- return { _data: new U16(ab2, baseOffset, count * componentCount), _count: count, _componentCount: componentCount };
15194
+ Ctor = U16;
15195
+ break;
14019
15196
  case UNSIGNED_INT:
14020
- return { _data: new U32(ab2, baseOffset, count * componentCount), _count: count, _componentCount: componentCount };
15197
+ Ctor = U32;
15198
+ break;
14021
15199
  case UNSIGNED_BYTE:
14022
- return { _data: new U8(ab2, baseOffset, count * componentCount), _count: count, _componentCount: componentCount };
15200
+ Ctor = U8;
15201
+ break;
14023
15202
  default:
14024
15203
  throw new Error(`Unsupported component type: ${accessor.componentType}`);
14025
15204
  }
15205
+ const data = accessor.bufferView === void 0 ? new Ctor(len2) : new Ctor(binChunk.buffer, binChunk.byteOffset + (json.bufferViews[accessor.bufferView].byteOffset ?? 0) + (accessor.byteOffset ?? 0), len2);
15206
+ return { _data: data, _count: count, _componentCount: componentCount };
14026
15207
  }
14027
15208
  function getTextureImageIndex(tex) {
14028
15209
  var _a, _b2;
@@ -14288,14 +15469,14 @@ async function runMatExts(mat, exts, ctx) {
14288
15469
  }
14289
15470
  let _interleavePromise;
14290
15471
  function loadInterleave() {
14291
- return _interleavePromise ?? (_interleavePromise = import("./gltf-interleave-OBqmlu-h.js"));
15472
+ return _interleavePromise ?? (_interleavePromise = import("./gltf-interleave-BdKrRH3j.js"));
14292
15473
  }
14293
- async function loadGltf(engine, url) {
15474
+ async function loadGltf(engine, source) {
14294
15475
  var _a;
14295
- const { json, binChunk, baseUrl } = await fetchGltfAsset(url);
15476
+ const { json, binChunk, baseUrl } = await fetchGltfAsset(source);
14296
15477
  const parentMap = buildParentMap(json);
14297
15478
  const worldMatrixCache = /* @__PURE__ */ new Map();
14298
- const features = assetUsesGltfFeatures(json) ? await (await import("./gltf-feature-registry-wNbt6UC-.js")).loadGltfFeatures(json) : [];
15479
+ const features = assetUsesGltfFeatures(json) ? await (await import("./gltf-feature-registry-DfOiNmhR.js")).loadGltfFeatures(json) : [];
14299
15480
  let activeBin = binChunk;
14300
15481
  for (const f of features) {
14301
15482
  if (f.preParse) {
@@ -14339,27 +15520,35 @@ async function loadGltf(engine, url) {
14339
15520
  }
14340
15521
  return container;
14341
15522
  }
14342
- async function fetchGltfAsset(url) {
15523
+ async function fetchGltfAsset(source) {
14343
15524
  var _a;
14344
- const baseUrl = url.substring(0, url.lastIndexOf("/") + 1);
14345
- if (url.toLowerCase().endsWith(".glb")) {
14346
- const buffer = await fetch(url).then((r) => r.arrayBuffer());
14347
- const { parseGlbContainer } = await import("./gltf-glb-parser-DSQWsT4r.js");
14348
- const { json: json2, binChunk: binChunk2 } = parseGlbContainer(buffer);
14349
- return { json: json2, binChunk: binChunk2, baseUrl };
14350
- }
14351
- const json = await fetch(url).then((r) => r.json());
15525
+ const isUrl = typeof source === "string";
15526
+ const baseUrl = isUrl ? source.substring(0, source.lastIndexOf("/") + 1) : "";
15527
+ const buffer = isUrl ? await fetch(source).then((r) => r.arrayBuffer()) : source instanceof Blob ? await source.arrayBuffer() : source;
15528
+ if (buffer.byteLength >= 4 && new DV$1(buffer).getUint32(0, true) === 1179937895) {
15529
+ const { parseGlbContainer } = await import("./gltf-glb-parser-DXMAJA8e.js");
15530
+ return { ...parseGlbContainer(buffer), baseUrl };
15531
+ }
15532
+ const json = JSON.parse(new TextDecoder().decode(buffer));
14352
15533
  const bufferDef = (_a = json.buffers) == null ? void 0 : _a[0];
14353
15534
  let binChunk;
14354
15535
  if (bufferDef == null ? void 0 : bufferDef.uri) {
14355
- const binUrl = new URL(bufferDef.uri, baseUrl + "x").href;
14356
- const binBuffer = await fetch(binUrl).then((r) => r.arrayBuffer());
14357
- binChunk = new DV$1(binBuffer);
15536
+ binChunk = new DV$1(await fetch(resolveBufferUri(bufferDef.uri, baseUrl)).then((r) => r.arrayBuffer()));
14358
15537
  } else {
14359
15538
  binChunk = new DV$1(new ArrayBuffer(0));
14360
15539
  }
14361
15540
  return { json, binChunk, baseUrl };
14362
15541
  }
15542
+ function resolveBufferUri(uri, baseUrl) {
15543
+ if (baseUrl) {
15544
+ return new URL(uri, baseUrl + "x").href;
15545
+ }
15546
+ try {
15547
+ return new URL(uri).href;
15548
+ } catch {
15549
+ throw new Error(`loadGltf: relative buffer URI "${uri}" needs a base URL — load from a URL, or use a self-contained GLB/data: URI glTF.`);
15550
+ }
15551
+ }
14363
15552
  function assetUsesGltfFeatures(json) {
14364
15553
  var _a, _b2, _c;
14365
15554
  return !!(((_a = json.extensionsUsed) == null ? void 0 : _a.length) || ((_b2 = json.animations) == null ? void 0 : _b2.length) || ((_c = json.skins) == null ? void 0 : _c.length) && anyPrimitive(json, (p3) => {
@@ -14554,7 +15743,7 @@ async function uploadMeshes(meshDatas, features, ctx) {
14554
15743
  }
14555
15744
  }
14556
15745
  let _pbrExtPromise = null;
14557
- const _ensurePbrExt = () => _pbrExtPromise ?? (_pbrExtPromise = import("./gltf-pbr-builder-ext-3imk8Tev.js"));
15746
+ const _ensurePbrExt = () => _pbrExtPromise ?? (_pbrExtPromise = import("./gltf-pbr-builder-ext-DJ8Jm7jo.js"));
14558
15747
  const builtMaterialCache = /* @__PURE__ */ new Map();
14559
15748
  async function buildPbrFromGltfMat(mat) {
14560
15749
  let cached = builtMaterialCache.get(mat);
@@ -14673,16 +15862,199 @@ function resetVariant(container) {
14673
15862
  entry.mesh.material = entry.material;
14674
15863
  }
14675
15864
  }
15865
+ let dracoBaseUrl = "/";
15866
+ function setDracoBaseUrl(url) {
15867
+ dracoBaseUrl = url.endsWith("/") ? url : url + "/";
15868
+ }
15869
+ let modulePromise = null;
15870
+ let scriptLoadPromise$1 = null;
15871
+ function loadDracoScript() {
15872
+ if (scriptLoadPromise$1) {
15873
+ return scriptLoadPromise$1;
15874
+ }
15875
+ scriptLoadPromise$1 = new Promise((resolve, reject) => {
15876
+ const existing = globalThis.DracoDecoderModule;
15877
+ if (existing) {
15878
+ resolve(existing);
15879
+ return;
15880
+ }
15881
+ const script = document.createElement("script");
15882
+ script.src = dracoBaseUrl + "draco_decoder.js";
15883
+ script.onload = () => {
15884
+ const factory = globalThis.DracoDecoderModule;
15885
+ if (!factory) {
15886
+ reject(new Error("draco_decoder.js loaded but DracoDecoderModule is undefined"));
15887
+ } else {
15888
+ resolve(factory);
15889
+ }
15890
+ };
15891
+ script.onerror = () => reject(new Error("Failed to load draco_decoder.js from " + script.src));
15892
+ document.head.appendChild(script);
15893
+ });
15894
+ return scriptLoadPromise$1;
15895
+ }
15896
+ async function getDracoModule() {
15897
+ if (modulePromise) {
15898
+ return modulePromise;
15899
+ }
15900
+ modulePromise = (async () => {
15901
+ const factory = await loadDracoScript();
15902
+ return factory({ locateFile: (f) => dracoBaseUrl + f });
15903
+ })();
15904
+ return modulePromise;
15905
+ }
15906
+ async function decodeDracoPrimitive(compressed, attributeMap, accessorTypes) {
15907
+ const module = await getDracoModule();
15908
+ const decoder = new module.Decoder();
15909
+ const buffer = new module.DecoderBuffer();
15910
+ buffer.Init(compressed, compressed.byteLength);
15911
+ const mesh = new module.Mesh();
15912
+ const status = decoder.DecodeBufferToMesh(buffer, mesh);
15913
+ if (!status.ok()) {
15914
+ const err = status.error_msg();
15915
+ module.destroy(buffer);
15916
+ module.destroy(mesh);
15917
+ module.destroy(decoder);
15918
+ throw new Error("Draco decode failed: " + err);
15919
+ }
15920
+ const numPoints = mesh.num_points();
15921
+ const numFaces = mesh.num_faces();
15922
+ const indexCount = numFaces * 3;
15923
+ const indexByteLength = indexCount * 4;
15924
+ const indexPtr = module._malloc(indexByteLength);
15925
+ decoder.GetTrianglesUInt32Array(mesh, indexByteLength, indexPtr);
15926
+ const indices = new U32(module.HEAPU32.buffer, indexPtr, indexCount).slice();
15927
+ module._free(indexPtr);
15928
+ const attributes = /* @__PURE__ */ new Map();
15929
+ for (const name of Object.keys(attributeMap)) {
15930
+ const uniqueId = attributeMap[name];
15931
+ const attr = decoder.GetAttributeByUniqueId(mesh, uniqueId);
15932
+ const componentCount = accessorTypes[name] ?? 3;
15933
+ const totalComponents = numPoints * componentCount;
15934
+ const isIntAttr = name === "JOINTS_0" || name === "JOINTS_1";
15935
+ const bytesPerElement = 4;
15936
+ const byteLength = totalComponents * bytesPerElement;
15937
+ const ptr = module._malloc(byteLength);
15938
+ const dataType = isIntAttr ? module.DT_INT32 : module.DT_FLOAT32;
15939
+ decoder.GetAttributeDataArrayForAllPoints(mesh, attr, dataType, byteLength, ptr);
15940
+ if (isIntAttr) {
15941
+ attributes.set(name, new I32(module.HEAP32.buffer, ptr, totalComponents).slice());
15942
+ } else {
15943
+ attributes.set(name, new F32(module.HEAPF32.buffer, ptr, totalComponents).slice());
15944
+ }
15945
+ module._free(ptr);
15946
+ }
15947
+ module.destroy(buffer);
15948
+ module.destroy(mesh);
15949
+ module.destroy(decoder);
15950
+ return { _attributes: attributes, _indices: indices, _vertexCount: numPoints, _indexCount: indexCount };
15951
+ }
15952
+ function getDracoBufferViewBytes(json, binChunk, bufferViewIdx) {
15953
+ const view = json.bufferViews[bufferViewIdx];
15954
+ if (!view) {
15955
+ throw new Error(`Draco bufferView ${bufferViewIdx} not found`);
15956
+ }
15957
+ const offset = binChunk.byteOffset + (view.byteOffset ?? 0);
15958
+ return new U8(binChunk.buffer, offset, view.byteLength);
15959
+ }
15960
+ let meshoptBaseUrl = "/";
15961
+ function setMeshoptBaseUrl(url) {
15962
+ meshoptBaseUrl = url.endsWith("/") ? url : url + "/";
15963
+ }
15964
+ let scriptLoadPromise = null;
15965
+ function loadMeshoptScript() {
15966
+ if (scriptLoadPromise) {
15967
+ return scriptLoadPromise;
15968
+ }
15969
+ scriptLoadPromise = new Promise((resolve, reject) => {
15970
+ const existing = globalThis.MeshoptDecoder;
15971
+ if (existing) {
15972
+ resolve(existing);
15973
+ return;
15974
+ }
15975
+ const script = document.createElement("script");
15976
+ script.src = meshoptBaseUrl + "meshopt_decoder.js";
15977
+ script.onload = () => {
15978
+ const mod = globalThis.MeshoptDecoder;
15979
+ if (!mod) {
15980
+ reject(new Error("meshopt_decoder.js loaded but MeshoptDecoder is undefined"));
15981
+ } else {
15982
+ resolve(mod);
15983
+ }
15984
+ };
15985
+ script.onerror = () => reject(new Error("Failed to load meshopt_decoder.js from " + script.src));
15986
+ document.head.appendChild(script);
15987
+ });
15988
+ return scriptLoadPromise;
15989
+ }
15990
+ async function getMeshoptDecoder() {
15991
+ const mod = await loadMeshoptScript();
15992
+ await mod.ready;
15993
+ return mod;
15994
+ }
14676
15995
  function mat4Multiply(a, b) {
14677
15996
  const out = new F32(16);
14678
15997
  mat4MultiplyInto(out, 0, a, 0, b, 0);
14679
15998
  return out;
14680
15999
  }
16000
+ function _quatFromRotationBasis(m11, m12, m13, m21, m22, m23, m31, m32, m33) {
16001
+ const trace = m11 + m22 + m33;
16002
+ let s;
16003
+ if (trace > 0) {
16004
+ s = 0.5 / Math.sqrt(trace + 1);
16005
+ return { x: (m32 - m23) * s, y: (m13 - m31) * s, z: (m21 - m12) * s, w: 0.25 / s };
16006
+ }
16007
+ if (m11 > m22 && m11 > m33) {
16008
+ s = 2 * Math.sqrt(1 + m11 - m22 - m33);
16009
+ return { x: 0.25 * s, y: (m12 + m21) / s, z: (m13 + m31) / s, w: (m32 - m23) / s };
16010
+ }
16011
+ if (m22 > m33) {
16012
+ s = 2 * Math.sqrt(1 + m22 - m11 - m33);
16013
+ return { x: (m12 + m21) / s, y: 0.25 * s, z: (m23 + m32) / s, w: (m13 - m31) / s };
16014
+ }
16015
+ s = 2 * Math.sqrt(1 + m33 - m11 - m22);
16016
+ return { x: (m13 + m31) / s, y: (m23 + m32) / s, z: 0.25 * s, w: (m21 - m12) / s };
16017
+ }
16018
+ function quatFromRotationMatrix(matrix) {
16019
+ return _quatFromRotationBasis(matrix[0], matrix[4], matrix[8], matrix[1], matrix[5], matrix[9], matrix[2], matrix[6], matrix[10]);
16020
+ }
16021
+ function mat4Decompose(m2) {
16022
+ const sx = Math.hypot(m2[0], m2[1], m2[2]);
16023
+ const sy = Math.hypot(m2[4], m2[5], m2[6]);
16024
+ const sz = Math.hypot(m2[8], m2[9], m2[10]);
16025
+ const invSx = sx > 1e-8 ? 1 / sx : 0;
16026
+ const invSy = sy > 1e-8 ? 1 / sy : 0;
16027
+ const invSz = sz > 1e-8 ? 1 / sz : 0;
16028
+ const q = _quatFromRotationBasis(m2[0] * invSx, m2[4] * invSy, m2[8] * invSz, m2[1] * invSx, m2[5] * invSy, m2[9] * invSz, m2[2] * invSx, m2[6] * invSy, m2[10] * invSz);
16029
+ const invLen = 1 / Math.hypot(q.x, q.y, q.z, q.w);
16030
+ return {
16031
+ translation: { x: m2[12], y: m2[13], z: m2[14] },
16032
+ rotation: { x: q.x * invLen, y: q.y * invLen, z: q.z * invLen, w: q.w * invLen },
16033
+ scale: { x: sx, y: sy, z: sz }
16034
+ };
16035
+ }
16036
+ function childrenOf(node) {
16037
+ const kids = node == null ? void 0 : node.children;
16038
+ return Array.isArray(kids) ? kids : null;
16039
+ }
14681
16040
  function setParent(child, parent) {
14682
16041
  const childWorld = child.worldMatrix;
14683
- child.parent = parent;
16042
+ if (child.parent !== parent) {
16043
+ const oldChildren = childrenOf(child.parent);
16044
+ if (oldChildren) {
16045
+ const i = oldChildren.indexOf(child);
16046
+ if (i >= 0) {
16047
+ oldChildren.splice(i, 1);
16048
+ }
16049
+ }
16050
+ child.parent = parent;
16051
+ const newChildren = childrenOf(parent);
16052
+ if (newChildren && newChildren.indexOf(child) < 0) {
16053
+ newChildren.push(child);
16054
+ }
16055
+ }
14684
16056
  if (!parent) {
14685
- decomposeInto(childWorld, child);
16057
+ applyLocal(childWorld, child);
14686
16058
  return;
14687
16059
  }
14688
16060
  const parentWorld = parent.worldMatrix;
@@ -14691,30 +16063,13 @@ function setParent(child, parent) {
14691
16063
  child.position.set(childWorld[12], childWorld[13], childWorld[14]);
14692
16064
  return;
14693
16065
  }
14694
- const newLocal = mat4Multiply(invParent, childWorld);
14695
- decomposeInto(newLocal, child);
16066
+ applyLocal(mat4Multiply(invParent, childWorld), child);
14696
16067
  }
14697
- function decomposeInto(m2, mesh) {
14698
- mesh.position.set(m2[12], m2[13], m2[14]);
14699
- const sx = Math.sqrt(m2[0] * m2[0] + m2[1] * m2[1] + m2[2] * m2[2]);
14700
- const sy = Math.sqrt(m2[4] * m2[4] + m2[5] * m2[5] + m2[6] * m2[6]);
14701
- const sz = Math.sqrt(m2[8] * m2[8] + m2[9] * m2[9] + m2[10] * m2[10]);
14702
- if (sx > 1e-6 && sy > 1e-6 && sz > 1e-6) {
14703
- const r00 = m2[0] / sx, r01 = m2[4] / sy, r02 = m2[8] / sz;
14704
- const r10 = m2[1] / sx, r11 = m2[5] / sy, r12 = m2[9] / sz;
14705
- const r22 = m2[10] / sz;
14706
- const ry = Math.asin(Math.max(-1, Math.min(1, r02)));
14707
- let rx2, rz;
14708
- if (Math.abs(r02) < 0.9999) {
14709
- rx2 = Math.atan2(-r12, r22);
14710
- rz = Math.atan2(-r01, r00);
14711
- } else {
14712
- rx2 = Math.atan2(r10, r11);
14713
- rz = 0;
14714
- }
14715
- mesh.rotation.set(rx2, ry, rz);
14716
- mesh.scaling.set(sx, sy, sz);
14717
- }
16068
+ function applyLocal(m2, node) {
16069
+ const { translation, rotation, scale } = mat4Decompose(m2);
16070
+ node.position.set(translation.x, translation.y, translation.z);
16071
+ node.rotationQuaternion.set(rotation.x, rotation.y, rotation.z, rotation.w);
16072
+ node.scaling.set(scale.x, scale.y, scale.z);
14718
16073
  }
14719
16074
  const TEX_SLOTS = [
14720
16075
  {
@@ -15017,7 +16372,7 @@ async function loadBabylon(engine, url, opts = {}) {
15017
16372
  }
15018
16373
  }
15019
16374
  const camData = opts.loadCamera !== false && ((_v = data.cameras) == null ? void 0 : _v.length) ? (data.activeCameraID ? data.cameras.find((c2) => c2.id === data.activeCameraID) : null) ?? data.cameras[0] : null;
15020
- const camera = camData ? (await import("./parse-camera-5IGdctAS.js")).parseBabylonCamera(camData) : void 0;
16375
+ const camera = camData ? (await import("./parse-camera-uQ8oKgeH.js")).parseBabylonCamera(camData) : void 0;
15021
16376
  const rootMeshes = allMeshes.filter((m2) => !childNodeIds.has(m2.id));
15022
16377
  const rootTransformNodes = [];
15023
16378
  for (const [id, node] of nodeMap) {
@@ -15114,7 +16469,7 @@ async function loadEnvironment(scene, url, options) {
15114
16469
  const envBuffer = await envPromise;
15115
16470
  const { faceBlobs, irradianceSH, width, mipCount } = parseEnvFile(envBuffer);
15116
16471
  const faceImages = await Promise.all(faceBlobs.map((blob2) => createImageBitmap(blob2, { premultiplyAlpha: "none", colorSpaceConversion: "none" })));
15117
- const { uploadCubemapRGBD, decodeBrdfPng } = await import("./rgbd-decode-duTlXMWd.js");
16472
+ const { uploadCubemapRGBD, decodeBrdfPng } = await import("./rgbd-decode-CAQ7XSwl.js");
15118
16473
  const specularCube = uploadCubemapRGBD(engine, faceImages, width, mipCount);
15119
16474
  for (const img of faceImages) {
15120
16475
  img.close();
@@ -15148,19 +16503,19 @@ async function loadEnvironment(scene, url, options) {
15148
16503
  const { groundSize, skyboxSize: autoSkyboxSize, rootPosition } = computeSceneSize(scene, options == null ? void 0 : options.skyboxSize);
15149
16504
  const skyHalfSize = autoSkyboxSize / 2;
15150
16505
  if (!bgOptions.skipSkybox) {
15151
- const { buildSolidSkyboxRenderable } = await import("./background-solid-skybox-DOOBeDIz.js");
16506
+ const { buildSolidSkyboxRenderable } = await import("./background-solid-skybox-CkmGuOn5.js");
15152
16507
  scene._renderables.push(buildSolidSkyboxRenderable(scene, textures, skyHalfSize, rootPosition, primaryColor));
15153
16508
  }
15154
16509
  if (!bgOptions.skipGround) {
15155
- const { buildGroundRenderable } = await import("./background-ground-Bm6gjWqx.js");
16510
+ const { buildGroundRenderable } = await import("./background-ground-ClcWiDuF.js");
15156
16511
  scene._renderables.push(await buildGroundRenderable(engine, groundSize, rootPosition, primaryColor, groundUrl, groundTexPromise));
15157
16512
  }
15158
16513
  if (skyboxIsDds) {
15159
- const { buildDdsSkyboxRenderable } = await import("./background-dds-skybox-BpcDr-9c.js");
16514
+ const { buildDdsSkyboxRenderable } = await import("./background-dds-skybox-Cv92mmdC.js");
15160
16515
  scene._renderables.push(await buildDdsSkyboxRenderable(scene, skyHalfSize, rootPosition, primaryColor, skyboxUrl));
15161
16516
  }
15162
16517
  if (skyboxIsEnv) {
15163
- const { buildHdrSkyboxRenderable } = await import("./background-hdr-skybox-CSFo8RX6.js");
16518
+ const { buildHdrSkyboxRenderable } = await import("./background-hdr-skybox-MfAwLhVx.js");
15164
16519
  scene._renderables.push(buildHdrSkyboxRenderable(scene, textures, skyHalfSize, rootPosition, primaryColor));
15165
16520
  }
15166
16521
  });
@@ -15413,7 +16768,7 @@ async function loadDdsEnvironment(scene, url, options) {
15413
16768
  }
15414
16769
  const irradianceSH = computeSH(raw, width, mipCount);
15415
16770
  const brdfImage = await brdfPromise;
15416
- const { decodeBrdfPng } = await import("./rgbd-decode-duTlXMWd.js");
16771
+ const { decodeBrdfPng } = await import("./rgbd-decode-CAQ7XSwl.js");
15417
16772
  const brdfLut = decodeBrdfPng(engine, brdfImage);
15418
16773
  brdfImage.close();
15419
16774
  const textures = assembleEnvironmentTextures(specularCube, brdfLut, irradianceSH, 0.8, engine);
@@ -15739,7 +17094,7 @@ async function loadHdrEnvironment(scene, url, options) {
15739
17094
  const { computeSceneSize: computeSceneSize2 } = await Promise.resolve().then(() => sceneSize);
15740
17095
  const { skyboxSize: autoSkyboxSize, rootPosition } = computeSceneSize2(scene, options == null ? void 0 : options.skyboxSize);
15741
17096
  const primaryColor = scene.environmentPrimaryColor ?? [0.08697355964132344, 0.08697355964132344, 0.2122208331110881];
15742
- const { buildHdrSkyboxRenderable } = await import("./background-hdr-skybox-CSFo8RX6.js");
17097
+ const { buildHdrSkyboxRenderable } = await import("./background-hdr-skybox-MfAwLhVx.js");
15743
17098
  scene._renderables.push(buildHdrSkyboxRenderable(scene, textures, autoSkyboxSize / 2, rootPosition, primaryColor));
15744
17099
  }
15745
17100
  if (!useHdr || !skipGround) {
@@ -15747,11 +17102,11 @@ async function loadHdrEnvironment(scene, url, options) {
15747
17102
  const { computeSceneSize: computeSceneSize2 } = await Promise.resolve().then(() => sceneSize);
15748
17103
  const { groundSize, skyboxSize: autoSkyboxSize, rootPosition } = computeSceneSize2(scene, options == null ? void 0 : options.skyboxSize);
15749
17104
  if (!useHdr) {
15750
- const { buildSolidSkyboxRenderable } = await import("./background-solid-skybox-DOOBeDIz.js");
17105
+ const { buildSolidSkyboxRenderable } = await import("./background-solid-skybox-CkmGuOn5.js");
15751
17106
  scene._renderables.push(buildSolidSkyboxRenderable(scene, textures, autoSkyboxSize / 2, rootPosition, primaryColor));
15752
17107
  }
15753
17108
  if (!skipGround) {
15754
- const { buildGroundRenderable } = await import("./background-ground-Bm6gjWqx.js");
17109
+ const { buildGroundRenderable } = await import("./background-ground-ClcWiDuF.js");
15755
17110
  scene._renderables.push(await buildGroundRenderable(engine, groundSize, rootPosition, primaryColor));
15756
17111
  }
15757
17112
  }
@@ -15832,7 +17187,7 @@ async function loadSkybox(scene, baseUrl, ext, size = 100) {
15832
17187
  idxCount: boxData.indices.length,
15833
17188
  worldMatrix: world
15834
17189
  };
15835
- const { buildSkyboxRenderable } = await import("./skybox-renderable-DJYkfw32.js");
17190
+ const { buildSkyboxRenderable } = await import("./skybox-renderable-lbMC32aI.js");
15836
17191
  scene._renderables.push(buildSkyboxRenderable(scene, skyboxData));
15837
17192
  }
15838
17193
  const SH_C0$2 = 0.28209479177387814;
@@ -16590,7 +17945,7 @@ async function attachParsedSplat(scene, name, parsed, fragments) {
16590
17945
  const eng = scene.surface.engine;
16591
17946
  const mesh = createGaussianSplattingMesh(eng, name, geom, worker, parsed);
16592
17947
  if (parsed.sh && parsed.shDegree && parsed.shDegree > 0) {
16593
- const { attachGaussianSplattingMeshSH } = await import("./gaussian-splatting-pipeline-sh-B30Mu56i.js");
17948
+ const { attachGaussianSplattingMeshSH } = await import("./gaussian-splatting-pipeline-sh-lM48JDca.js");
16594
17949
  attachGaussianSplattingMeshSH(scene, mesh, parsed.sh, fragments);
16595
17950
  } else {
16596
17951
  attachGaussianSplattingMesh(scene, mesh, fragments);
@@ -16606,7 +17961,7 @@ async function loadSplat(scene, url, fragments) {
16606
17961
  let parsed;
16607
17962
  if (isPly(data)) {
16608
17963
  if (isPlyCompressedOrSH(data)) {
16609
- const { convertCompressedPlyToParsedSplat } = await import("./splat-ply-compressed-SxMlsKNK.js");
17964
+ const { convertCompressedPlyToParsedSplat } = await import("./splat-ply-compressed-B_w2N_V7.js");
16610
17965
  parsed = convertCompressedPlyToParsedSplat(data);
16611
17966
  } else {
16612
17967
  parsed = convertPlyToSplat(data);
@@ -17435,21 +18790,21 @@ async function preloadEsmShadowTaskState(casterMeshes) {
17435
18790
  }
17436
18791
  if (needsStandard && !createStandardEsmShadowMaterialView) {
17437
18792
  loads.push(
17438
- import("./esm-shadow-view-DmIORQGZ.js").then((module) => {
18793
+ import("./esm-shadow-view-KyVyZnKZ.js").then((module) => {
17439
18794
  createStandardEsmShadowMaterialView = module.createStandardEsmShadowMaterialView;
17440
18795
  })
17441
18796
  );
17442
18797
  }
17443
18798
  if (needsPbr && !createPbrEsmShadowMaterialView) {
17444
18799
  loads.push(
17445
- import("./esm-shadow-view-DRpyRAfa.js").then((module) => {
18800
+ import("./esm-shadow-view-Cf2PwVNs.js").then((module) => {
17446
18801
  createPbrEsmShadowMaterialView = module.createPbrEsmShadowMaterialView;
17447
18802
  })
17448
18803
  );
17449
18804
  }
17450
18805
  if (needsNode && !createNodeEsmShadowMaterialView) {
17451
18806
  loads.push(
17452
- import("./esm-shadow-view-JCPaOOi7.js").then((module) => {
18807
+ import("./esm-shadow-view-CcX1jdrL.js").then((module) => {
17453
18808
  createNodeEsmShadowMaterialView = module.createNodeEsmShadowMaterialView;
17454
18809
  })
17455
18810
  );
@@ -18347,12 +19702,14 @@ function _computeCsmCascades(engine, camera, light, cfg, casterMeshes) {
18347
19702
  cy /= 8;
18348
19703
  cz /= 8;
18349
19704
  let minX, maxX, minY, maxY, minEz, maxEz;
19705
+ let stableRadius = 0;
18350
19706
  if (cfg._stabilizeCascades) {
18351
19707
  let radius = 0;
18352
19708
  for (const p3 of corners) {
18353
19709
  radius = Math.max(radius, Math.hypot(p3[0] - cx, p3[1] - cy, p3[2] - cz));
18354
19710
  }
18355
19711
  radius = Math.ceil(radius * 16) / 16;
19712
+ stableRadius = radius;
18356
19713
  minX = minY = minEz = -radius;
18357
19714
  maxX = maxY = maxEz = radius;
18358
19715
  } else {
@@ -18390,6 +19747,11 @@ function _computeCsmCascades(engine, camera, light, cfg, casterMeshes) {
18390
19747
  viewMinZ = Math.min(viewMinZ, cMinZ);
18391
19748
  viewMaxZ = Math.min(viewMaxZ, cMaxZ);
18392
19749
  }
19750
+ if (cfg._stabilizeCascades && stableRadius > 0) {
19751
+ const zq2 = Math.max(0.5, stableRadius / 128);
19752
+ viewMinZ = Math.floor(viewMinZ / zq2) * zq2;
19753
+ viewMaxZ = Math.ceil(viewMaxZ / zq2) * zq2;
19754
+ }
18393
19755
  }
18394
19756
  const proj0 = orthoOffCenterLH(minX, maxX, minY, maxY, viewMinZ, viewMaxZ);
18395
19757
  let transform = multiply4x4(proj0, view);
@@ -18418,6 +19780,19 @@ function _computeCsmCascades(engine, camera, light, cfg, casterMeshes) {
18418
19780
  function _castersWorldAabb(casterMeshes) {
18419
19781
  let minX = Infinity, minY = Infinity, minZ = Infinity, maxX = -Infinity, maxY = -Infinity, maxZ = -Infinity;
18420
19782
  for (const mesh of casterMeshes) {
19783
+ const ti = mesh.thinInstances;
19784
+ if (ti && ti.count > 0 && ti.matrices) {
19785
+ const a = _thinInstanceWorldAabb(mesh, ti);
19786
+ if (a) {
19787
+ minX = Math.min(minX, a._min[0]);
19788
+ maxX = Math.max(maxX, a._max[0]);
19789
+ minY = Math.min(minY, a._min[1]);
19790
+ maxY = Math.max(maxY, a._max[1]);
19791
+ minZ = Math.min(minZ, a._min[2]);
19792
+ maxZ = Math.max(maxZ, a._max[2]);
19793
+ }
19794
+ continue;
19795
+ }
18421
19796
  const world = mesh.worldMatrix;
18422
19797
  const bmin = mesh.boundMin ?? [-0.5, -0.5, -0.5];
18423
19798
  const bmax = mesh.boundMax ?? [0.5, 0.5, 0.5];
@@ -18441,6 +19816,66 @@ function _castersWorldAabb(casterMeshes) {
18441
19816
  }
18442
19817
  return { _min: [minX, minY, minZ], _max: [maxX, maxY, maxZ] };
18443
19818
  }
19819
+ let _thinCasterAabbCache = null;
19820
+ function _getThinCasterAabbCache() {
19821
+ if (!_thinCasterAabbCache) {
19822
+ _thinCasterAabbCache = /* @__PURE__ */ new WeakMap();
19823
+ }
19824
+ return _thinCasterAabbCache;
19825
+ }
19826
+ function _thinInstanceWorldAabb(mesh, ti) {
19827
+ const cache = _getThinCasterAabbCache();
19828
+ const worldVersion = mesh.worldMatrixVersion;
19829
+ const cached = cache.get(mesh);
19830
+ if (cached && cached._version === ti._version && cached._worldVersion === worldVersion) {
19831
+ return cached._aabb;
19832
+ }
19833
+ const world = mesh.worldMatrix;
19834
+ const bmin = mesh.boundMin ?? [-0.5, -0.5, -0.5];
19835
+ const bmax = mesh.boundMax ?? [0.5, 0.5, 0.5];
19836
+ const mats = ti.matrices;
19837
+ const count = Math.min(ti.count, mats.length / 16 | 0);
19838
+ let minX = Infinity, minY = Infinity, minZ = Infinity, maxX = -Infinity, maxY = -Infinity, maxZ = -Infinity;
19839
+ for (let i = 0; i < count; i++) {
19840
+ const o3 = i * 16;
19841
+ const lin = Math.abs(mats[o3]) + Math.abs(mats[o3 + 1]) + Math.abs(mats[o3 + 2]) + Math.abs(mats[o3 + 4]) + Math.abs(mats[o3 + 5]) + Math.abs(mats[o3 + 6]) + Math.abs(mats[o3 + 8]) + Math.abs(mats[o3 + 9]) + Math.abs(mats[o3 + 10]);
19842
+ if (lin < 1e-9) {
19843
+ continue;
19844
+ }
19845
+ for (let k = 0; k < 8; k++) {
19846
+ const lx = k & 1 ? bmax[0] : bmin[0];
19847
+ const ly = k & 2 ? bmax[1] : bmin[1];
19848
+ const lz = k & 4 ? bmax[2] : bmin[2];
19849
+ const ix2 = mats[o3] * lx + mats[o3 + 4] * ly + mats[o3 + 8] * lz + mats[o3 + 12];
19850
+ const iy = mats[o3 + 1] * lx + mats[o3 + 5] * ly + mats[o3 + 9] * lz + mats[o3 + 13];
19851
+ const iz = mats[o3 + 2] * lx + mats[o3 + 6] * ly + mats[o3 + 10] * lz + mats[o3 + 14];
19852
+ const wx = world[0] * ix2 + world[4] * iy + world[8] * iz + world[12];
19853
+ const wy = world[1] * ix2 + world[5] * iy + world[9] * iz + world[13];
19854
+ const wz = world[2] * ix2 + world[6] * iy + world[10] * iz + world[14];
19855
+ if (wx < minX) {
19856
+ minX = wx;
19857
+ }
19858
+ if (wx > maxX) {
19859
+ maxX = wx;
19860
+ }
19861
+ if (wy < minY) {
19862
+ minY = wy;
19863
+ }
19864
+ if (wy > maxY) {
19865
+ maxY = wy;
19866
+ }
19867
+ if (wz < minZ) {
19868
+ minZ = wz;
19869
+ }
19870
+ if (wz > maxZ) {
19871
+ maxZ = wz;
19872
+ }
19873
+ }
19874
+ }
19875
+ const aabb = Number.isFinite(minX) ? { _min: [minX, minY, minZ], _max: [maxX, maxY, maxZ] } : null;
19876
+ cache.set(mesh, { _version: ti._version, _worldVersion: worldVersion, _aabb: aabb });
19877
+ return aabb;
19878
+ }
18444
19879
  function _writeCsmUbo(out, cascades, cfg) {
18445
19880
  out.fill(0);
18446
19881
  const n3 = cascades._transforms.length;
@@ -18771,13 +20206,23 @@ function evaluateSampler(sampler, t, stride, isQuat, dst, dstOffset) {
18771
20206
  }
18772
20207
  }
18773
20208
  }
18774
- const _boneTmp$1 = new F32(16);
18775
- const RH_TO_LH$1 = new F32([-1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]);
18776
- const TRS_STRIDE$1 = 12;
18777
- const T_OFF$1 = 0;
18778
- const R_OFF$1 = 3;
18779
- const S_OFF$1 = 7;
18780
- function computeTopoOrder$1(nodes) {
20209
+ let _boneBuilder = null;
20210
+ let _boneApplier = null;
20211
+ function _installBoneControl(builder, applier) {
20212
+ _boneBuilder = builder;
20213
+ _boneApplier = applier;
20214
+ }
20215
+ const _boneTmp$2 = new F32(16);
20216
+ let _maskResolver = null;
20217
+ function _installAnimationMaskResolver(resolver) {
20218
+ _maskResolver = resolver;
20219
+ }
20220
+ const RH_TO_LH$2 = new F32([-1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]);
20221
+ const TRS_STRIDE$2 = 12;
20222
+ const T_OFF$2 = 0;
20223
+ const R_OFF$2 = 3;
20224
+ const S_OFF$2 = 7;
20225
+ function computeTopoOrder$2(nodes) {
18781
20226
  const n3 = nodes.length;
18782
20227
  const order = new I32(n3);
18783
20228
  const visited = new U8(n3);
@@ -18798,7 +20243,7 @@ function computeTopoOrder$1(nodes) {
18798
20243
  }
18799
20244
  return order;
18800
20245
  }
18801
- function createAnimationController(clip, nodes, skeletons, morphBindings, nodeTargets, excludedNodeIndices) {
20246
+ function createAnimationController(clip, nodes, skeletons, morphBindings, nodeTargets, excludedNodeIndices, boneOverrides, nodeNames) {
18802
20247
  const requiresEngine = skeletons.length > 0 || morphBindings.length > 0;
18803
20248
  const numNodes = nodes.length;
18804
20249
  const nodeTrsBindings = [];
@@ -18817,13 +20262,13 @@ function createAnimationController(clip, nodes, skeletons, morphBindings, nodeTa
18817
20262
  maskByNode.set(ni, (maskByNode.get(ni) ?? 0) | bit);
18818
20263
  }
18819
20264
  for (const [ni, mask] of maskByNode) {
18820
- nodeTrsBindings.push({ target: nodeTargets[ni], off: ni * TRS_STRIDE$1, mask });
20265
+ nodeTrsBindings.push({ target: nodeTargets[ni], off: ni * TRS_STRIDE$2, mask });
18821
20266
  }
18822
20267
  }
18823
- const currentTRS = new F32(numNodes * TRS_STRIDE$1);
20268
+ const currentTRS = new F32(numNodes * TRS_STRIDE$2);
18824
20269
  const localMat = new F32(numNodes * 16);
18825
20270
  const worldMat = new F32(numNodes * 16);
18826
- const topoOrder = computeTopoOrder$1(nodes);
20271
+ const topoOrder = computeTopoOrder$2(nodes);
18827
20272
  const boneScratch = skeletons.map((s) => s.boneMatrices);
18828
20273
  const morphBindingsByNode = [];
18829
20274
  for (let morphIndex = 0; morphIndex < morphBindings.length; morphIndex++) {
@@ -18838,11 +20283,40 @@ function createAnimationController(clip, nodes, skeletons, morphBindings, nodeTa
18838
20283
  const morphUploadF32 = new F32(4);
18839
20284
  const pointerScratch = new F32(16);
18840
20285
  let cachedEngine;
20286
+ let maskedNodes = null;
20287
+ let maskActive = false;
20288
+ let cMask = null;
20289
+ let cNames = null;
20290
+ let cLen = -1;
20291
+ let cMode = -1;
20292
+ let cDisabled = false;
20293
+ const _setMask = (mask) => {
20294
+ if (!mask || mask.disabled || !nodeNames || !_maskResolver) {
20295
+ maskActive = false;
20296
+ return;
20297
+ }
20298
+ const names = mask.names;
20299
+ if (mask === cMask && names === cNames && names.length === cLen && mask.mode === cMode && mask.disabled === cDisabled) {
20300
+ maskActive = true;
20301
+ return;
20302
+ }
20303
+ cMask = mask;
20304
+ cNames = names;
20305
+ cLen = names.length;
20306
+ cMode = mask.mode;
20307
+ cDisabled = mask.disabled;
20308
+ if (!maskedNodes) {
20309
+ maskedNodes = new U8(numNodes);
20310
+ }
20311
+ _maskResolver(mask, nodeNames, maskedNodes, numNodes);
20312
+ maskActive = true;
20313
+ };
18841
20314
  const ctrl = {
18842
20315
  time: 0,
18843
20316
  playing: true,
18844
20317
  speedRatio: 1,
18845
20318
  loop: true,
20319
+ _setMask,
18846
20320
  _debugWorldMat: worldMat,
18847
20321
  tick: clip.duration <= 0 ? noopAnimationTick : (deltaMs, engine) => {
18848
20322
  var _a, _b2;
@@ -18868,31 +20342,37 @@ function createAnimationController(clip, nodes, skeletons, morphBindings, nodeTa
18868
20342
  const t = ctrl.time;
18869
20343
  for (let i = 0; i < numNodes; i++) {
18870
20344
  const n3 = nodes[i];
18871
- const off = i * TRS_STRIDE$1;
18872
- currentTRS[off + T_OFF$1] = n3.tx;
18873
- currentTRS[off + T_OFF$1 + 1] = n3.ty;
18874
- currentTRS[off + T_OFF$1 + 2] = n3.tz;
18875
- currentTRS[off + R_OFF$1] = n3.rx;
18876
- currentTRS[off + R_OFF$1 + 1] = n3.ry;
18877
- currentTRS[off + R_OFF$1 + 2] = n3.rz;
18878
- currentTRS[off + R_OFF$1 + 3] = n3.rw;
18879
- currentTRS[off + S_OFF$1] = n3.sx;
18880
- currentTRS[off + S_OFF$1 + 1] = n3.sy;
18881
- currentTRS[off + S_OFF$1 + 2] = n3.sz;
20345
+ const off = i * TRS_STRIDE$2;
20346
+ currentTRS[off + T_OFF$2] = n3.tx;
20347
+ currentTRS[off + T_OFF$2 + 1] = n3.ty;
20348
+ currentTRS[off + T_OFF$2 + 2] = n3.tz;
20349
+ currentTRS[off + R_OFF$2] = n3.rx;
20350
+ currentTRS[off + R_OFF$2 + 1] = n3.ry;
20351
+ currentTRS[off + R_OFF$2 + 2] = n3.rz;
20352
+ currentTRS[off + R_OFF$2 + 3] = n3.rw;
20353
+ currentTRS[off + S_OFF$2] = n3.sx;
20354
+ currentTRS[off + S_OFF$2 + 1] = n3.sy;
20355
+ currentTRS[off + S_OFF$2 + 2] = n3.sz;
20356
+ }
20357
+ if (boneOverrides !== void 0 && boneOverrides.size > 0) {
20358
+ _boneApplier == null ? void 0 : _boneApplier(boneOverrides, currentTRS, numNodes);
18882
20359
  }
18883
20360
  for (let channelIndex = 0; channelIndex < clip.channels.length; channelIndex++) {
18884
20361
  const ch = clip.channels[channelIndex];
20362
+ if (_maskResolver !== null && maskActive && ch.nodeIdx >= 0 && maskedNodes[ch.nodeIdx]) {
20363
+ continue;
20364
+ }
18885
20365
  const sampler = clip.samplers[ch.samplerIdx];
18886
- const base = ch.nodeIdx * TRS_STRIDE$1;
20366
+ const base = ch.nodeIdx * TRS_STRIDE$2;
18887
20367
  switch (ch.path) {
18888
20368
  case PATH_TRANSLATION:
18889
- evaluateSampler(sampler, t, 3, false, currentTRS, base + T_OFF$1);
20369
+ evaluateSampler(sampler, t, 3, false, currentTRS, base + T_OFF$2);
18890
20370
  break;
18891
20371
  case PATH_ROTATION:
18892
- evaluateSampler(sampler, t, 4, true, currentTRS, base + R_OFF$1);
20372
+ evaluateSampler(sampler, t, 4, true, currentTRS, base + R_OFF$2);
18893
20373
  break;
18894
20374
  case PATH_SCALE:
18895
- evaluateSampler(sampler, t, 3, false, currentTRS, base + S_OFF$1);
20375
+ evaluateSampler(sampler, t, 3, false, currentTRS, base + S_OFF$2);
18896
20376
  break;
18897
20377
  case PATH_WEIGHTS: {
18898
20378
  const bindings = morphBindingsByNode[ch.nodeIdx];
@@ -18921,42 +20401,42 @@ function createAnimationController(clip, nodes, skeletons, morphBindings, nodeTa
18921
20401
  const b = nodeTrsBindings[bi];
18922
20402
  const o3 = b.off;
18923
20403
  if (b.mask & 1) {
18924
- b.target.position.set(currentTRS[o3 + T_OFF$1], currentTRS[o3 + T_OFF$1 + 1], currentTRS[o3 + T_OFF$1 + 2]);
20404
+ b.target.position.set(currentTRS[o3 + T_OFF$2], currentTRS[o3 + T_OFF$2 + 1], currentTRS[o3 + T_OFF$2 + 2]);
18925
20405
  }
18926
20406
  if (b.mask & 2) {
18927
- b.target.rotationQuaternion.set(currentTRS[o3 + R_OFF$1], currentTRS[o3 + R_OFF$1 + 1], currentTRS[o3 + R_OFF$1 + 2], currentTRS[o3 + R_OFF$1 + 3]);
20407
+ b.target.rotationQuaternion.set(currentTRS[o3 + R_OFF$2], currentTRS[o3 + R_OFF$2 + 1], currentTRS[o3 + R_OFF$2 + 2], currentTRS[o3 + R_OFF$2 + 3]);
18928
20408
  }
18929
20409
  if (b.mask & 4) {
18930
- b.target.scaling.set(currentTRS[o3 + S_OFF$1], currentTRS[o3 + S_OFF$1 + 1], currentTRS[o3 + S_OFF$1 + 2]);
20410
+ b.target.scaling.set(currentTRS[o3 + S_OFF$2], currentTRS[o3 + S_OFF$2 + 1], currentTRS[o3 + S_OFF$2 + 2]);
18931
20411
  }
18932
20412
  }
18933
20413
  for (let idx = 0; idx < numNodes; idx++) {
18934
20414
  const nodeIdx = topoOrder[idx];
18935
20415
  const node = nodes[nodeIdx];
18936
- const off = nodeIdx * TRS_STRIDE$1;
20416
+ const off = nodeIdx * TRS_STRIDE$2;
18937
20417
  if (node._matrix) {
18938
20418
  localMat.set(node._matrix, nodeIdx * 16);
18939
20419
  } else {
18940
20420
  mat4ComposeInto(
18941
20421
  localMat,
18942
20422
  nodeIdx * 16,
18943
- currentTRS[off + T_OFF$1],
18944
- currentTRS[off + T_OFF$1 + 1],
18945
- currentTRS[off + T_OFF$1 + 2],
18946
- currentTRS[off + R_OFF$1],
18947
- currentTRS[off + R_OFF$1 + 1],
18948
- currentTRS[off + R_OFF$1 + 2],
18949
- currentTRS[off + R_OFF$1 + 3],
18950
- currentTRS[off + S_OFF$1],
18951
- currentTRS[off + S_OFF$1 + 1],
18952
- currentTRS[off + S_OFF$1 + 2]
20423
+ currentTRS[off + T_OFF$2],
20424
+ currentTRS[off + T_OFF$2 + 1],
20425
+ currentTRS[off + T_OFF$2 + 2],
20426
+ currentTRS[off + R_OFF$2],
20427
+ currentTRS[off + R_OFF$2 + 1],
20428
+ currentTRS[off + R_OFF$2 + 2],
20429
+ currentTRS[off + R_OFF$2 + 3],
20430
+ currentTRS[off + S_OFF$2],
20431
+ currentTRS[off + S_OFF$2 + 1],
20432
+ currentTRS[off + S_OFF$2 + 2]
18953
20433
  );
18954
20434
  }
18955
20435
  const parentIdx = node.parentIdx;
18956
20436
  if (parentIdx >= 0) {
18957
20437
  mat4MultiplyInto(worldMat, nodeIdx * 16, worldMat, parentIdx * 16, localMat, nodeIdx * 16);
18958
20438
  } else {
18959
- mat4MultiplyInto(worldMat, nodeIdx * 16, RH_TO_LH$1, 0, localMat, nodeIdx * 16);
20439
+ mat4MultiplyInto(worldMat, nodeIdx * 16, RH_TO_LH$2, 0, localMat, nodeIdx * 16);
18960
20440
  }
18961
20441
  }
18962
20442
  for (let si = 0; si < skeletons.length; si++) {
@@ -18965,8 +20445,8 @@ function createAnimationController(clip, nodes, skeletons, morphBindings, nodeTa
18965
20445
  for (let bi = 0; bi < skel.boneCount; bi++) {
18966
20446
  const jointIdx = skel.jointNodes[bi];
18967
20447
  const ibmOff = bi * 16;
18968
- mat4MultiplyInto(_boneTmp$1, 0, skel.invMeshWorld, 0, worldMat, jointIdx * 16);
18969
- mat4MultiplyInto(boneData, bi * 16, _boneTmp$1, 0, skel.inverseBindMatrices, ibmOff);
20448
+ mat4MultiplyInto(_boneTmp$2, 0, skel.invMeshWorld, 0, worldMat, jointIdx * 16);
20449
+ mat4MultiplyInto(boneData, bi * 16, _boneTmp$2, 0, skel.inverseBindMatrices, ibmOff);
18970
20450
  }
18971
20451
  const texWidth = skel.boneCount * 4;
18972
20452
  device.queue.writeTexture(
@@ -18982,6 +20462,318 @@ function createAnimationController(clip, nodes, skeletons, morphBindings, nodeTa
18982
20462
  }
18983
20463
  function noopAnimationTick() {
18984
20464
  }
20465
+ const TRS_STRIDE$1 = 12;
20466
+ const T_OFF$1 = 0;
20467
+ const R_OFF$1 = 3;
20468
+ const S_OFF$1 = 7;
20469
+ const RH_TO_LH$1 = new F32([-1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]);
20470
+ const _boneTmp$1 = new F32(16);
20471
+ function computeTopoOrder$1(nodes) {
20472
+ const n3 = nodes.length;
20473
+ const order = new I32(n3);
20474
+ const visited = new U8(n3);
20475
+ let cursor = 0;
20476
+ function visit(idx) {
20477
+ if (visited[idx]) {
20478
+ return;
20479
+ }
20480
+ visited[idx] = 1;
20481
+ const p3 = nodes[idx].parentIdx;
20482
+ if (p3 >= 0) {
20483
+ visit(p3);
20484
+ }
20485
+ order[cursor++] = idx;
20486
+ }
20487
+ for (let i = 0; i < n3; i++) {
20488
+ visit(i);
20489
+ }
20490
+ return order;
20491
+ }
20492
+ function resetTRS(nodes, numNodes, currentTRS) {
20493
+ for (let i = 0; i < numNodes; i++) {
20494
+ const n3 = nodes[i];
20495
+ const off = i * TRS_STRIDE$1;
20496
+ currentTRS[off + T_OFF$1] = n3.tx;
20497
+ currentTRS[off + T_OFF$1 + 1] = n3.ty;
20498
+ currentTRS[off + T_OFF$1 + 2] = n3.tz;
20499
+ currentTRS[off + R_OFF$1] = n3.rx;
20500
+ currentTRS[off + R_OFF$1 + 1] = n3.ry;
20501
+ currentTRS[off + R_OFF$1 + 2] = n3.rz;
20502
+ currentTRS[off + R_OFF$1 + 3] = n3.rw;
20503
+ currentTRS[off + S_OFF$1] = n3.sx;
20504
+ currentTRS[off + S_OFF$1 + 1] = n3.sy;
20505
+ currentTRS[off + S_OFF$1 + 2] = n3.sz;
20506
+ }
20507
+ }
20508
+ function computeNodeWorldMatrices(nodes, numNodes, topoOrder, currentTRS, localMat, worldMat) {
20509
+ for (let idx = 0; idx < numNodes; idx++) {
20510
+ const nodeIdx = topoOrder[idx];
20511
+ const node = nodes[nodeIdx];
20512
+ const off = nodeIdx * TRS_STRIDE$1;
20513
+ if (node._matrix) {
20514
+ localMat.set(node._matrix, nodeIdx * 16);
20515
+ } else {
20516
+ mat4ComposeInto(
20517
+ localMat,
20518
+ nodeIdx * 16,
20519
+ currentTRS[off + T_OFF$1],
20520
+ currentTRS[off + T_OFF$1 + 1],
20521
+ currentTRS[off + T_OFF$1 + 2],
20522
+ currentTRS[off + R_OFF$1],
20523
+ currentTRS[off + R_OFF$1 + 1],
20524
+ currentTRS[off + R_OFF$1 + 2],
20525
+ currentTRS[off + R_OFF$1 + 3],
20526
+ currentTRS[off + S_OFF$1],
20527
+ currentTRS[off + S_OFF$1 + 1],
20528
+ currentTRS[off + S_OFF$1 + 2]
20529
+ );
20530
+ }
20531
+ const parentIdx = node.parentIdx;
20532
+ if (parentIdx >= 0) {
20533
+ mat4MultiplyInto(worldMat, nodeIdx * 16, worldMat, parentIdx * 16, localMat, nodeIdx * 16);
20534
+ } else {
20535
+ mat4MultiplyInto(worldMat, nodeIdx * 16, RH_TO_LH$1, 0, localMat, nodeIdx * 16);
20536
+ }
20537
+ }
20538
+ }
20539
+ function writeBoneTextures(device, skeletons, worldMat) {
20540
+ var _a;
20541
+ for (let si = 0; si < skeletons.length; si++) {
20542
+ const skel = skeletons[si];
20543
+ const boneData = skel.boneMatrices;
20544
+ for (let bi = 0; bi < skel.boneCount; bi++) {
20545
+ const jointIdx = skel.jointNodes[bi];
20546
+ const ibmOff = bi * 16;
20547
+ mat4MultiplyInto(_boneTmp$1, 0, skel.invMeshWorld, 0, worldMat, jointIdx * 16);
20548
+ mat4MultiplyInto(boneData, bi * 16, _boneTmp$1, 0, skel.inverseBindMatrices, ibmOff);
20549
+ }
20550
+ const texWidth = skel.boneCount * 4;
20551
+ device.queue.writeTexture(
20552
+ { texture: ((_a = skel.runtimeSkeleton) == null ? void 0 : _a.boneTexture) ?? skel.boneTexture },
20553
+ boneData.buffer,
20554
+ { bytesPerRow: texWidth * 16 },
20555
+ { width: texWidth, height: 1 }
20556
+ );
20557
+ }
20558
+ }
20559
+ function getBoneByName(skeleton, name) {
20560
+ return skeleton._byName.get(name);
20561
+ }
20562
+ function ensureOverride(skeleton, bone) {
20563
+ let o3 = skeleton._overrides.get(bone._nodeIndex);
20564
+ if (!o3) {
20565
+ o3 = { mask: 0, tx: 0, ty: 0, tz: 0, rx: 0, ry: 0, rz: 0, rw: 1, sx: 1, sy: 1, sz: 1 };
20566
+ skeleton._overrides.set(bone._nodeIndex, o3);
20567
+ }
20568
+ return o3;
20569
+ }
20570
+ function setBonePosition(skeleton, bone, x, y, z) {
20571
+ const o3 = ensureOverride(skeleton, bone);
20572
+ o3.tx = x;
20573
+ o3.ty = y;
20574
+ o3.tz = z;
20575
+ o3.mask |= 1;
20576
+ skeleton._bake();
20577
+ }
20578
+ function setBoneRotationQuaternion(skeleton, bone, x, y, z, w) {
20579
+ const o3 = ensureOverride(skeleton, bone);
20580
+ o3.rx = x;
20581
+ o3.ry = y;
20582
+ o3.rz = z;
20583
+ o3.rw = w;
20584
+ o3.mask |= 2;
20585
+ skeleton._bake();
20586
+ }
20587
+ function setBoneScaling(skeleton, bone, x, y, z) {
20588
+ const o3 = ensureOverride(skeleton, bone);
20589
+ o3.sx = x;
20590
+ o3.sy = y;
20591
+ o3.sz = z;
20592
+ o3.mask |= 4;
20593
+ skeleton._bake();
20594
+ }
20595
+ function setBoneVisible(skeleton, bone, visible) {
20596
+ if (!visible) {
20597
+ setBoneScaling(skeleton, bone, 0, 0, 0);
20598
+ return;
20599
+ }
20600
+ const o3 = skeleton._overrides.get(bone._nodeIndex);
20601
+ if (o3) {
20602
+ o3.mask &= -5;
20603
+ if (o3.mask === 0) {
20604
+ skeleton._overrides.delete(bone._nodeIndex);
20605
+ }
20606
+ skeleton._bake();
20607
+ }
20608
+ }
20609
+ function clearBoneOverride(skeleton, bone) {
20610
+ if (skeleton._overrides.delete(bone._nodeIndex)) {
20611
+ skeleton._bake();
20612
+ }
20613
+ }
20614
+ function applyOverridesToTRS(overrides, currentTRS, numNodes) {
20615
+ for (const [ni, o3] of overrides) {
20616
+ if (ni < 0 || ni >= numNodes) {
20617
+ continue;
20618
+ }
20619
+ const off = ni * TRS_STRIDE$1;
20620
+ const m2 = o3.mask;
20621
+ if (m2 & 1) {
20622
+ currentTRS[off + T_OFF$1] = o3.tx;
20623
+ currentTRS[off + T_OFF$1 + 1] = o3.ty;
20624
+ currentTRS[off + T_OFF$1 + 2] = o3.tz;
20625
+ }
20626
+ if (m2 & 2) {
20627
+ currentTRS[off + R_OFF$1] = o3.rx;
20628
+ currentTRS[off + R_OFF$1 + 1] = o3.ry;
20629
+ currentTRS[off + R_OFF$1 + 2] = o3.rz;
20630
+ currentTRS[off + R_OFF$1 + 3] = o3.rw;
20631
+ }
20632
+ if (m2 & 4) {
20633
+ currentTRS[off + S_OFF$1] = o3.sx;
20634
+ currentTRS[off + S_OFF$1 + 1] = o3.sy;
20635
+ currentTRS[off + S_OFF$1 + 2] = o3.sz;
20636
+ }
20637
+ }
20638
+ }
20639
+ function buildRestNodes(json, parentMap) {
20640
+ var _a;
20641
+ const nodeCount = ((_a = json.nodes) == null ? void 0 : _a.length) ?? 0;
20642
+ const nodes = [];
20643
+ for (let i = 0; i < nodeCount; i++) {
20644
+ const n3 = json.nodes[i];
20645
+ const t = n3.translation ?? [0, 0, 0];
20646
+ const r = n3.rotation ?? [0, 0, 0, 1];
20647
+ const s = n3.scale ?? [1, 1, 1];
20648
+ nodes.push({
20649
+ parentIdx: findParent(parentMap, i),
20650
+ _matrix: n3.matrix,
20651
+ tx: t[0],
20652
+ ty: t[1],
20653
+ tz: t[2],
20654
+ rx: r[0],
20655
+ ry: r[1],
20656
+ rz: r[2],
20657
+ rw: r[3],
20658
+ sx: s[0],
20659
+ sy: s[1],
20660
+ sz: s[2]
20661
+ });
20662
+ }
20663
+ return nodes;
20664
+ }
20665
+ function resolveIBMs(json, binChunk, skin) {
20666
+ const jointCount = skin.joints.length;
20667
+ if (skin.inverseBindMatrices !== void 0) {
20668
+ const ibm = resolveAccessor(json, binChunk, skin.inverseBindMatrices);
20669
+ return new F32(ibm._data.buffer, ibm._data.byteOffset, jointCount * 16);
20670
+ }
20671
+ const out = new F32(jointCount * 16);
20672
+ for (let i = 0; i < jointCount; i++) {
20673
+ const o3 = i * 16;
20674
+ out[o3] = out[o3 + 5] = out[o3 + 10] = out[o3 + 15] = 1;
20675
+ }
20676
+ return out;
20677
+ }
20678
+ function buildNodeToMeshIndices(json) {
20679
+ var _a;
20680
+ const nodeCount = ((_a = json.nodes) == null ? void 0 : _a.length) ?? 0;
20681
+ const map = /* @__PURE__ */ new Map();
20682
+ let gpuIdx = 0;
20683
+ for (let ni = 0; ni < nodeCount; ni++) {
20684
+ const node = json.nodes[ni];
20685
+ if (node.mesh === void 0) {
20686
+ continue;
20687
+ }
20688
+ const indices = [];
20689
+ for (let p3 = 0; p3 < json.meshes[node.mesh].primitives.length; p3++) {
20690
+ indices.push(gpuIdx++);
20691
+ }
20692
+ map.set(ni, indices);
20693
+ }
20694
+ return map;
20695
+ }
20696
+ function extractSkinGroups(json, binChunk, meshes, parentMap, worldMatrixCache) {
20697
+ var _a, _b2;
20698
+ const nodeCount = ((_a = json.nodes) == null ? void 0 : _a.length) ?? 0;
20699
+ const nodeToMeshIndices = buildNodeToMeshIndices(json);
20700
+ const groups = [];
20701
+ for (let nodeIdx = 0; nodeIdx < nodeCount; nodeIdx++) {
20702
+ const node = json.nodes[nodeIdx];
20703
+ if (node.skin === void 0 || !json.skins) {
20704
+ continue;
20705
+ }
20706
+ const meshIndices = nodeToMeshIndices.get(nodeIdx);
20707
+ if (!meshIndices) {
20708
+ continue;
20709
+ }
20710
+ const skin = json.skins[node.skin];
20711
+ const jointNodes = skin.joints;
20712
+ const inverseBindMatrices = resolveIBMs(json, binChunk, skin);
20713
+ const meshWorldMatrix = computeNodeWorldMatrix(json, nodeIdx, parentMap, worldMatrixCache);
20714
+ const invMeshWorld = mat4Invert(meshWorldMatrix) ?? mat4Identity();
20715
+ const bindings = [];
20716
+ for (const mi of meshIndices) {
20717
+ const skeleton = (_b2 = meshes[mi]) == null ? void 0 : _b2.skeleton;
20718
+ if (!skeleton) {
20719
+ continue;
20720
+ }
20721
+ bindings.push({
20722
+ jointNodes,
20723
+ inverseBindMatrices,
20724
+ invMeshWorld,
20725
+ boneTexture: skeleton.boneTexture,
20726
+ boneCount: jointNodes.length,
20727
+ boneMatrices: skeleton.boneMatrices,
20728
+ runtimeSkeleton: skeleton
20729
+ });
20730
+ }
20731
+ if (bindings.length > 0) {
20732
+ groups.push({ jointNodes, bindings });
20733
+ }
20734
+ }
20735
+ return groups;
20736
+ }
20737
+ async function buildSkeletons(ctx, meshes, overrides) {
20738
+ const { _json: json, _binChunk: binChunk, _engine: engine, _parentMap: parentMap, _worldMatrixCache: worldMatrixCache } = ctx;
20739
+ const groups = extractSkinGroups(json, binChunk, meshes, parentMap, worldMatrixCache);
20740
+ if (groups.length === 0) {
20741
+ return {};
20742
+ }
20743
+ const nodes = buildRestNodes(json, parentMap);
20744
+ const numNodes = nodes.length;
20745
+ const topoOrder = computeTopoOrder$1(nodes);
20746
+ const currentTRS = new F32(numNodes * TRS_STRIDE$1);
20747
+ const localMat = new F32(numNodes * 16);
20748
+ const worldMat = new F32(numNodes * 16);
20749
+ const device = engine._device;
20750
+ const allBindings = groups.flatMap((g) => g.bindings);
20751
+ const bake = () => {
20752
+ resetTRS(nodes, numNodes, currentTRS);
20753
+ if (overrides.size > 0) {
20754
+ applyOverridesToTRS(overrides, currentTRS, numNodes);
20755
+ }
20756
+ computeNodeWorldMatrices(nodes, numNodes, topoOrder, currentTRS, localMat, worldMat);
20757
+ writeBoneTextures(device, allBindings, worldMat);
20758
+ };
20759
+ const skeletons = groups.map((g) => {
20760
+ var _a, _b2;
20761
+ const bones = [];
20762
+ const byName = /* @__PURE__ */ new Map();
20763
+ for (const ni of g.jointNodes) {
20764
+ const bone = { name: ((_b2 = (_a = json.nodes) == null ? void 0 : _a[ni]) == null ? void 0 : _b2.name) ?? `bone_${ni}`, _nodeIndex: ni };
20765
+ bones.push(bone);
20766
+ if (!byName.has(bone.name)) {
20767
+ byName.set(bone.name, bone);
20768
+ }
20769
+ }
20770
+ return { bones, _byName: byName, _overrides: overrides, _bake: bake };
20771
+ });
20772
+ return { skeletons };
20773
+ }
20774
+ function enableBoneControl() {
20775
+ _installBoneControl(buildSkeletons, applyOverridesToTRS);
20776
+ }
18985
20777
  const DEFAULT_FRAME_RATE$2 = 60;
18986
20778
  function playAnimation(group) {
18987
20779
  group.isPlaying = true;
@@ -19015,13 +20807,15 @@ function tickAnimation(group, deltaMs, engine) {
19015
20807
  }
19016
20808
  }
19017
20809
  function syncControllerFromGroup(group, ctrl) {
20810
+ var _a;
19018
20811
  ctrl.time = group.currentFrame;
19019
20812
  ctrl.playing = group.isPlaying;
19020
20813
  ctrl.speedRatio = group.speedRatio;
19021
20814
  ctrl.loop = group.loopAnimation;
20815
+ (_a = ctrl._setMask) == null ? void 0 : _a.call(ctrl, group.mask ?? null);
19022
20816
  }
19023
20817
  function createAnimationGroups(animData) {
19024
- const { clips, nodes, skeletons, morphBindings, nodeTargets, excludedNodeIndices } = animData;
20818
+ const { clips, nodes, skeletons, morphBindings, nodeTargets, excludedNodeIndices, nodeNames, boneOverrides } = animData;
19025
20819
  const hasPointer = clips.some((c2) => c2.channels.some((ch) => ch.path === PATH_POINTER));
19026
20820
  const hasNodeWriteback = clips.some(
19027
20821
  (c2) => c2.channels.some(
@@ -19032,7 +20826,7 @@ function createAnimationGroups(animData) {
19032
20826
  return [];
19033
20827
  }
19034
20828
  return clips.map((clip, clipIndex) => {
19035
- const ctrl = createAnimationController(clip, nodes, skeletons, morphBindings, nodeTargets, excludedNodeIndices);
20829
+ const ctrl = createAnimationController(clip, nodes, skeletons, morphBindings, nodeTargets, excludedNodeIndices, boneOverrides, nodeNames);
19036
20830
  const group = {
19037
20831
  name: clip.name || `animation_${clipIndex}`,
19038
20832
  duration: clip.duration,
@@ -19060,6 +20854,26 @@ const animationGroup = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defi
19060
20854
  stopAnimation,
19061
20855
  tickAnimation
19062
20856
  }, Symbol.toStringTag, { value: "Module" }));
20857
+ var AnimationGroupMaskMode = /* @__PURE__ */ ((AnimationGroupMaskMode2) => {
20858
+ AnimationGroupMaskMode2[AnimationGroupMaskMode2["Include"] = 0] = "Include";
20859
+ AnimationGroupMaskMode2[AnimationGroupMaskMode2["Exclude"] = 1] = "Exclude";
20860
+ return AnimationGroupMaskMode2;
20861
+ })(AnimationGroupMaskMode || {});
20862
+ function animationGroupMaskRetainsTarget(mask, name) {
20863
+ if (mask.disabled) {
20864
+ return true;
20865
+ }
20866
+ return mask.names.indexOf(name) !== -1 === (mask.mode === 0);
20867
+ }
20868
+ function resolveAnimationMask(mask, nodeNames, out, numNodes) {
20869
+ for (let i = 0; i < numNodes; i++) {
20870
+ out[i] = animationGroupMaskRetainsTarget(mask, nodeNames[i] ?? "") ? 0 : 1;
20871
+ }
20872
+ }
20873
+ function createAnimationGroupMask(names = [], mode = 0) {
20874
+ _installAnimationMaskResolver(resolveAnimationMask);
20875
+ return { mode, names: names.slice(), disabled: false };
20876
+ }
19063
20877
  function setAnimationWeight(group, weight) {
19064
20878
  if (!Number.isFinite(weight) || weight < 0 || weight > 1) {
19065
20879
  throw new Error(`Animation weight must be a finite number between 0 and 1, got ${weight}`);
@@ -20159,53 +21973,6 @@ const createMorphTargets$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Objec
20159
21973
  createMorphTargets,
20160
21974
  setMorphTargetWeights
20161
21975
  }, Symbol.toStringTag, { value: "Module" }));
20162
- const MSH_HAS_TANGENTS = 1 << 0;
20163
- const MSH_HAS_SKELETON = 1 << 1;
20164
- const MSH_HAS_SKELETON_8 = 1 << 2;
20165
- const MSH_HAS_MORPH_TARGETS = 1 << 3;
20166
- const MSH_HAS_THIN_INSTANCES = 1 << 4;
20167
- const MSH_HAS_INSTANCE_COLOR = 1 << 5;
20168
- const MSH_HAS_VERTEX_COLOR = 1 << 6;
20169
- const MSH_HAS_UV2 = 1 << 7;
20170
- const MSH_RECEIVE_SHADOWS = 1 << 8;
20171
- const MSH_VAT = 1 << 9;
20172
- function _computeMeshFeatures(mesh, receiveShadows = false) {
20173
- const gpu = mesh._gpu;
20174
- let features = 0;
20175
- if (gpu.tangentBuffer) {
20176
- features |= MSH_HAS_TANGENTS;
20177
- }
20178
- if (mesh.vat) {
20179
- features |= MSH_VAT;
20180
- if (mesh.vat.joints1Buffer) {
20181
- features |= MSH_HAS_SKELETON_8;
20182
- }
20183
- } else if (mesh.skeleton) {
20184
- features |= MSH_HAS_SKELETON;
20185
- if (mesh.skeleton.joints1Buffer) {
20186
- features |= MSH_HAS_SKELETON_8;
20187
- }
20188
- }
20189
- if (mesh.morphTargets) {
20190
- features |= MSH_HAS_MORPH_TARGETS;
20191
- }
20192
- if (mesh.thinInstances) {
20193
- features |= MSH_HAS_THIN_INSTANCES;
20194
- if (mesh.thinInstances.colors) {
20195
- features |= MSH_HAS_INSTANCE_COLOR;
20196
- }
20197
- }
20198
- if (gpu.colorBuffer) {
20199
- features |= MSH_HAS_VERTEX_COLOR;
20200
- }
20201
- if (gpu.uv2Buffer) {
20202
- features |= MSH_HAS_UV2;
20203
- }
20204
- if (receiveShadows) {
20205
- features |= MSH_RECEIVE_SHADOWS;
20206
- }
20207
- return features;
20208
- }
20209
21976
  const STAGE_VERTEX = 1;
20210
21977
  const VAT_HELPERS = `struct vatUniforms {
20211
21978
  params: vec4<f32>,
@@ -20471,6 +22238,24 @@ function writeVec3(out, offset, v2) {
20471
22238
  out[offset + 1] = v2.y;
20472
22239
  out[offset + 2] = v2.z;
20473
22240
  }
22241
+ function quatFromLookDirectionRH(forward, up) {
22242
+ let fx2 = forward.x, fy = forward.y, fz = forward.z;
22243
+ const fl = Math.hypot(fx2, fy, fz) || 1;
22244
+ fx2 /= fl;
22245
+ fy /= fl;
22246
+ fz /= fl;
22247
+ let rx2 = up.y * fz - up.z * fy;
22248
+ let ry = up.z * fx2 - up.x * fz;
22249
+ let rz = up.x * fy - up.y * fx2;
22250
+ const rl = Math.hypot(rx2, ry, rz) || 1;
22251
+ rx2 /= rl;
22252
+ ry /= rl;
22253
+ rz /= rl;
22254
+ const ux = fy * rz - fz * ry;
22255
+ const uy = fz * rx2 - fx2 * rz;
22256
+ const uz = fx2 * ry - fy * rx2;
22257
+ return _quatFromRotationBasis(rx2, ux, fx2, ry, uy, fy, rz, uz, fz);
22258
+ }
20474
22259
  function setThinInstances(mesh, matrices, count) {
20475
22260
  if (!mesh.thinInstances) {
20476
22261
  mesh.thinInstances = {
@@ -21246,7 +23031,7 @@ async function pickAsync(picker, x, y, options) {
21246
23031
  const gsMeshCount = gsMeshes.length;
21247
23032
  const gsNextIdStart = nextId;
21248
23033
  if (gsMeshCount > 0) {
21249
- const gsModule = await import("./gs-picking-pipeline-CERN-Trj.js");
23034
+ const gsModule = await import("./gs-picking-pipeline-DlogO8fI.js");
21250
23035
  gsModule.computeGsPickMatrix(_gsPickMatrix, px2, py, w, h);
21251
23036
  gsModule.gsPickWritePickMatrixAndBind(pass, engine, _gsPickMatrix);
21252
23037
  const resMap = picker._gsMeshResources ?? (picker._gsMeshResources = /* @__PURE__ */ new Map());
@@ -21397,7 +23182,7 @@ function disposePicker(picker) {
21397
23182
  picker._sceneBG = null;
21398
23183
  }
21399
23184
  if (picker._gsMeshResources) {
21400
- void import("./gs-picking-pipeline-CERN-Trj.js").then((m2) => {
23185
+ void import("./gs-picking-pipeline-DlogO8fI.js").then((m2) => {
21401
23186
  if (!picker._gsMeshResources) {
21402
23187
  return;
21403
23188
  }
@@ -26343,7 +28128,7 @@ function isBillboardSpriteHandleAlive(handle) {
26343
28128
  }
26344
28129
  function addBillboardSystem(scene, system) {
26345
28130
  addDeferredSceneRenderables(scene, async (engine) => {
26346
- const { buildBillboardRenderable } = await import("./billboard-renderable-IJfCpeDS.js");
28131
+ const { buildBillboardRenderable } = await import("./billboard-renderable-CmIfD7IP.js");
26347
28132
  const built = buildBillboardRenderable(engine, system);
26348
28133
  return { renderables: [built.renderable], dispose: built.dispose };
26349
28134
  });
@@ -39039,7 +40824,7 @@ function createHavokWorld(scene, hknp, gravity) {
39039
40824
  return world;
39040
40825
  }
39041
40826
  async function enableHavokFloatingOrigin(world, floatingOriginWorldRadius = 1e5) {
39042
- const fo = await import("./havok-floating-origin-VVdJRUYc.js");
40827
+ const fo = await import("./havok-floating-origin-CQ7yE-XD.js");
39043
40828
  world._fo = fo.createHavokFloatingOriginContext(world._hkWorld, world._gravity, floatingOriginWorldRadius);
39044
40829
  }
39045
40830
  function _stepWorld(world, deltaMs) {
@@ -39490,7 +41275,7 @@ function addPhysicsShapeChildFromParent(world, container, parentNode, child, chi
39490
41275
  throw new Error("Cannot add physics child shape from a singular parent transform.");
39491
41276
  }
39492
41277
  const childToParent = mat4Multiply(invParent, childNode.worldMatrix);
39493
- const transform = decomposeMatrix(childToParent);
41278
+ const transform = mat4Decompose(childToParent);
39494
41279
  addPhysicsShapeChild(world, container, child, transform.translation, transform.rotation, transform.scale);
39495
41280
  }
39496
41281
  function setPhysicsShapeMaterial(world, shape, friction, restitution) {
@@ -39535,59 +41320,6 @@ function buildMassProperties(world, body) {
39535
41320
  }
39536
41321
  return [[0, 0, 0], 1, [1, 1, 1], [0, 0, 0, 1]];
39537
41322
  }
39538
- function decomposeMatrix(m2) {
39539
- const sx = Math.hypot(m2[0], m2[1], m2[2]);
39540
- const sy = Math.hypot(m2[4], m2[5], m2[6]);
39541
- const sz = Math.hypot(m2[8], m2[9], m2[10]);
39542
- const invSx = sx > 1e-8 ? 1 / sx : 0;
39543
- const invSy = sy > 1e-8 ? 1 / sy : 0;
39544
- const invSz = sz > 1e-8 ? 1 / sz : 0;
39545
- const r00 = m2[0] * invSx;
39546
- const r01 = m2[4] * invSy;
39547
- const r02 = m2[8] * invSz;
39548
- const r10 = m2[1] * invSx;
39549
- const r11 = m2[5] * invSy;
39550
- const r12 = m2[9] * invSz;
39551
- const r20 = m2[2] * invSx;
39552
- const r21 = m2[6] * invSy;
39553
- const r22 = m2[10] * invSz;
39554
- let x;
39555
- let y;
39556
- let z;
39557
- let w;
39558
- const trace = r00 + r11 + r22;
39559
- if (trace > 0) {
39560
- const s = Math.sqrt(trace + 1) * 2;
39561
- w = 0.25 * s;
39562
- x = (r21 - r12) / s;
39563
- y = (r02 - r20) / s;
39564
- z = (r10 - r01) / s;
39565
- } else if (r00 > r11 && r00 > r22) {
39566
- const s = Math.sqrt(1 + r00 - r11 - r22) * 2;
39567
- w = (r21 - r12) / s;
39568
- x = 0.25 * s;
39569
- y = (r01 + r10) / s;
39570
- z = (r02 + r20) / s;
39571
- } else if (r11 > r22) {
39572
- const s = Math.sqrt(1 + r11 - r00 - r22) * 2;
39573
- w = (r02 - r20) / s;
39574
- x = (r01 + r10) / s;
39575
- y = 0.25 * s;
39576
- z = (r12 + r21) / s;
39577
- } else {
39578
- const s = Math.sqrt(1 + r22 - r00 - r11) * 2;
39579
- w = (r10 - r01) / s;
39580
- x = (r02 + r20) / s;
39581
- y = (r12 + r21) / s;
39582
- z = 0.25 * s;
39583
- }
39584
- const invLen = 1 / Math.hypot(x, y, z, w);
39585
- return {
39586
- translation: { x: m2[12], y: m2[13], z: m2[14] },
39587
- rotation: { x: x * invLen, y: y * invLen, z: z * invLen, w: w * invLen },
39588
- scale: { x: sx, y: sy, z: sz }
39589
- };
39590
- }
39591
41323
  function applyPhysicsImpulse(world, body, impulse, point) {
39592
41324
  const hknp = world._hknp;
39593
41325
  let loc = point;
@@ -42003,705 +43735,738 @@ function _assertTileCache(plugin) {
42003
43735
  }
42004
43736
  }
42005
43737
  export {
42006
- createEmptyUniformBuffer as $,
42007
- getSceneBindGroupLayout as A,
43738
+ createBillboardInstanceBuffer as $,
43739
+ applyGsFragments as A,
42008
43740
  BU as B,
42009
- disposeGaussianSplattingMesh as C,
43741
+ CW$1 as C,
42010
43742
  DV$1 as D,
42011
- applyGsFragments as E,
43743
+ getRenderTargetSize as E,
42012
43744
  F64 as F,
42013
43745
  GeometryTextureType as G,
42014
- CW$1 as H,
42015
- getRenderTargetSize as I,
42016
- getViewMatrix as J,
42017
- getProjectionMatrix as K,
42018
- getCameraPosition as L,
43746
+ getViewMatrix as H,
43747
+ getProjectionMatrix as I,
43748
+ getCameraPosition as J,
43749
+ U8C as K,
43750
+ createMaterialView as L,
42019
43751
  MAX_LIGHTS as M,
42020
43752
  NODE_ESM_SHADOW_OUTPUT as N,
42021
- U8C as O,
42022
- createMaterialView as P,
42023
- ESM_SHADOW_OUTPUT as Q,
42024
- MATERIAL_ALPHA_BLEND as R,
43753
+ ESM_SHADOW_OUTPUT as O,
43754
+ MATERIAL_ALPHA_BLEND as P,
43755
+ PBR2_ESM_SHADOW_OUTPUT as Q,
43756
+ PBR_HAS_ALPHA_BLEND as R,
42025
43757
  SS as S,
42026
43758
  TU as T,
42027
43759
  U32 as U,
42028
- PBR2_ESM_SHADOW_OUTPUT as V,
42029
- PBR_HAS_ALPHA_BLEND as W,
42030
- encodeIdToColor as X,
42031
- getPickingSceneBGL as Y,
42032
- gsGpuPickingFragment as Z,
42033
- BILLBOARD_INDEX_DATA as _,
43760
+ encodeIdToColor as V,
43761
+ getPickingSceneBGL as W,
43762
+ gsGpuPickingFragment as X,
43763
+ BILLBOARD_INDEX_DATA as Y,
43764
+ createEmptyUniformBuffer as Z,
43765
+ BILLBOARD_SYSTEM_UBO_BYTES as _,
42034
43766
  F32 as a,
42035
- PBR2_HAS_IRIDESCENCE_THICKNESS_MAP as a$,
42036
- BILLBOARD_SYSTEM_UBO_BYTES as a0,
42037
- createBillboardInstanceBuffer as a1,
42038
- _getBillboardFxHook as a2,
42039
- createBillboardInstanceSortScratch as a3,
42040
- getOrCreateBillboardPipeline as a4,
42041
- createBillboardSystemBindGroup as a5,
42042
- resetBillboardPipelineCache as a6,
42043
- ensureBillboardInstanceBuffer as a7,
42044
- uploadSortedBillboardInstances as a8,
42045
- uploadBillboardInstances as a9,
42046
- acquireTexture as aA,
42047
- releaseTexture as aB,
42048
- NO_COLOR_OUTPUT as aC,
42049
- NEEDS_UV as aD,
42050
- MSH_HAS_INSTANCE_COLOR as aE,
42051
- NEEDS_UV2 as aF,
42052
- MSH_HAS_THIN_INSTANCES as aG,
42053
- MSH_RECEIVE_SHADOWS as aH,
42054
- _standardShaderVariantKey as aI,
42055
- WGSL$1 as aJ,
42056
- getCsmPbrReceiverFactory as aK,
42057
- PBR_HAS_ALPHA_TEST as aL,
42058
- PBR_HAS_METALLIC_REFLECTANCE_MAP as aM,
42059
- PBR_HAS_REFLECTANCE_MAP as aN,
42060
- PBR2_HAS_REFLECTANCE_FACTORS as aO,
42061
- PBR2_HAS_UV2 as aP,
42062
- PBR_HAS_USE_ALPHA_ONLY_MR as aQ,
42063
- PBR_HAS_CLEARCOAT as aR,
42064
- PBR2_CC_INT_MAP as aS,
42065
- PBR2_CC_ROUGH_MAP as aT,
42066
- PBR2_CC_NORMAL_MAP as aU,
42067
- PBR2_CC_F0_REMAP_OFF as aV,
42068
- PBR_HAS_SHEEN_TEXTURE as aW,
42069
- PBR_HAS_SHEEN as aX,
42070
- PBR2_HAS_SHEEN_UV_TX as aY,
42071
- PBR_HAS_SHEEN_ALBEDO_SCALING as aZ,
42072
- PBR2_HAS_IRIDESCENCE_MAP as a_,
42073
- buildBillboardSystemUbo as aa,
42074
- writeBillboardSystemUboIfDirty as ab,
42075
- createBillboardPipelineCache as ac,
42076
- PhysicsMotionType as ad,
42077
- HAS_BUMP_TEXTURE as ae,
42078
- HAS_EMISSIVE_TEXTURE as af,
42079
- HAS_DEPTH_EMISSIVE_TEXTURE as ag,
42080
- HAS_SPECULAR_TEXTURE as ah,
42081
- SPECULAR_USES_UV2 as ai,
42082
- HAS_AMBIENT_TEXTURE as aj,
42083
- AMBIENT_USES_UV2 as ak,
42084
- HAS_LIGHTMAP_TEXTURE as al,
42085
- LIGHTMAP_FLIP_V as am,
42086
- LIGHTMAP_SHADOWMAP as an,
42087
- LIGHTMAP_USES_UV2 as ao,
42088
- HAS_OPACITY_TEXTURE as ap,
42089
- OPACITY_FROM_RGB as aq,
42090
- HAS_REFLECTION_TEXTURE as ar,
42091
- HAS_CUBE_REFLECTION as as,
42092
- getCsmStdReceiverFactory as at,
43767
+ PBR_HAS_USE_ALPHA_ONLY_MR as a$,
43768
+ _getBillboardFxHook as a0,
43769
+ createBillboardInstanceSortScratch as a1,
43770
+ getOrCreateBillboardPipeline as a2,
43771
+ createBillboardSystemBindGroup as a3,
43772
+ resetBillboardPipelineCache as a4,
43773
+ ensureBillboardInstanceBuffer as a5,
43774
+ uploadSortedBillboardInstances as a6,
43775
+ uploadBillboardInstances as a7,
43776
+ buildBillboardSystemUbo as a8,
43777
+ writeBillboardSystemUboIfDirty as a9,
43778
+ writeStdMaterialData as aA,
43779
+ createStandardMeshBindGroup as aB,
43780
+ collectStdBoundTextures as aC,
43781
+ acquireTexture as aD,
43782
+ releaseTexture as aE,
43783
+ NO_COLOR_OUTPUT as aF,
43784
+ getOrCreateStandardPipeline as aG,
43785
+ NEEDS_UV as aH,
43786
+ MSH_HAS_INSTANCE_COLOR as aI,
43787
+ NEEDS_UV2 as aJ,
43788
+ MSH_HAS_THIN_INSTANCES as aK,
43789
+ MSH_RECEIVE_SHADOWS as aL,
43790
+ _standardShaderVariantKey as aM,
43791
+ getOrCreateShaderPipeline as aN,
43792
+ getOrCreateShaderPipelineBindings as aO,
43793
+ _isShaderSystemUniform as aP,
43794
+ getEffectiveAspectRatio as aQ,
43795
+ getViewProjectionMatrix as aR,
43796
+ mat4MultiplyInto as aS,
43797
+ I32 as aT,
43798
+ WGSL$1 as aU,
43799
+ getCsmPbrReceiverFactory as aV,
43800
+ PBR_HAS_ALPHA_TEST as aW,
43801
+ PBR_HAS_METALLIC_REFLECTANCE_MAP as aX,
43802
+ PBR_HAS_REFLECTANCE_MAP as aY,
43803
+ PBR2_HAS_REFLECTANCE_FACTORS as aZ,
43804
+ PBR2_HAS_UV2 as a_,
43805
+ createBillboardPipelineCache as aa,
43806
+ PhysicsMotionType as ab,
43807
+ HAS_BUMP_TEXTURE as ac,
43808
+ WGSL_PERTURB_NORMAL as ad,
43809
+ HAS_EMISSIVE_TEXTURE as ae,
43810
+ HAS_DEPTH_EMISSIVE_TEXTURE as af,
43811
+ HAS_SPECULAR_TEXTURE as ag,
43812
+ SPECULAR_USES_UV2 as ah,
43813
+ HAS_AMBIENT_TEXTURE as ai,
43814
+ AMBIENT_USES_UV2 as aj,
43815
+ HAS_LIGHTMAP_TEXTURE as ak,
43816
+ LIGHTMAP_FLIP_V as al,
43817
+ LIGHTMAP_SHADOWMAP as am,
43818
+ LIGHTMAP_USES_UV2 as an,
43819
+ HAS_OPACITY_TEXTURE as ao,
43820
+ OPACITY_FROM_RGB as ap,
43821
+ HAS_REFLECTION_TEXTURE as aq,
43822
+ HAS_CUBE_REFLECTION as ar,
43823
+ getCsmStdReceiverFactory as as,
43824
+ clearStandardPipelineCache as at,
42093
43825
  clearSamplerCache as au,
42094
43826
  _computeStandardMaterialFeatures as av,
42095
43827
  _computeMeshFeatures as aw,
42096
43828
  _getStdExts as ax,
42097
- createUniformBuffer$1 as ay,
42098
- collectStdBoundTextures as az,
43829
+ getOrCreateStandardBindings as ay,
43830
+ createUniformBuffer$1 as az,
42099
43831
  writeMeshLightSelection as b,
42100
- getTrilinearAnisotropicSampler as b$,
42101
- PBR2_HAS_IRIDESCENCE as b0,
42102
- PBR_HAS_THICKNESS_MAP as b1,
42103
- PBR_HAS_SUBSURFACE as b2,
42104
- PBR2_HAS_THICKNESS_GLTF_CHANNEL as b3,
42105
- PBR_HAS_EMISSIVE_COLOR as b4,
42106
- PBR_HAS_EMISSIVE as b5,
42107
- PBR2_HAS_UNLIT as b6,
42108
- MSH_HAS_SKELETON as b7,
42109
- MSH_HAS_SKELETON_8 as b8,
42110
- MSH_HAS_MORPH_TARGETS as b9,
42111
- findBlockByClassName as bA,
42112
- emitGraph as bB,
42113
- sanitize as bC,
42114
- bjsTypeToNodeType as bD,
42115
- extractDefault as bE,
42116
- floatCount as bF,
42117
- NODE_GEOMETRY_OUTPUT as bG,
42118
- appendMeshLightUboFields as bH,
42119
- meshLightIndexWGSL as bI,
42120
- clearSceneBGLCache as bJ,
42121
- _getStdExtsSorted as bK,
42122
- _standardFeatureKey as bL,
42123
- HAS_DIFFUSE_TEXTURE as bM,
42124
- REVERSE_DEPTH_COMPARE as bN,
42125
- DOUBLE_SIDED as bO,
42126
- DISABLE_LIGHTING as bP,
42127
- DIFFUSE_USES_UV2 as bQ,
42128
- createSingleUniformBGL as bR,
42129
- getViewProjectionMatrix as bS,
42130
- _isShaderSystemUniform as bT,
42131
- getEffectiveAspectRatio as bU,
42132
- I32 as bV,
42133
- I8 as bW,
42134
- I16 as bX,
42135
- PATH_POINTER as bY,
42136
- PBR2_HAS_REFRACTION as bZ,
42137
- PBR2_HAS_REFRACTION_MAP as b_,
42138
- uploadKtx2Texture2D as ba,
42139
- decodeKtx2ImageBitmapFromBuffer as bb,
42140
- setMaxLights as bc,
42141
- computeNodeWorldMatrix as bd,
42142
- setSubtreeVisible as be,
42143
- mat4Invert as bf,
42144
- mat4Identity as bg,
42145
- getLoaderTmpAnim as bh,
42146
- mat4MultiplyInto as bi,
42147
- INTERP_CUBICSPLINE as bj,
42148
- INTERP_STEP as bk,
42149
- INTERP_LINEAR as bl,
42150
- PATH_WEIGHTS as bm,
42151
- PATH_SCALE as bn,
42152
- PATH_ROTATION as bo,
42153
- PATH_TRANSLATION as bp,
42154
- findParent as bq,
42155
- setThinInstances as br,
42156
- mat4ComposeInto as bs,
42157
- getLoaderTmpInstance as bt,
42158
- mat4Multiply as bu,
42159
- identityTexWrap as bv,
42160
- getOrCreateSampler as bw,
42161
- assembleMaterial as bx,
42162
- runMatExts as by,
42163
- makeImageFetcher as bz,
43832
+ PATH_POINTER as b$,
43833
+ PBR_HAS_CLEARCOAT as b0,
43834
+ PBR2_CC_INT_MAP as b1,
43835
+ PBR2_CC_ROUGH_MAP as b2,
43836
+ PBR2_CC_NORMAL_MAP as b3,
43837
+ PBR2_CC_F0_REMAP_OFF as b4,
43838
+ PBR_HAS_SHEEN_TEXTURE as b5,
43839
+ PBR_HAS_SHEEN as b6,
43840
+ PBR2_HAS_SHEEN_UV_TX as b7,
43841
+ PBR_HAS_SHEEN_ALBEDO_SCALING as b8,
43842
+ PBR2_HAS_IRIDESCENCE_MAP as b9,
43843
+ INTERP_LINEAR as bA,
43844
+ PATH_WEIGHTS as bB,
43845
+ PATH_SCALE as bC,
43846
+ PATH_ROTATION as bD,
43847
+ PATH_TRANSLATION as bE,
43848
+ findParent as bF,
43849
+ setThinInstances as bG,
43850
+ mat4ComposeInto as bH,
43851
+ getLoaderTmpInstance as bI,
43852
+ mat4Multiply as bJ,
43853
+ identityTexWrap as bK,
43854
+ getOrCreateSampler as bL,
43855
+ assembleMaterial as bM,
43856
+ runMatExts as bN,
43857
+ makeImageFetcher as bO,
43858
+ findBlockByClassName as bP,
43859
+ emitGraph as bQ,
43860
+ sanitize as bR,
43861
+ bjsTypeToNodeType as bS,
43862
+ extractDefault as bT,
43863
+ floatCount as bU,
43864
+ NODE_GEOMETRY_OUTPUT as bV,
43865
+ SCENE_UBO_WGSL as bW,
43866
+ WGSL_DITHER as bX,
43867
+ createSingleUniformBGL as bY,
43868
+ I8 as bZ,
43869
+ I16 as b_,
43870
+ PBR2_HAS_IRIDESCENCE_THICKNESS_MAP as ba,
43871
+ PBR2_HAS_IRIDESCENCE as bb,
43872
+ PBR_HAS_THICKNESS_MAP as bc,
43873
+ PBR_HAS_SUBSURFACE as bd,
43874
+ PBR2_HAS_THICKNESS_GLTF_CHANNEL as be,
43875
+ PBR_HAS_EMISSIVE_COLOR as bf,
43876
+ PBR_HAS_EMISSIVE as bg,
43877
+ PBR2_HAS_UNLIT as bh,
43878
+ MSH_HAS_SKELETON as bi,
43879
+ MSH_HAS_SKELETON_8 as bj,
43880
+ MSH_HAS_MORPH_TARGETS as bk,
43881
+ WGSL_FOG as bl,
43882
+ getMeshoptDecoder as bm,
43883
+ getDracoBufferViewBytes as bn,
43884
+ decodeDracoPrimitive as bo,
43885
+ uploadKtx2Texture2D as bp,
43886
+ decodeKtx2ImageBitmapFromBuffer as bq,
43887
+ _boneBuilder as br,
43888
+ setMaxLights as bs,
43889
+ computeNodeWorldMatrix as bt,
43890
+ setSubtreeVisible as bu,
43891
+ mat4Invert as bv,
43892
+ mat4Identity as bw,
43893
+ getLoaderTmpAnim as bx,
43894
+ INTERP_CUBICSPLINE as by,
43895
+ INTERP_STEP as bz,
42164
43896
  compileNodePipeline as c,
42165
- addSprite2DIndex as c$,
42166
- PBR2_LINEAR_IMAGE_PROCESSING as c0,
42167
- PBR2_HAS_DISPERSION as c1,
42168
- PBR2_HAS_VOLUME as c2,
42169
- enableSceneTransmission as c3,
42170
- GEOMETRY_OUTPUT as c4,
42171
- _registerPbrExt as c5,
42172
- PBR2_GEOMETRY_OUTPUT as c6,
42173
- PBR_HAS_ENV as c7,
42174
- _computePbrMaterialFeatures as c8,
42175
- collectPbrBoundTextures as c9,
42176
- ObservableQuat as cA,
42177
- ObservableVec3 as cB,
42178
- PhysicsCharacterController as cC,
42179
- PhysicsConstraintAxis as cD,
42180
- PhysicsConstraintType as cE,
42181
- PhysicsPrestepType as cF,
42182
- PhysicsShapeType as cG,
42183
- VERSION as cH,
42184
- Vec3Up as cI,
42185
- addAgent as cJ,
42186
- addAnimationGroup as cK,
42187
- addAnimationGroups as cL,
42188
- addAnimationTask as cM,
42189
- addAxisLockedBillboardSystem as cN,
42190
- addBillboardSprite as cO,
42191
- addBillboardSpriteIndex as cP,
42192
- addBoxObstacle as cQ,
42193
- addClusteredLightContainer as cR,
42194
- addCylinderObstacle as cS,
42195
- addDepthHostedSpriteLayer as cT,
42196
- addFacingBillboardSystem as cU,
42197
- addHierarchyInstance as cV,
42198
- addPassDependencies as cW,
42199
- addPhysicsShapeChild as cX,
42200
- addPhysicsShapeChildFromParent as cY,
42201
- addRenderPass as cZ,
42202
- addSprite2D as c_,
42203
- PBR_HAS_NORMAL_MAP as ca,
42204
- MSH_HAS_TANGENTS as cb,
42205
- MSH_HAS_UV2 as cc,
42206
- MSH_HAS_VERTEX_COLOR as cd,
42207
- PBR_HAS_DOUBLE_SIDED as ce,
42208
- getBilinearSampler as cf,
42209
- _getPbrExtsSorted as cg,
42210
- PBR_HAS_SPEC_GLOSS as ch,
42211
- PBR2_NO_COLOR_OUTPUT as ci,
42212
- _getPbrExts as cj,
42213
- PBR2_HAS_UV_TRANSFORM as ck,
42214
- PBR_HAS_ANISOTROPY as cl,
42215
- PBR_HAS_SKYBOX as cm,
42216
- PBR_HAS_SPECULAR_AA as cn,
42217
- PBR_HAS_FOG as co,
42218
- PBR_HAS_OCCLUSION as cp,
42219
- PBR2_HAS_BASE_COLOR_FACTOR as cq,
42220
- PBR_HAS_GAMMA_ALBEDO as cr,
42221
- PBR_HAS_TONEMAP as cs,
42222
- CAP_ALL as ct,
42223
- CAP_END as cu,
42224
- CAP_NONE as cv,
42225
- CAP_START as cw,
42226
- CharacterCollisionObservable as cx,
42227
- CharacterSupportedState as cy,
42228
- DepthOfFieldBlurLevel as cz,
43897
+ addAnimationGroups as c$,
43898
+ PBR2_HAS_REFRACTION as c0,
43899
+ PBR2_HAS_REFRACTION_MAP as c1,
43900
+ getTrilinearAnisotropicSampler as c2,
43901
+ PBR2_LINEAR_IMAGE_PROCESSING as c3,
43902
+ PBR2_HAS_DISPERSION as c4,
43903
+ PBR2_HAS_VOLUME as c5,
43904
+ enableSceneTransmission as c6,
43905
+ composeStandardShader as c7,
43906
+ _getStdExtsSorted as c8,
43907
+ HAS_DIFFUSE_TEXTURE as c9,
43908
+ PBR2_HAS_BASE_COLOR_FACTOR as cA,
43909
+ PBR_HAS_GAMMA_ALBEDO as cB,
43910
+ PBR_HAS_TONEMAP as cC,
43911
+ clearPbrPipelineCache as cD,
43912
+ getOrCreatePbrBindings as cE,
43913
+ getOrCreatePbrPipeline as cF,
43914
+ getBilinearSampler as cG,
43915
+ WGSL_NO_DITHER as cH,
43916
+ AnimationGroupMaskMode as cI,
43917
+ CAP_ALL as cJ,
43918
+ CAP_END as cK,
43919
+ CAP_NONE as cL,
43920
+ CAP_START as cM,
43921
+ CharacterCollisionObservable as cN,
43922
+ CharacterSupportedState as cO,
43923
+ DepthOfFieldBlurLevel as cP,
43924
+ ObservableQuat as cQ,
43925
+ ObservableVec3 as cR,
43926
+ PhysicsCharacterController as cS,
43927
+ PhysicsConstraintAxis as cT,
43928
+ PhysicsConstraintType as cU,
43929
+ PhysicsPrestepType as cV,
43930
+ PhysicsShapeType as cW,
43931
+ VERSION as cX,
43932
+ Vec3Up as cY,
43933
+ addAgent as cZ,
43934
+ addAnimationGroup as c_,
43935
+ DOUBLE_SIDED as ca,
43936
+ GEOMETRY_OUTPUT as cb,
43937
+ _registerPbrExt as cc,
43938
+ PBR2_GEOMETRY_OUTPUT as cd,
43939
+ PBR_HAS_ENV as ce,
43940
+ _computePbrMaterialFeatures as cf,
43941
+ createPbrMeshBindGroup as cg,
43942
+ collectPbrBoundTextures as ch,
43943
+ REVERSE_DEPTH_COMPARE as ci,
43944
+ PBR_HAS_NORMAL_MAP as cj,
43945
+ MSH_HAS_TANGENTS as ck,
43946
+ MSH_HAS_UV2 as cl,
43947
+ MSH_HAS_VERTEX_COLOR as cm,
43948
+ PBR_HAS_DOUBLE_SIDED as cn,
43949
+ appendMeshLightUboFields as co,
43950
+ meshLightIndexWGSL as cp,
43951
+ _getPbrExts as cq,
43952
+ composeShader as cr,
43953
+ PBR2_HAS_UV_TRANSFORM as cs,
43954
+ PBR_HAS_ANISOTROPY as ct,
43955
+ PBR_HAS_SKYBOX as cu,
43956
+ PBR_HAS_SPECULAR_AA as cv,
43957
+ PBR_HAS_SPEC_GLOSS as cw,
43958
+ PBR_HAS_FOG as cx,
43959
+ PBR2_NO_COLOR_OUTPUT as cy,
43960
+ PBR_HAS_OCCLUSION as cz,
42229
43961
  NODE_NO_COLOR_OUTPUT as d,
42230
- createBloomPostProcessTask as d$,
42231
- addSpriteAnimation as d0,
42232
- addSpriteAnimationManager as d1,
42233
- addSpriteRendererLayer as d2,
42234
- addTask as d3,
42235
- addTaskAtStart as d4,
42236
- addTaskBefore as d5,
42237
- addTextRenderable as d6,
42238
- addTextRendererLayer as d7,
42239
- addThinInstance as d8,
42240
- addToScene as d9,
42241
- billboardBlendAdditive as dA,
42242
- billboardBlendAlpha as dB,
42243
- billboardBlendCutout as dC,
42244
- billboardBlendPremultiplied as dD,
42245
- captureScreenshot as dE,
42246
- clampCenterFromPoles as dF,
42247
- clampZoomDistance as dG,
42248
- clearAnimationManager as dH,
42249
- clearBillboardSprites as dI,
42250
- clearSprite2DLayer as dJ,
42251
- clearSpriteAnimations as dK,
42252
- cloneTransformNode as dL,
42253
- computeLocalBasis as dM,
42254
- computeLookAtFromYawPitch as dN,
42255
- computePath as dO,
42256
- computeYawPitchFromLookAt as dP,
42257
- createAnaglyphPostProcessTask as dQ,
42258
- createAnimationController as dR,
42259
- createAnimationGroups as dS,
42260
- createAnimationManager as dT,
42261
- createAnimationTask as dU,
42262
- createArcRotateCamera as dV,
42263
- createAxisDragGizmo as dW,
42264
- createAxisLockedBillboardSystem as dX,
42265
- createAxisScaleGizmo as dY,
42266
- createBillboardCustomShader as dZ,
42267
- createBlackAndWhitePostProcessTask as d_,
42268
- addVec3 as da,
42269
- agentGoto as db,
42270
- appendSpriteAtlasFrames as dc,
42271
- applyPhysicsBodyForce as dd,
42272
- applyPhysicsBodyImpulse as de,
42273
- applyPhysicsImpulse as df,
42274
- attachAxisDragGizmoToNode as dg,
42275
- attachAxisScaleGizmoToNode as dh,
42276
- attachBoundingBoxGizmoToNode as di,
42277
- attachCameraGizmoToCamera as dj,
42278
- attachControl as dk,
42279
- attachFreeControl as dl,
42280
- attachGeospatialControls as dm,
42281
- attachLightGizmoToLight as dn,
42282
- attachPlaneDragGizmoToNode as dp,
42283
- attachPlaneRotationGizmoToNode as dq,
42284
- attachPositionGizmoToNode as dr,
42285
- attachRotationGizmoToNode as ds,
42286
- attachScaleGizmoToNode as dt,
42287
- attachSpriteAnimationsToRenderer as du,
42288
- attachSpriteAnimationsToScene as dv,
42289
- attachVat as dw,
42290
- bakeCurrentTransformIntoVertices as dx,
42291
- bakeTransformIntoVertices as dy,
42292
- bakeVat as dz,
43962
+ clearSprite2DLayer as d$,
43963
+ addAnimationTask as d0,
43964
+ addAxisLockedBillboardSystem as d1,
43965
+ addBillboardSprite as d2,
43966
+ addBillboardSpriteIndex as d3,
43967
+ addBoxObstacle as d4,
43968
+ addClusteredLightContainer as d5,
43969
+ addCylinderObstacle as d6,
43970
+ addDepthHostedSpriteLayer as d7,
43971
+ addFacingBillboardSystem as d8,
43972
+ addHierarchyInstance as d9,
43973
+ attachBoundingBoxGizmoToNode as dA,
43974
+ attachCameraGizmoToCamera as dB,
43975
+ attachControl as dC,
43976
+ attachFreeControl as dD,
43977
+ attachGeospatialControls as dE,
43978
+ attachLightGizmoToLight as dF,
43979
+ attachPlaneDragGizmoToNode as dG,
43980
+ attachPlaneRotationGizmoToNode as dH,
43981
+ attachPositionGizmoToNode as dI,
43982
+ attachRotationGizmoToNode as dJ,
43983
+ attachScaleGizmoToNode as dK,
43984
+ attachSpriteAnimationsToRenderer as dL,
43985
+ attachSpriteAnimationsToScene as dM,
43986
+ attachVat as dN,
43987
+ bakeCurrentTransformIntoVertices as dO,
43988
+ bakeTransformIntoVertices as dP,
43989
+ bakeVat as dQ,
43990
+ billboardBlendAdditive as dR,
43991
+ billboardBlendAlpha as dS,
43992
+ billboardBlendCutout as dT,
43993
+ billboardBlendPremultiplied as dU,
43994
+ captureScreenshot as dV,
43995
+ clampCenterFromPoles as dW,
43996
+ clampZoomDistance as dX,
43997
+ clearAnimationManager as dY,
43998
+ clearBillboardSprites as dZ,
43999
+ clearBoneOverride as d_,
44000
+ addPassDependencies as da,
44001
+ addPhysicsShapeChild as db,
44002
+ addPhysicsShapeChildFromParent as dc,
44003
+ addRenderPass as dd,
44004
+ addSprite2D as de,
44005
+ addSprite2DIndex as df,
44006
+ addSpriteAnimation as dg,
44007
+ addSpriteAnimationManager as dh,
44008
+ addSpriteRendererLayer as di,
44009
+ addTask as dj,
44010
+ addTaskAtStart as dk,
44011
+ addTaskBefore as dl,
44012
+ addTextRenderable as dm,
44013
+ addTextRendererLayer as dn,
44014
+ addThinInstance as dp,
44015
+ addToScene as dq,
44016
+ addVec3 as dr,
44017
+ agentGoto as ds,
44018
+ animationGroupMaskRetainsTarget as dt,
44019
+ appendSpriteAtlasFrames as du,
44020
+ applyPhysicsBodyForce as dv,
44021
+ applyPhysicsBodyImpulse as dw,
44022
+ applyPhysicsImpulse as dx,
44023
+ attachAxisDragGizmoToNode as dy,
44024
+ attachAxisScaleGizmoToNode as dz,
42293
44025
  U8 as e,
42294
- createPhysicsBody as e$,
42295
- createBlurPostProcessTask as e0,
42296
- createBoundingBoxGizmo as e1,
42297
- createBox as e2,
42298
- createCameraGizmo as e3,
42299
- createCapsule as e4,
42300
- createCapsuleData as e5,
42301
- createChromaticAberrationPostProcessTask as e6,
42302
- createCircleOfConfusionPostProcessTask as e7,
42303
- createClusteredLightContainer as e8,
42304
- createClusteredPointLight as e9,
42305
- createGpuPicker as eA,
42306
- createGridMaterial as eB,
42307
- createGridSpriteAtlas as eC,
42308
- createGround as eD,
42309
- createGroundFromHeightMap as eE,
42310
- createHavokWorld as eF,
42311
- createHeightFieldShape as eG,
42312
- createHemisphericLight as eH,
42313
- createHierarchyInstancePool as eI,
42314
- createImageProcessingTask as eJ,
42315
- createLightGizmo as eK,
42316
- createLinearDepthMaterial as eL,
42317
- createMeshFromCsg as eM,
42318
- createMeshFromCsg2 as eN,
42319
- createMeshFromData as eO,
42320
- createMeshesFromCsg2 as eP,
42321
- createMorphTargets as eQ,
42322
- createNavCrowd as eR,
42323
- createNavMesh as eS,
42324
- createNavMeshFromSources as eT,
42325
- createNavigationPluginAsync as eU,
42326
- createNodeNoColorMaterialView$1 as eV,
42327
- createPbrMaterial as eW,
42328
- createPbrNoColorMaterialView$1 as eX,
42329
- createPcfDirectionalShadowGenerator as eY,
42330
- createPcfSpotlightShadowGenerator as eZ,
42331
- createPhysicsAggregate as e_,
42332
- createCopyToTextureTask as ea,
42333
- createCsg2FromMesh as eb,
42334
- createCsgFromMesh as ec,
42335
- createCsmDirectionalShadowGenerator as ed,
42336
- createCylinder as ee,
42337
- createCylinderData as ef,
42338
- createDebugNavMeshGeometry as eg,
42339
- createDefaultCamera as eh,
42340
- createDefaultTextData as ei,
42341
- createDepthOfFieldPostProcessTask as ej,
42342
- createDirectionalLight as ek,
42343
- createDisc as el,
42344
- createEffectRenderTask as em,
42345
- createEffectRenderer as en,
42346
- createEffectWrapper as eo,
42347
- createEngine as ep,
42348
- createEsmDirectionalShadowGenerator as eq,
42349
- createExtractHighlightsPostProcessTask as er,
42350
- createExtrudeShape as es,
42351
- createFacingBillboardSystem as et,
42352
- createFontFromBuffer as eu,
42353
- createFrameGraphContext as ev,
42354
- createGeometryRendererTask as ew,
42355
- createGeospatialCamera as ex,
42356
- createGeospatialLimits as ey,
42357
- createGlyphStorage as ez,
44026
+ createHierarchyInstancePool as e$,
44027
+ clearSpriteAnimations as e0,
44028
+ cloneTransformNode as e1,
44029
+ computeLocalBasis as e2,
44030
+ computeLookAtFromYawPitch as e3,
44031
+ computePath as e4,
44032
+ computeYawPitchFromLookAt as e5,
44033
+ createAnaglyphPostProcessTask as e6,
44034
+ createAnimationController as e7,
44035
+ createAnimationGroupMask as e8,
44036
+ createAnimationGroups as e9,
44037
+ createDefaultCamera as eA,
44038
+ createDefaultTextData as eB,
44039
+ createDepthOfFieldPostProcessTask as eC,
44040
+ createDirectionalLight as eD,
44041
+ createDisc as eE,
44042
+ createEffectRenderTask as eF,
44043
+ createEffectRenderer as eG,
44044
+ createEffectWrapper as eH,
44045
+ createEngine as eI,
44046
+ createEsmDirectionalShadowGenerator as eJ,
44047
+ createExtractHighlightsPostProcessTask as eK,
44048
+ createExtrudeShape as eL,
44049
+ createFacingBillboardSystem as eM,
44050
+ createFontFromBuffer as eN,
44051
+ createFrameGraphContext as eO,
44052
+ createGeometryRendererTask as eP,
44053
+ createGeospatialCamera as eQ,
44054
+ createGeospatialLimits as eR,
44055
+ createGlyphStorage as eS,
44056
+ createGpuPicker as eT,
44057
+ createGridMaterial as eU,
44058
+ createGridSpriteAtlas as eV,
44059
+ createGround as eW,
44060
+ createGroundFromHeightMap as eX,
44061
+ createHavokWorld as eY,
44062
+ createHeightFieldShape as eZ,
44063
+ createHemisphericLight as e_,
44064
+ createAnimationManager as ea,
44065
+ createAnimationTask as eb,
44066
+ createArcRotateCamera as ec,
44067
+ createAxisDragGizmo as ed,
44068
+ createAxisLockedBillboardSystem as ee,
44069
+ createAxisScaleGizmo as ef,
44070
+ createBillboardCustomShader as eg,
44071
+ createBlackAndWhitePostProcessTask as eh,
44072
+ createBloomPostProcessTask as ei,
44073
+ createBlurPostProcessTask as ej,
44074
+ createBoundingBoxGizmo as ek,
44075
+ createBox as el,
44076
+ createCameraGizmo as em,
44077
+ createCapsule as en,
44078
+ createCapsuleData as eo,
44079
+ createChromaticAberrationPostProcessTask as ep,
44080
+ createCircleOfConfusionPostProcessTask as eq,
44081
+ createClusteredLightContainer as er,
44082
+ createClusteredPointLight as es,
44083
+ createCopyToTextureTask as et,
44084
+ createCsg2FromMesh as eu,
44085
+ createCsgFromMesh as ev,
44086
+ createCsmDirectionalShadowGenerator as ew,
44087
+ createCylinder as ex,
44088
+ createCylinderData as ey,
44089
+ createDebugNavMeshGeometry as ez,
42358
44090
  markMaterialUboDirty as f,
42359
- disposeBoundingBoxGizmo as f$,
42360
- createPhysicsCharacterController as f0,
42361
- createPhysicsConstraint as f1,
42362
- createPhysicsShape as f2,
42363
- createPhysicsViewer as f3,
42364
- createPlane as f4,
42365
- createPlaneDragGizmo as f5,
42366
- createPlaneRotationGizmo as f6,
42367
- createPointLight as f7,
42368
- createPointerDrag as f8,
42369
- createPolyhedron as f9,
42370
- createStandardMaterial as fA,
42371
- createStandardNoColorMaterialView$1 as fB,
42372
- createSurface as fC,
42373
- createTextData as fD,
42374
- createTextLayer as fE,
42375
- createTextRenderable as fF,
42376
- createTextRenderer as fG,
42377
- createTexture2DFromPixels as fH,
42378
- createTorus as fI,
42379
- createTorusKnot as fJ,
42380
- createTorusKnotData as fK,
42381
- createTransformNode as fL,
42382
- createTube as fM,
42383
- createUniformEffectRenderTask as fN,
42384
- createUniformEffectWrapper as fO,
42385
- createUtilityLayer as fP,
42386
- crossFadeAnimationGroups as fQ,
42387
- crossVec3 as fR,
42388
- csg2Add as fS,
42389
- csg2Intersect as fT,
42390
- csg2Subtract as fU,
42391
- csgIntersect as fV,
42392
- csgSubtract as fW,
42393
- csgUnion as fX,
42394
- cubicToQuadratics as fY,
42395
- disposeAxisDragGizmo as fZ,
42396
- disposeAxisScaleGizmo as f_,
42397
- createPositionGizmo as fa,
42398
- createProceduralGaussianSplattingMesh as fb,
42399
- createPropertyAnimationClip as fc,
42400
- createPropertyAnimationGroup as fd,
42401
- createRenderTarget as fe,
42402
- createRenderTargetTexture as ff,
42403
- createRenderTask as fg,
42404
- createRenderTexture2D as fh,
42405
- createRibbon as fi,
42406
- createRotationGizmo as fj,
42407
- createScaleGizmo as fk,
42408
- createSceneContext as fl,
42409
- createShaderMaterial as fm,
42410
- createShaderNoColorMaterialView$1 as fn,
42411
- createShaderNormalMaterialView as fo,
42412
- createShadowTask as fp,
42413
- createSolidTexture2D as fq,
42414
- createSphere as fr,
42415
- createSphereData as fs,
42416
- createSpotLight as ft,
42417
- createSprite2DCustomShader as fu,
42418
- createSprite2DLayer as fv,
42419
- createSpriteAnimationManager as fw,
42420
- createSpriteAtlasFromFrames as fx,
42421
- createSpriteFrameAnimation as fy,
42422
- createSpriteRenderer as fz,
44091
+ createTorus as f$,
44092
+ createImageProcessingTask as f0,
44093
+ createLightGizmo as f1,
44094
+ createLinearDepthMaterial as f2,
44095
+ createMeshFromCsg as f3,
44096
+ createMeshFromCsg2 as f4,
44097
+ createMeshFromData as f5,
44098
+ createMeshesFromCsg2 as f6,
44099
+ createMorphTargets as f7,
44100
+ createNavCrowd as f8,
44101
+ createNavMesh as f9,
44102
+ createRenderTexture2D as fA,
44103
+ createRibbon as fB,
44104
+ createRotationGizmo as fC,
44105
+ createScaleGizmo as fD,
44106
+ createSceneContext as fE,
44107
+ createShaderMaterial as fF,
44108
+ createShaderNoColorMaterialView$1 as fG,
44109
+ createShaderNormalMaterialView as fH,
44110
+ createShadowTask as fI,
44111
+ createSolidTexture2D as fJ,
44112
+ createSphere as fK,
44113
+ createSphereData as fL,
44114
+ createSpotLight as fM,
44115
+ createSprite2DCustomShader as fN,
44116
+ createSprite2DLayer as fO,
44117
+ createSpriteAnimationManager as fP,
44118
+ createSpriteAtlasFromFrames as fQ,
44119
+ createSpriteFrameAnimation as fR,
44120
+ createSpriteRenderer as fS,
44121
+ createStandardMaterial as fT,
44122
+ createStandardNoColorMaterialView$1 as fU,
44123
+ createSurface as fV,
44124
+ createTextData as fW,
44125
+ createTextLayer as fX,
44126
+ createTextRenderable as fY,
44127
+ createTextRenderer as fZ,
44128
+ createTexture2DFromPixels as f_,
44129
+ createNavMeshFromSources as fa,
44130
+ createNavigationPluginAsync as fb,
44131
+ createNodeNoColorMaterialView$1 as fc,
44132
+ createPbrMaterial as fd,
44133
+ createPbrNoColorMaterialView$1 as fe,
44134
+ createPcfDirectionalShadowGenerator as ff,
44135
+ createPcfSpotlightShadowGenerator as fg,
44136
+ createPhysicsAggregate as fh,
44137
+ createPhysicsBody as fi,
44138
+ createPhysicsCharacterController as fj,
44139
+ createPhysicsConstraint as fk,
44140
+ createPhysicsShape as fl,
44141
+ createPhysicsViewer as fm,
44142
+ createPlane as fn,
44143
+ createPlaneDragGizmo as fo,
44144
+ createPlaneRotationGizmo as fp,
44145
+ createPointLight as fq,
44146
+ createPointerDrag as fr,
44147
+ createPolyhedron as fs,
44148
+ createPositionGizmo as ft,
44149
+ createProceduralGaussianSplattingMesh as fu,
44150
+ createPropertyAnimationClip as fv,
44151
+ createPropertyAnimationGroup as fw,
44152
+ createRenderTarget as fx,
44153
+ createRenderTargetTexture as fy,
44154
+ createRenderTask as fz,
42423
44155
  TYPE_SIZES as g,
42424
- hidePhysicsBody as g$,
42425
- disposeCameraGizmo as g0,
42426
- disposeCsg2 as g1,
42427
- disposeDefaultTextData as g2,
42428
- disposeEffectRenderer as g3,
42429
- disposeEffectWrapper as g4,
42430
- disposeEngine as g5,
42431
- disposeFrameGraphContext as g6,
42432
- disposeGlyphStorage as g7,
42433
- disposeLightGizmo as g8,
42434
- disposePhysics as g9,
42435
- fadeAnimationWeight as gA,
42436
- findRandomPoint as gB,
42437
- findRandomPointAroundCircle as gC,
42438
- flushThinInstances as gD,
42439
- flyGeospatialCameraToAsync as gE,
42440
- getAgentPosition as gF,
42441
- getAgentVelocity as gG,
42442
- getAnimationGroups as gH,
42443
- getBillboardSpriteHandleIndex as gI,
42444
- getClosestPoint as gJ,
42445
- getContainerMeshes as gK,
42446
- getEffectivePitchMax as gL,
42447
- getFloatingOriginOffset as gM,
42448
- getFrameGraph as gN,
42449
- getNavigationRandomSeed as gO,
42450
- getPhysicsBodyLinearVelocity as gP,
42451
- getPhysicsGravity as gQ,
42452
- getPhysicsTimestep as gR,
42453
- getPhysicsVelocityLimits as gS,
42454
- getPickedNormal as gT,
42455
- getPickedUV as gU,
42456
- getRenderTaskGpuTimings as gV,
42457
- getSprite2DHandleIndex as gW,
42458
- getVariantNames as gX,
42459
- goToFrame as gY,
42460
- gsAlphaBlendedDepthFragment as gZ,
42461
- gsLinearDepthFragment as g_,
42462
- disposePhysicsViewer as ga,
42463
- disposePicker as gb,
42464
- disposePlaneDragGizmo as gc,
42465
- disposePlaneRotationGizmo as gd,
42466
- disposePositionGizmo as ge,
42467
- disposeRotationGizmo as gf,
42468
- disposeScaleGizmo as gg,
42469
- disposeScene as gh,
42470
- disposeSpriteAnimationBinding as gi,
42471
- disposeSpriteRenderer as gj,
42472
- disposeSurface as gk,
42473
- disposeTextData as gl,
42474
- disposeTextRenderable as gm,
42475
- disposeTextRenderer as gn,
42476
- disposeUniformEffectWrapper as go,
42477
- disposeUtilityLayer as gp,
42478
- dotVec3 as gq,
42479
- enableAnimationBlending as gr,
42480
- enableDetailedPicking as gs,
42481
- enableHavokFloatingOrigin as gt,
42482
- enableMaterialPlugins as gu,
42483
- enableMaterialTracking as gv,
42484
- enablePropertyAnimationBlending as gw,
42485
- enableRenderTaskTransmission as gx,
42486
- enableThinInstanceGpuCulling as gy,
42487
- extractGlyphCurves as gz,
44156
+ getAgentPosition as g$,
44157
+ createTorusKnot as g0,
44158
+ createTorusKnotData as g1,
44159
+ createTransformNode as g2,
44160
+ createTube as g3,
44161
+ createUniformEffectRenderTask as g4,
44162
+ createUniformEffectWrapper as g5,
44163
+ createUtilityLayer as g6,
44164
+ crossFadeAnimationGroups as g7,
44165
+ crossVec3 as g8,
44166
+ csg2Add as g9,
44167
+ disposeScaleGizmo as gA,
44168
+ disposeScene as gB,
44169
+ disposeSpriteAnimationBinding as gC,
44170
+ disposeSpriteRenderer as gD,
44171
+ disposeSurface as gE,
44172
+ disposeTextData as gF,
44173
+ disposeTextRenderable as gG,
44174
+ disposeTextRenderer as gH,
44175
+ disposeUniformEffectWrapper as gI,
44176
+ disposeUtilityLayer as gJ,
44177
+ dotVec3 as gK,
44178
+ enableAnimationBlending as gL,
44179
+ enableBoneControl as gM,
44180
+ enableDetailedPicking as gN,
44181
+ enableHavokFloatingOrigin as gO,
44182
+ enableMaterialPlugins as gP,
44183
+ enableMaterialStencil as gQ,
44184
+ enableMaterialTracking as gR,
44185
+ enablePropertyAnimationBlending as gS,
44186
+ enableRenderTaskTransmission as gT,
44187
+ enableThinInstanceGpuCulling as gU,
44188
+ extractGlyphCurves as gV,
44189
+ fadeAnimationWeight as gW,
44190
+ findRandomPoint as gX,
44191
+ findRandomPointAroundCircle as gY,
44192
+ flushThinInstances as gZ,
44193
+ flyGeospatialCameraToAsync as g_,
44194
+ csg2Intersect as ga,
44195
+ csg2Subtract as gb,
44196
+ csgIntersect as gc,
44197
+ csgSubtract as gd,
44198
+ csgUnion as ge,
44199
+ cubicToQuadratics as gf,
44200
+ disposeAxisDragGizmo as gg,
44201
+ disposeAxisScaleGizmo as gh,
44202
+ disposeBoundingBoxGizmo as gi,
44203
+ disposeCameraGizmo as gj,
44204
+ disposeCsg2 as gk,
44205
+ disposeDefaultTextData as gl,
44206
+ disposeEffectRenderer as gm,
44207
+ disposeEffectWrapper as gn,
44208
+ disposeEngine as go,
44209
+ disposeFrameGraphContext as gp,
44210
+ disposeGlyphStorage as gq,
44211
+ disposeLightGizmo as gr,
44212
+ disposeMeshGpu as gs,
44213
+ disposePhysics as gt,
44214
+ disposePhysicsViewer as gu,
44215
+ disposePicker as gv,
44216
+ disposePlaneDragGizmo as gw,
44217
+ disposePlaneRotationGizmo as gx,
44218
+ disposePositionGizmo as gy,
44219
+ disposeRotationGizmo as gz,
42488
44220
  computeAabb as h,
42489
- registerTextRenderer as h$,
42490
- initializeCsg2Async as h0,
42491
- invalidateRenderBundles as h1,
42492
- isBillboardSpriteHandleAlive as h2,
42493
- isCsg2Ready as h3,
42494
- isGizmoDragging as h4,
42495
- isGizmoInteracting as h5,
42496
- isGizmoPickPending as h6,
42497
- isGpuTimingSupported as h7,
42498
- isRenderTaskGpuTimingSupported as h8,
42499
- isSprite2DHandleAlive as h9,
42500
- normalizeVec3$1 as hA,
42501
- normalizeVec3$2 as hB,
42502
- onBeforeRender as hC,
42503
- onCsmReceiverUpdate as hD,
42504
- onPhysicsAfterStep as hE,
42505
- onPhysicsCollision as hF,
42506
- onPhysicsTrigger as hG,
42507
- onSceneDispose as hH,
42508
- packedSrgbToLinearRgba as hI,
42509
- parseNodeMaterialFromSnippet as hJ,
42510
- pauseAnimation as hK,
42511
- physicsRaycast as hL,
42512
- pickAsync as hM,
42513
- playAnimation as hN,
42514
- playBillboardSpriteAnimation as hO,
42515
- playBillboardSpriteIndexAnimation as hP,
42516
- playSprite2DAnimation as hQ,
42517
- playSprite2DIndexAnimation as hR,
42518
- playSpriteFrameAnimation as hS,
42519
- raycast as hT,
42520
- rebuildMaterial as hU,
42521
- registerEffectRenderer as hV,
42522
- registerFrameGraphContext as hW,
42523
- registerPointerDrag as hX,
42524
- registerScene as hY,
42525
- registerSceneWithShadowSupport as hZ,
42526
- registerSpriteRenderer as h_,
42527
- lengthVec3 as ha,
42528
- lerpVec3 as hb,
42529
- loadBabylon as hc,
42530
- loadBasisTexture2D as hd,
42531
- loadDdsEnvironment as he,
42532
- loadEnvironment as hf,
42533
- loadFont as hg,
42534
- loadGltf as hh,
42535
- loadHdrEnvironment as hi,
42536
- loadKtxTexture2D as hj,
42537
- loadNodeBlockEmitterWithGeometry as hk,
42538
- loadSOG as hl,
42539
- loadSPZ as hm,
42540
- loadSkybox as hn,
42541
- loadSplat as ho,
42542
- loadSpriteAtlas as hp,
42543
- loadTexture2D as hq,
42544
- markClusteredLightContainerDirty as hr,
42545
- mat4Compose as hs,
42546
- mat4FromQuat as ht,
42547
- mat4LookAtLH as hu,
42548
- mat4PerspectiveLH as hv,
42549
- mat4Scale as hw,
42550
- mat4Translation as hx,
42551
- negateVec3 as hy,
42552
- normalizeRadians as hz,
44221
+ onBeforeRender as h$,
44222
+ getAgentVelocity as h0,
44223
+ getAnimationGroups as h1,
44224
+ getBillboardSpriteHandleIndex as h2,
44225
+ getBoneByName as h3,
44226
+ getClosestPoint as h4,
44227
+ getContainerMeshes as h5,
44228
+ getEffectivePitchMax as h6,
44229
+ getFloatingOriginOffset as h7,
44230
+ getFrameGraph as h8,
44231
+ getNavigationRandomSeed as h9,
44232
+ loadBasisTexture2D as hA,
44233
+ loadDdsEnvironment as hB,
44234
+ loadEnvironment as hC,
44235
+ loadFont as hD,
44236
+ loadGltf as hE,
44237
+ loadHdrEnvironment as hF,
44238
+ loadKtx2Texture2D as hG,
44239
+ loadKtxTexture2D as hH,
44240
+ loadNodeBlockEmitterWithGeometry as hI,
44241
+ loadSOG as hJ,
44242
+ loadSPZ as hK,
44243
+ loadSkybox as hL,
44244
+ loadSplat as hM,
44245
+ loadSpriteAtlas as hN,
44246
+ loadTexture2D as hO,
44247
+ markClusteredLightContainerDirty as hP,
44248
+ mat4Compose as hQ,
44249
+ mat4Decompose as hR,
44250
+ mat4FromQuat as hS,
44251
+ mat4LookAtLH as hT,
44252
+ mat4PerspectiveLH as hU,
44253
+ mat4Scale as hV,
44254
+ mat4Translation as hW,
44255
+ negateVec3 as hX,
44256
+ normalizeRadians as hY,
44257
+ normalizeVec3$1 as hZ,
44258
+ normalizeVec3$2 as h_,
44259
+ getPhysicsBodyLinearVelocity as ha,
44260
+ getPhysicsGravity as hb,
44261
+ getPhysicsTimestep as hc,
44262
+ getPhysicsVelocityLimits as hd,
44263
+ getPickedNormal as he,
44264
+ getPickedUV as hf,
44265
+ getRenderTaskGpuTimings as hg,
44266
+ getSprite2DHandleIndex as hh,
44267
+ getVariantNames as hi,
44268
+ goToFrame as hj,
44269
+ gsAlphaBlendedDepthFragment as hk,
44270
+ gsLinearDepthFragment as hl,
44271
+ hidePhysicsBody as hm,
44272
+ initializeCsg2Async as hn,
44273
+ invalidateRenderBundles as ho,
44274
+ isBillboardSpriteHandleAlive as hp,
44275
+ isCsg2Ready as hq,
44276
+ isGizmoDragging as hr,
44277
+ isGizmoInteracting as hs,
44278
+ isGizmoPickPending as ht,
44279
+ isGpuTimingSupported as hu,
44280
+ isRenderTaskGpuTimingSupported as hv,
44281
+ isSprite2DHandleAlive as hw,
44282
+ lengthVec3 as hx,
44283
+ lerpVec3 as hy,
44284
+ loadBabylon as hz,
42553
44285
  initMeshTransform as i,
42554
- setPhysicsTimestep as i$,
42555
- registerUtilityLayer as i0,
42556
- releasePhysicsShape as i1,
42557
- removeAnimationGroup as i2,
42558
- removeAnimationTask as i3,
42559
- removeBillboardSprite as i4,
42560
- removeBillboardSpriteIndex as i5,
42561
- removeFromScene as i6,
42562
- removeHierarchyInstance as i7,
42563
- removeMeshFromTask as i8,
42564
- removeObstacle as i9,
42565
- setEffectTexture as iA,
42566
- setEffectUniforms as iB,
42567
- setEngineSize as iC,
42568
- setFog as iD,
42569
- setGeospatialOrientation as iE,
42570
- setGpuTimingEnabled as iF,
42571
- setHierarchyInstanceCount as iG,
42572
- setHierarchyInstanceMatrix as iH,
42573
- setKtx2DecoderUrl as iI,
42574
- setMorphTargetWeights as iJ,
42575
- setNavigationRandomSeed as iK,
42576
- setParent as iL,
42577
- setPhysicsBodyAngularVelocity as iM,
42578
- setPhysicsBodyCollisionEventsEnabled as iN,
42579
- setPhysicsBodyLinearVelocity as iO,
42580
- setPhysicsBodyMass as iP,
42581
- setPhysicsBodyMassProperties as iQ,
42582
- setPhysicsBodyMotionType as iR,
42583
- setPhysicsBodyPreStep as iS,
42584
- setPhysicsBodyPrestepType as iT,
42585
- setPhysicsBodyShape as iU,
42586
- setPhysicsBodyTransform as iV,
42587
- setPhysicsGravity as iW,
42588
- setPhysicsShapeFilterCollideMask as iX,
42589
- setPhysicsShapeFilterMembershipMask as iY,
42590
- setPhysicsShapeIsTrigger as iZ,
42591
- setPhysicsShapeMaterial as i_,
42592
- removePhysicsBody as ia,
42593
- removeSprite2D as ib,
42594
- removeSprite2DIndex as ic,
42595
- removeSpriteAnimation as id,
42596
- removeSpriteAnimationManager as ie,
42597
- removeSpriteRendererLayer as ig,
42598
- removeTextRendererLayer as ih,
42599
- removeThinInstance as ii,
42600
- renderFrame as ij,
42601
- resetVariant as ik,
42602
- resizeEngine as il,
42603
- resizeMeshGeometry as im,
42604
- resizeSurface as io,
42605
- resolveCameraViewport as ip,
42606
- scaleVec3 as iq,
42607
- selectVariant as ir,
42608
- setAnimationAdditive as is,
42609
- setAnimationTaskCategoryHandler as it,
42610
- setAnimationWeight as iu,
42611
- setBillboardShaderParams as iv,
42612
- setBillboardSpriteFrame as iw,
42613
- setBillboardSpriteFrameIndex as ix,
42614
- setCameraLimits as iy,
42615
- setClipPlane as iz,
44286
+ setBoneScaling as i$,
44287
+ onCsmReceiverUpdate as i0,
44288
+ onPhysicsAfterStep as i1,
44289
+ onPhysicsCollision as i2,
44290
+ onPhysicsTrigger as i3,
44291
+ onSceneDispose as i4,
44292
+ packedSrgbToLinearRgba as i5,
44293
+ parseNodeMaterialFromSnippet as i6,
44294
+ pauseAnimation as i7,
44295
+ physicsRaycast as i8,
44296
+ pickAsync as i9,
44297
+ removeHierarchyInstance as iA,
44298
+ removeMeshFromTask as iB,
44299
+ removeObstacle as iC,
44300
+ removePhysicsBody as iD,
44301
+ removeSprite2D as iE,
44302
+ removeSprite2DIndex as iF,
44303
+ removeSpriteAnimation as iG,
44304
+ removeSpriteAnimationManager as iH,
44305
+ removeSpriteRendererLayer as iI,
44306
+ removeTextRendererLayer as iJ,
44307
+ removeThinInstance as iK,
44308
+ renderFrame as iL,
44309
+ resetVariant as iM,
44310
+ resizeEngine as iN,
44311
+ resizeMeshGeometry as iO,
44312
+ resizeSurface as iP,
44313
+ resolveCameraViewport as iQ,
44314
+ scaleVec3 as iR,
44315
+ selectVariant as iS,
44316
+ setAnimationAdditive as iT,
44317
+ setAnimationTaskCategoryHandler as iU,
44318
+ setAnimationWeight as iV,
44319
+ setBillboardShaderParams as iW,
44320
+ setBillboardSpriteFrame as iX,
44321
+ setBillboardSpriteFrameIndex as iY,
44322
+ setBonePosition as iZ,
44323
+ setBoneRotationQuaternion as i_,
44324
+ playAnimation as ia,
44325
+ playBillboardSpriteAnimation as ib,
44326
+ playBillboardSpriteIndexAnimation as ic,
44327
+ playSprite2DAnimation as id,
44328
+ playSprite2DIndexAnimation as ie,
44329
+ playSpriteFrameAnimation as ig,
44330
+ quatFromLookDirectionRH as ih,
44331
+ quatFromRotationMatrix as ii,
44332
+ raycast as ij,
44333
+ rebuildMaterial as ik,
44334
+ registerEffectRenderer as il,
44335
+ registerFrameGraphContext as im,
44336
+ registerPointerDrag as io,
44337
+ registerScene as ip,
44338
+ registerSceneWithShadowSupport as iq,
44339
+ registerSpriteRenderer as ir,
44340
+ registerTextRenderer as is,
44341
+ registerUtilityLayer as it,
44342
+ releasePhysicsShape as iu,
44343
+ removeAnimationGroup as iv,
44344
+ removeAnimationTask as iw,
44345
+ removeBillboardSprite as ix,
44346
+ removeBillboardSpriteIndex as iy,
44347
+ removeFromScene as iz,
42616
44348
  U16 as j,
42617
- updateTextData as j$,
42618
- setPhysicsVelocityLimits as j0,
42619
- setPositionGizmoLocalCoordinates as j1,
42620
- setRenderTaskGpuTimingEnabled as j2,
42621
- setRotationGizmoLocalCoordinates as j3,
42622
- setScaleGizmoLocalCoordinates as j4,
42623
- setShaderFloat as j5,
42624
- setShaderMatrix as j6,
42625
- setShaderStorageBuffer as j7,
42626
- setShaderTexture as j8,
42627
- setShaderUniform as j9,
42628
- stopAnimation as jA,
42629
- stopAnimationManager as jB,
42630
- stopEngine as jC,
42631
- stopSpriteAnimation as jD,
42632
- stopSpriteAnimationManager as jE,
42633
- subVec3 as jF,
42634
- unregisterEffectRenderer as jG,
42635
- unregisterFrameGraphContext as jH,
42636
- unregisterScene as jI,
42637
- unregisterSpriteRenderer as jJ,
42638
- unregisterTextRenderer as jK,
42639
- updateAnimationManager as jL,
42640
- updateBillboardSprite as jM,
42641
- updateBillboardSpriteIndex as jN,
42642
- updateDefaultTextData as jO,
42643
- updateGlyphStorage as jP,
42644
- updateMeshColors as jQ,
42645
- updateMeshNormals as jR,
42646
- updateMeshPositions as jS,
42647
- updateMeshTangents as jT,
42648
- updateMeshUv2 as jU,
42649
- updateMeshUvs as jV,
42650
- updateNavCrowd as jW,
42651
- updateNavMeshObstacles as jX,
42652
- updateSprite2D as jY,
42653
- updateSprite2DIndex as jZ,
42654
- updateSpriteAnimationManager as j_,
42655
- setShaderVector3 as ja,
42656
- setShadowTaskCasterMeshes as jb,
42657
- setSprite2DFrame as jc,
42658
- setSprite2DFrameIndex as jd,
42659
- setSprite2DShaderParams as je,
42660
- setSprite2DUvOffset as jf,
42661
- setSpriteRendererTarget as jg,
42662
- setSurfaceSize as jh,
42663
- setTextLayerPosition as ji,
42664
- setThinInstanceColor as jj,
42665
- setThinInstanceColors as jk,
42666
- setThinInstanceCount as jl,
42667
- setThinInstanceMatrix as jm,
42668
- setUniformEffectUniforms as jn,
42669
- shapeCast as jo,
42670
- shapeProximity as jp,
42671
- showPhysicsBody as jq,
42672
- showPhysicsConstraint as jr,
42673
- spriteBlendAdditive as js,
42674
- spriteBlendAlpha as jt,
42675
- spriteBlendMultiply as ju,
42676
- spriteBlendPremultiplied as jv,
42677
- srgbByteToLinear as jw,
42678
- startAnimationManager as jx,
42679
- startEngine as jy,
42680
- startSpriteAnimationManager as jz,
44349
+ spriteBlendMultiply as j$,
44350
+ setBoneVisible as j0,
44351
+ setCameraLimits as j1,
44352
+ setClipPlane as j2,
44353
+ setDracoBaseUrl as j3,
44354
+ setEffectTexture as j4,
44355
+ setEffectUniforms as j5,
44356
+ setEngineSize as j6,
44357
+ setFog as j7,
44358
+ setGeospatialOrientation as j8,
44359
+ setGpuTimingEnabled as j9,
44360
+ setRotationGizmoLocalCoordinates as jA,
44361
+ setScaleGizmoLocalCoordinates as jB,
44362
+ setShaderFloat as jC,
44363
+ setShaderMatrix as jD,
44364
+ setShaderStorageBuffer as jE,
44365
+ setShaderTexture as jF,
44366
+ setShaderUniform as jG,
44367
+ setShaderVector3 as jH,
44368
+ setShadowTaskCasterMeshes as jI,
44369
+ setSprite2DFrame as jJ,
44370
+ setSprite2DFrameIndex as jK,
44371
+ setSprite2DShaderParams as jL,
44372
+ setSprite2DUvOffset as jM,
44373
+ setSpriteRendererTarget as jN,
44374
+ setSurfaceSize as jO,
44375
+ setTextLayerPosition as jP,
44376
+ setThinInstanceColor as jQ,
44377
+ setThinInstanceColors as jR,
44378
+ setThinInstanceCount as jS,
44379
+ setThinInstanceMatrix as jT,
44380
+ setUniformEffectUniforms as jU,
44381
+ shapeCast as jV,
44382
+ shapeProximity as jW,
44383
+ showPhysicsBody as jX,
44384
+ showPhysicsConstraint as jY,
44385
+ spriteBlendAdditive as jZ,
44386
+ spriteBlendAlpha as j_,
44387
+ setHierarchyInstanceCount as ja,
44388
+ setHierarchyInstanceMatrix as jb,
44389
+ setKtx2DecoderUrl as jc,
44390
+ setMeshoptBaseUrl as jd,
44391
+ setMorphTargetWeights as je,
44392
+ setNavigationRandomSeed as jf,
44393
+ setParent as jg,
44394
+ setPhysicsBodyAngularVelocity as jh,
44395
+ setPhysicsBodyCollisionEventsEnabled as ji,
44396
+ setPhysicsBodyLinearVelocity as jj,
44397
+ setPhysicsBodyMass as jk,
44398
+ setPhysicsBodyMassProperties as jl,
44399
+ setPhysicsBodyMotionType as jm,
44400
+ setPhysicsBodyPreStep as jn,
44401
+ setPhysicsBodyPrestepType as jo,
44402
+ setPhysicsBodyShape as jp,
44403
+ setPhysicsBodyTransform as jq,
44404
+ setPhysicsGravity as jr,
44405
+ setPhysicsShapeFilterCollideMask as js,
44406
+ setPhysicsShapeFilterMembershipMask as jt,
44407
+ setPhysicsShapeIsTrigger as ju,
44408
+ setPhysicsShapeMaterial as jv,
44409
+ setPhysicsTimestep as jw,
44410
+ setPhysicsVelocityLimits as jx,
44411
+ setPositionGizmoLocalCoordinates as jy,
44412
+ setRenderTaskGpuTimingEnabled as jz,
42681
44413
  createMappedBuffer as k,
42682
- updateTexture2DFromPixels as k0,
42683
- vec3 as k1,
42684
- writeVec3 as k2,
42685
- generateMipmaps$1 as k3,
42686
- pointLight as k4,
42687
- directionalLight as k5,
42688
- spotLight as k6,
42689
- animationGroup as k7,
42690
- createMorphTargets$1 as k8,
44414
+ spriteBlendPremultiplied as k0,
44415
+ srgbByteToLinear as k1,
44416
+ startAnimationManager as k2,
44417
+ startEngine as k3,
44418
+ startSpriteAnimationManager as k4,
44419
+ stopAnimation as k5,
44420
+ stopAnimationManager as k6,
44421
+ stopEngine as k7,
44422
+ stopSpriteAnimation as k8,
44423
+ stopSpriteAnimationManager as k9,
44424
+ generateMipmaps$1 as kA,
44425
+ pointLight as kB,
44426
+ directionalLight as kC,
44427
+ spotLight as kD,
44428
+ animationGroup as kE,
44429
+ createMorphTargets$1 as kF,
44430
+ subVec3 as ka,
44431
+ unregisterEffectRenderer as kb,
44432
+ unregisterFrameGraphContext as kc,
44433
+ unregisterScene as kd,
44434
+ unregisterSpriteRenderer as ke,
44435
+ unregisterTextRenderer as kf,
44436
+ updateAnimationManager as kg,
44437
+ updateBillboardSprite as kh,
44438
+ updateBillboardSpriteIndex as ki,
44439
+ updateDefaultTextData as kj,
44440
+ updateGlyphStorage as kk,
44441
+ updateMeshColors as kl,
44442
+ updateMeshNormals as km,
44443
+ updateMeshPositions as kn,
44444
+ updateMeshTangents as ko,
44445
+ updateMeshUv2 as kp,
44446
+ updateMeshUvs as kq,
44447
+ updateNavCrowd as kr,
44448
+ updateNavMeshObstacles as ks,
44449
+ updateSprite2D as kt,
44450
+ updateSprite2DIndex as ku,
44451
+ updateSpriteAnimationManager as kv,
44452
+ updateTextData as kw,
44453
+ updateTexture2DFromPixels as kx,
44454
+ vec3 as ky,
44455
+ writeVec3 as kz,
42691
44456
  anyPrimitive as l,
42692
44457
  makeTimingSnapshot as m,
42693
44458
  needsOrmComposite as n,
42694
- computeUboLayout as o,
44459
+ pbrGroupBuilder as o,
42695
44460
  packMat4IntoF32 as p,
42696
- SCENE_UBO_WGSL as q,
44461
+ linearToSrgbByte as q,
42697
44462
  resolveAccessor as r,
42698
- pbrGroupBuilder as s,
42699
- linearToSrgbByte as t,
44463
+ cloneTexture2D as s,
44464
+ createFreeCamera as t,
42700
44465
  uploadTex as u,
42701
- cloneTexture2D as v,
44466
+ targetSignatureKey as v,
42702
44467
  writeNodeUBO as w,
42703
- createFreeCamera as x,
42704
- targetSignatureKey as y,
42705
- createDefaultPipelineDescriptor as z
44468
+ createDefaultPipelineDescriptor as x,
44469
+ getSceneBindGroupLayout as y,
44470
+ disposeGaussianSplattingMesh as z
42706
44471
  };
42707
- //# sourceMappingURL=index-BgY3QEzL.js.map
44472
+ //# sourceMappingURL=index-C2sM8ERH.js.map