@babylonjs/lite 0.1.1 → 1.0.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 (262) hide show
  1. package/_mat4-storage-f64-CjDoht2w.js +11 -0
  2. package/_mat4-storage-f64-CjDoht2w.js.map +1 -0
  3. package/{alpha-test-fragment-CUiHCw7W.js → alpha-test-fragment-B7DjSnF7.js} +2 -2
  4. package/{alpha-test-fragment-CUiHCw7W.js.map → alpha-test-fragment-B7DjSnF7.js.map} +1 -1
  5. package/assets/splat-sort-worker-DT3eybMZ.js.map +1 -0
  6. package/{background-dds-skybox-yHTqabU3.js → background-dds-skybox-BEX309u3.js} +14 -14
  7. package/background-dds-skybox-BEX309u3.js.map +1 -0
  8. package/{background-ground-DIw6D3qf.js → background-ground-BU0HOcM4.js} +20 -20
  9. package/background-ground-BU0HOcM4.js.map +1 -0
  10. package/{background-hdr-skybox-c4uuTmkP.js → background-hdr-skybox--RRRic_K.js} +10 -10
  11. package/background-hdr-skybox--RRRic_K.js.map +1 -0
  12. package/{background-solid-skybox-DPGBpPbm.js → background-solid-skybox-BrH2fXSu.js} +12 -13
  13. package/background-solid-skybox-BrH2fXSu.js.map +1 -0
  14. package/{billboard-renderable-D8mlVGCd.js → billboard-renderable-BHWryAeC.js} +46 -10
  15. package/billboard-renderable-BHWryAeC.js.map +1 -0
  16. package/{clamp-block-BdII67hT.js → clamp-block-DqbwnQGW.js} +2 -2
  17. package/{clamp-block-BdII67hT.js.map → clamp-block-DqbwnQGW.js.map} +1 -1
  18. package/{clearcoat-fragment-LCiG98Rf.js → clearcoat-fragment-D6FSCie1.js} +2 -2
  19. package/{clearcoat-fragment-LCiG98Rf.js.map → clearcoat-fragment-D6FSCie1.js.map} +1 -1
  20. package/{create-skeleton-C9JdIJnb.js → create-skeleton-D_uplboC.js} +9 -9
  21. package/create-skeleton-D_uplboC.js.map +1 -0
  22. package/{cubemap-skybox-material-DvXMVc4k.js → cubemap-skybox-material-DQcMMdf-.js} +6 -7
  23. package/cubemap-skybox-material-DQcMMdf-.js.map +1 -0
  24. package/{curve-block-BlJpXVYv.js → curve-block-21rT0JjG.js} +2 -2
  25. package/{curve-block-BlJpXVYv.js.map → curve-block-21rT0JjG.js.map} +1 -1
  26. package/{emissive-fragment-BnNvbBCw.js → emissive-fragment-C5FtBs3y.js} +3 -3
  27. package/emissive-fragment-C5FtBs3y.js.map +1 -0
  28. package/{esm-shadow-view-DN9HIaM4.js → esm-shadow-view-Cl3rPGof.js} +2 -2
  29. package/{esm-shadow-view-DN9HIaM4.js.map → esm-shadow-view-Cl3rPGof.js.map} +1 -1
  30. package/{esm-shadow-view-Dk9NFtLq.js → esm-shadow-view-Gtd1LWRP.js} +2 -2
  31. package/{esm-shadow-view-Dk9NFtLq.js.map → esm-shadow-view-Gtd1LWRP.js.map} +1 -1
  32. package/{esm-shadow-view-DGKdF1NI.js → esm-shadow-view-c5YV4Eg9.js} +2 -2
  33. package/{esm-shadow-view-DGKdF1NI.js.map → esm-shadow-view-c5YV4Eg9.js.map} +1 -1
  34. package/{gaussian-splatting-pipeline-sh-DgJl7l56.js → gaussian-splatting-pipeline-sh-7J31V23x.js} +19 -19
  35. package/gaussian-splatting-pipeline-sh-7J31V23x.js.map +1 -0
  36. package/geometry-texture-output-dXk4E9uu.js +41 -0
  37. package/geometry-texture-output-dXk4E9uu.js.map +1 -0
  38. package/geometry-view-BsFJpBJa.js +404 -0
  39. package/geometry-view-BsFJpBJa.js.map +1 -0
  40. package/{gltf-animation-D7uyTyO3.js → gltf-animation-K_zZxj_d.js} +7 -7
  41. package/gltf-animation-K_zZxj_d.js.map +1 -0
  42. package/gltf-color-normalize-Qxl-9C48.js +29 -0
  43. package/gltf-color-normalize-Qxl-9C48.js.map +1 -0
  44. package/{gltf-ext-basisu-CPg5kPrx.js → gltf-ext-basisu-CDbPclzZ.js} +53 -18
  45. package/gltf-ext-basisu-CDbPclzZ.js.map +1 -0
  46. package/{gltf-ext-node-visibility-MafA9ot2.js → gltf-ext-node-visibility-DXCJEYr6.js} +2 -2
  47. package/{gltf-ext-node-visibility-MafA9ot2.js.map → gltf-ext-node-visibility-DXCJEYr6.js.map} +1 -1
  48. package/{gltf-ext-quantization-CpZyLDIz.js → gltf-ext-quantization-CvHI_0Vg.js} +4 -3
  49. package/gltf-ext-quantization-CvHI_0Vg.js.map +1 -0
  50. package/{gltf-ext-uv-transform-CE_-T1Tr.js → gltf-ext-uv-transform-DgYazJBs.js} +2 -2
  51. package/{gltf-ext-uv-transform-CE_-T1Tr.js.map → gltf-ext-uv-transform-DgYazJBs.js.map} +1 -1
  52. package/{gltf-feature-animation-pointer-BjpwOOqo.js → gltf-feature-animation-pointer-D1RJRFBw.js} +9 -9
  53. package/gltf-feature-animation-pointer-D1RJRFBw.js.map +1 -0
  54. package/{gltf-feature-animations-CCizegp8.js → gltf-feature-animations-Cmc1uoIu.js} +2 -2
  55. package/{gltf-feature-animations-CCizegp8.js.map → gltf-feature-animations-Cmc1uoIu.js.map} +1 -1
  56. package/{gltf-feature-draco-yGSMGTE3.js → gltf-feature-draco-CKKzT5E3.js} +6 -5
  57. package/gltf-feature-draco-CKKzT5E3.js.map +1 -0
  58. package/{gltf-feature-gpu-instancing-2e_CFQnl.js → gltf-feature-gpu-instancing-n87SO6Vh.js} +7 -6
  59. package/gltf-feature-gpu-instancing-n87SO6Vh.js.map +1 -0
  60. package/{gltf-feature-lights-punctual-DDDg4j0U.js → gltf-feature-lights-punctual-Ckm3ciL8.js} +5 -5
  61. package/{gltf-feature-lights-punctual-DDDg4j0U.js.map → gltf-feature-lights-punctual-Ckm3ciL8.js.map} +1 -1
  62. package/{gltf-feature-meshopt-Des96YFI.js → gltf-feature-meshopt-DLC4SF1E.js} +7 -6
  63. package/gltf-feature-meshopt-DLC4SF1E.js.map +1 -0
  64. package/{gltf-feature-morph-CKCw6tkX.js → gltf-feature-morph-Cjtu7hYa.js} +4 -4
  65. package/gltf-feature-morph-Cjtu7hYa.js.map +1 -0
  66. package/gltf-feature-registry-C63Hjp9w.js +59 -0
  67. package/gltf-feature-registry-C63Hjp9w.js.map +1 -0
  68. package/{gltf-feature-skeleton-D8hWLqi2.js → gltf-feature-skeleton-DKbOGidp.js} +3 -3
  69. package/{gltf-feature-skeleton-D8hWLqi2.js.map → gltf-feature-skeleton-DKbOGidp.js.map} +1 -1
  70. package/{gltf-feature-variants-Ds6v9byg.js → gltf-feature-variants-Cmzu0O0e.js} +2 -2
  71. package/{gltf-feature-variants-Ds6v9byg.js.map → gltf-feature-variants-Cmzu0O0e.js.map} +1 -1
  72. package/{gltf-glb-parser-D6UZWFuC.js → gltf-glb-parser-Cj5MHS-v.js} +5 -4
  73. package/gltf-glb-parser-Cj5MHS-v.js.map +1 -0
  74. package/{gltf-interleave-DGnUlz28.js → gltf-interleave-gHf9_t0i.js} +14 -14
  75. package/gltf-interleave-gHf9_t0i.js.map +1 -0
  76. package/gltf-normals-b2h74380.js +37 -0
  77. package/gltf-normals-b2h74380.js.map +1 -0
  78. package/{gltf-pbr-builder-ext-BFOxOCnQ.js → gltf-pbr-builder-ext-edNcjwPf.js} +5 -5
  79. package/gltf-pbr-builder-ext-edNcjwPf.js.map +1 -0
  80. package/{gltf-variants-DFbr8EES.js → gltf-variants-CPxNdtP4.js} +4 -4
  81. package/{gltf-variants-DFbr8EES.js.map → gltf-variants-CPxNdtP4.js.map} +1 -1
  82. package/{gs-picking-pipeline-DzfMASL9.js → gs-picking-pipeline-DYaW_Lg3.js} +14 -14
  83. package/gs-picking-pipeline-DYaW_Lg3.js.map +1 -0
  84. package/havok-floating-origin-Dr-18Nds.js +198 -0
  85. package/havok-floating-origin-Dr-18Nds.js.map +1 -0
  86. package/index-CLElg2Bo.js +39209 -0
  87. package/index-CLElg2Bo.js.map +1 -0
  88. package/index-CYZDclhF.js +918 -0
  89. package/index-CYZDclhF.js.map +1 -0
  90. package/index-SMJ67XwT.js +3330 -0
  91. package/index-SMJ67XwT.js.map +1 -0
  92. package/index.d.ts +2508 -119
  93. package/index.js +444 -302
  94. package/{input-block-DgAJBzN_.js → input-block-DqEedWF2.js} +2 -2
  95. package/{input-block-DgAJBzN_.js.map → input-block-DqEedWF2.js.map} +1 -1
  96. package/{iridescence-fragment-Gymp7or5.js → iridescence-fragment-BHU59-gQ.js} +2 -2
  97. package/{iridescence-fragment-Gymp7or5.js.map → iridescence-fragment-BHU59-gQ.js.map} +1 -1
  98. package/{light-block-B11ew7FA.js → light-block-Bv37V8vl.js} +2 -2
  99. package/{light-block-B11ew7FA.js.map → light-block-Bv37V8vl.js.map} +1 -1
  100. package/{loop-block-Bb23EOMb.js → loop-block-qTg8vb99.js} +2 -2
  101. package/{loop-block-Bb23EOMb.js.map → loop-block-qTg8vb99.js.map} +1 -1
  102. package/{morph-fragment-DOVo70gP.js → morph-fragment-BRCUr2wQ.js} +2 -2
  103. package/{morph-fragment-DOVo70gP.js.map → morph-fragment-BRCUr2wQ.js.map} +1 -1
  104. package/{multilight-wgsl-BGyiIOp3.js → multilight-wgsl-DMeppAdZ.js} +4 -4
  105. package/{multilight-wgsl-BGyiIOp3.js.map → multilight-wgsl-DMeppAdZ.js.map} +1 -1
  106. package/{node-env-BPZXZzBf.js → node-env-Bc559GmY.js} +6 -5
  107. package/node-env-Bc559GmY.js.map +1 -0
  108. package/node-geometry-view-COmWsRXK.js +291 -0
  109. package/node-geometry-view-COmWsRXK.js.map +1 -0
  110. package/{node-registry-extra-compat-Dhrw8fDQ.js → node-registry-extra-compat-dWrv7gpS.js} +2 -2
  111. package/{node-registry-extra-compat-Dhrw8fDQ.js.map → node-registry-extra-compat-dWrv7gpS.js.map} +1 -1
  112. package/{node-registry-extra-math-CsAHvIZo.js → node-registry-extra-math-Bn854sX9.js} +2 -2
  113. package/{node-registry-extra-math-CsAHvIZo.js.map → node-registry-extra-math-Bn854sX9.js.map} +1 -1
  114. package/{node-renderable-DlLIdBmd.js → node-renderable-B5G8WcdH.js} +41 -22
  115. package/node-renderable-B5G8WcdH.js.map +1 -0
  116. package/{node-shadow-DKrcqmNg.js → node-shadow-CVIUlNf0.js} +7 -7
  117. package/node-shadow-CVIUlNf0.js.map +1 -0
  118. package/{normal-map-fragment-DpsIXrJf.js → normal-map-fragment-CQSxhjCy.js} +3 -3
  119. package/{normal-map-fragment-DpsIXrJf.js.map → normal-map-fragment-CQSxhjCy.js.map} +1 -1
  120. package/pack-mat4-with-offset-BqB8Jqo7.js +37 -0
  121. package/pack-mat4-with-offset-BqB8Jqo7.js.map +1 -0
  122. package/package.json +3 -10
  123. package/{parse-camera-DM3oJJeT.js → parse-camera-pBRT_6i5.js} +2 -2
  124. package/{parse-camera-DM3oJJeT.js.map → parse-camera-pBRT_6i5.js.map} +1 -1
  125. package/pbr-fog-wgsl-BqdCid6r.js +8 -0
  126. package/pbr-fog-wgsl-BqdCid6r.js.map +1 -0
  127. package/pbr-geometry-view-NiZY_juX.js +491 -0
  128. package/pbr-geometry-view-NiZY_juX.js.map +1 -0
  129. package/{pbr-metallic-roughness-block-h_KAOZrW.js → pbr-metallic-roughness-block-JBSi-tQN.js} +2 -2
  130. package/{pbr-metallic-roughness-block-h_KAOZrW.js.map → pbr-metallic-roughness-block-JBSi-tQN.js.map} +1 -1
  131. package/{pbr-metallic-roughness-block-full-6vMm1Jk6.js → pbr-metallic-roughness-block-full-Ta9lR2cz.js} +2 -2
  132. package/{pbr-metallic-roughness-block-full-6vMm1Jk6.js.map → pbr-metallic-roughness-block-full-Ta9lR2cz.js.map} +1 -1
  133. package/{pbr-mr-helper-core-CIwm-T1G.js → pbr-mr-helper-core-BVWNR08D.js} +2 -2
  134. package/{pbr-mr-helper-core-CIwm-T1G.js.map → pbr-mr-helper-core-BVWNR08D.js.map} +1 -1
  135. package/{pbr-refraction-DGmMSa2v.js → pbr-refraction-C9FvFmAp.js} +2 -2
  136. package/{pbr-refraction-DGmMSa2v.js.map → pbr-refraction-C9FvFmAp.js.map} +1 -1
  137. package/{pbr-renderable-BJxUtPBb.js → pbr-renderable-DzUF2QIk.js} +118 -58
  138. package/pbr-renderable-DzUF2QIk.js.map +1 -0
  139. package/{pbr-shadow-fragment-LO9SlbJj.js → pbr-shadow-fragment-CnqnbGYS.js} +6 -1
  140. package/pbr-shadow-fragment-CnqnbGYS.js.map +1 -0
  141. package/{pbr-template-ext-8q7BcTDf.js → pbr-template-ext-CGgB2n2y.js} +3 -2
  142. package/{pbr-template-ext-8q7BcTDf.js.map → pbr-template-ext-CGgB2n2y.js.map} +1 -1
  143. package/{pbr-tracking-B3alzn91.js → pbr-tracking-3tU1kqea.js} +2 -2
  144. package/{pbr-tracking-B3alzn91.js.map → pbr-tracking-3tU1kqea.js.map} +1 -1
  145. package/pbr-transmission-ext-BcLjRxfB.js +190 -0
  146. package/pbr-transmission-ext-BcLjRxfB.js.map +1 -0
  147. package/recast-navigation.wasm-DG_0AFuk.js +8706 -0
  148. package/recast-navigation.wasm-DG_0AFuk.js.map +1 -0
  149. package/recast-navigation.wasm-compat-C-Bf2ylB.js +8692 -0
  150. package/recast-navigation.wasm-compat-C-Bf2ylB.js.map +1 -0
  151. package/{reflectance-fragment-BCrgPmrt.js → reflectance-fragment-Dbpgw3Jt.js} +2 -2
  152. package/{reflectance-fragment-BCrgPmrt.js.map → reflectance-fragment-Dbpgw3Jt.js.map} +1 -1
  153. package/{rgbd-decode-DCvzUYeI.js → rgbd-decode-DoyUquy3.js} +7 -6
  154. package/rgbd-decode-DoyUquy3.js.map +1 -0
  155. package/{scene-material-swap-C2ykv55W.js → scene-material-swap-nNUH4nGn.js} +11 -4
  156. package/scene-material-swap-nNUH4nGn.js.map +1 -0
  157. package/screenshot-readback-D0Sj9qq3.js +92 -0
  158. package/screenshot-readback-D0Sj9qq3.js.map +1 -0
  159. package/{mesh-features-BLENkYVt.js → shader-composer-BUD_pSX4.js} +7 -55
  160. package/shader-composer-BUD_pSX4.js.map +1 -0
  161. package/{shader-renderable-D-6796KR.js → shader-renderable-D7-RyVxa.js} +62 -27
  162. package/shader-renderable-D7-RyVxa.js.map +1 -0
  163. package/shader-thin-instance-DuBotxDO.js +150 -0
  164. package/shader-thin-instance-DuBotxDO.js.map +1 -0
  165. package/shadow-fragment-core-DHN2G6FI.js.map +1 -1
  166. package/{sheen-fragment-Dze2f7XJ.js → sheen-fragment-1MkEMcbc.js} +2 -2
  167. package/{sheen-fragment-Dze2f7XJ.js.map → sheen-fragment-1MkEMcbc.js.map} +1 -1
  168. package/{singlelight-directional-wgsl-CmUDZxwz.js → singlelight-directional-wgsl-BsV8G456.js} +2 -2
  169. package/{singlelight-directional-wgsl-CmUDZxwz.js.map → singlelight-directional-wgsl-BsV8G456.js.map} +1 -1
  170. package/{singlelight-hemispheric-wgsl-t-83IP_s.js → singlelight-hemispheric-wgsl-Bo0jKlW5.js} +2 -2
  171. package/{singlelight-hemispheric-wgsl-t-83IP_s.js.map → singlelight-hemispheric-wgsl-Bo0jKlW5.js.map} +1 -1
  172. package/{singlelight-point-wgsl-CLzULIYV.js → singlelight-point-wgsl-DV39UP5Y.js} +2 -2
  173. package/{singlelight-point-wgsl-CLzULIYV.js.map → singlelight-point-wgsl-DV39UP5Y.js.map} +1 -1
  174. package/{singlelight-spot-wgsl-DEEUrfVM.js → singlelight-spot-wgsl-yg3od6vL.js} +2 -2
  175. package/{singlelight-spot-wgsl-DEEUrfVM.js.map → singlelight-spot-wgsl-yg3od6vL.js.map} +1 -1
  176. package/{skeleton-fragment-B_XlFbtx.js → skeleton-fragment-DdxYG6kv.js} +2 -2
  177. package/{skeleton-fragment-B_XlFbtx.js.map → skeleton-fragment-DdxYG6kv.js.map} +1 -1
  178. package/{skybox-renderable-DDwzu-PT.js → skybox-renderable-CJD4XmX5.js} +8 -9
  179. package/skybox-renderable-CJD4XmX5.js.map +1 -0
  180. package/{splat-ply-compressed-BahdBG1r.js → splat-ply-compressed-DHjyiVmI.js} +9 -8
  181. package/splat-ply-compressed-DHjyiVmI.js.map +1 -0
  182. package/{standard-renderable-GjxL9xSf.js → standard-pipeline-XTbHL7MY.js} +12 -257
  183. package/standard-pipeline-XTbHL7MY.js.map +1 -0
  184. package/standard-renderable-CREWLNHI.js +191 -0
  185. package/standard-renderable-CREWLNHI.js.map +1 -0
  186. package/{std-ambient-fragment-BoUsD06w.js → std-ambient-fragment-Bjx3VFrr.js} +2 -2
  187. package/{std-ambient-fragment-BoUsD06w.js.map → std-ambient-fragment-Bjx3VFrr.js.map} +1 -1
  188. package/{std-cube-reflection-fragment-ulqc3bsP.js → std-cube-reflection-fragment-y9WWdXUt.js} +2 -2
  189. package/{std-cube-reflection-fragment-ulqc3bsP.js.map → std-cube-reflection-fragment-y9WWdXUt.js.map} +1 -1
  190. package/{std-emissive-fragment-DNGj1HdQ.js → std-emissive-fragment-C8Lnmojh.js} +2 -2
  191. package/{std-emissive-fragment-DNGj1HdQ.js.map → std-emissive-fragment-C8Lnmojh.js.map} +1 -1
  192. package/{std-lightmap-fragment-Bqj89aIe.js → std-lightmap-fragment-DFxGcoA5.js} +2 -2
  193. package/{std-lightmap-fragment-Bqj89aIe.js.map → std-lightmap-fragment-DFxGcoA5.js.map} +1 -1
  194. package/{std-opacity-fragment-KuPh5N2Z.js → std-opacity-fragment-EXzFWiSp.js} +2 -2
  195. package/{std-opacity-fragment-KuPh5N2Z.js.map → std-opacity-fragment-EXzFWiSp.js.map} +1 -1
  196. package/{std-reflection-fragment-BA5Ghn_M.js → std-reflection-fragment-BoJORqpG.js} +2 -2
  197. package/{std-reflection-fragment-BA5Ghn_M.js.map → std-reflection-fragment-BoJORqpG.js.map} +1 -1
  198. package/std-shadow-fragment-Bq-Wc8UJ.js +13 -0
  199. package/std-shadow-fragment-Bq-Wc8UJ.js.map +1 -0
  200. package/{std-specular-fragment-CE-6scqd.js → std-specular-fragment-CM5R5j2g.js} +2 -2
  201. package/{std-specular-fragment-CE-6scqd.js.map → std-specular-fragment-CM5R5j2g.js.map} +1 -1
  202. package/{std-tracking-CNKZ-hJN.js → std-tracking-Cif_wXeT.js} +2 -2
  203. package/{std-tracking-CNKZ-hJN.js.map → std-tracking-Cif_wXeT.js.map} +1 -1
  204. package/{subsurface-fragment-liM3y2-P.js → subsurface-fragment-BEaAXYXz.js} +2 -2
  205. package/{subsurface-fragment-liM3y2-P.js.map → subsurface-fragment-BEaAXYXz.js.map} +1 -1
  206. package/swapchain-overlay-UCLilhbq.js +37 -0
  207. package/swapchain-overlay-UCLilhbq.js.map +1 -0
  208. package/thin-instance-cull-binding-DWKUt5ZN.js +310 -0
  209. package/thin-instance-cull-binding-DWKUt5ZN.js.map +1 -0
  210. package/{thin-instance-gpu-C9Gv_Z1w.js → thin-instance-gpu-BDdRcNAh.js} +30 -5
  211. package/thin-instance-gpu-BDdRcNAh.js.map +1 -0
  212. package/{tracking-primitives-wgdBY85t.js → tracking-primitives-CglRNTlX.js} +2 -2
  213. package/{tracking-primitives-wgdBY85t.js.map → tracking-primitives-CglRNTlX.js.map} +1 -1
  214. package/{unlit-fragment-BIlhJpz6.js → unlit-fragment-kxfZWlnp.js} +2 -2
  215. package/{unlit-fragment-BIlhJpz6.js.map → unlit-fragment-kxfZWlnp.js.map} +1 -1
  216. package/{wgsl-helpers-DyzNzCeE.js → wgsl-helpers-D8sl1VVA.js} +4 -4
  217. package/{wgsl-helpers-DyzNzCeE.js.map → wgsl-helpers-D8sl1VVA.js.map} +1 -1
  218. package/assets/splat-sort-worker-Crg3CaCc.js.map +0 -1
  219. package/background-dds-skybox-yHTqabU3.js.map +0 -1
  220. package/background-ground-DIw6D3qf.js.map +0 -1
  221. package/background-hdr-skybox-c4uuTmkP.js.map +0 -1
  222. package/background-solid-skybox-DPGBpPbm.js.map +0 -1
  223. package/billboard-renderable-D8mlVGCd.js.map +0 -1
  224. package/create-skeleton-C9JdIJnb.js.map +0 -1
  225. package/cubemap-skybox-material-DvXMVc4k.js.map +0 -1
  226. package/emissive-fragment-BnNvbBCw.js.map +0 -1
  227. package/gaussian-splatting-pipeline-sh-DgJl7l56.js.map +0 -1
  228. package/gltf-animation-D7uyTyO3.js.map +0 -1
  229. package/gltf-ext-basisu-CPg5kPrx.js.map +0 -1
  230. package/gltf-ext-quantization-CpZyLDIz.js.map +0 -1
  231. package/gltf-feature-animation-pointer-BjpwOOqo.js.map +0 -1
  232. package/gltf-feature-draco-yGSMGTE3.js.map +0 -1
  233. package/gltf-feature-gpu-instancing-2e_CFQnl.js.map +0 -1
  234. package/gltf-feature-meshopt-Des96YFI.js.map +0 -1
  235. package/gltf-feature-morph-CKCw6tkX.js.map +0 -1
  236. package/gltf-glb-parser-D6UZWFuC.js.map +0 -1
  237. package/gltf-interleave-DGnUlz28.js.map +0 -1
  238. package/gltf-pbr-builder-ext-BFOxOCnQ.js.map +0 -1
  239. package/gs-picking-pipeline-DzfMASL9.js.map +0 -1
  240. package/index-C8HOR2sB.js +0 -19222
  241. package/index-C8HOR2sB.js.map +0 -1
  242. package/mesh-features-BLENkYVt.js.map +0 -1
  243. package/node-env-BPZXZzBf.js.map +0 -1
  244. package/node-registry-DwgC4yth.js +0 -190
  245. package/node-registry-DwgC4yth.js.map +0 -1
  246. package/node-renderable-DlLIdBmd.js.map +0 -1
  247. package/node-shadow-DKrcqmNg.js.map +0 -1
  248. package/pbr-renderable-BJxUtPBb.js.map +0 -1
  249. package/pbr-shadow-fragment-LO9SlbJj.js.map +0 -1
  250. package/pbr-transmission-ext-BxW4CEGu.js +0 -581
  251. package/pbr-transmission-ext-BxW4CEGu.js.map +0 -1
  252. package/rgbd-decode-DCvzUYeI.js.map +0 -1
  253. package/scene-material-swap-C2ykv55W.js.map +0 -1
  254. package/shader-renderable-D-6796KR.js.map +0 -1
  255. package/skybox-renderable-DDwzu-PT.js.map +0 -1
  256. package/splat-ply-compressed-BahdBG1r.js.map +0 -1
  257. package/standard-renderable-GjxL9xSf.js.map +0 -1
  258. package/std-shadow-fragment-FNQfrJuC.js +0 -8
  259. package/std-shadow-fragment-FNQfrJuC.js.map +0 -1
  260. package/swapchain-overlay-DcCSFDp7.js +0 -35
  261. package/swapchain-overlay-DcCSFDp7.js.map +0 -1
  262. package/thin-instance-gpu-C9Gv_Z1w.js.map +0 -1
@@ -0,0 +1,291 @@
1
+ import { B as BU, p as packMat4IntoF32, M as MAX_LIGHTS, bv as findBlockByClassName, bw as emitGraph, x as targetSignatureKey, c as compileNodePipeline, S as SS, a as F32, G as GeometryTextureType, b as writeMeshLightSelection, bx as sanitize, by as bjsTypeToNodeType, bz as extractDefault, bA as floatCount, O as createMaterialView, bB as NODE_GEOMETRY_OUTPUT } from "./index-CLElg2Bo.js";
2
+ import { getAttrBuffer, writeAttributeFlags } from "./node-renderable-B5G8WcdH.js";
3
+ const nodeGeometryGroupBuilder = (async () => {
4
+ throw new Error("node-geometry view does not support scene group building");
5
+ });
6
+ nodeGeometryGroupBuilder._rebuildSingle = (scene, mesh, materialOverride) => {
7
+ const view = materialOverride ?? mesh.material;
8
+ return buildNodeGeometryRenderable(scene, mesh, view);
9
+ };
10
+ nodeGeometryGroupBuilder._materialFamily = "node";
11
+ const ZERO = (wg) => `vec4<f32>(0.0, 0.0, 0.0, ${wg})`;
12
+ function geomWrite(type, inputs, gpRef) {
13
+ const wg = "1.0";
14
+ const v = inputs.get(type);
15
+ const wp = inputs.get(GeometryTextureType.WORLD_POSITION);
16
+ switch (type) {
17
+ case GeometryTextureType.WORLD_POSITION:
18
+ return v ? `vec4<f32>(${v.expr}, ${wg})` : ZERO(wg);
19
+ case GeometryTextureType.LOCAL_POSITION:
20
+ return v ? `vec4<f32>(${v.expr}, ${wg})` : ZERO(wg);
21
+ case GeometryTextureType.WORLD_NORMAL:
22
+ return v ? `vec4<f32>(normalize(${v.expr}) * 0.5 + vec3<f32>(0.5), ${wg})` : ZERO(wg);
23
+ case GeometryTextureType.VIEW_NORMAL:
24
+ return v ? `vec4<f32>(normalize(${v.expr}), ${wg})` : ZERO(wg);
25
+ case GeometryTextureType.REFLECTIVITY:
26
+ return v ? `(${v.expr}) * ${wg}` : ZERO(wg);
27
+ case GeometryTextureType.ALBEDO:
28
+ return v ? `vec4<f32>(${v.expr}, ${wg})` : ZERO(wg);
29
+ case GeometryTextureType.IRRADIANCE:
30
+ return v ? `vec4<f32>(${v.expr}, ${wg})` : ZERO(wg);
31
+ case GeometryTextureType.SCREENSPACE_DEPTH:
32
+ return v ? `vec4<f32>(${v.expr}, 0.0, 0.0, ${wg})` : `vec4<f32>(in.position.z, 0.0, 0.0, ${wg})`;
33
+ case GeometryTextureType.VIEW_DEPTH:
34
+ if (v) {
35
+ return `vec4<f32>(${v.expr}, 0.0, 0.0, ${wg})`;
36
+ }
37
+ return wp ? `vec4<f32>((scene.view * vec4<f32>(${wp.expr}, 1.0)).z, 0.0, 0.0, ${wg})` : ZERO(wg);
38
+ case GeometryTextureType.NORMALIZED_VIEW_DEPTH:
39
+ if (v) {
40
+ return `vec4<f32>(${v.expr}, 0.0, 0.0, ${wg})`;
41
+ }
42
+ if (wp) {
43
+ gpRef.needsGp = true;
44
+ return `vec4<f32>(((scene.view * vec4<f32>(${wp.expr}, 1.0)).z - nmeGeom.cameraNearFar.x) / (nmeGeom.cameraNearFar.y - nmeGeom.cameraNearFar.x), 0.0, 0.0, ${wg})`;
45
+ }
46
+ return ZERO(wg);
47
+ case GeometryTextureType.LINEAR_VELOCITY:
48
+ return v ? `vec4<f32>(${v.expr}, ${wg})` : ZERO(wg);
49
+ }
50
+ }
51
+ function ensureGeometryResources(view) {
52
+ const cached = view._geometry;
53
+ if (cached) {
54
+ return cached;
55
+ }
56
+ const source = view.source;
57
+ const graph = source._graph;
58
+ const geomRoot = findBlockByClassName(graph, "GeometryTextureOutputBlock");
59
+ if (!geomRoot) {
60
+ throw new Error("NodeMaterial geometry view: graph has no GeometryTextureOutputBlock");
61
+ }
62
+ const vertRoot = findBlockByClassName(graph, "VertexOutputBlock");
63
+ const { vertexWgsl, fragmentWgsl, state } = emitGraph(
64
+ graph,
65
+ source._emitters,
66
+ geomRoot.id,
67
+ vertRoot ? vertRoot.id : null,
68
+ [],
69
+ {
70
+ hasSkeleton: source._hasSkeleton,
71
+ hasInstances: source._hasInstances
72
+ }
73
+ );
74
+ if (state.usesMorphTargets || state.usesEnv || state.shadowLights.length > 0) {
75
+ throw new Error("NodeMaterial geometry view: morph / env / shadow inputs are not supported in the geometry pass");
76
+ }
77
+ const inputs = state._geometryInputs ?? /* @__PURE__ */ new Map();
78
+ const attachments = view._geometryAttachments;
79
+ const gpRef = { needsGp: false };
80
+ const structLines = attachments.map((_, i) => `@location(${i}) f${i}: vec4<f32>,`);
81
+ const struct = `struct FragmentOutput {
82
+ ${structLines.join("\n")}
83
+ };`;
84
+ const writeLines = attachments.map((type, i) => `out.f${i} = ${geomWrite(type, inputs, gpRef)};`);
85
+ const fsReturn = ["var out: FragmentOutput;", ...writeLines, "return out;"].map((l) => ` ${l}`).join("\n") + "\n";
86
+ const res = {
87
+ _vertexWgsl: vertexWgsl,
88
+ _fragmentWgsl: fragmentWgsl,
89
+ _geomState: state,
90
+ _struct: struct,
91
+ _fsReturn: fsReturn,
92
+ _needsGpUbo: gpRef.needsGp,
93
+ _attrNames: state.vertexAttributes.map((a) => a._name),
94
+ _compileBySig: /* @__PURE__ */ new Map(),
95
+ _nodeUBO: null,
96
+ _nodeUBOReady: false
97
+ };
98
+ Object.defineProperty(view, "_geometry", { value: res, enumerable: false, configurable: true });
99
+ return res;
100
+ }
101
+ function ensureGeometryCompile(view, res, engine, sig) {
102
+ const key = targetSignatureKey(sig);
103
+ const cached = res._compileBySig.get(key);
104
+ if (cached) {
105
+ return cached;
106
+ }
107
+ const source = view.source;
108
+ const colorFormats = sig._colorFormats ?? (sig._colorFormat ? [sig._colorFormat] : []);
109
+ if (colorFormats.length === 0) {
110
+ throw new Error("node-geometry: render target has no color attachments");
111
+ }
112
+ const cullMode = source._graph.backFaceCulling ? view._reverseCulling ? "front" : "back" : "none";
113
+ const mrtOutput = {
114
+ _struct: res._struct,
115
+ _fsReturnType: " -> FragmentOutput",
116
+ _fsReturn: res._fsReturn,
117
+ _cacheKey: `3|mrt:${colorFormats.join()}:${cullMode}`,
118
+ _needsGpUbo: res._needsGpUbo,
119
+ _buildGeomUbo: (binding) => ({
120
+ _wgsl: `struct NmeGeomParams { previousViewProjection: mat4x4<f32>, cameraNearFar: vec4<f32> };
121
+ @group(1) @binding(${binding}) var<uniform> nmeGeom: NmeGeomParams;`,
122
+ _bglEntry: { binding, visibility: SS.FRAGMENT, buffer: { type: "uniform" } }
123
+ }),
124
+ // Geometry MRT renders upright into offscreen targets (the task packs an
125
+ // un-flipped scene UBO), matching the Standard/PBR geometry renderables.
126
+ _buildPipeline: (device, a) => device.createRenderPipeline({
127
+ label: "node-material-geometry",
128
+ layout: device.createPipelineLayout({ bindGroupLayouts: [a._sceneBGL, a._meshBGL] }),
129
+ vertex: { module: a._shaderModule, entryPoint: "vs_main", buffers: a._vertexBuffers },
130
+ fragment: { module: a._shaderModule, entryPoint: "fs_main", targets: colorFormats.map((f) => ({ format: f })) },
131
+ depthStencil: { format: a._depthFormat, depthCompare: a._depthCompare, depthWriteEnabled: true },
132
+ multisample: { count: a._msaaSamples },
133
+ primitive: { topology: "triangle-list", cullMode, frontFace: "ccw" }
134
+ })
135
+ };
136
+ const compile = compileNodePipeline(res._geomState, res._vertexWgsl, res._fragmentWgsl, {
137
+ _engine: engine,
138
+ _format: engine.format,
139
+ _depthStencilFormat: sig._depthStencilFormat,
140
+ _depthCompare: sig._depthCompare ?? "greater-equal",
141
+ _msaaSamples: sig._sampleCount,
142
+ _backFaceCulling: source._graph.backFaceCulling,
143
+ _alphaMode: 0,
144
+ _mrtOutput: mrtOutput
145
+ });
146
+ res._compileBySig.set(key, compile);
147
+ return compile;
148
+ }
149
+ function extractNodeUniformDefault(graph, sanitizedName) {
150
+ for (const block of graph.blocks.values()) {
151
+ if (block.className !== "InputBlock") {
152
+ continue;
153
+ }
154
+ if (sanitize(block.name || `input${block.id}`) !== sanitizedName) {
155
+ continue;
156
+ }
157
+ const type = bjsTypeToNodeType(block.serialized["type"] ?? 16);
158
+ if (type === "mat4f") {
159
+ return null;
160
+ }
161
+ const values = new F32(floatCount(type));
162
+ values.set(extractDefault(block.serialized["value"], type));
163
+ return values;
164
+ }
165
+ return null;
166
+ }
167
+ function ensureGeometryNodeUBO(res, compile, engine, source) {
168
+ if (res._nodeUBOReady) {
169
+ return res._nodeUBO;
170
+ }
171
+ res._nodeUBOReady = true;
172
+ if (compile._nodeUboBinding === null || compile._nodeUboSize === 0) {
173
+ return null;
174
+ }
175
+ const scratch = new F32(compile._nodeUboSize / 4);
176
+ for (const [name, offsetBytes] of compile._nodeUboOffsets) {
177
+ const live = source._uniformValues.get(name);
178
+ if (live) {
179
+ scratch.set(live._values, offsetBytes >> 2);
180
+ continue;
181
+ }
182
+ const def = extractNodeUniformDefault(source._graph, name);
183
+ if (def) {
184
+ scratch.set(def, offsetBytes >> 2);
185
+ }
186
+ }
187
+ const ubo = engine._device.createBuffer({ label: "node-geom-ubo", size: compile._nodeUboSize, usage: BU.UNIFORM | BU.COPY_DST });
188
+ engine._device.queue.writeBuffer(ubo, 0, scratch);
189
+ res._nodeUBO = ubo;
190
+ return ubo;
191
+ }
192
+ function buildGeometryBindGroup(engine, source, compile, meshUBO, nodeUBO, view) {
193
+ var _a;
194
+ const entries = [{ binding: 0, resource: { buffer: meshUBO } }];
195
+ if (nodeUBO && compile._nodeUboBinding !== null) {
196
+ entries.push({ binding: compile._nodeUboBinding, resource: { buffer: nodeUBO } });
197
+ }
198
+ for (const tb of compile._textureBindings) {
199
+ const tex = (_a = source._textureSlots.get(tb._name)) == null ? void 0 : _a.current;
200
+ if (!tex) {
201
+ throw new Error(`NodeMaterial geometry view: texture binding "${tb._name}" not set. Provide it via material.inputs["${tb._name}"].texture before the first render.`);
202
+ }
203
+ entries.push({ binding: tb._texBinding, resource: tex.view }, { binding: tb._sampBinding, resource: tex.sampler });
204
+ }
205
+ if (compile._geometryGpBinding !== null) {
206
+ if (!view._gpUBO) {
207
+ throw new Error("NodeMaterial geometry view: NORMALIZED_VIEW_DEPTH requested but no geometry-params UBO was provided by the task.");
208
+ }
209
+ entries.push({ binding: compile._geometryGpBinding, resource: { buffer: view._gpUBO } });
210
+ }
211
+ return engine._device.createBindGroup({ label: "node-geom-bg", layout: compile._meshBGL, entries });
212
+ }
213
+ function buildNodeGeometryRenderable(scene, mesh, view) {
214
+ var _a;
215
+ const engine = scene.surface.engine;
216
+ const device = engine._device;
217
+ const source = view.source;
218
+ const res = ensureGeometryResources(view);
219
+ const meshUboBytes = 96 + 16 * Math.ceil(MAX_LIGHTS / 4) + 15 & -16;
220
+ const meshUBO = device.createBuffer({ label: "node-geom-mesh-ubo", size: meshUboBytes, usage: BU.UNIFORM | BU.COPY_DST });
221
+ const meshScratch = new F32(meshUboBytes / 4);
222
+ const packMeshWorld = ((_a = engine._makePackMeshWorld) == null ? void 0 : _a.call(engine, scene)) ?? packMat4IntoF32;
223
+ let needsAttrFlags = false;
224
+ const writeMesh = () => {
225
+ packMeshWorld(meshScratch, mesh.worldMatrix, 0, 0);
226
+ meshScratch[16] = mesh.receiveShadows ? 1 : 0;
227
+ if (needsAttrFlags) {
228
+ writeAttributeFlags(mesh, meshScratch);
229
+ }
230
+ writeMeshLightSelection(mesh, scene.lights, meshScratch.subarray(4));
231
+ device.queue.writeBuffer(meshUBO, 0, meshScratch);
232
+ };
233
+ let bindGroup = null;
234
+ let lastWorldVersion = -1;
235
+ let lastLightsCount = -1;
236
+ const sortCenter = [mesh.worldMatrix[12], mesh.worldMatrix[13], mesh.worldMatrix[14]];
237
+ const r = {
238
+ order: mesh.renderOrder ?? 100,
239
+ isTransparent: false,
240
+ mesh,
241
+ bind(eng, sig) {
242
+ const compile = ensureGeometryCompile(view, res, eng, sig);
243
+ needsAttrFlags = compile._usesMeshAttributeFlags;
244
+ const nodeUBO = ensureGeometryNodeUBO(res, compile, eng, source);
245
+ bindGroup = buildGeometryBindGroup(eng, source, compile, meshUBO, nodeUBO, view);
246
+ const update = () => {
247
+ if (mesh.worldMatrixVersion !== lastWorldVersion || scene.lights.length !== lastLightsCount) {
248
+ writeMesh();
249
+ sortCenter[0] = mesh.worldMatrix[12];
250
+ sortCenter[1] = mesh.worldMatrix[13];
251
+ sortCenter[2] = mesh.worldMatrix[14];
252
+ lastWorldVersion = mesh.worldMatrixVersion;
253
+ lastLightsCount = scene.lights.length;
254
+ }
255
+ };
256
+ const draw = (pass) => {
257
+ if (mesh.visible === false) {
258
+ return 0;
259
+ }
260
+ const g = mesh._gpu;
261
+ for (let i = 0; i < res._attrNames.length; i++) {
262
+ pass.setVertexBuffer(i, getAttrBuffer(engine, g, res._attrNames[i]));
263
+ }
264
+ pass.setIndexBuffer(g.indexBuffer, g.indexFormat);
265
+ pass.setBindGroup(1, bindGroup);
266
+ pass.drawIndexed(g.indexCount);
267
+ return 1;
268
+ };
269
+ return { renderable: r, pipeline: compile._pipeline, update, draw };
270
+ }
271
+ };
272
+ r._worldCenter = sortCenter;
273
+ return r;
274
+ }
275
+ function createNodeGeometryMaterialView(source, config) {
276
+ var _a;
277
+ if (config.emitColor) {
278
+ throw new Error("NodeMaterial geometry view: emitColor (real-color target) is not supported — omit targetTexture on the geometry task.");
279
+ }
280
+ const baseFeatures = ((_a = source._renderFeatures) == null ? void 0 : _a.features) ?? 0;
281
+ const view = createMaterialView(source, { features: baseFeatures | NODE_GEOMETRY_OUTPUT });
282
+ Object.defineProperty(view, "_geometryAttachments", { value: config.attachments, enumerable: false });
283
+ Object.defineProperty(view, "_gpUBO", { value: config.gpUBO ?? null, enumerable: false });
284
+ Object.defineProperty(view, "_reverseCulling", { value: config.reverseCulling ?? false, enumerable: false });
285
+ Object.defineProperty(view, "_buildGroup", { value: nodeGeometryGroupBuilder, enumerable: false });
286
+ return view;
287
+ }
288
+ export {
289
+ createNodeGeometryMaterialView
290
+ };
291
+ //# sourceMappingURL=node-geometry-view-COmWsRXK.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node-geometry-view-COmWsRXK.js","sources":["../src/material/node/node-geometry-renderable.ts","../src/material/node/node-geometry-view.ts"],"sourcesContent":["/** Node Material geometry-MRT renderable factory.\n *\n * Builds a {@link Renderable} that draws a single mesh through a\n * {@link createNodeGeometryMaterialView} into the geometry renderer task's\n * multi-attachment render target. Parallel to\n * `standard-geometry-renderable.ts` / `pbr-geometry-renderable.ts` but for the\n * NodeMaterial family.\n *\n * The geometry shader is produced by **re-walking** the parsed graph from the\n * `GeometryTextureOutputBlock` terminal (instead of `FragmentOutputBlock`).\n * That second `emitGraph` pass fills `state._geometryInputs` with the WGSL\n * expression for every connected geometry input; this module turns those into\n * the per-attachment `FragmentOutput` writes (falling back to the engine\n * default for unconnected attachments) and feeds them to\n * {@link compileNodePipeline} via its `_mrtOutput` option.\n *\n * This module is imported only by {@link createNodeGeometryMaterialView}, which\n * the geometry renderer task dynamic-imports — node scenes that never use the\n * geometry renderer pay zero bytes for it.\n */\n\nimport { F32 } from \"../../engine/typed-arrays.js\";\nimport { BU, SS } from \"../../engine/gpu-flags.js\";\nimport type { EngineContext } from \"../../engine/engine.js\";\nimport type { RenderTargetSignature } from \"../../engine/render-target.js\";\nimport { targetSignatureKey } from \"../../engine/render-target.js\";\nimport type { Mesh } from \"../../mesh/mesh.js\";\nimport type { MeshGroupBuilder, Renderable } from \"../../render/renderable.js\";\nimport { writeMeshLightSelection } from \"../../render/lights-ubo.js\";\nimport { MAX_LIGHTS } from \"../../light/types.js\";\nimport { packMat4IntoF32 } from \"../../math/pack-mat4-into-f32.js\";\nimport type { SceneContext } from \"../../scene/scene-core.js\";\nimport type { Material } from \"../material.js\";\nimport { GeometryTextureType } from \"../../frame-graph/geometry-types.js\";\nimport type { NodeExpr, NodeBuildState, NodeGraph } from \"./node-types.js\";\nimport { emitGraph } from \"./node-emitter.js\";\nimport { findBlockByClassName } from \"./node-parser.js\";\nimport { compileNodePipeline, type NodeCompileResult, type MrtOutputOpts } from \"./node-pipeline.js\";\nimport type { NodeMaterial } from \"./node-material.js\";\nimport { sanitize, bjsTypeToNodeType, floatCount, extractDefault } from \"./node-material.js\";\nimport { getAttrBuffer, writeAttributeFlags } from \"./node-renderable.js\";\nimport type { NodeGeometryMaterialView } from \"./node-geometry-view.js\";\n\n/** Singleton {@link MeshGroupBuilder} that node geometry views point at via their\n * overridden `_buildGroup`. The async builder body is unreachable — geometry\n * views are dispatched per-mesh via the geometry renderer task which calls\n * `_rebuildSingle` directly. */\nexport const nodeGeometryGroupBuilder: MeshGroupBuilder = (async () => {\n throw new Error(\"node-geometry view does not support scene group building\");\n}) as MeshGroupBuilder;\nnodeGeometryGroupBuilder._rebuildSingle = (scene: SceneContext, mesh: Mesh, materialOverride?: Material): Renderable => {\n const view = (materialOverride ?? mesh.material) as NodeGeometryMaterialView;\n return buildNodeGeometryRenderable(scene, mesh, view);\n};\nnodeGeometryGroupBuilder._materialFamily = \"node\";\n\n/** Shared per-view geometry resources, computed once and cached on the view. */\ninterface NodeGeometryViewResources {\n readonly _vertexWgsl: string;\n readonly _fragmentWgsl: string;\n readonly _geomState: NodeBuildState;\n readonly _struct: string;\n /** Fully-assembled fs_main return body (`var out…; return out;`), indented\n * one level with a trailing newline — ready to splice straight into the\n * node pipeline's `fs_main` (no WGSL assembly leaks into node-pipeline.ts). */\n readonly _fsReturn: string;\n readonly _needsGpUbo: boolean;\n readonly _attrNames: readonly string[];\n /** Per-target-signature compile (pipeline + BGL). */\n readonly _compileBySig: Map<string, NodeCompileResult>;\n /** Shared node UBO (one per material, format-independent). Allocated on first compile. */\n _nodeUBO: GPUBuffer | null;\n _nodeUBOReady: boolean;\n}\n\nconst ZERO = (wg: string): string => `vec4<f32>(0.0, 0.0, 0.0, ${wg})`;\n\n/** Build the per-attachment WGSL write for one geometry texture type, reading a\n * connected graph input when present and falling back to the engine default. */\nfunction geomWrite(type: GeometryTextureType, inputs: Map<GeometryTextureType, NodeExpr>, gpRef: { needsGp: boolean }): string {\n const wg = \"1.0\"; // opaque node materials: writeGeometryInfo gate is always 1.\n const v = inputs.get(type);\n const wp = inputs.get(GeometryTextureType.WORLD_POSITION);\n switch (type) {\n case GeometryTextureType.WORLD_POSITION:\n return v ? `vec4<f32>(${v.expr}, ${wg})` : ZERO(wg);\n case GeometryTextureType.LOCAL_POSITION:\n return v ? `vec4<f32>(${v.expr}, ${wg})` : ZERO(wg);\n case GeometryTextureType.WORLD_NORMAL:\n return v ? `vec4<f32>(normalize(${v.expr}) * 0.5 + vec3<f32>(0.5), ${wg})` : ZERO(wg);\n case GeometryTextureType.VIEW_NORMAL:\n return v ? `vec4<f32>(normalize(${v.expr}), ${wg})` : ZERO(wg);\n case GeometryTextureType.REFLECTIVITY:\n // Stored as vec4 — vec4(rgb, a) * writeGeometryInfo.\n return v ? `(${v.expr}) * ${wg}` : ZERO(wg);\n case GeometryTextureType.ALBEDO:\n return v ? `vec4<f32>(${v.expr}, ${wg})` : ZERO(wg);\n case GeometryTextureType.IRRADIANCE:\n return v ? `vec4<f32>(${v.expr}, ${wg})` : ZERO(wg);\n case GeometryTextureType.SCREENSPACE_DEPTH:\n return v ? `vec4<f32>(${v.expr}, 0.0, 0.0, ${wg})` : `vec4<f32>(in.position.z, 0.0, 0.0, ${wg})`;\n case GeometryTextureType.VIEW_DEPTH:\n if (v) {\n return `vec4<f32>(${v.expr}, 0.0, 0.0, ${wg})`;\n }\n return wp ? `vec4<f32>((scene.view * vec4<f32>(${wp.expr}, 1.0)).z, 0.0, 0.0, ${wg})` : ZERO(wg);\n case GeometryTextureType.NORMALIZED_VIEW_DEPTH:\n if (v) {\n return `vec4<f32>(${v.expr}, 0.0, 0.0, ${wg})`;\n }\n if (wp) {\n gpRef.needsGp = true;\n return `vec4<f32>(((scene.view * vec4<f32>(${wp.expr}, 1.0)).z - nmeGeom.cameraNearFar.x) / (nmeGeom.cameraNearFar.y - nmeGeom.cameraNearFar.x), 0.0, 0.0, ${wg})`;\n }\n return ZERO(wg);\n case GeometryTextureType.LINEAR_VELOCITY:\n // Stored as vec3 — node materials do not compute velocity, default 0.\n return v ? `vec4<f32>(${v.expr}, ${wg})` : ZERO(wg);\n }\n}\n\n/** Re-emit the graph from the GeometryTextureOutputBlock terminal and build the\n * shared geometry resources (WGSL bodies + FragmentOutput struct + writes). */\nfunction ensureGeometryResources(view: NodeGeometryMaterialView): NodeGeometryViewResources {\n const cached = view._geometry as NodeGeometryViewResources | undefined;\n if (cached) {\n return cached;\n }\n const source = view.source as NodeMaterial;\n const graph = source._graph;\n const geomRoot = findBlockByClassName(graph, \"GeometryTextureOutputBlock\");\n if (!geomRoot) {\n throw new Error(\"NodeMaterial geometry view: graph has no GeometryTextureOutputBlock\");\n }\n const vertRoot = findBlockByClassName(graph, \"VertexOutputBlock\");\n const { vertexWgsl, fragmentWgsl, state } = emitGraph(\n graph,\n source._emitters as Map<string, import(\"./node-types.js\").BlockEmitter>,\n geomRoot.id,\n vertRoot ? vertRoot.id : null,\n [],\n {\n hasSkeleton: source._hasSkeleton,\n hasInstances: source._hasInstances,\n }\n );\n if (state.usesMorphTargets || state.usesEnv || state.shadowLights.length > 0) {\n throw new Error(\"NodeMaterial geometry view: morph / env / shadow inputs are not supported in the geometry pass\");\n }\n\n const inputs = state._geometryInputs ?? new Map<GeometryTextureType, NodeExpr>();\n const attachments = view._geometryAttachments;\n const gpRef = { needsGp: false };\n const structLines = attachments.map((_, i) => `@location(${i}) f${i}: vec4<f32>,`);\n const struct = `struct FragmentOutput {\\n${structLines.join(\"\\n\")}\\n};`;\n const writeLines = attachments.map((type, i) => `out.f${i} = ${geomWrite(type, inputs, gpRef)};`);\n // Pre-indent the full return body here (one level + trailing newline) so the\n // node pipeline just splices the string — no geometry WGSL assembly in the\n // always-loaded compileNodePipeline.\n const fsReturn = [\"var out: FragmentOutput;\", ...writeLines, \"return out;\"].map((l) => ` ${l}`).join(\"\\n\") + \"\\n\";\n\n const res: NodeGeometryViewResources = {\n _vertexWgsl: vertexWgsl,\n _fragmentWgsl: fragmentWgsl,\n _geomState: state,\n _struct: struct,\n _fsReturn: fsReturn,\n _needsGpUbo: gpRef.needsGp,\n _attrNames: state.vertexAttributes.map((a) => a._name),\n _compileBySig: new Map(),\n _nodeUBO: null,\n _nodeUBOReady: false,\n };\n Object.defineProperty(view, \"_geometry\", { value: res, enumerable: false, configurable: true });\n return res;\n}\n\n/** Compile (or fetch cached) the geometry MRT pipeline for a target signature. */\nfunction ensureGeometryCompile(view: NodeGeometryMaterialView, res: NodeGeometryViewResources, engine: EngineContext, sig: RenderTargetSignature): NodeCompileResult {\n const key = targetSignatureKey(sig);\n const cached = res._compileBySig.get(key);\n if (cached) {\n return cached;\n }\n const source = view.source as NodeMaterial;\n const colorFormats = (sig as RenderTargetSignature & { _colorFormats?: readonly GPUTextureFormat[] })._colorFormats ?? (sig._colorFormat ? [sig._colorFormat] : []);\n if (colorFormats.length === 0) {\n throw new Error(\"node-geometry: render target has no color attachments\");\n }\n const cullMode: GPUCullMode = source._graph.backFaceCulling ? (view._reverseCulling ? \"front\" : \"back\") : \"none\";\n // All geometry-specific WGSL object-literals + the MRT pipeline descriptor\n // live here (lazy module). compileNodePipeline only splices strings + calls\n // these callbacks, so non-geometry node scenes bundle none of it.\n const mrtOutput: MrtOutputOpts = {\n _struct: res._struct,\n _fsReturnType: \" -> FragmentOutput\",\n _fsReturn: res._fsReturn,\n _cacheKey: `3|mrt:${colorFormats.join()}:${cullMode}`,\n _needsGpUbo: res._needsGpUbo,\n _buildGeomUbo: (binding) => ({\n _wgsl: `struct NmeGeomParams { previousViewProjection: mat4x4<f32>, cameraNearFar: vec4<f32> };\\n@group(1) @binding(${binding}) var<uniform> nmeGeom: NmeGeomParams;`,\n _bglEntry: { binding, visibility: SS.FRAGMENT, buffer: { type: \"uniform\" } },\n }),\n // Geometry MRT renders upright into offscreen targets (the task packs an\n // un-flipped scene UBO), matching the Standard/PBR geometry renderables.\n _buildPipeline: (device, a) =>\n device.createRenderPipeline({\n label: \"node-material-geometry\",\n layout: device.createPipelineLayout({ bindGroupLayouts: [a._sceneBGL, a._meshBGL] }),\n vertex: { module: a._shaderModule, entryPoint: \"vs_main\", buffers: a._vertexBuffers },\n fragment: { module: a._shaderModule, entryPoint: \"fs_main\", targets: colorFormats.map((f) => ({ format: f })) },\n depthStencil: { format: a._depthFormat, depthCompare: a._depthCompare, depthWriteEnabled: true },\n multisample: { count: a._msaaSamples },\n primitive: { topology: \"triangle-list\", cullMode, frontFace: \"ccw\" },\n }),\n };\n const compile = compileNodePipeline(res._geomState, res._vertexWgsl, res._fragmentWgsl, {\n _engine: engine,\n _format: engine.format,\n _depthStencilFormat: sig._depthStencilFormat,\n _depthCompare: sig._depthCompare ?? \"greater-equal\",\n _msaaSamples: sig._sampleCount,\n _backFaceCulling: source._graph.backFaceCulling,\n _alphaMode: 0,\n _mrtOutput: mrtOutput,\n });\n res._compileBySig.set(key, compile);\n return compile;\n}\n\n/** Resolve the default uniform value (as a Float32Array) for the InputBlock\n * whose sanitized name matches `sanitizedName`. Used by {@link ensureGeometryNodeUBO}\n * for uniforms that only appear in the geometry re-emit — e.g. a constant\n * reflectivity colour referenced solely by the GeometryTextureOutputBlock\n * terminal and therefore absent from the colour pass's `_uniformValues`.\n * Returns null when no matching scalar/vector uniform InputBlock exists. Lives\n * here (not in the always-loaded `node-material.ts`) so non-geometry node\n * scenes pay zero bytes for it; the tiny helpers it calls (`sanitize`,\n * `bjsTypeToNodeType`, `floatCount`, `extractDefault`) are already retained by\n * the always-loaded UBO writer and merely re-exported. */\nfunction extractNodeUniformDefault(graph: NodeGraph, sanitizedName: string): Float32Array | null {\n for (const block of graph.blocks.values()) {\n if (block.className !== \"InputBlock\") {\n continue;\n }\n if (sanitize(block.name || `input${block.id}`) !== sanitizedName) {\n continue;\n }\n const type = bjsTypeToNodeType((block.serialized[\"type\"] as number | undefined) ?? 0x10);\n if (type === \"mat4f\") {\n return null;\n }\n const values = new F32(floatCount(type));\n values.set(extractDefault(block.serialized[\"value\"], type));\n return values;\n }\n return null;\n}\n\n/** Build / refresh the shared geometry node UBO (constants + live uniform overlays). */\nfunction ensureGeometryNodeUBO(res: NodeGeometryViewResources, compile: NodeCompileResult, engine: EngineContext, source: NodeMaterial): GPUBuffer | null {\n if (res._nodeUBOReady) {\n return res._nodeUBO;\n }\n res._nodeUBOReady = true;\n if (compile._nodeUboBinding === null || compile._nodeUboSize === 0) {\n return null;\n }\n const scratch = new F32(compile._nodeUboSize / 4);\n for (const [name, offsetBytes] of compile._nodeUboOffsets) {\n const live = source._uniformValues.get(name);\n if (live) {\n scratch.set(live._values, offsetBytes >> 2);\n continue;\n }\n const def = extractNodeUniformDefault(source._graph, name);\n if (def) {\n scratch.set(def, offsetBytes >> 2);\n }\n }\n const ubo = engine._device.createBuffer({ label: \"node-geom-ubo\", size: compile._nodeUboSize, usage: BU.UNIFORM | BU.COPY_DST });\n engine._device.queue.writeBuffer(ubo, 0, scratch);\n res._nodeUBO = ubo;\n return ubo;\n}\n\nfunction buildGeometryBindGroup(\n engine: EngineContext,\n source: NodeMaterial,\n compile: NodeCompileResult,\n meshUBO: GPUBuffer,\n nodeUBO: GPUBuffer | null,\n view: NodeGeometryMaterialView\n): GPUBindGroup {\n const entries: GPUBindGroupEntry[] = [{ binding: 0, resource: { buffer: meshUBO } }];\n if (nodeUBO && compile._nodeUboBinding !== null) {\n entries.push({ binding: compile._nodeUboBinding, resource: { buffer: nodeUBO } });\n }\n for (const tb of compile._textureBindings) {\n const tex = source._textureSlots.get(tb._name)?.current;\n if (!tex) {\n throw new Error(`NodeMaterial geometry view: texture binding \"${tb._name}\" not set. Provide it via material.inputs[\"${tb._name}\"].texture before the first render.`);\n }\n entries.push({ binding: tb._texBinding, resource: tex.view }, { binding: tb._sampBinding, resource: tex.sampler });\n }\n if (compile._geometryGpBinding !== null) {\n if (!view._gpUBO) {\n throw new Error(\"NodeMaterial geometry view: NORMALIZED_VIEW_DEPTH requested but no geometry-params UBO was provided by the task.\");\n }\n entries.push({ binding: compile._geometryGpBinding, resource: { buffer: view._gpUBO } });\n }\n return engine._device.createBindGroup({ label: \"node-geom-bg\", layout: compile._meshBGL, entries });\n}\n\n/** Build a {@link Renderable} for one mesh drawn through a NodeMaterial geometry view. */\nexport function buildNodeGeometryRenderable(scene: SceneContext, mesh: Mesh, view: NodeGeometryMaterialView): Renderable {\n const engine = scene.surface.engine;\n const device = engine._device;\n const source = view.source as NodeMaterial;\n const res = ensureGeometryResources(view);\n\n // Per-mesh UBO: world (64B) + receivesShadow (vec4) + light count/indices.\n const meshUboBytes = (96 + 16 * Math.ceil(MAX_LIGHTS / 4) + 15) & ~15;\n const meshUBO = device.createBuffer({ label: \"node-geom-mesh-ubo\", size: meshUboBytes, usage: BU.UNIFORM | BU.COPY_DST });\n const meshScratch = new F32(meshUboBytes / 4);\n const packMeshWorld = engine._makePackMeshWorld?.(scene) ?? packMat4IntoF32;\n\n let needsAttrFlags = false;\n const writeMesh = (): void => {\n packMeshWorld(meshScratch, mesh.worldMatrix, 0, 0);\n meshScratch[16] = mesh.receiveShadows ? 1 : 0;\n if (needsAttrFlags) {\n writeAttributeFlags(mesh, meshScratch);\n }\n writeMeshLightSelection(mesh, scene.lights, meshScratch.subarray(4));\n device.queue.writeBuffer(meshUBO, 0, meshScratch as Float32Array<ArrayBuffer>);\n };\n\n let bindGroup: GPUBindGroup | null = null;\n let lastWorldVersion = -1;\n let lastLightsCount = -1;\n\n const sortCenter: [number, number, number] = [mesh.worldMatrix[12]!, mesh.worldMatrix[13]!, mesh.worldMatrix[14]!];\n\n const r: Renderable = {\n order: mesh.renderOrder ?? 100,\n isTransparent: false,\n mesh,\n bind(eng: EngineContext, sig: RenderTargetSignature) {\n const compile = ensureGeometryCompile(view, res, eng as EngineContext, sig);\n needsAttrFlags = compile._usesMeshAttributeFlags;\n const nodeUBO = ensureGeometryNodeUBO(res, compile, eng as EngineContext, source);\n bindGroup = buildGeometryBindGroup(eng as EngineContext, source, compile, meshUBO, nodeUBO, view);\n\n const update = (): void => {\n if (mesh.worldMatrixVersion !== lastWorldVersion || scene.lights.length !== lastLightsCount) {\n writeMesh();\n sortCenter[0] = mesh.worldMatrix[12]!;\n sortCenter[1] = mesh.worldMatrix[13]!;\n sortCenter[2] = mesh.worldMatrix[14]!;\n lastWorldVersion = mesh.worldMatrixVersion;\n lastLightsCount = scene.lights.length;\n }\n };\n const draw = (pass: GPURenderPassEncoder | GPURenderBundleEncoder): number => {\n if (mesh.visible === false) {\n return 0;\n }\n const g = mesh._gpu;\n for (let i = 0; i < res._attrNames.length; i++) {\n pass.setVertexBuffer(i, getAttrBuffer(engine, g, res._attrNames[i]!));\n }\n pass.setIndexBuffer(g.indexBuffer, g.indexFormat);\n pass.setBindGroup(1, bindGroup!);\n pass.drawIndexed(g.indexCount);\n return 1;\n };\n return { renderable: r, pipeline: compile._pipeline, update, draw };\n },\n };\n r._worldCenter = sortCenter;\n return r;\n}\n","/** NodeMaterial view helper that targets geometry-rendering MRT output.\n *\n * The geometry renderer task wraps each NodeMaterial caster in a\n * `NodeGeometryMaterialView`. The view carries the per-task attachment list,\n * optional `gp` UBO (camera near/far, shared across the task's materials), and\n * reverse-culling flag, and shadows {@link Material._buildGroup} with\n * {@link nodeGeometryGroupBuilder} so the geometry renderer task materialises a\n * {@link Renderable} through the node geometry renderable infrastructure — no\n * view-aware branching needed in core render-task.\n *\n * The geometry-output WGSL itself is produced by re-walking the parsed graph\n * from the `GeometryTextureOutputBlock` terminal in\n * `./node-geometry-renderable.ts`. Mirrors `material/standard/geometry-view.ts`\n * and `material/node/esm-shadow-view.ts`. */\n\nimport { createMaterialView } from \"../material-view.js\";\nimport type { MaterialView } from \"../material.js\";\nimport type { GeometryTextureType } from \"../../frame-graph/geometry-types.js\";\nimport { NODE_GEOMETRY_OUTPUT } from \"./node-flags.js\";\nimport type { NodeMaterial } from \"./node-material.js\";\nimport { nodeGeometryGroupBuilder } from \"./node-geometry-renderable.js\";\n\n/** Per-task ordered attachment list driving the geometry template. The array\n * index is the MRT color-attachment slot used in `@location(i)`. */\nexport type NodeGeometryAttachments = readonly GeometryTextureType[];\n\n/** Per-(task, material) NodeMaterial geometry view configuration. */\nexport interface NodeGeometryViewConfig {\n /** Ordered MRT attachment list — index = `@location(i)`. */\n readonly attachments: NodeGeometryAttachments;\n /** When true the task additionally wants the real (lit) material color at\n * `@location(N)`. NodeMaterial geometry views do not implement the extra\n * color attachment (the realColor impostor is dropped); passing `true`\n * throws so callers don't silently mismatch the render-pass attachments. */\n readonly emitColor: boolean;\n /** Per-task camera-near-far UBO. Required when {@link attachments} contains\n * `NORMALIZED_VIEW_DEPTH` (and the input is left unconnected). */\n readonly gpUBO?: GPUBuffer | null;\n /** Flip culling direction. */\n readonly reverseCulling?: boolean;\n}\n\n/** NodeMaterial view that emits geometry textures instead of shaded colour. */\nexport interface NodeGeometryMaterialView extends MaterialView {\n /** @internal Ordered MRT attachment list — index = `@location(i)`. */\n readonly _geometryAttachments: NodeGeometryAttachments;\n /** @internal Optional per-task geometry-params UBO. */\n readonly _gpUBO: GPUBuffer | null;\n /** @internal */\n readonly _reverseCulling: boolean;\n /** @internal Shared per-view resources cache populated lazily by the renderable factory. */\n _geometry?: unknown;\n}\n\n/** Wrap a NodeMaterial as a geometry-output view.\n * - Sets the `NODE_GEOMETRY_OUTPUT` feature bit.\n * - Shadows `_buildGroup` with {@link nodeGeometryGroupBuilder} so the natural\n * `material._buildGroup._rebuildSingle` dispatch builds a geometry-MRT\n * renderable for this view. */\nexport function createNodeGeometryMaterialView(source: NodeMaterial, config: NodeGeometryViewConfig): NodeGeometryMaterialView {\n if (config.emitColor) {\n throw new Error(\"NodeMaterial geometry view: emitColor (real-color target) is not supported — omit targetTexture on the geometry task.\");\n }\n const baseFeatures = source._renderFeatures?.features ?? 0;\n const view = createMaterialView(source, { features: baseFeatures | NODE_GEOMETRY_OUTPUT }) as NodeGeometryMaterialView;\n Object.defineProperty(view, \"_geometryAttachments\", { value: config.attachments, enumerable: false });\n Object.defineProperty(view, \"_gpUBO\", { value: config.gpUBO ?? null, enumerable: false });\n Object.defineProperty(view, \"_reverseCulling\", { value: config.reverseCulling ?? false, enumerable: false });\n Object.defineProperty(view, \"_buildG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Aa,EAAE,WAAW;AAChD,aAAK,aAAa,GAAG,SAAU;AAC/B,aAAK,YAAY,EAAE,UAAU;AAC7B,eAAO;AAAA,MACX;AACA,aAAO,EAAE,YAAY,GAAG,UAAU,QAAQ,WAAW,QAAQ,KAAA;AAAA,IACjE;AAAA,EAAA;AAEJ,IAAE,eAAe;AACjB,SAAO;AACX;ACnUO,SAAS,+BAA+B,QAAsB,QAA0D;;AAC3H,MAAI,OAAO,WAAW;AAClB,UAAM,IAAI,MAAM,uHAAuH;AAAA,EAC3I;AACA,QAAM,iBAAe,YAAO,oBAAP,mBAAwB,aAAY;AACzD,QAAM,OAAO,mBAAmB,QAAQ,EAAE,UAAU,eAAe,sBAAsB;AACzF,SAAO,eAAe,MAAM,wBAAwB,EAAE,OAAO,OAAO,aAAa,YAAY,OAAO;AACpG,SAAO,eAAe,MAAM,UAAU,EAAE,OAAO,OAAO,SAAS,MAAM,YAAY,MAAA,CAAO;AACxF,SAAO,eAAe,MAAM,mBAAmB,EAAE,OAAO,OAAO,kBAAkB,OAAO,YAAY,MAAA,CAAO;AAC3G,SAAO,eAAe,MAAM,eAAe,EAAE,OAAO,0BAA0B,YAAY,OAAO;AACjG,SAAO;AACX;"}
@@ -19,7 +19,7 @@ function blockLoader(key) {
19
19
  case "IridescenceBlock":
20
20
  return () => import("./iridescence-block-B0pRFoOU.js");
21
21
  case "LoopBlock":
22
- return () => import("./loop-block-Bb23EOMb.js");
22
+ return () => import("./loop-block-qTg8vb99.js");
23
23
  case "StorageReadBlock":
24
24
  return () => import("./storage-read-block-BdzhJfln.js");
25
25
  case "StorageWriteBlock":
@@ -38,4 +38,4 @@ async function loadExtraEmitter(key) {
38
38
  export {
39
39
  loadExtraEmitter
40
40
  };
41
- //# sourceMappingURL=node-registry-extra-compat-Dhrw8fDQ.js.map
41
+ //# sourceMappingURL=node-registry-extra-compat-dWrv7gpS.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"node-registry-extra-compat-Dhrw8fDQ.js","sources":["../src/material/node/node-registry-extra-compat.ts"],"sourcesContent":["import type { BlockEmitter } from \"./node-types.js\";\nimport type { BlockLoader } from \"./node-registry.js\";\n\nfunction blockLoader(key: string): BlockLoader | null {\n switch (key) {\n case \"ElbowBlock\":\n return () => import(\"./blocks/elbow-block.js\");\n case \"NodeMaterialTeleportInBlock\":\n return () => import(\"./blocks/teleport-in-block.js\");\n case \"NodeMaterialTeleportOutBlock\":\n return () => import(\"./blocks/teleport-out-block.js\");\n case \"NodeMaterialDebugBlock\":\n return () => import(\"./blocks/debug-block.js\");\n case \"MeshAttributeExistsBlock\":\n return () => import(\"./blocks/mesh-attribute-exists-block.js\");\n case \"ClipPlanesBlock\":\n return () => import(\"./blocks/clip-planes-block.js\");\n case \"ReflectionTextureBaseBlock\":\n return () => import(\"./blocks/reflection-texture-base-block.js\");\n case \"ImageProcessingBlock\":\n return () => import(\"./blocks/image-processing-block.js\");\n case \"IridescenceBlock\":\n return () => import(\"./blocks/iridescence-block.js\");\n case \"LoopBlock\":\n return () => import(\"./blocks/loop-block.js\");\n case \"StorageReadBlock\":\n return () => import(\"./blocks/storage-read-block.js\");\n case \"StorageWriteBlock\":\n return () => import(\"./blocks/storage-write-block.js\");\n default:\n return null;\n }\n}\n\nexport async function loadExtraEmitter(key: string): Promise<BlockEmitter> {\n const loader = blockLoader(key);\n if (!loader) {\n throw new Error(`NodeMaterial: no compatibility extension emitter registered for block \"${key}\"`);\n }\n return (await loader()).emitter;\n}\n"],"names":[],"mappings":"AAGA,SAAS,YAAY,KAAiC;AAClD,UAAQ,KAAA;AAAA,IACJ,KAAK;AACD,aAAO,MAAM,OAAO,2BAAyB;AAAA,IACjD,KAAK;AACD,aAAO,MAAM,OAAO,iCAA+B;AAAA,IACvD,KAAK;AACD,aAAO,MAAM,OAAO,kCAAgC;AAAA,IACxD,KAAK;AACD,aAAO,MAAM,OAAO,2BAAyB;AAAA,IACjD,KAAK;AACD,aAAO,MAAM,OAAO,2CAAyC;AAAA,IACjE,KAAK;AACD,aAAO,MAAM,OAAO,iCAA+B;AAAA,IACvD,KAAK;AACD,aAAO,MAAM,OAAO,6CAA2C;AAAA,IACnE,KAAK;AACD,aAAO,MAAM,OAAO,sCAAoC;AAAA,IAC5D,KAAK;AACD,aAAO,MAAM,OAAO,iCAA+B;AAAA,IACvD,KAAK;AACD,aAAO,MAAM,OAAO,0BAAwB;AAAA,IAChD,KAAK;AACD,aAAO,MAAM,OAAO,kCAAgC;AAAA,IACxD,KAAK;AACD,aAAO,MAAM,OAAO,mCAAiC;AAAA,IACzD;AACI,aAAO;AAAA,EAAA;AAEnB;AAEA,eAAsB,iBAAiB,KAAoC;AACvE,QAAM,SAAS,YAAY,GAAG;AAC9B,MAAI,CAAC,QAAQ;AACT,UAAM,IAAI,MAAM,0EAA0E,GAAG,GAAG;AAAA,EACpG;AACA,UAAQ,MAAM,UAAU;AAC5B;"}
1
+ {"version":3,"file":"node-registry-extra-compat-dWrv7gpS.js","sources":["../src/material/node/node-registry-extra-compat.ts"],"sourcesContent":["import type { BlockEmitter } from \"./node-types.js\";\nimport type { BlockLoader } from \"./node-registry.js\";\n\nfunction blockLoader(key: string): BlockLoader | null {\n switch (key) {\n case \"ElbowBlock\":\n return () => import(\"./blocks/elbow-block.js\");\n case \"NodeMaterialTeleportInBlock\":\n return () => import(\"./blocks/teleport-in-block.js\");\n case \"NodeMaterialTeleportOutBlock\":\n return () => import(\"./blocks/teleport-out-block.js\");\n case \"NodeMaterialDebugBlock\":\n return () => import(\"./blocks/debug-block.js\");\n case \"MeshAttributeExistsBlock\":\n return () => import(\"./blocks/mesh-attribute-exists-block.js\");\n case \"ClipPlanesBlock\":\n return () => import(\"./blocks/clip-planes-block.js\");\n case \"ReflectionTextureBaseBlock\":\n return () => import(\"./blocks/reflection-texture-base-block.js\");\n case \"ImageProcessingBlock\":\n return () => import(\"./blocks/image-processing-block.js\");\n case \"IridescenceBlock\":\n return () => import(\"./blocks/iridescence-block.js\");\n case \"LoopBlock\":\n return () => import(\"./blocks/loop-block.js\");\n case \"StorageReadBlock\":\n return () => import(\"./blocks/storage-read-block.js\");\n case \"StorageWriteBlock\":\n return () => import(\"./blocks/storage-write-block.js\");\n default:\n return null;\n }\n}\n\nexport async function loadExtraEmitter(key: string): Promise<BlockEmitter> {\n const loader = blockLoader(key);\n if (!loader) {\n throw new Error(`NodeMaterial: no compatibility extension emitter registered for block \"${key}\"`);\n }\n return (await loader()).emitter;\n}\n"],"names":[],"mappings":"AAGA,SAAS,YAAY,KAAiC;AAClD,UAAQ,KAAA;AAAA,IACJ,KAAK;AACD,aAAO,MAAM,OAAO,2BAAyB;AAAA,IACjD,KAAK;AACD,aAAO,MAAM,OAAO,iCAA+B;AAAA,IACvD,KAAK;AACD,aAAO,MAAM,OAAO,kCAAgC;AAAA,IACxD,KAAK;AACD,aAAO,MAAM,OAAO,2BAAyB;AAAA,IACjD,KAAK;AACD,aAAO,MAAM,OAAO,2CAAyC;AAAA,IACjE,KAAK;AACD,aAAO,MAAM,OAAO,iCAA+B;AAAA,IACvD,KAAK;AACD,aAAO,MAAM,OAAO,6CAA2C;AAAA,IACnE,KAAK;AACD,aAAO,MAAM,OAAO,sCAAoC;AAAA,IAC5D,KAAK;AACD,aAAO,MAAM,OAAO,iCAA+B;AAAA,IACvD,KAAK;AACD,aAAO,MAAM,OAAO,0BAAwB;AAAA,IAChD,KAAK;AACD,aAAO,MAAM,OAAO,kCAAgC;AAAA,IACxD,KAAK;AACD,aAAO,MAAM,OAAO,mCAAiC;AAAA,IACzD;AACI,aAAO;AAAA,EAAA;AAEnB;AAEA,eAAsB,iBAAiB,KAAoC;AACvE,QAAM,SAAS,YAAY,GAAG;AAC9B,MAAI,CAAC,QAAQ;AACT,UAAM,IAAI,MAAM,0EAA0E,GAAG,GAAG;AAAA,EACpG;AACA,UAAQ,MAAM,UAAU;AAC5B;"}
@@ -27,7 +27,7 @@ function blockLoader(key) {
27
27
  case "ConditionalBlock":
28
28
  return () => import("./conditional-block-Cd2pbejI.js");
29
29
  case "CurveBlock":
30
- return () => import("./curve-block-BlJpXVYv.js");
30
+ return () => import("./curve-block-21rT0JjG.js");
31
31
  case "WaveBlock":
32
32
  return () => import("./wave-block-CY_mk1ec.js");
33
33
  case "RandomNumberBlock":
@@ -46,4 +46,4 @@ async function loadExtraEmitter(key) {
46
46
  export {
47
47
  loadExtraEmitter
48
48
  };
49
- //# sourceMappingURL=node-registry-extra-math-CsAHvIZo.js.map
49
+ //# sourceMappingURL=node-registry-extra-math-Bn854sX9.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"node-registry-extra-math-CsAHvIZo.js","sources":["../src/material/node/node-registry-extra-math.ts"],"sourcesContent":["import type { BlockEmitter } from \"./node-types.js\";\nimport type { BlockLoader } from \"./node-registry.js\";\n\nfunction blockLoader(key: string): BlockLoader | null {\n switch (key) {\n case \"DivideBlock\":\n return () => import(\"./blocks/divide-block.js\");\n case \"ModBlock\":\n return () => import(\"./blocks/mod-block.js\");\n case \"ReciprocalBlock\":\n return () => import(\"./blocks/reciprocal-block.js\");\n case \"LengthBlock\":\n return () => import(\"./blocks/length-block.js\");\n case \"DistanceBlock\":\n return () => import(\"./blocks/distance-block.js\");\n case \"CrossBlock\":\n return () => import(\"./blocks/cross-block.js\");\n case \"ReflectBlock\":\n return () => import(\"./blocks/reflect-block.js\");\n case \"RefractBlock\":\n return () => import(\"./blocks/refract-block.js\");\n case \"ArcTan2Block\":\n return () => import(\"./blocks/arc-tan2-block.js\");\n case \"FresnelBlock\":\n return () => import(\"./blocks/fresnel-block.js\");\n case \"OppositeBlock\":\n return () => import(\"./blocks/opposite-block.js\");\n case \"NLerpBlock\":\n return () => import(\"./blocks/nlerp-block.js\");\n case \"ConditionalBlock\":\n return () => import(\"./blocks/conditional-block.js\");\n case \"CurveBlock\":\n return () => import(\"./blocks/curve-block.js\");\n case \"WaveBlock\":\n return () => import(\"./blocks/wave-block.js\");\n case \"RandomNumberBlock\":\n return () => import(\"./blocks/random-number-block.js\");\n default:\n return null;\n }\n}\n\nexport async function loadExtraEmitter(key: string): Promise<BlockEmitter> {\n const loader = blockLoader(key);\n if (!loader) {\n throw new Error(`NodeMaterial: no math extension emitter registered for block \"${key}\"`);\n }\n return (await loader()).emitter;\n}\n"],"names":[],"mappings":"AAGA,SAAS,YAAY,KAAiC;AAClD,UAAQ,KAAA;AAAA,IACJ,KAAK;AACD,aAAO,MAAM,OAAO,4BAA0B;AAAA,IAClD,KAAK;AACD,aAAO,MAAM,OAAO,yBAAuB;AAAA,IAC/C,KAAK;AACD,aAAO,MAAM,OAAO,gCAA8B;AAAA,IACtD,KAAK;AACD,aAAO,MAAM,OAAO,4BAA0B;AAAA,IAClD,KAAK;AACD,aAAO,MAAM,OAAO,8BAA4B;AAAA,IACpD,KAAK;AACD,aAAO,MAAM,OAAO,2BAAyB;AAAA,IACjD,KAAK;AACD,aAAO,MAAM,OAAO,6BAA2B;AAAA,IACnD,KAAK;AACD,aAAO,MAAM,OAAO,6BAA2B;AAAA,IACnD,KAAK;AACD,aAAO,MAAM,OAAO,8BAA4B;AAAA,IACpD,KAAK;AACD,aAAO,MAAM,OAAO,6BAA2B;AAAA,IACnD,KAAK;AACD,aAAO,MAAM,OAAO,8BAA4B;AAAA,IACpD,KAAK;AACD,aAAO,MAAM,OAAO,2BAAyB;AAAA,IACjD,KAAK;AACD,aAAO,MAAM,OAAO,iCAA+B;AAAA,IACvD,KAAK;AACD,aAAO,MAAM,OAAO,2BAAyB;AAAA,IACjD,KAAK;AACD,aAAO,MAAM,OAAO,0BAAwB;AAAA,IAChD,KAAK;AACD,aAAO,MAAM,OAAO,mCAAiC;AAAA,IACzD;AACI,aAAO;AAAA,EAAA;AAEnB;AAEA,eAAsB,iBAAiB,KAAoC;AACvE,QAAM,SAAS,YAAY,GAAG;AAC9B,MAAI,CAAC,QAAQ;AACT,UAAM,IAAI,MAAM,iEAAiE,GAAG,GAAG;AAAA,EAC3F;AACA,UAAQ,MAAM,UAAU;AAC5B;"}
1
+ {"version":3,"file":"node-registry-extra-math-Bn854sX9.js","sources":["../src/material/node/node-registry-extra-math.ts"],"sourcesContent":["import type { BlockEmitter } from \"./node-types.js\";\nimport type { BlockLoader } from \"./node-registry.js\";\n\nfunction blockLoader(key: string): BlockLoader | null {\n switch (key) {\n case \"DivideBlock\":\n return () => import(\"./blocks/divide-block.js\");\n case \"ModBlock\":\n return () => import(\"./blocks/mod-block.js\");\n case \"ReciprocalBlock\":\n return () => import(\"./blocks/reciprocal-block.js\");\n case \"LengthBlock\":\n return () => import(\"./blocks/length-block.js\");\n case \"DistanceBlock\":\n return () => import(\"./blocks/distance-block.js\");\n case \"CrossBlock\":\n return () => import(\"./blocks/cross-block.js\");\n case \"ReflectBlock\":\n return () => import(\"./blocks/reflect-block.js\");\n case \"RefractBlock\":\n return () => import(\"./blocks/refract-block.js\");\n case \"ArcTan2Block\":\n return () => import(\"./blocks/arc-tan2-block.js\");\n case \"FresnelBlock\":\n return () => import(\"./blocks/fresnel-block.js\");\n case \"OppositeBlock\":\n return () => import(\"./blocks/opposite-block.js\");\n case \"NLerpBlock\":\n return () => import(\"./blocks/nlerp-block.js\");\n case \"ConditionalBlock\":\n return () => import(\"./blocks/conditional-block.js\");\n case \"CurveBlock\":\n return () => import(\"./blocks/curve-block.js\");\n case \"WaveBlock\":\n return () => import(\"./blocks/wave-block.js\");\n case \"RandomNumberBlock\":\n return () => import(\"./blocks/random-number-block.js\");\n default:\n return null;\n }\n}\n\nexport async function loadExtraEmitter(key: string): Promise<BlockEmitter> {\n const loader = blockLoader(key);\n if (!loader) {\n throw new Error(`NodeMaterial: no math extension emitter registered for block \"${key}\"`);\n }\n return (await loader()).emitter;\n}\n"],"names":[],"mappings":"AAGA,SAAS,YAAY,KAAiC;AAClD,UAAQ,KAAA;AAAA,IACJ,KAAK;AACD,aAAO,MAAM,OAAO,4BAA0B;AAAA,IAClD,KAAK;AACD,aAAO,MAAM,OAAO,yBAAuB;AAAA,IAC/C,KAAK;AACD,aAAO,MAAM,OAAO,gCAA8B;AAAA,IACtD,KAAK;AACD,aAAO,MAAM,OAAO,4BAA0B;AAAA,IAClD,KAAK;AACD,aAAO,MAAM,OAAO,8BAA4B;AAAA,IACpD,KAAK;AACD,aAAO,MAAM,OAAO,2BAAyB;AAAA,IACjD,KAAK;AACD,aAAO,MAAM,OAAO,6BAA2B;AAAA,IACnD,KAAK;AACD,aAAO,MAAM,OAAO,6BAA2B;AAAA,IACnD,KAAK;AACD,aAAO,MAAM,OAAO,8BAA4B;AAAA,IACpD,KAAK;AACD,aAAO,MAAM,OAAO,6BAA2B;AAAA,IACnD,KAAK;AACD,aAAO,MAAM,OAAO,8BAA4B;AAAA,IACpD,KAAK;AACD,aAAO,MAAM,OAAO,2BAAyB;AAAA,IACjD,KAAK;AACD,aAAO,MAAM,OAAO,iCAA+B;AAAA,IACvD,KAAK;AACD,aAAO,MAAM,OAAO,2BAAyB;AAAA,IACjD,KAAK;AACD,aAAO,MAAM,OAAO,0BAAwB;AAAA,IAChD,KAAK;AACD,aAAO,MAAM,OAAO,mCAAiC;AAAA,IACzD;AACI,aAAO;AAAA,EAAA;AAEnB;AAEA,eAAsB,iBAAiB,KAAoC;AACvE,QAAM,SAAS,YAAY,GAAG;AAC9B,MAAI,CAAC,QAAQ;AACT,UAAM,IAAI,MAAM,iEAAiE,GAAG,GAAG;AAAA,EAC3F;AACA,UAAQ,MAAM,UAAU;AAC5B;"}
@@ -1,4 +1,4 @@
1
- import { c as compileNodePipeline, w as writeNodeUBO, a as writeMeshLightSelection, N as NODE_ESM_SHADOW_OUTPUT, b as NODE_NO_COLOR_OUTPUT, M as MAX_LIGHTS } from "./index-C8HOR2sB.js";
1
+ import { c as compileNodePipeline, B as BU, w as writeNodeUBO, p as packMat4IntoF32, a as F32, b as writeMeshLightSelection, N as NODE_ESM_SHADOW_OUTPUT, d as NODE_NO_COLOR_OUTPUT, M as MAX_LIGHTS, T as TU, U as U32, e as U8 } from "./index-CLElg2Bo.js";
2
2
  const emptyMorphByEngine = /* @__PURE__ */ new WeakMap();
3
3
  function getEmptyMorph(engine) {
4
4
  const cached = emptyMorphByEngine.get(engine);
@@ -9,23 +9,23 @@ function getEmptyMorph(engine) {
9
9
  label: "node-morph-empty",
10
10
  size: [1, 1],
11
11
  format: "rgba32float",
12
- usage: GPUTextureUsage.TEXTURE_BINDING | GPUTextureUsage.COPY_DST
12
+ usage: TU.TEXTURE_BINDING | TU.COPY_DST
13
13
  });
14
- engine._device.queue.writeTexture({ texture }, new Float32Array([0, 0, 0, 0]).buffer, { bytesPerRow: 16 }, { width: 1, height: 1 });
14
+ engine._device.queue.writeTexture({ texture }, new F32([0, 0, 0, 0]).buffer, { bytesPerRow: 16 }, { width: 1, height: 1 });
15
15
  const ubo = new ArrayBuffer(32);
16
- const u32 = new Uint32Array(ubo, 16, 4);
16
+ const u32 = new U32(ubo, 16, 4);
17
17
  u32[0] = 0;
18
18
  u32[1] = 1;
19
19
  u32[2] = 1;
20
- const weightsBuffer = engine._device.createBuffer({ label: "node-morph-empty-ubo", size: 32, usage: GPUBufferUsage.UNIFORM | GPUBufferUsage.COPY_DST });
21
- engine._device.queue.writeBuffer(weightsBuffer, 0, new Uint8Array(ubo));
20
+ const weightsBuffer = engine._device.createBuffer({ label: "node-morph-empty-ubo", size: 32, usage: BU.UNIFORM | BU.COPY_DST });
21
+ engine._device.queue.writeBuffer(weightsBuffer, 0, new U8(ubo));
22
22
  const entry = { texture, weightsBuffer };
23
23
  emptyMorphByEngine.set(engine, entry);
24
24
  return entry;
25
25
  }
26
26
  function buildNodeMeshRenderables(scene, meshes, materialOverride) {
27
- var _a, _b, _c, _d;
28
- const engine = scene.engine;
27
+ var _a, _b, _c, _d, _e, _f, _g, _h;
28
+ const engine = scene.surface.engine;
29
29
  const device = engine._device;
30
30
  const byMaterial = /* @__PURE__ */ new Map();
31
31
  for (const m of meshes) {
@@ -53,21 +53,28 @@ function buildNodeMeshRenderables(scene, meshes, materialOverride) {
53
53
  _noColorOutput: noColorOutput,
54
54
  _esmShadowOutput: esmShadowOutput,
55
55
  _esmShadowDepthCode: esmShadowOutput ? material._esmShadowDepthCode : void 0,
56
- _alphaMode: esmShadowOutput ? 0 : void 0
56
+ _alphaMode: esmShadowOutput ? 0 : void 0,
57
+ // The shared fragment body still references env IBL/BRDF samplers
58
+ // (e.g. nmeBrdfLUT) even in the no-color shadow-depth variant, so we
59
+ // must emit the env decls + BGL entries here too; otherwise WGSL fails
60
+ // to resolve those identifiers. _envEmitter is undefined for non-env
61
+ // materials (state.usesEnv === false), leaving them unaffected.
62
+ _envEmitter: (_b = material._envHelpers) == null ? void 0 : _b.emitEnv
57
63
  }) : material._compile;
58
64
  const meshBGL = compile._meshBGL;
59
65
  let nodeUBO = null;
60
66
  if (compile._nodeUboBinding !== null && compile._nodeUboSize > 0) {
61
- nodeUBO = device.createBuffer({ label: "node-ubo", size: compile._nodeUboSize, usage: GPUBufferUsage.UNIFORM | GPUBufferUsage.COPY_DST });
67
+ nodeUBO = device.createBuffer({ label: "node-ubo", size: compile._nodeUboSize, usage: BU.UNIFORM | BU.COPY_DST });
62
68
  writeNodeUBO(engine, nodeUBO, material);
63
69
  material._nodeUBO = nodeUBO;
64
70
  }
71
+ const _packMeshWorld = ((_c = engine._makePackMeshWorld) == null ? void 0 : _c.call(engine, scene)) ?? packMat4IntoF32;
65
72
  const packets = [];
66
73
  for (const _mesh of matMeshes) {
67
74
  const meshUboBytes = 96 + 16 * Math.ceil(MAX_LIGHTS / 4);
68
- const _meshUBO = device.createBuffer({ label: "node-mesh-ubo", size: meshUboBytes + 15 & -16, usage: GPUBufferUsage.UNIFORM | GPUBufferUsage.COPY_DST });
69
- const _meshScratch = new Float32Array((meshUboBytes + 15 & -16) / 4);
70
- _meshScratch.set(_mesh.worldMatrix, 0);
75
+ const _meshUBO = device.createBuffer({ label: "node-mesh-ubo", size: meshUboBytes + 15 & -16, usage: BU.UNIFORM | BU.COPY_DST });
76
+ const _meshScratch = new F32((meshUboBytes + 15 & -16) / 4);
77
+ _packMeshWorld(_meshScratch, _mesh.worldMatrix, 0, 0);
71
78
  const recv = _mesh.receiveShadows ? 1 : 0;
72
79
  _meshScratch[16] = recv;
73
80
  if (compile._usesMeshAttributeFlags) {
@@ -133,7 +140,7 @@ function buildNodeMeshRenderables(scene, meshes, materialOverride) {
133
140
  const recvChanged = recv !== pkt._lastReceivesShadow;
134
141
  const lightsChanged = scene.lights.length !== pkt._lastLightsCount;
135
142
  if (worldChanged || recvChanged || lightsChanged) {
136
- pkt._meshScratch.set(pkt._mesh.worldMatrix, 0);
143
+ _packMeshWorld(pkt._meshScratch, pkt._mesh.worldMatrix, 0, 0);
137
144
  pkt._meshScratch[16] = recv;
138
145
  if (compile._usesMeshAttributeFlags) {
139
146
  writeAttributeFlags(pkt._mesh, pkt._meshScratch);
@@ -165,11 +172,11 @@ function buildNodeMeshRenderables(scene, meshes, materialOverride) {
165
172
  if (isTransparent) {
166
173
  for (const pkt of packets) {
167
174
  const wm = pkt._mesh.worldMatrix;
168
- const cx = ((_b = pkt._mesh.position) == null ? void 0 : _b.x) ?? wm[12];
169
- const cy = ((_c = pkt._mesh.position) == null ? void 0 : _c.y) ?? wm[13];
170
- const cz = ((_d = pkt._mesh.position) == null ? void 0 : _d.z) ?? wm[14];
175
+ const cx = ((_d = pkt._mesh.position) == null ? void 0 : _d.x) ?? wm[12];
176
+ const cy = ((_e = pkt._mesh.position) == null ? void 0 : _e.y) ?? wm[13];
177
+ const cz = ((_f = pkt._mesh.position) == null ? void 0 : _f.z) ?? wm[14];
171
178
  const sortCenter = [cx, cy, cz];
172
- const update = () => {
179
+ const _baseUpdate = () => {
173
180
  updatePacketUBO(pkt);
174
181
  updateNodeUBO();
175
182
  const m = pkt._mesh.worldMatrix;
@@ -177,6 +184,10 @@ function buildNodeMeshRenderables(scene, meshes, materialOverride) {
177
184
  sortCenter[1] = m[13];
178
185
  sortCenter[2] = m[14];
179
186
  };
187
+ const _invalidate = () => {
188
+ pkt._lastWorldVersion = -1;
189
+ };
190
+ const update = ((_g = engine._wrapRenderableForFO) == null ? void 0 : _g.call(engine, _baseUpdate, scene, _invalidate)) ?? _baseUpdate;
180
191
  const draw = (pass) => {
181
192
  drawPacket(pass, pkt);
182
193
  return 1;
@@ -193,12 +204,18 @@ function buildNodeMeshRenderables(scene, meshes, materialOverride) {
193
204
  renderables.push(rTrans);
194
205
  }
195
206
  } else {
196
- const update = () => {
207
+ const _baseUpdate = () => {
197
208
  for (const pkt of packets) {
198
209
  updatePacketUBO(pkt);
199
210
  }
200
211
  updateNodeUBO();
201
212
  };
213
+ const _invalidate = () => {
214
+ for (const pkt of packets) {
215
+ pkt._lastWorldVersion = -1;
216
+ }
217
+ };
218
+ const update = ((_h = engine._wrapRenderableForFO) == null ? void 0 : _h.call(engine, _baseUpdate, scene, _invalidate)) ?? _baseUpdate;
202
219
  const draw = (pass) => {
203
220
  let draws = 0;
204
221
  for (const pkt of packets) {
@@ -235,7 +252,7 @@ function getZeroAttrBuffer(engine, gpu, name) {
235
252
  }
236
253
  const vertexCount = gpu.positionBuffer.size / 12;
237
254
  const stride = name === "uv" || name === "uv2" ? 8 : name === "normal" ? 12 : name === "tangent" || name === "color" ? 16 : 16;
238
- const buf = engine._device.createBuffer({ label: `node-zero-${name}`, size: vertexCount * stride, usage: GPUBufferUsage.VERTEX | GPUBufferUsage.COPY_DST });
255
+ const buf = engine._device.createBuffer({ label: `node-zero-${name}`, size: vertexCount * stride, usage: BU.VERTEX | BU.COPY_DST });
239
256
  cache.set(name, buf);
240
257
  return buf;
241
258
  }
@@ -264,6 +281,8 @@ function writeAttributeFlags(mesh, scratch) {
264
281
  scratch[19] = gpu.hasColor ? 1 : 0;
265
282
  }
266
283
  export {
267
- buildNodeMeshRenderables
284
+ buildNodeMeshRenderables,
285
+ getAttrBuffer,
286
+ writeAttributeFlags
268
287
  };
269
- //# sourceMappingURL=node-renderable-DlLIdBmd.js.map
288
+ //# sourceMappingURL=node-renderable-B5G8WcdH.js.map