@holoscript/core 8.0.8 → 8.0.10

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 (463) hide show
  1. package/LICENSE +21 -0
  2. package/bin/holoscript.cjs +5 -1
  3. package/dist/GLTFPipeline-L76YTXKA.js +15 -0
  4. package/dist/GLTFPipeline-ZWJN7GI6.cjs +36 -0
  5. package/dist/HoloCompositionParser-K76KTEEE.js +12 -0
  6. package/dist/HoloCompositionParser-UZH6Y4HO.cjs +45 -0
  7. package/dist/HoloScriptCodeParser-2D4ERFUZ.js +6 -0
  8. package/dist/HoloScriptCodeParser-UDRLDA7I.cjs +23 -0
  9. package/dist/HoloScriptPlusParser-FTMCGWXD.js +13 -0
  10. package/dist/HoloScriptPlusParser-LQR5GIKF.cjs +30 -0
  11. package/dist/HoloScriptRuntime-UTRLJI5L.js +12 -0
  12. package/dist/HoloScriptRuntime-YBYXJHJN.cjs +21 -0
  13. package/dist/SceneIRCompiler-63KA3M2F.js +17 -0
  14. package/dist/SceneIRCompiler-KWUFHZ4O.cjs +42 -0
  15. package/dist/{USDZExporter-AUHZODOF.cjs → USDZExporter-ML4UMIGC.cjs} +3 -3
  16. package/dist/{USDZExporter-GXB4AUSG.js → USDZExporter-ZFKLQ76G.js} +3 -3
  17. package/dist/agents/index.cjs +1 -1
  18. package/dist/agents/index.js +1 -1
  19. package/dist/audit/AuditLogger.d.ts +106 -0
  20. package/dist/audit/AuditQueryBuilder.d.ts +79 -0
  21. package/dist/audit/ComplianceReporter.d.ts +90 -0
  22. package/dist/audit/index.d.ts +13 -0
  23. package/dist/{chunk-FGMDMJM7.js → chunk-2BYAUHBO.js} +3 -3
  24. package/dist/{chunk-EDPYCLRC.cjs → chunk-2E6PP5UE.cjs} +83 -59
  25. package/dist/{chunk-GASCWJK5.js → chunk-2EGGAZT3.js} +65 -287
  26. package/dist/{chunk-SIEXCILW.js → chunk-2I3XAGMF.js} +3 -3
  27. package/dist/{chunk-OS533P33.cjs → chunk-2KKOYZYI.cjs} +1074 -1655
  28. package/dist/chunk-2MQKNDNH.js +51 -0
  29. package/dist/{chunk-7DMMMBCY.cjs → chunk-2X3IPCBK.cjs} +10 -10
  30. package/dist/chunk-2ZOTBO25.cjs +202 -0
  31. package/dist/chunk-356N4NPM.cjs +152 -0
  32. package/dist/{chunk-X3GJPRVK.cjs → chunk-36NPLOI4.cjs} +92 -81
  33. package/dist/{chunk-SLU6UPJI.cjs → chunk-37HHY7RH.cjs} +5 -5
  34. package/dist/{chunk-YDPEHCCI.cjs → chunk-3CDDRUER.cjs} +3 -118
  35. package/dist/chunk-3F7ZZWIN.js +1651 -0
  36. package/dist/chunk-3ILD7TKP.cjs +187 -0
  37. package/dist/{chunk-X27QRG4C.cjs → chunk-3IUHTGDD.cjs} +153 -41
  38. package/dist/{chunk-PXNZ6TME.js → chunk-4376VHNJ.js} +60 -36
  39. package/dist/{chunk-YKGPCZEE.cjs → chunk-4FIBOJW6.cjs} +10 -10
  40. package/dist/chunk-4Q7RKQQI.cjs +14195 -0
  41. package/dist/{chunk-YCM6QQRT.cjs → chunk-566ZB4LZ.cjs} +180 -8
  42. package/dist/{chunk-2Y3V22SG.js → chunk-5CURIYGT.js} +3 -3
  43. package/dist/{chunk-QBWNJXNR.js → chunk-5FYMCVBY.js} +5 -5
  44. package/dist/{chunk-ZA34AN3R.js → chunk-5LVFTGKH.js} +841 -12
  45. package/dist/{chunk-Z6PMDS4G.js → chunk-5OUOMBKK.js} +1090 -53
  46. package/dist/chunk-63AUAIL6.js +48 -0
  47. package/dist/chunk-655FATJU.js +110 -0
  48. package/dist/{chunk-TQ377OLB.cjs → chunk-65S62L4D.cjs} +28 -22
  49. package/dist/chunk-6NTAZN5Z.cjs +502 -0
  50. package/dist/chunk-6TRX6AR2.js +9376 -0
  51. package/dist/chunk-6ZCCLKS2.cjs +51 -0
  52. package/dist/{chunk-MDR235RZ.js → chunk-734OB5SK.js} +721 -8
  53. package/dist/{chunk-Q2Q34NF3.js → chunk-77QI552M.js} +6 -6
  54. package/dist/{chunk-WKX5AMOY.js → chunk-7I74JWPW.js} +3 -3
  55. package/dist/{chunk-5FSKKMR7.cjs → chunk-7IDJDMPU.cjs} +232 -4
  56. package/dist/chunk-7VBKRGIZ.cjs +847 -0
  57. package/dist/{chunk-KCPHASCO.js → chunk-AATYYLYK.js} +5 -5
  58. package/dist/{chunk-DTGBOSEM.cjs → chunk-AWXFEAQL.cjs} +12 -12
  59. package/dist/{chunk-THCK6ECW.js → chunk-B3CWTCK2.js} +231 -3
  60. package/dist/chunk-BCP4E7MD.cjs +997 -0
  61. package/dist/chunk-BG7RPYJP.js +91 -0
  62. package/dist/{chunk-VF257YKO.js → chunk-BP4KTMLY.js} +117 -5
  63. package/dist/{chunk-YN6IETRZ.js → chunk-BQJ3YBF3.js} +6424 -987
  64. package/dist/{chunk-7X5PNIQJ.js → chunk-BXSOEQI3.js} +27 -25
  65. package/dist/{chunk-WFKVS2K4.cjs → chunk-C65C5VED.cjs} +1101 -55
  66. package/dist/{chunk-KOUAQL2B.cjs → chunk-CANAL6CT.cjs} +1569 -168
  67. package/dist/{chunk-FDSGHPAK.js → chunk-CBSDJF3B.js} +3 -3
  68. package/dist/{chunk-FEWUHQNM.cjs → chunk-CFVK26P4.cjs} +4 -4
  69. package/dist/{chunk-M7K4LE66.cjs → chunk-CI33NINL.cjs} +4 -4
  70. package/dist/{chunk-2OWDB4FB.js → chunk-CKV5NYAE.js} +6 -6
  71. package/dist/{chunk-LPS5AMQD.cjs → chunk-CM4NHXVO.cjs} +24 -24
  72. package/dist/chunk-D3HSRXYB.js +115 -0
  73. package/dist/{chunk-FNHJRI32.js → chunk-DBH3D2MU.js} +1561 -160
  74. package/dist/{chunk-GW3LKD5C.js → chunk-DJNH4HFW.js} +3 -3
  75. package/dist/{chunk-2GCNOI2U.cjs → chunk-DN6F4DHH.cjs} +9 -3
  76. package/dist/chunk-DQRJ5RJG.js +432 -0
  77. package/dist/{chunk-C7ZBSV2Q.js → chunk-DUG3OQAS.js} +106 -43
  78. package/dist/chunk-ECUYJOJ2.cjs +199 -0
  79. package/dist/chunk-EEMTCAK7.js +182 -0
  80. package/dist/{chunk-3SKLAUDD.cjs → chunk-EI3J6LTW.cjs} +359 -581
  81. package/dist/{chunk-SSSN7VAM.js → chunk-EM2OGPYE.js} +4 -4
  82. package/dist/{chunk-56VOWURB.cjs → chunk-ENZCIQZC.cjs} +522 -453
  83. package/dist/chunk-ESBXUYOC.cjs +836 -0
  84. package/dist/{chunk-L5U4W6JC.js → chunk-ESSEF6U2.js} +4 -4
  85. package/dist/chunk-ET3AN4W3.js +824 -0
  86. package/dist/chunk-EXKSFGSX.cjs +14 -14
  87. package/dist/{chunk-I76GIKN7.cjs → chunk-F3YT6GUF.cjs} +17 -17
  88. package/dist/{chunk-WRWEX5ZF.js → chunk-F75DZBBI.js} +3 -3
  89. package/dist/{chunk-4JGRWHZJ.js → chunk-FG6PYGIZ.js} +12 -6
  90. package/dist/chunk-FGGJQRLZ.js +14 -14
  91. package/dist/{chunk-SXOSDZD6.js → chunk-FWCHPCD4.js} +128 -10
  92. package/dist/{chunk-XW6IXEQH.cjs → chunk-G35CAQ7I.cjs} +5 -5
  93. package/dist/{chunk-7VMGP2FW.js → chunk-G6KACNMO.js} +132 -188
  94. package/dist/{chunk-FJPADH77.cjs → chunk-GAWJJAGT.cjs} +6 -6
  95. package/dist/chunk-GGR7QUKK.cjs +4724 -0
  96. package/dist/chunk-GIBF4BHH.js +14098 -0
  97. package/dist/{chunk-AWB7QYY6.cjs → chunk-GILYQ5VH.cjs} +6 -6
  98. package/dist/{chunk-FWVYAMNW.cjs → chunk-GKFCHGCM.cjs} +4 -4
  99. package/dist/{chunk-Y3ZFVUUU.js → chunk-GLEJ2TLS.js} +3 -3
  100. package/dist/{chunk-3GWWJT7L.js → chunk-GP3OKSKT.js} +13 -13
  101. package/dist/chunk-GTIPOEHN.js +196 -0
  102. package/dist/{chunk-LMJ5EBV7.cjs → chunk-GZPUA2TL.cjs} +16 -15
  103. package/dist/{chunk-IELX2OKI.js → chunk-H4LJ4HEA.js} +3 -115
  104. package/dist/{chunk-ACVWFGBI.cjs → chunk-HCX4SMFK.cjs} +3 -3
  105. package/dist/{chunk-HYNTS5CP.js → chunk-HHRZ6STP.js} +24 -2
  106. package/dist/chunk-HIDEIEFG.js +48 -0
  107. package/dist/{chunk-W6RW64BB.cjs → chunk-HSWBIDZM.cjs} +228 -5
  108. package/dist/{chunk-GSOUNWEL.js → chunk-HVX7QQYK.js} +1035 -1616
  109. package/dist/{chunk-TRCGG42I.cjs → chunk-IFW5IW4L.cjs} +6502 -1019
  110. package/dist/{chunk-F5LKJ6F5.cjs → chunk-IJU6AS67.cjs} +32 -28
  111. package/dist/{chunk-TVANHNJ7.js → chunk-IK6Z2HNC.js} +173 -3
  112. package/dist/{chunk-QGMUTVVH.cjs → chunk-IS7NTKY5.cjs} +20 -20
  113. package/dist/{chunk-YFVQWSNJ.js → chunk-IXWGYWH6.js} +3 -3
  114. package/dist/chunk-J2DAS2PL.js +148 -0
  115. package/dist/chunk-JBQXZIWB.js +148 -0
  116. package/dist/chunk-JBYBMBMW.js +261 -0
  117. package/dist/{chunk-LWUOUCYL.js → chunk-JEJ7TT54.js} +5 -5
  118. package/dist/{chunk-DUCB6LGL.js → chunk-JOTCTHN5.js} +211 -5
  119. package/dist/{chunk-47RUFYKR.js → chunk-K56UVEXV.js} +3 -3
  120. package/dist/{chunk-XSFNHP2E.js → chunk-KB26H447.js} +3 -3
  121. package/dist/{chunk-3NGDZZR4.js → chunk-KEYG7HGY.js} +430 -37
  122. package/dist/{chunk-DY72BMU5.js → chunk-KFVNCW4Q.js} +4 -4
  123. package/dist/chunk-KPGC7SK2.js +192 -0
  124. package/dist/chunk-KROXXBK5.cjs +53 -0
  125. package/dist/{chunk-ZPZAVHXL.cjs → chunk-LB3ZZMKT.cjs} +137 -19
  126. package/dist/chunk-LDYZWNJW.cjs +1654 -0
  127. package/dist/{chunk-UGXHYIWT.cjs → chunk-LHNHO27U.cjs} +28 -28
  128. package/dist/{chunk-ULMSSHCJ.cjs → chunk-LMB555QB.cjs} +405 -38
  129. package/dist/{chunk-CBJY23VL.js → chunk-MD4IVS42.js} +3 -3
  130. package/dist/{chunk-VMLKSV26.js → chunk-MDDWEBCX.js} +226 -3
  131. package/dist/chunk-MUWH4QK5.cjs +94 -0
  132. package/dist/{chunk-T6W3Z3SH.cjs → chunk-N2ILK7BF.cjs} +4 -4
  133. package/dist/{chunk-6EX3I5P4.cjs → chunk-N74QRJGP.cjs} +6 -6
  134. package/dist/chunk-NFFHLX37.cjs +132 -0
  135. package/dist/chunk-NJSYWX7H.js +190 -0
  136. package/dist/{chunk-SH5PPVK7.cjs → chunk-NQN5LFN4.cjs} +165 -221
  137. package/dist/chunk-NTQRFOPP.cjs +56 -0
  138. package/dist/{chunk-YFWRJW4B.js → chunk-NWMJPTVL.js} +51 -55
  139. package/dist/{chunk-63ZGNR2T.cjs → chunk-OC6GV5QH.cjs} +42 -42
  140. package/dist/{chunk-7E7GCQCK.js → chunk-OG3MBHM3.js} +9 -3
  141. package/dist/chunk-OMNHTCS4.cjs +264 -0
  142. package/dist/chunk-OQXB6NNC.cjs +117 -0
  143. package/dist/{chunk-Y57W2CT5.cjs → chunk-OV46CCA2.cjs} +51 -55
  144. package/dist/{chunk-6PRZIHGL.cjs → chunk-OV6HHKLE.cjs} +21 -266
  145. package/dist/{chunk-C37BHB7N.cjs → chunk-P26YYPOO.cjs} +5 -5
  146. package/dist/{chunk-2BZHWUSR.cjs → chunk-P7JEKJTZ.cjs} +16 -16
  147. package/dist/{chunk-NGBXXZLL.cjs → chunk-PDXX5UI4.cjs} +45 -45
  148. package/dist/{chunk-FHQFPYV4.js → chunk-PJFTTSKE.js} +8 -7
  149. package/dist/{chunk-GVFJ6T4S.cjs → chunk-PVODJEJ7.cjs} +721 -8
  150. package/dist/{chunk-ZZ7RO2UQ.js → chunk-Q265VZJ4.js} +3 -3
  151. package/dist/{chunk-E7JP3BS3.cjs → chunk-Q47JEE2C.cjs} +4 -4
  152. package/dist/chunk-QBY7LRN2.js +281 -0
  153. package/dist/{chunk-GH6C2QGW.cjs → chunk-QEDMOGF3.cjs} +857 -16
  154. package/dist/{chunk-5WUNN6ZN.cjs → chunk-QHSAVOOL.cjs} +24 -2
  155. package/dist/chunk-QJNCDVYM.cjs +137 -0
  156. package/dist/chunk-QM7FJB5W.js +4717 -0
  157. package/dist/chunk-QQFB4RT2.cjs +448 -0
  158. package/dist/chunk-QSYBHQAD.cjs +196 -0
  159. package/dist/{chunk-2YSNA2F2.cjs → chunk-QVJMDVYZ.cjs} +5 -5
  160. package/dist/chunk-RAJMAX6D.js +131 -0
  161. package/dist/{chunk-VVKVQZI6.js → chunk-RAN3ECAS.js} +3 -3
  162. package/dist/chunk-RKGUZBOC.js +79 -0
  163. package/dist/{chunk-HLFDZ35S.cjs → chunk-RRQIAJLQ.cjs} +8 -8
  164. package/dist/{chunk-PABONWKI.js → chunk-RXQNRZ5F.js} +3 -3
  165. package/dist/{chunk-7ZHYEITD.cjs → chunk-S4O7CFHQ.cjs} +10 -11
  166. package/dist/chunk-SE7ANBGN.js +128 -0
  167. package/dist/{chunk-X2AVEAZM.cjs → chunk-SJIRCTIS.cjs} +176 -2
  168. package/dist/{chunk-WXQ57LAO.js → chunk-SQXAZHDG.js} +4 -4
  169. package/dist/chunk-SR73L5ZP.cjs +84 -0
  170. package/dist/{chunk-OABEO6HH.js → chunk-SZOLTWWD.js} +2349 -214
  171. package/dist/{chunk-5JEU52DW.js → chunk-TPZ3BN2D.js} +3 -3
  172. package/dist/{chunk-QFU53KRH.js → chunk-TSTFYGGX.js} +4 -5
  173. package/dist/{chunk-EBS32AJI.cjs → chunk-TZCFKZ6Z.cjs} +5 -5
  174. package/dist/chunk-UCVZXQ63.js +724 -0
  175. package/dist/chunk-UGQ3QNV6.js +992 -0
  176. package/dist/chunk-UNMVGZVW.js +142 -0
  177. package/dist/{chunk-TEVX443G.js → chunk-UTUD6GJI.js} +178 -6
  178. package/dist/chunk-UXBYA7DV.cjs +155 -0
  179. package/dist/chunk-V6GXFSK7.cjs +443 -0
  180. package/dist/chunk-VHORVGCG.cjs +761 -0
  181. package/dist/{chunk-B4EKV6HQ.js → chunk-VKCTYLDN.js} +500 -442
  182. package/dist/{chunk-O3MGZDCT.cjs → chunk-VTEXJOSD.cjs} +63 -63
  183. package/dist/chunk-VVAAZITA.cjs +287 -0
  184. package/dist/{chunk-V7AKE5VT.cjs → chunk-W2GA3EQB.cjs} +435 -42
  185. package/dist/chunk-W4GABFCR.js +37 -0
  186. package/dist/chunk-WKEK4NCA.js +490 -0
  187. package/dist/{chunk-5A4TCHOC.cjs → chunk-WNYXT4TE.cjs} +4 -4
  188. package/dist/{chunk-S762UEV5.js → chunk-WTH23ISI.js} +6 -6
  189. package/dist/{chunk-BTKZGHAV.js → chunk-WWNCM473.js} +10 -6
  190. package/dist/{chunk-4YNYPHH3.cjs → chunk-X75H75UY.cjs} +2351 -213
  191. package/dist/{chunk-LYJJI7ZK.cjs → chunk-XCUDDFKC.cjs} +216 -9
  192. package/dist/chunk-YAO4HPJL.cjs +120 -0
  193. package/dist/chunk-YKY2JBER.cjs +9443 -0
  194. package/dist/chunk-YP5CHEYU.cjs +154 -0
  195. package/dist/{chunk-WRNEH5MO.js → chunk-YW3I2FQL.js} +18 -7
  196. package/dist/{chunk-BRNUPDHJ.js → chunk-Z557DVYN.js} +386 -19
  197. package/dist/{chunk-VSACG2AR.js → chunk-Z6LZUYZF.js} +21 -264
  198. package/dist/chunk-ZHPMP447.cjs +43 -0
  199. package/dist/{chunk-LODTHGST.cjs → chunk-ZK7KX5CD.cjs} +133 -70
  200. package/dist/{chunk-CCPSNT6B.cjs → chunk-ZRPALBQB.cjs} +5 -5
  201. package/dist/chunk-ZVFHPMC5.js +824 -0
  202. package/dist/chunk-ZVQMKUGJ.js +443 -0
  203. package/dist/cli/holoscript-runner.cjs +86 -48
  204. package/dist/cli/holoscript-runner.js +54 -16
  205. package/dist/codebase/index.cjs +1 -1
  206. package/dist/codebase/index.js +1 -1
  207. package/dist/compiler/agent-inference.cjs +11 -11
  208. package/dist/compiler/agent-inference.js +9 -6
  209. package/dist/compiler/android-xr.cjs +13 -12
  210. package/dist/compiler/android-xr.js +11 -10
  211. package/dist/compiler/android.cjs +12 -12
  212. package/dist/compiler/android.js +10 -10
  213. package/dist/compiler/business-quest.cjs +10 -10
  214. package/dist/compiler/business-quest.js +2 -2
  215. package/dist/compiler/coco.cjs +1 -1
  216. package/dist/compiler/coco.js +1 -1
  217. package/dist/compiler/context.cjs +9 -9
  218. package/dist/compiler/context.js +6 -6
  219. package/dist/compiler/daimon-seed.cjs +36 -0
  220. package/dist/compiler/daimon-seed.js +12 -0
  221. package/dist/compiler/domain-block-utils.cjs +205 -156
  222. package/dist/compiler/domain-block-utils.js +8 -7
  223. package/dist/compiler/dtdl.cjs +10 -10
  224. package/dist/compiler/dtdl.js +7 -7
  225. package/dist/compiler/gltf-pipeline.cjs +9 -9
  226. package/dist/compiler/gltf-pipeline.js +2 -2
  227. package/dist/compiler/godot.cjs +10 -9
  228. package/dist/compiler/godot.js +9 -8
  229. package/dist/compiler/incremental.cjs +11 -11
  230. package/dist/compiler/incremental.js +6 -6
  231. package/dist/compiler/index.cjs +2585 -3273
  232. package/dist/compiler/index.d.ts +149 -35
  233. package/dist/compiler/index.js +2197 -3102
  234. package/dist/compiler/ios.cjs +11 -11
  235. package/dist/compiler/ios.js +9 -9
  236. package/dist/compiler/llm-provider-capabilities.cjs +9 -9
  237. package/dist/compiler/llm-provider-capabilities.js +6 -6
  238. package/dist/compiler/nodetoy.cjs +1 -1
  239. package/dist/compiler/nodetoy.js +1 -1
  240. package/dist/compiler/openxr.cjs +11 -10
  241. package/dist/compiler/openxr.js +10 -9
  242. package/dist/compiler/remotion.cjs +1 -1
  243. package/dist/compiler/remotion.js +1 -1
  244. package/dist/compiler/reproducibility.cjs +1 -1
  245. package/dist/compiler/reproducibility.js +1 -1
  246. package/dist/compiler/sdf.cjs +11 -10
  247. package/dist/compiler/sdf.js +9 -8
  248. package/dist/compiler/semantic-scene.cjs +7 -7
  249. package/dist/compiler/semantic-scene.js +2 -2
  250. package/dist/compiler/state.cjs +9 -9
  251. package/dist/compiler/state.js +7 -7
  252. package/dist/compiler/trait-composition.cjs +11 -11
  253. package/dist/compiler/trait-composition.js +7 -7
  254. package/dist/compiler/traits/ProvenanceSemiring.d.ts +167 -0
  255. package/dist/compiler/traits/Semiring.d.ts +26 -0
  256. package/dist/compiler/unity.cjs +11 -10
  257. package/dist/compiler/unity.js +10 -9
  258. package/dist/compiler/unreal.cjs +12 -11
  259. package/dist/compiler/unreal.js +10 -9
  260. package/dist/compiler/urdf.cjs +18 -17
  261. package/dist/compiler/urdf.js +9 -8
  262. package/dist/compiler/usd-physics.cjs +11 -10
  263. package/dist/compiler/usd-physics.js +8 -7
  264. package/dist/compiler/visionos.cjs +11 -10
  265. package/dist/compiler/visionos.js +10 -9
  266. package/dist/compiler/vrchat.cjs +11 -10
  267. package/dist/compiler/vrchat.js +9 -8
  268. package/dist/compiler/wasm.cjs +14 -13
  269. package/dist/compiler/wasm.js +9 -8
  270. package/dist/compiler/webgpu.cjs +10 -9
  271. package/dist/compiler/webgpu.js +9 -8
  272. package/dist/constants.cjs +398 -0
  273. package/dist/constants.js +9 -0
  274. package/dist/coordinators/index.cjs +4 -1
  275. package/dist/coordinators/index.js +4 -1
  276. package/dist/debugger.cjs +11 -9
  277. package/dist/debugger.js +9 -7
  278. package/dist/{dist-ACXG6IH5.cjs → dist-GRMOP2UL.cjs} +341 -65
  279. package/dist/{dist-VD4L6V7Q.js → dist-ZBUKU2JG.js} +333 -63
  280. package/dist/entries/interop.cjs +23 -23
  281. package/dist/entries/interop.js +3 -3
  282. package/dist/entries/scripting.cjs +12 -11
  283. package/dist/entries/scripting.js +8 -7
  284. package/dist/evolution/index.cjs +66 -0
  285. package/dist/evolution/index.d.ts +162 -0
  286. package/dist/evolution/index.js +17 -0
  287. package/dist/hololand/index.cjs +41 -37
  288. package/dist/hololand/index.js +3 -3
  289. package/dist/index.cjs +12394 -3224
  290. package/dist/index.d.ts +260 -18
  291. package/dist/index.js +10755 -2182
  292. package/dist/keyword-registry/PluginKeywordRegistry.d.ts +138 -0
  293. package/dist/keyword-registry/index.cjs +29 -0
  294. package/dist/keyword-registry/index.d.ts +1 -0
  295. package/dist/keyword-registry/index.js +4 -0
  296. package/dist/math/tropical-spmv.cjs +11 -11
  297. package/dist/math/tropical-spmv.d.ts +1 -0
  298. package/dist/math/tropical-spmv.js +2 -2
  299. package/dist/math/tropicalSpmv.d.ts +43 -0
  300. package/dist/math/vec3.cjs +1 -1
  301. package/dist/math/vec3.js +1 -1
  302. package/dist/matter/StagedMatter.d.ts +82 -0
  303. package/dist/matter/index.cjs +17 -0
  304. package/dist/matter/index.d.ts +1 -0
  305. package/dist/matter/index.js +4 -0
  306. package/dist/{ml-dsa-Z7JDKW4L.js → ml-dsa-J6VKVT4K.js} +3 -3
  307. package/dist/{ml-dsa-FSKBTE3W.cjs → ml-dsa-MTIK4ZUQ.cjs} +23 -23
  308. package/dist/paper-0c-spike/index.cjs +1 -1
  309. package/dist/paper-0c-spike/index.js +1 -1
  310. package/dist/parameter-envelope/ParameterEnvelope.d.ts +128 -0
  311. package/dist/parameter-envelope/index.cjs +17 -0
  312. package/dist/parameter-envelope/index.d.ts +2 -0
  313. package/dist/parameter-envelope/index.js +4 -0
  314. package/dist/parser/HoloCompositionTypes.d.ts +2013 -0
  315. package/dist/parser/PipelineParser.d.ts +162 -0
  316. package/dist/parser.cjs +36 -20
  317. package/dist/parser.js +13 -9
  318. package/dist/plugin-manifest/ManifestAutoLoader.d.ts +35 -0
  319. package/dist/plugin-manifest/PluginManifest.d.ts +156 -0
  320. package/dist/plugin-manifest/index.cjs +25 -0
  321. package/dist/plugin-manifest/index.d.ts +2 -0
  322. package/dist/plugin-manifest/index.js +4 -0
  323. package/dist/plugin-solver-contract/PluginSolverContract.d.ts +288 -0
  324. package/dist/plugin-solver-contract/index.cjs +41 -0
  325. package/dist/plugin-solver-contract/index.d.ts +1 -0
  326. package/dist/plugin-solver-contract/index.js +4 -0
  327. package/dist/policy/ContentPolicyGate.d.ts +51 -0
  328. package/dist/policy/PolicyPack.d.ts +120 -0
  329. package/dist/policy/blocklist.d.ts +32 -0
  330. package/dist/policy/defaults.d.ts +44 -0
  331. package/dist/policy/index.cjs +106 -0
  332. package/dist/policy/index.d.ts +17 -0
  333. package/dist/policy/index.js +5 -0
  334. package/dist/policy/jsonLogic.d.ts +31 -0
  335. package/dist/policy/types.d.ts +174 -0
  336. package/dist/proof-composition/ProofCompositionLaw.d.ts +93 -0
  337. package/dist/proof-composition/index.cjs +25 -0
  338. package/dist/proof-composition/index.d.ts +1 -0
  339. package/dist/proof-composition/index.js +4 -0
  340. package/dist/receipts/hash-policy.d.ts +85 -0
  341. package/dist/reconstruction/index.cjs +75 -47
  342. package/dist/reconstruction/index.js +5 -5
  343. package/dist/runtime/plugin-trait-registrar.d.ts +36 -0
  344. package/dist/runtime.cjs +81 -79
  345. package/dist/runtime.js +9 -7
  346. package/dist/scene-presets-EDKYZ5GW.js +4 -0
  347. package/dist/scene-presets-NCW2CFRS.cjs +17 -0
  348. package/dist/self-improvement/index.cjs +1 -1
  349. package/dist/self-improvement/index.js +1 -1
  350. package/dist/{src-PT2FERDV.cjs → src-G3D7ZATQ.cjs} +545 -21
  351. package/dist/{src-J6CM4AUR.js → src-UXYA7HM6.js} +539 -16
  352. package/dist/storage/index.cjs +10 -10
  353. package/dist/storage/index.js +3 -3
  354. package/dist/testing.cjs +1 -1
  355. package/dist/testing.js +1 -1
  356. package/dist/tools/index.cjs +3631 -0
  357. package/dist/tools/index.js +3581 -0
  358. package/dist/traitDocs/traitDocs.cjs +9 -9
  359. package/dist/traitDocs/traitDocs.d.ts +1 -0
  360. package/dist/traitDocs/traitDocs.js +3 -3
  361. package/dist/traits/ControlLoopTrait.d.ts +154 -0
  362. package/dist/traits/KinematicChainTrait.d.ts +116 -0
  363. package/dist/traits/SensorSamplingTrait.d.ts +154 -0
  364. package/dist/traits/TraitTypes.d.ts +270 -0
  365. package/dist/traits/TransactionTrait.d.ts +121 -0
  366. package/dist/traits/botanical-lotus.cjs +54 -50
  367. package/dist/traits/botanical-lotus.js +2 -5
  368. package/dist/traits/control-loop.cjs +21 -0
  369. package/dist/traits/control-loop.d.ts +1 -0
  370. package/dist/traits/control-loop.js +4 -0
  371. package/dist/traits/engines/cloth-verlet.d.ts +65 -0
  372. package/dist/traits/engines/index.cjs +19 -19
  373. package/dist/traits/engines/index.d.ts +15 -275
  374. package/dist/traits/engines/index.js +3 -3
  375. package/dist/traits/engines/motion-data-schema.d.ts +119 -0
  376. package/dist/traits/engines/motion-matching.d.ts +102 -0
  377. package/dist/traits/engines/noise.d.ts +25 -0
  378. package/dist/traits/engines/onnx-adapter.d.ts +173 -0
  379. package/dist/traits/engines/onnx-motion-matching.d.ts +163 -0
  380. package/dist/traits/engines/pfnn-network.d.ts +92 -0
  381. package/dist/traits/engines/synthetic-walk-cycle.d.ts +38 -0
  382. package/dist/traits/engines/tensor-ops.d.ts +15 -0
  383. package/dist/traits/index.cjs +2789 -1259
  384. package/dist/traits/index.d.ts +35 -0
  385. package/dist/traits/index.js +1692 -411
  386. package/dist/traits/kinematic-chain.cjs +25 -0
  387. package/dist/traits/kinematic-chain.d.ts +1 -0
  388. package/dist/traits/kinematic-chain.js +4 -0
  389. package/dist/traits/sensor-sampling.cjs +33 -0
  390. package/dist/traits/sensor-sampling.d.ts +1 -0
  391. package/dist/traits/sensor-sampling.js +4 -0
  392. package/dist/traits/simulation-solver-factory.cjs +1 -1
  393. package/dist/traits/simulation-solver-factory.js +1 -1
  394. package/dist/traits/transaction.cjs +29 -0
  395. package/dist/traits/transaction.d.ts +1 -0
  396. package/dist/traits/transaction.js +4 -0
  397. package/dist/traits/webcam-gaze.cjs +1 -1
  398. package/dist/traits/webcam-gaze.js +1 -1
  399. package/dist/type-checker.cjs +7 -6
  400. package/dist/type-checker.js +5 -4
  401. package/dist/types/AdvancedTypeSystem.d.ts +489 -0
  402. package/dist/types/HoloScriptPlus.d.ts +810 -0
  403. package/dist/types/base.d.ts +248 -0
  404. package/dist/types.d.ts +799 -0
  405. package/dist/world/index.cjs +3 -4
  406. package/dist/world/index.js +3 -4
  407. package/dist/world-model/index.cjs +1 -1
  408. package/dist/world-model/index.js +1 -1
  409. package/dist/wot/index.cjs +1 -1
  410. package/dist/wot/index.js +1 -1
  411. package/package.json +135 -69
  412. package/dist/GLTFPipeline-3EJLL3TS.cjs +0 -38
  413. package/dist/GLTFPipeline-3OWJV2VK.js +0 -17
  414. package/dist/HoloScriptPlusParser-ADWRY5OS.cjs +0 -698
  415. package/dist/HoloScriptPlusParser-JLJDXHSC.js +0 -693
  416. package/dist/HoloScriptPlusParser-QCGFPWIL.cjs +0 -27
  417. package/dist/HoloScriptPlusParser-WENAFEFV.js +0 -10
  418. package/dist/HoloScriptRuntime-GGRVEU4T.cjs +0 -19
  419. package/dist/HoloScriptRuntime-GJK6VJPH.js +0 -10
  420. package/dist/chunk-22Q5A6RV.js +0 -979
  421. package/dist/chunk-4C57PR42.js +0 -468
  422. package/dist/chunk-4W5G5QVL.cjs +0 -847
  423. package/dist/chunk-5ET6L4NS.js +0 -487
  424. package/dist/chunk-C4GSLCHE.cjs +0 -7153
  425. package/dist/chunk-F2G6CWFT.js +0 -7089
  426. package/dist/chunk-G6PNEASF.cjs +0 -814
  427. package/dist/chunk-GTA4Q3A3.js +0 -1491
  428. package/dist/chunk-HCCQLAA4.cjs +0 -74
  429. package/dist/chunk-HFSVMKM3.cjs +0 -72
  430. package/dist/chunk-KAIVDEIG.cjs +0 -4539
  431. package/dist/chunk-KQU64CIX.cjs +0 -1508
  432. package/dist/chunk-MSYSQ2AJ.js +0 -4533
  433. package/dist/chunk-NHJLP37F.js +0 -70
  434. package/dist/chunk-NHYRRAGI.cjs +0 -490
  435. package/dist/chunk-OIQYIIO3.cjs +0 -473
  436. package/dist/chunk-OL46QLBJ.js +0 -61
  437. package/dist/chunk-SKZPC5AG.cjs +0 -984
  438. package/dist/chunk-SLHLXUMO.js +0 -445
  439. package/dist/chunk-UOIGFQXC.cjs +0 -9750
  440. package/dist/chunk-UOL6Y5TD.cjs +0 -759
  441. package/dist/chunk-UVFI7XIR.cjs +0 -452
  442. package/dist/chunk-VEPGBETF.js +0 -844
  443. package/dist/chunk-XQ5MWMP2.js +0 -756
  444. package/dist/chunk-XT6JY5W5.js +0 -9684
  445. package/dist/chunk-YRRAUB35.js +0 -811
  446. package/dist/compiler/GasOptimizationAnalyzer.d.ts +0 -73
  447. package/dist/compiler/NFTMarketplaceCompiler.d.ts +0 -23
  448. package/dist/compiler/ar.cjs +0 -23
  449. package/dist/compiler/ar.js +0 -11
  450. package/dist/compiler/babylon.cjs +0 -21
  451. package/dist/compiler/babylon.js +0 -15
  452. package/dist/compiler/multi-layer.cjs +0 -24
  453. package/dist/compiler/multi-layer.js +0 -15
  454. package/dist/compiler/playcanvas.cjs +0 -19
  455. package/dist/compiler/playcanvas.js +0 -13
  456. package/dist/compiler/r3f.cjs +0 -39
  457. package/dist/compiler/r3f.d.ts +0 -22
  458. package/dist/compiler/r3f.js +0 -17
  459. package/dist/compiler/vrr.cjs +0 -24
  460. package/dist/compiler/vrr.js +0 -12
  461. package/dist/parser/NFTMarketplaceTypes.d.ts +0 -191
  462. package/dist/playwright-3AT3AKTV.cjs +0 -98673
  463. package/dist/playwright-VZPDVUEQ.js +0 -98660
@@ -1,6 +1,92 @@
1
- import { __esm } from './chunk-OL46QLBJ.js';
2
-
3
1
  // src/traits/BotanicalLotusTrait.ts
2
+ var DEFAULT_BOTANICAL_LOTUS_CONFIG = {
3
+ schema: "holoscript.trait.botanical_lotus.v0",
4
+ status: "visual_seed",
5
+ source: {
6
+ kind: "conversation_reference_images",
7
+ count: 3,
8
+ content_hash_status: "pending_media_ingest",
9
+ wallet_signature_status: "pending_cael_anchor",
10
+ note: "Derived from three pink lotus reference images provided in-thread; raw media ingest is pending."
11
+ },
12
+ reference_anchors: [
13
+ {
14
+ id: "lotus-reference-2026-05-06-01",
15
+ label: "open pink lotus close-up",
16
+ uri: "conversation://2026-05-06/lotus-reference-01",
17
+ role: "material",
18
+ status: "pending_media_ingest"
19
+ },
20
+ {
21
+ id: "lotus-reference-2026-05-06-02",
22
+ label: "upright pink lotus silhouette",
23
+ uri: "conversation://2026-05-06/lotus-reference-02",
24
+ role: "silhouette",
25
+ status: "pending_media_ingest"
26
+ },
27
+ {
28
+ id: "lotus-reference-2026-05-06-03",
29
+ label: "pink lotus with leaves and water context",
30
+ uri: "conversation://2026-05-06/lotus-reference-03",
31
+ role: "leaf_context",
32
+ status: "pending_media_ingest"
33
+ }
34
+ ],
35
+ material: {
36
+ subsurface_scattering: 0.74,
37
+ subsurface_radius_rgb: [0.9, 0.32, 0.72],
38
+ petal_translucency_base: 0.68,
39
+ petal_translucency_edge: 0.36,
40
+ roughness: 0.72,
41
+ ior: 1.36,
42
+ vein_normal_intensity: 0.045,
43
+ edge_curl_intensity: 0.58,
44
+ gravity_sag_outer: 0.3,
45
+ sheen: 0.5,
46
+ sheen_roughness: 0.42,
47
+ sheen_color: "#ffe8f2"
48
+ },
49
+ colors: {
50
+ petal_base: "#fff1f6",
51
+ petal_mid: "#f47ab7",
52
+ petal_inner: "#ff9ecf",
53
+ petal_rim: "#c42a86",
54
+ petal_shadow: "#84205f",
55
+ seed_pod: "#f4d74a",
56
+ seed_pod_rim: "#b7c66b",
57
+ stamen: "#f59e0b",
58
+ stamen_tip: "#fff4bd",
59
+ leaf: "#235f4f",
60
+ leaf_dark: "#102f28",
61
+ water: "#07140f"
62
+ },
63
+ geometry: {
64
+ petal_rings: [
65
+ { name: "inner", count: 8, cup: 0.86, gravity_sag: 0.02 },
66
+ { name: "mid", count: 13, cup: 0.5, gravity_sag: 0.12 },
67
+ { name: "outer", count: 21, cup: 0.24, gravity_sag: 0.3 }
68
+ ],
69
+ petal_shape: "broad_elliptic_pointed_tip_with_center_ridge",
70
+ stamen_filament_count: 58,
71
+ seed_pod_dot_pattern: "1_center_7_12_18_radial"
72
+ },
73
+ renderer: {
74
+ requires: ["sss_render", "instanced_filaments", "water_surface"],
75
+ lod: {
76
+ close: "full_filaments",
77
+ mid: "simplified_filaments",
78
+ far: "petal_billboard"
79
+ },
80
+ material_model: "thin_tissue_mesh_physical_material"
81
+ }
82
+ };
83
+ var SHA256_HASH_PATTERN = /^sha256:[a-f0-9]{64}$/;
84
+ var HEX_COLOR_PATTERN = /^#[0-9a-fA-F]{6}$/;
85
+ var RING_RENDER_DEFAULTS = {
86
+ inner: { radius: 0.32, length: 0.82, width: 0.34, pitch_degrees: 74 },
87
+ mid: { radius: 0.58, length: 1.15, width: 0.46, pitch_degrees: 42 },
88
+ outer: { radius: 0.92, length: 1.52, width: 0.58, pitch_degrees: 18 }
89
+ };
4
90
  function cloneDefaultConfig() {
5
91
  const d = DEFAULT_BOTANICAL_LOTUS_CONFIG;
6
92
  return {
@@ -233,6 +319,164 @@ function createBotanicalLotusRenderProfile(input = {}, placement, lighting) {
233
319
  lighting_reference: lighting?.reference_id
234
320
  };
235
321
  }
322
+ var botanicalLotusHandler = {
323
+ name: "botanical_lotus",
324
+ defaultConfig: DEFAULT_BOTANICAL_LOTUS_CONFIG,
325
+ validate: validateBotanicalLotusConfig,
326
+ toRenderProfile: createBotanicalLotusRenderProfile,
327
+ onAttach(node, config, context) {
328
+ const normalized = assertBotanicalLotusConfig(config);
329
+ const profile = createBotanicalLotusRenderProfile(normalized);
330
+ const state = { config: normalized, profile };
331
+ node.__botanicalLotusState = state;
332
+ const nodeId = String(node.id ?? "unknown");
333
+ context.setState?.({
334
+ [`botanical_lotus.${nodeId}.anchor_status`]: profile.anchor_status,
335
+ [`botanical_lotus.${nodeId}.petal_count`]: profile.petal_count
336
+ });
337
+ context.emit?.("botanical_lotus_attached", {
338
+ node,
339
+ anchorStatus: profile.anchor_status,
340
+ walletSigned: profile.wallet_signed,
341
+ petalCount: profile.petal_count,
342
+ referenceAnchorIds: profile.reference_anchor_ids,
343
+ rendererRequires: profile.renderer_requires
344
+ });
345
+ },
346
+ onDetach(node, _config, context) {
347
+ context.emit?.("botanical_lotus_detached", { node });
348
+ delete node.__botanicalLotusState;
349
+ },
350
+ onUpdate(_node, _config, _context, _delta) {
351
+ },
352
+ onEvent(node, _config, context, event) {
353
+ const state = node.__botanicalLotusState;
354
+ if (!state) return;
355
+ if (event.type === "botanical_lotus_query") {
356
+ context.emit?.("botanical_lotus_response", {
357
+ queryId: event.queryId,
358
+ node,
359
+ config: state.config,
360
+ profile: state.profile
361
+ });
362
+ return;
363
+ }
364
+ if (event.type === "botanical_lotus_reference_anchored") {
365
+ const anchorId = String(event.anchorId ?? "");
366
+ const contentHash = typeof event.contentHash === "string" ? event.contentHash : void 0;
367
+ const walletSignature = typeof event.walletSignature === "string" ? event.walletSignature : void 0;
368
+ if (!anchorId || !contentHash) return;
369
+ const updatedAnchors = state.config.reference_anchors.map((anchor) => {
370
+ if (anchor.id !== anchorId) return anchor;
371
+ return {
372
+ ...anchor,
373
+ content_hash: contentHash,
374
+ wallet_signature: walletSignature,
375
+ status: walletSignature ? "wallet_signed" : "hashed"
376
+ };
377
+ });
378
+ const updatedConfig = assertBotanicalLotusConfig({
379
+ ...state.config,
380
+ status: updatedAnchors.every((anchor) => anchor.status === "wallet_signed") ? "wallet_signed" : "content_hashed",
381
+ source: {
382
+ ...state.config.source,
383
+ content_hash_status: deriveBotanicalLotusAnchorStatus(updatedAnchors),
384
+ wallet_signature_status: updatedAnchors.every(
385
+ (anchor) => anchor.status === "wallet_signed"
386
+ ) ? "wallet_signed" : "pending_cael_anchor"
387
+ },
388
+ reference_anchors: updatedAnchors
389
+ });
390
+ state.config = updatedConfig;
391
+ state.profile = createBotanicalLotusRenderProfile(
392
+ updatedConfig,
393
+ state.placement,
394
+ state.lighting
395
+ );
396
+ context.emit?.("botanical_lotus_reference_updated", {
397
+ node,
398
+ anchorId,
399
+ anchorStatus: state.profile.anchor_status,
400
+ walletSigned: state.profile.wallet_signed,
401
+ referenceAnchorIds: state.profile.reference_anchor_ids
402
+ });
403
+ return;
404
+ }
405
+ if (event.type === "holomap:surface_anchor_placed") {
406
+ const payload = event.payload ?? {};
407
+ const surfaceAnchorId = typeof payload.surfaceAnchorId === "string" ? payload.surfaceAnchorId : void 0;
408
+ const surfaceNormal = Array.isArray(payload.surfaceNormal) ? payload.surfaceNormal : void 0;
409
+ const worldPosition = Array.isArray(payload.worldPosition) ? payload.worldPosition : void 0;
410
+ if (!surfaceAnchorId) return;
411
+ state.placement = {
412
+ surface_anchor_id: surfaceAnchorId,
413
+ surface_normal: surfaceNormal,
414
+ world_position: worldPosition
415
+ };
416
+ state.profile = createBotanicalLotusRenderProfile(
417
+ state.config,
418
+ state.placement,
419
+ state.lighting
420
+ );
421
+ context.emit?.("botanical_lotus_surface_bound", {
422
+ node,
423
+ surfaceAnchorId,
424
+ surfaceNormal,
425
+ worldPosition
426
+ });
427
+ return;
428
+ }
429
+ if (event.type === "holomap:lighting_update") {
430
+ const payload = event.payload ?? {};
431
+ const referenceId = typeof payload.referenceId === "string" ? payload.referenceId : void 0;
432
+ const estimatedLux = typeof payload.estimatedLux === "number" && Number.isFinite(payload.estimatedLux) ? payload.estimatedLux : void 0;
433
+ const colorTemperatureK = typeof payload.colorTemperatureK === "number" && Number.isFinite(payload.colorTemperatureK) ? payload.colorTemperatureK : void 0;
434
+ const dominantDirection = Array.isArray(payload.dominantDirection) ? payload.dominantDirection : void 0;
435
+ if (!referenceId) return;
436
+ state.lighting = {
437
+ reference_id: referenceId,
438
+ estimated_lux: estimatedLux,
439
+ color_temperature_k: colorTemperatureK,
440
+ dominant_direction: dominantDirection
441
+ };
442
+ state.profile = createBotanicalLotusRenderProfile(
443
+ state.config,
444
+ state.placement,
445
+ state.lighting
446
+ );
447
+ context.emit?.("botanical_lotus_lighting_updated", {
448
+ node,
449
+ referenceId,
450
+ estimatedLux,
451
+ colorTemperatureK,
452
+ dominantDirection
453
+ });
454
+ return;
455
+ }
456
+ if (event.type === "holomap:anchor_state_changed") {
457
+ const payload = event.payload ?? {};
458
+ const anchorFrameIndex = typeof payload.anchorFrameIndex === "number" ? payload.anchorFrameIndex : void 0;
459
+ if (state.placement?.surface_anchor_id && anchorFrameIndex !== void 0) {
460
+ context.emit?.("botanical_lotus_anchor_drift", {
461
+ node,
462
+ surfaceAnchorId: state.placement.surface_anchor_id,
463
+ anchorFrameIndex
464
+ });
465
+ }
466
+ return;
467
+ }
468
+ }
469
+ };
470
+ var LOTUS_GOLDEN_ANGLE_DEG = 137.50776;
471
+ var LOTUS_GROWTH_SECONDS = 12.5;
472
+ var LOTUS_GENESIS_SEED_PLACEHOLDER = "0x0000DEAD";
473
+ var LOTUS_RING_SCALING = {
474
+ 1: { radius: 1.25, length: 0.98, width: 1.65, height: 1.12 },
475
+ 2: { radius: 1.25, length: 0.94, width: 1.48, height: 0.98 },
476
+ 3: { radius: 1.25, length: 0.82, width: 1.35, height: 0.78 }
477
+ };
478
+ var LOTUS_OUTER_PETAL_COLOR = "#d94b9a";
479
+ var LOTUS_PETAL_NAME_RE = /^Petal\s+P([123])\.(\d+)/;
236
480
  function deriveLotusBloomFromGlow(intensity, pulse) {
237
481
  if (intensity >= 1 && pulse) return "full";
238
482
  if (intensity >= 0.7) return "blooming";
@@ -252,19 +496,17 @@ function buildLotusSceneFromComposition(objects, profile = createBotanicalLotusR
252
496
  const ringProfile = /* @__PURE__ */ new Map();
253
497
  profile.petal_rings.forEach((r, i) => ringProfile.set(i + 1, r));
254
498
  const lastRing = profile.petal_rings[profile.petal_rings.length - 1];
255
- const goldenAngle = LOTUS_GOLDEN_ANGLE_DEG * Math.PI / 180;
256
499
  const petalObjs = objects.filter((o) => LOTUS_PETAL_NAME_RE.test(String(o.name ?? "")));
257
500
  const ringCounters = { 1: 0, 2: 0, 3: 0 };
258
501
  const seedNum = Number(options.seed ?? LOTUS_GENESIS_SEED_PLACEHOLDER) >>> 0;
259
- const PHYLLOTAXIS_WARMUP = 60;
260
- const phyllotaxis = simulateLotusPhyllotaxis({
261
- count: petalObjs.length + PHYLLOTAXIS_WARMUP,
502
+ const grownLayout = buildLotusPhyllotaxisPetalLayout(profile, {
503
+ count: petalObjs.length,
262
504
  seed: seedNum
263
505
  });
264
- const grownAngles = phyllotaxis.primordia.slice(PHYLLOTAXIS_WARMUP).map((p) => p.theta);
265
506
  const petals = petalObjs.map((obj, index) => {
507
+ const grown = grownLayout[index];
266
508
  const match = LOTUS_PETAL_NAME_RE.exec(String(obj.name));
267
- const ring = Number(match?.[1] ?? 3);
509
+ const ring = grown?.ring ?? Number(match?.[1] ?? 3);
268
510
  const ringIndex = ringCounters[ring]++;
269
511
  const glow = lotusObjectTraitConfig(obj, "glowing") ?? {};
270
512
  const intensity = typeof glow.intensity === "number" ? glow.intensity : 0.1;
@@ -277,8 +519,8 @@ function buildLotusSceneFromComposition(objects, profile = createBotanicalLotusR
277
519
  index,
278
520
  ring,
279
521
  ringIndex,
280
- angle: grownAngles[index] ?? index * goldenAngle,
281
- radius: base.radius * scale.radius,
522
+ angle: grown?.azimuth ?? 0,
523
+ radius: grown?.radius ?? base.radius * scale.radius,
282
524
  length: base.length * scale.length,
283
525
  width: base.width * scale.width,
284
526
  cup: base.cup,
@@ -293,9 +535,10 @@ function buildLotusSceneFromComposition(objects, profile = createBotanicalLotusR
293
535
  const rings = [1, 2, 3].map((ring) => {
294
536
  const base = ringProfile.get(ring) ?? lastRing;
295
537
  const scale = LOTUS_RING_SCALING[ring];
538
+ const count = petals.filter((p) => p.ring === ring).length || base.count;
296
539
  return {
297
540
  ring,
298
- count: base.count,
541
+ count,
299
542
  radius: base.radius * scale.radius,
300
543
  length: base.length * scale.length,
301
544
  width: base.width * scale.width,
@@ -316,6 +559,149 @@ function buildLotusSceneFromComposition(objects, profile = createBotanicalLotusR
316
559
  seed_pod_dot_pattern: profile.seed_pod_dot_pattern
317
560
  };
318
561
  }
562
+ var LOTUS_PETAL_SHADER_CHUNKS = {
563
+ /** Spliced after `#include <common>` in the vertex shader. */
564
+ vertexHeader: `
565
+ attribute vec2 petalUv;
566
+ attribute float veinPhase;
567
+ varying vec2 vLotusPetalUv;
568
+ varying float vLotusVeinPhase;
569
+ varying vec3 vLotusWorldNormal;
570
+ varying vec3 vLotusViewDir;
571
+ uniform float uPetalDevTime;
572
+ uniform float uPetalCurlScale;
573
+ `,
574
+ /**
575
+ * Spliced after \`#include <begin_vertex>\` — EMERGENT petal curl (L2). Bends the
576
+ * length axis by the integral of the maturation-front growth curvature (mirrors
577
+ * simulateLotusPetalGrowth), RELATIVE to the fully-open state so the bend is zero at
578
+ * full bloom (the approved open pose is preserved exactly) and the bud-wrap appears
579
+ * only while opening. Curvature reverses inward(bud) -> outward(open) behind the
580
+ * acropetal maturation front.
581
+ */
582
+ vertexBend: `
583
+ {
584
+ float lotusVlen = clamp(petalUv.y, 0.0, 1.0);
585
+ float lotusDs = lotusVlen / 12.0;
586
+ float lotusPhiN = 0.0, lotusPhiO = 0.0;
587
+ vec2 lotusCN = vec2(0.0), lotusCO = vec2(0.0);
588
+ for (int k = 0; k < 12; k++) {
589
+ float s = (float(k) + 0.5) * lotusDs;
590
+ float matN = smoothstep(0.0, 1.0, (uPetalDevTime - 0.15 - s * 0.35) / 0.5);
591
+ float matO = smoothstep(0.0, 1.0, (1.0 - 0.15 - s * 0.35) / 0.5);
592
+ lotusPhiN += mix(2.8, -0.25, matN) * lotusDs;
593
+ lotusPhiO += mix(2.8, -0.25, matO) * lotusDs;
594
+ lotusCN += vec2(cos(lotusPhiN), sin(lotusPhiN)) * lotusDs;
595
+ lotusCO += vec2(cos(lotusPhiO), sin(lotusPhiO)) * lotusDs;
596
+ }
597
+ vec2 lotusBend = (lotusCN - lotusCO) * uPetalCurlScale;
598
+ transformed.x += lotusBend.x;
599
+ transformed.y += lotusBend.y;
600
+ }
601
+ `,
602
+ /** Spliced after \`#include <worldpos_vertex>\`. */
603
+ vertexWorld: `
604
+ vLotusPetalUv = petalUv;
605
+ vLotusVeinPhase = veinPhase;
606
+ vLotusWorldNormal = normalize(mat3(modelMatrix) * objectNormal);
607
+ vLotusViewDir = normalize(cameraPosition - worldPosition.xyz);
608
+ `,
609
+ /** Spliced after `#include <common>` in the fragment shader. */
610
+ fragmentHeader: `
611
+ uniform vec3 uLotusBaseColor;
612
+ uniform vec3 uLotusMidColor;
613
+ uniform vec3 uLotusRimColor;
614
+ uniform vec3 uLotusShadowColor;
615
+ uniform vec3 uLotusSubsurfaceColor;
616
+ uniform float uLotusSSS;
617
+ uniform float uLotusTransmissionBase;
618
+ uniform float uLotusTransmissionEdge;
619
+ uniform float uLotusVeinIntensity;
620
+ uniform float uLotusGrowth;
621
+ uniform float uLotusBloom;
622
+ uniform float uLotusTime;
623
+ varying vec2 vLotusPetalUv;
624
+ varying float vLotusVeinPhase;
625
+ varying vec3 vLotusWorldNormal;
626
+ varying vec3 vLotusViewDir;
627
+
628
+ float lotusVeinField(vec2 uv, float phase) {
629
+ float signedX = uv.x * 2.0 - 1.0;
630
+ float major = pow(1.0 - abs(sin((signedX * 18.0 + uv.y * 6.0 + phase) * 3.14159265)), 20.0);
631
+ float secondary = pow(1.0 - abs(sin((signedX * 34.0 - uv.y * 4.0 - phase * 0.7) * 3.14159265)), 32.0);
632
+ float taper = (1.0 - smoothstep(0.82, 1.0, uv.y)) * (1.0 - abs(signedX) * 0.34);
633
+ return clamp((major * 0.62 + secondary * 0.38) * taper, 0.0, 1.0);
634
+ }
635
+ `,
636
+ /** Spliced after `#include <normal_fragment_maps>` — vein normal perturbation. */
637
+ fragmentNormalInjection: `
638
+ float lotusNormalVein = lotusVeinField(vLotusPetalUv, vLotusVeinPhase);
639
+ float lotusVeinSide = sign(vLotusPetalUv.x - 0.5);
640
+ normal = normalize(normal + vec3(
641
+ lotusNormalVein * lotusVeinSide * uLotusVeinIntensity * 1.7,
642
+ lotusNormalVein * uLotusVeinIntensity * 0.6,
643
+ 0.0
644
+ ));`,
645
+ /** Spliced after `#include <color_fragment>` — petal profile gradient + veins. */
646
+ fragmentColorInjection: `
647
+ float lotusEdge = abs(vLotusPetalUv.x * 2.0 - 1.0);
648
+ float lotusTip = smoothstep(0.78, 1.0, vLotusPetalUv.y);
649
+ vec3 lotusProfileColor = mix(uLotusBaseColor, uLotusMidColor, smoothstep(0.08, 0.72, vLotusPetalUv.y));
650
+ lotusProfileColor = mix(lotusProfileColor, uLotusRimColor, clamp(lotusEdge * lotusEdge * 0.42 + lotusTip * 0.35, 0.0, 0.82));
651
+ float lotusVeinColorField = lotusVeinField(vLotusPetalUv, vLotusVeinPhase);
652
+ vec3 lotusVeinColor = mix(uLotusShadowColor, uLotusRimColor, 0.58);
653
+ diffuseColor.rgb = mix(diffuseColor.rgb, diffuseColor.rgb * lotusProfileColor, 0.62);
654
+ diffuseColor.rgb += lotusVeinColor * lotusVeinColorField * uLotusVeinIntensity * uLotusGrowth * 7.5;
655
+ diffuseColor.a *= mix(0.7, 1.0, uLotusGrowth);`,
656
+ /** Spliced after `#include <emissivemap_fragment>` — backlit subsurface scatter. */
657
+ fragmentEmissiveInjection: `
658
+ // NaN-safe: guard normalize() of the interpolated normal/view vectors \u2014 on thin
659
+ // petals they can interpolate to ~0, and normalize(vec3(0)) divides by zero (X4008),
660
+ // leaking NaN/Inf that flickers across the bloom. Fall back to a +z facing vector.
661
+ float lotusNLen = length(vLotusWorldNormal);
662
+ float lotusVLen = length(vLotusViewDir);
663
+ vec3 lotusN = lotusNLen > 1e-4 ? vLotusWorldNormal / lotusNLen : vec3(0.0, 0.0, 1.0);
664
+ vec3 lotusV = lotusVLen > 1e-4 ? vLotusViewDir / lotusVLen : vec3(0.0, 0.0, 1.0);
665
+ float lotusBacklight = pow(1.0 - abs(dot(lotusN, lotusV)), 2.15);
666
+ float lotusTranslucency = mix(uLotusTransmissionBase, uLotusTransmissionEdge, lotusEdge);
667
+ float lotusPulse = 0.92 + sin(uLotusTime * 0.65 + vLotusVeinPhase * 6.28318) * 0.08;
668
+ vec3 lotusScatter = uLotusSubsurfaceColor * lotusBacklight * lotusTranslucency * uLotusSSS * uLotusGrowth * lotusPulse;
669
+ totalEmissiveRadiance += lotusScatter * (0.28 + uLotusBloom * 0.72);`
670
+ };
671
+ var LOTUS_PETAL_CHUNK_ENTRIES = [
672
+ { stage: "vertex", include: "common", code: LOTUS_PETAL_SHADER_CHUNKS.vertexHeader },
673
+ { stage: "vertex", include: "begin_vertex", code: LOTUS_PETAL_SHADER_CHUNKS.vertexBend },
674
+ { stage: "vertex", include: "worldpos_vertex", code: LOTUS_PETAL_SHADER_CHUNKS.vertexWorld },
675
+ { stage: "fragment", include: "common", code: LOTUS_PETAL_SHADER_CHUNKS.fragmentHeader },
676
+ {
677
+ stage: "fragment",
678
+ include: "normal_fragment_maps",
679
+ code: LOTUS_PETAL_SHADER_CHUNKS.fragmentNormalInjection
680
+ },
681
+ {
682
+ stage: "fragment",
683
+ include: "color_fragment",
684
+ code: LOTUS_PETAL_SHADER_CHUNKS.fragmentColorInjection
685
+ },
686
+ {
687
+ stage: "fragment",
688
+ include: "emissivemap_fragment",
689
+ code: LOTUS_PETAL_SHADER_CHUNKS.fragmentEmissiveInjection
690
+ }
691
+ ];
692
+ var LOTUS_PETAL_DEFAULT_DYNAMIC = {
693
+ devTime: 1,
694
+ curlScale: 1,
695
+ growth: 1,
696
+ bloom: 1,
697
+ time: 0
698
+ };
699
+ var LOTUS_PETAL_UNIFORM_BINDINGS = {
700
+ uPetalDevTime: "devTime",
701
+ uLotusGrowth: "growth",
702
+ uLotusBloom: "bloom",
703
+ uLotusTime: "time"
704
+ };
319
705
  function hexToRgb01(hex) {
320
706
  const h = hex.replace("#", "");
321
707
  const r = parseInt(h.slice(0, 2), 16) / 255;
@@ -497,6 +883,19 @@ function generateBotanicalRoughnessMap(opts) {
497
883
  }
498
884
  return { width: size, height: size, data };
499
885
  }
886
+ var DEFAULT_LOTUS_PETAL_GEOMETRY_PARAMS = {
887
+ length: 1.7,
888
+ // Broader (width/length 0.65 → 0.85) + a deeper cup so each petal reads as a wide
889
+ // cupped tear-drop, not a thin sliver; the obovate silhouette does the rest.
890
+ width: 1.45,
891
+ cup: 0.4,
892
+ ridge: 0.12,
893
+ gravitySag: 0.18,
894
+ segmentsU: 24,
895
+ segmentsV: 40,
896
+ veinPhase: 0,
897
+ thickness: 0.012
898
+ };
500
899
  function lotusSmoothstep(edge0, edge1, x) {
501
900
  const t = Math.min(1, Math.max(0, (x - edge0) / (edge1 - edge0)));
502
901
  return t * t * (3 - 2 * t);
@@ -666,30 +1065,96 @@ function lotusPetalGeometryParamsFromProfile(profile, options = {}) {
666
1065
  ...overrides
667
1066
  };
668
1067
  }
669
- function buildLotusFlowerPlacements(profile = createBotanicalLotusRenderProfile(), options = {}) {
1068
+ var LOTUS_PHYLLOTAXIS_LAYOUT_WARMUP = 60;
1069
+ function lotusSeedNumber(seed) {
1070
+ if (typeof seed === "number" && Number.isFinite(seed)) return seed >>> 0;
1071
+ if (typeof seed === "string") {
1072
+ const parsed = Number(seed);
1073
+ if (Number.isFinite(parsed)) return parsed >>> 0;
1074
+ }
1075
+ return Number(LOTUS_GENESIS_SEED_PLACEHOLDER) >>> 0;
1076
+ }
1077
+ function lotusProfileRing(profile, ring) {
1078
+ return profile.petal_rings[ring - 1] ?? profile.petal_rings[profile.petal_rings.length - 1];
1079
+ }
1080
+ function lotusPlacementRadius(profile, ring, radiusScale) {
1081
+ const base = lotusProfileRing(profile, ring);
1082
+ const scale = LOTUS_RING_SCALING[ring] ?? LOTUS_RING_SCALING[3];
1083
+ return base.radius * scale.radius * radiusScale;
1084
+ }
1085
+ function lotusScaledRingQuotas(profile, count) {
1086
+ const source = [1, 2, 3].map(
1087
+ (ring) => Math.max(0, lotusProfileRing(profile, ring).count)
1088
+ );
1089
+ const total = source.reduce((sum, n) => sum + n, 0);
1090
+ if (total <= 0) {
1091
+ const third = Math.floor(count / 3);
1092
+ return { 1: third, 2: third, 3: count - third * 2 };
1093
+ }
1094
+ const raw = source.map((n) => n / total * count);
1095
+ const quotas = raw.map(Math.floor);
1096
+ let remaining = count - quotas.reduce((sum, n) => sum + n, 0);
1097
+ const order = raw.map((n, index) => ({ index, fraction: n - Math.floor(n) })).sort((a, b) => b.fraction - a.fraction);
1098
+ for (let i = 0; remaining > 0; i += 1) {
1099
+ quotas[order[i % order.length].index] += 1;
1100
+ remaining -= 1;
1101
+ }
1102
+ return { 1: quotas[0] ?? 0, 2: quotas[1] ?? 0, 3: quotas[2] ?? 0 };
1103
+ }
1104
+ function lotusRingForLayoutIndex(index, quotas) {
1105
+ if (index < quotas[1]) return 1;
1106
+ if (index < quotas[1] + quotas[2]) return 2;
1107
+ return 3;
1108
+ }
1109
+ function buildLotusPhyllotaxisPetalLayout(profile = createBotanicalLotusRenderProfile(), options = {}) {
670
1110
  const radiusScale = options.radiusScale ?? 0.5;
671
1111
  const ringLift = options.ringLift ?? 0.12;
672
- const goldenAngle = LOTUS_GOLDEN_ANGLE_DEG * Math.PI / 180;
673
- const placements = [];
674
- let globalIndex = 0;
675
- profile.petal_rings.forEach((ring, idx) => {
676
- const ringNum = idx + 1;
677
- const scale = LOTUS_RING_SCALING[ringNum] ?? LOTUS_RING_SCALING[3];
678
- const radius = ring.radius * scale.radius * radiusScale;
679
- const tilt = (90 - ring.pitch_degrees) * Math.PI / 180;
680
- const lift = (profile.petal_rings.length - ringNum) * ringLift;
681
- for (let i = 0; i < ring.count; i += 1) {
682
- placements.push({
683
- azimuth: globalIndex * goldenAngle,
684
- tilt,
685
- radius,
686
- lift,
687
- ring: ringNum
688
- });
689
- globalIndex += 1;
690
- }
1112
+ const count = Math.max(
1113
+ 1,
1114
+ Math.floor(options.count ?? profile.petal_rings.reduce((sum, ring) => sum + ring.count, 0))
1115
+ );
1116
+ const warmup = Math.max(
1117
+ 0,
1118
+ Math.floor(options.phyllotaxisWarmup ?? LOTUS_PHYLLOTAXIS_LAYOUT_WARMUP)
1119
+ );
1120
+ const phyllotaxis = simulateLotusPhyllotaxis({
1121
+ count: count + warmup,
1122
+ seed: lotusSeedNumber(options.seed)
1123
+ });
1124
+ const primordia = phyllotaxis.primordia.slice(warmup).reverse().slice(0, count);
1125
+ const minR = Math.min(...primordia.map((p) => p.r));
1126
+ const maxR = Math.max(...primordia.map((p) => p.r));
1127
+ const rSpan = Math.max(1e-9, maxR - minR);
1128
+ const innerRadius = lotusPlacementRadius(profile, 1, radiusScale);
1129
+ const outerRadius = lotusPlacementRadius(profile, 3, radiusScale);
1130
+ const quotas = lotusScaledRingQuotas(profile, primordia.length);
1131
+ const ringCounters = { 1: 0, 2: 0, 3: 0 };
1132
+ return primordia.map((p, index) => {
1133
+ const ring = lotusRingForLayoutIndex(index, quotas);
1134
+ const base = lotusProfileRing(profile, ring);
1135
+ const scale = LOTUS_RING_SCALING[ring] ?? LOTUS_RING_SCALING[3];
1136
+ const radialT = (p.r - minR) / rSpan;
1137
+ const liveRadius = innerRadius + radialT * (outerRadius - innerRadius);
1138
+ const profileRadius = base.radius * scale.radius * radiusScale;
1139
+ const tilt = (90 - base.pitch_degrees) * Math.PI / 180;
1140
+ const lift = (profile.petal_rings.length - ring) * ringLift;
1141
+ const ringIndex = ringCounters[ring]++;
1142
+ return {
1143
+ azimuth: (p.theta % (Math.PI * 2) + Math.PI * 2) % (Math.PI * 2),
1144
+ tilt,
1145
+ radius: liveRadius * 0.7 + profileRadius * 0.3,
1146
+ lift,
1147
+ ring,
1148
+ ringIndex,
1149
+ phyllotaxisIndex: p.index,
1150
+ primordiumRadius: p.r,
1151
+ emergentDivergenceDeg: phyllotaxis.emergentDivergenceDeg,
1152
+ divergenceSpreadDeg: phyllotaxis.divergenceSpreadDeg
1153
+ };
691
1154
  });
692
- return placements;
1155
+ }
1156
+ function buildLotusFlowerPlacements(profile = createBotanicalLotusRenderProfile(), options = {}) {
1157
+ return buildLotusPhyllotaxisPetalLayout(profile, options);
693
1158
  }
694
1159
  function buildLotusSceneScaffold() {
695
1160
  return {
@@ -1225,414 +1690,7 @@ function lotusPetalTurgorOpenProgress(state) {
1225
1690
  const tip = lotusPetalTurgorTipDeg(state);
1226
1691
  return Math.max(0, Math.min(1, (250 - tip) / (250 - 76)));
1227
1692
  }
1228
- var DEFAULT_BOTANICAL_LOTUS_CONFIG, SHA256_HASH_PATTERN, HEX_COLOR_PATTERN, RING_RENDER_DEFAULTS, botanicalLotusHandler, LOTUS_GOLDEN_ANGLE_DEG, LOTUS_GROWTH_SECONDS, LOTUS_GENESIS_SEED_PLACEHOLDER, LOTUS_RING_SCALING, LOTUS_OUTER_PETAL_COLOR, LOTUS_PETAL_NAME_RE, LOTUS_PETAL_SHADER_CHUNKS, LOTUS_PETAL_CHUNK_ENTRIES, LOTUS_PETAL_DEFAULT_DYNAMIC, LOTUS_PETAL_UNIFORM_BINDINGS, DEFAULT_LOTUS_PETAL_GEOMETRY_PARAMS;
1229
- var init_BotanicalLotusTrait = __esm({
1230
- "src/traits/BotanicalLotusTrait.ts"() {
1231
- DEFAULT_BOTANICAL_LOTUS_CONFIG = {
1232
- schema: "holoscript.trait.botanical_lotus.v0",
1233
- status: "visual_seed",
1234
- source: {
1235
- kind: "conversation_reference_images",
1236
- count: 3,
1237
- content_hash_status: "pending_media_ingest",
1238
- wallet_signature_status: "pending_cael_anchor",
1239
- note: "Derived from three pink lotus reference images provided in-thread; raw media ingest is pending."
1240
- },
1241
- reference_anchors: [
1242
- {
1243
- id: "lotus-reference-2026-05-06-01",
1244
- label: "open pink lotus close-up",
1245
- uri: "conversation://2026-05-06/lotus-reference-01",
1246
- role: "material",
1247
- status: "pending_media_ingest"
1248
- },
1249
- {
1250
- id: "lotus-reference-2026-05-06-02",
1251
- label: "upright pink lotus silhouette",
1252
- uri: "conversation://2026-05-06/lotus-reference-02",
1253
- role: "silhouette",
1254
- status: "pending_media_ingest"
1255
- },
1256
- {
1257
- id: "lotus-reference-2026-05-06-03",
1258
- label: "pink lotus with leaves and water context",
1259
- uri: "conversation://2026-05-06/lotus-reference-03",
1260
- role: "leaf_context",
1261
- status: "pending_media_ingest"
1262
- }
1263
- ],
1264
- material: {
1265
- subsurface_scattering: 0.74,
1266
- subsurface_radius_rgb: [0.9, 0.32, 0.72],
1267
- petal_translucency_base: 0.68,
1268
- petal_translucency_edge: 0.36,
1269
- roughness: 0.72,
1270
- ior: 1.36,
1271
- vein_normal_intensity: 0.045,
1272
- edge_curl_intensity: 0.58,
1273
- gravity_sag_outer: 0.3,
1274
- sheen: 0.5,
1275
- sheen_roughness: 0.42,
1276
- sheen_color: "#ffe8f2"
1277
- },
1278
- colors: {
1279
- petal_base: "#fff1f6",
1280
- petal_mid: "#f47ab7",
1281
- petal_inner: "#ff9ecf",
1282
- petal_rim: "#c42a86",
1283
- petal_shadow: "#84205f",
1284
- seed_pod: "#f4d74a",
1285
- seed_pod_rim: "#b7c66b",
1286
- stamen: "#f59e0b",
1287
- stamen_tip: "#fff4bd",
1288
- leaf: "#235f4f",
1289
- leaf_dark: "#102f28",
1290
- water: "#07140f"
1291
- },
1292
- geometry: {
1293
- petal_rings: [
1294
- { name: "inner", count: 8, cup: 0.86, gravity_sag: 0.02 },
1295
- { name: "mid", count: 13, cup: 0.5, gravity_sag: 0.12 },
1296
- { name: "outer", count: 21, cup: 0.24, gravity_sag: 0.3 }
1297
- ],
1298
- petal_shape: "broad_elliptic_pointed_tip_with_center_ridge",
1299
- stamen_filament_count: 58,
1300
- seed_pod_dot_pattern: "1_center_7_12_18_radial"
1301
- },
1302
- renderer: {
1303
- requires: ["sss_render", "instanced_filaments", "water_surface"],
1304
- lod: {
1305
- close: "full_filaments",
1306
- mid: "simplified_filaments",
1307
- far: "petal_billboard"
1308
- },
1309
- material_model: "thin_tissue_mesh_physical_material"
1310
- }
1311
- };
1312
- SHA256_HASH_PATTERN = /^sha256:[a-f0-9]{64}$/;
1313
- HEX_COLOR_PATTERN = /^#[0-9a-fA-F]{6}$/;
1314
- RING_RENDER_DEFAULTS = {
1315
- inner: { radius: 0.32, length: 0.82, width: 0.34, pitch_degrees: 74 },
1316
- mid: { radius: 0.58, length: 1.15, width: 0.46, pitch_degrees: 42 },
1317
- outer: { radius: 0.92, length: 1.52, width: 0.58, pitch_degrees: 18 }
1318
- };
1319
- botanicalLotusHandler = {
1320
- name: "botanical_lotus",
1321
- defaultConfig: DEFAULT_BOTANICAL_LOTUS_CONFIG,
1322
- validate: validateBotanicalLotusConfig,
1323
- toRenderProfile: createBotanicalLotusRenderProfile,
1324
- onAttach(node, config, context) {
1325
- const normalized = assertBotanicalLotusConfig(config);
1326
- const profile = createBotanicalLotusRenderProfile(normalized);
1327
- const state = { config: normalized, profile };
1328
- node.__botanicalLotusState = state;
1329
- const nodeId = String(node.id ?? "unknown");
1330
- context.setState?.({
1331
- [`botanical_lotus.${nodeId}.anchor_status`]: profile.anchor_status,
1332
- [`botanical_lotus.${nodeId}.petal_count`]: profile.petal_count
1333
- });
1334
- context.emit?.("botanical_lotus_attached", {
1335
- node,
1336
- anchorStatus: profile.anchor_status,
1337
- walletSigned: profile.wallet_signed,
1338
- petalCount: profile.petal_count,
1339
- referenceAnchorIds: profile.reference_anchor_ids,
1340
- rendererRequires: profile.renderer_requires
1341
- });
1342
- },
1343
- onDetach(node, _config, context) {
1344
- context.emit?.("botanical_lotus_detached", { node });
1345
- delete node.__botanicalLotusState;
1346
- },
1347
- onUpdate(_node, _config, _context, _delta) {
1348
- },
1349
- onEvent(node, _config, context, event) {
1350
- const state = node.__botanicalLotusState;
1351
- if (!state) return;
1352
- if (event.type === "botanical_lotus_query") {
1353
- context.emit?.("botanical_lotus_response", {
1354
- queryId: event.queryId,
1355
- node,
1356
- config: state.config,
1357
- profile: state.profile
1358
- });
1359
- return;
1360
- }
1361
- if (event.type === "botanical_lotus_reference_anchored") {
1362
- const anchorId = String(event.anchorId ?? "");
1363
- const contentHash = typeof event.contentHash === "string" ? event.contentHash : void 0;
1364
- const walletSignature = typeof event.walletSignature === "string" ? event.walletSignature : void 0;
1365
- if (!anchorId || !contentHash) return;
1366
- const updatedAnchors = state.config.reference_anchors.map((anchor) => {
1367
- if (anchor.id !== anchorId) return anchor;
1368
- return {
1369
- ...anchor,
1370
- content_hash: contentHash,
1371
- wallet_signature: walletSignature,
1372
- status: walletSignature ? "wallet_signed" : "hashed"
1373
- };
1374
- });
1375
- const updatedConfig = assertBotanicalLotusConfig({
1376
- ...state.config,
1377
- status: updatedAnchors.every((anchor) => anchor.status === "wallet_signed") ? "wallet_signed" : "content_hashed",
1378
- source: {
1379
- ...state.config.source,
1380
- content_hash_status: deriveBotanicalLotusAnchorStatus(updatedAnchors),
1381
- wallet_signature_status: updatedAnchors.every(
1382
- (anchor) => anchor.status === "wallet_signed"
1383
- ) ? "wallet_signed" : "pending_cael_anchor"
1384
- },
1385
- reference_anchors: updatedAnchors
1386
- });
1387
- state.config = updatedConfig;
1388
- state.profile = createBotanicalLotusRenderProfile(
1389
- updatedConfig,
1390
- state.placement,
1391
- state.lighting
1392
- );
1393
- context.emit?.("botanical_lotus_reference_updated", {
1394
- node,
1395
- anchorId,
1396
- anchorStatus: state.profile.anchor_status,
1397
- walletSigned: state.profile.wallet_signed,
1398
- referenceAnchorIds: state.profile.reference_anchor_ids
1399
- });
1400
- return;
1401
- }
1402
- if (event.type === "holomap:surface_anchor_placed") {
1403
- const payload = event.payload ?? {};
1404
- const surfaceAnchorId = typeof payload.surfaceAnchorId === "string" ? payload.surfaceAnchorId : void 0;
1405
- const surfaceNormal = Array.isArray(payload.surfaceNormal) ? payload.surfaceNormal : void 0;
1406
- const worldPosition = Array.isArray(payload.worldPosition) ? payload.worldPosition : void 0;
1407
- if (!surfaceAnchorId) return;
1408
- state.placement = {
1409
- surface_anchor_id: surfaceAnchorId,
1410
- surface_normal: surfaceNormal,
1411
- world_position: worldPosition
1412
- };
1413
- state.profile = createBotanicalLotusRenderProfile(
1414
- state.config,
1415
- state.placement,
1416
- state.lighting
1417
- );
1418
- context.emit?.("botanical_lotus_surface_bound", {
1419
- node,
1420
- surfaceAnchorId,
1421
- surfaceNormal,
1422
- worldPosition
1423
- });
1424
- return;
1425
- }
1426
- if (event.type === "holomap:lighting_update") {
1427
- const payload = event.payload ?? {};
1428
- const referenceId = typeof payload.referenceId === "string" ? payload.referenceId : void 0;
1429
- const estimatedLux = typeof payload.estimatedLux === "number" && Number.isFinite(payload.estimatedLux) ? payload.estimatedLux : void 0;
1430
- const colorTemperatureK = typeof payload.colorTemperatureK === "number" && Number.isFinite(payload.colorTemperatureK) ? payload.colorTemperatureK : void 0;
1431
- const dominantDirection = Array.isArray(payload.dominantDirection) ? payload.dominantDirection : void 0;
1432
- if (!referenceId) return;
1433
- state.lighting = {
1434
- reference_id: referenceId,
1435
- estimated_lux: estimatedLux,
1436
- color_temperature_k: colorTemperatureK,
1437
- dominant_direction: dominantDirection
1438
- };
1439
- state.profile = createBotanicalLotusRenderProfile(
1440
- state.config,
1441
- state.placement,
1442
- state.lighting
1443
- );
1444
- context.emit?.("botanical_lotus_lighting_updated", {
1445
- node,
1446
- referenceId,
1447
- estimatedLux,
1448
- colorTemperatureK,
1449
- dominantDirection
1450
- });
1451
- return;
1452
- }
1453
- if (event.type === "holomap:anchor_state_changed") {
1454
- const payload = event.payload ?? {};
1455
- const anchorFrameIndex = typeof payload.anchorFrameIndex === "number" ? payload.anchorFrameIndex : void 0;
1456
- if (state.placement?.surface_anchor_id && anchorFrameIndex !== void 0) {
1457
- context.emit?.("botanical_lotus_anchor_drift", {
1458
- node,
1459
- surfaceAnchorId: state.placement.surface_anchor_id,
1460
- anchorFrameIndex
1461
- });
1462
- }
1463
- return;
1464
- }
1465
- }
1466
- };
1467
- LOTUS_GOLDEN_ANGLE_DEG = 137.50776;
1468
- LOTUS_GROWTH_SECONDS = 12.5;
1469
- LOTUS_GENESIS_SEED_PLACEHOLDER = "0x0000DEAD";
1470
- LOTUS_RING_SCALING = {
1471
- 1: { radius: 1.25, length: 0.98, width: 1.65, height: 1.12 },
1472
- 2: { radius: 1.25, length: 0.94, width: 1.48, height: 0.98 },
1473
- 3: { radius: 1.25, length: 0.82, width: 1.35, height: 0.78 }
1474
- };
1475
- LOTUS_OUTER_PETAL_COLOR = "#d94b9a";
1476
- LOTUS_PETAL_NAME_RE = /^Petal\s+P([123])\.(\d+)/;
1477
- LOTUS_PETAL_SHADER_CHUNKS = {
1478
- /** Spliced after `#include <common>` in the vertex shader. */
1479
- vertexHeader: `
1480
- attribute vec2 petalUv;
1481
- attribute float veinPhase;
1482
- varying vec2 vLotusPetalUv;
1483
- varying float vLotusVeinPhase;
1484
- varying vec3 vLotusWorldNormal;
1485
- varying vec3 vLotusViewDir;
1486
- uniform float uPetalDevTime;
1487
- uniform float uPetalCurlScale;
1488
- `,
1489
- /**
1490
- * Spliced after \`#include <begin_vertex>\` — EMERGENT petal curl (L2). Bends the
1491
- * length axis by the integral of the maturation-front growth curvature (mirrors
1492
- * simulateLotusPetalGrowth), RELATIVE to the fully-open state so the bend is zero at
1493
- * full bloom (the approved open pose is preserved exactly) and the bud-wrap appears
1494
- * only while opening. Curvature reverses inward(bud) -> outward(open) behind the
1495
- * acropetal maturation front.
1496
- */
1497
- vertexBend: `
1498
- {
1499
- float lotusVlen = clamp(petalUv.y, 0.0, 1.0);
1500
- float lotusDs = lotusVlen / 12.0;
1501
- float lotusPhiN = 0.0, lotusPhiO = 0.0;
1502
- vec2 lotusCN = vec2(0.0), lotusCO = vec2(0.0);
1503
- for (int k = 0; k < 12; k++) {
1504
- float s = (float(k) + 0.5) * lotusDs;
1505
- float matN = smoothstep(0.0, 1.0, (uPetalDevTime - 0.15 - s * 0.35) / 0.5);
1506
- float matO = smoothstep(0.0, 1.0, (1.0 - 0.15 - s * 0.35) / 0.5);
1507
- lotusPhiN += mix(2.8, -0.25, matN) * lotusDs;
1508
- lotusPhiO += mix(2.8, -0.25, matO) * lotusDs;
1509
- lotusCN += vec2(cos(lotusPhiN), sin(lotusPhiN)) * lotusDs;
1510
- lotusCO += vec2(cos(lotusPhiO), sin(lotusPhiO)) * lotusDs;
1511
- }
1512
- vec2 lotusBend = (lotusCN - lotusCO) * uPetalCurlScale;
1513
- transformed.x += lotusBend.x;
1514
- transformed.y += lotusBend.y;
1515
- }
1516
- `,
1517
- /** Spliced after \`#include <worldpos_vertex>\`. */
1518
- vertexWorld: `
1519
- vLotusPetalUv = petalUv;
1520
- vLotusVeinPhase = veinPhase;
1521
- vLotusWorldNormal = normalize(mat3(modelMatrix) * objectNormal);
1522
- vLotusViewDir = normalize(cameraPosition - worldPosition.xyz);
1523
- `,
1524
- /** Spliced after `#include <common>` in the fragment shader. */
1525
- fragmentHeader: `
1526
- uniform vec3 uLotusBaseColor;
1527
- uniform vec3 uLotusMidColor;
1528
- uniform vec3 uLotusRimColor;
1529
- uniform vec3 uLotusShadowColor;
1530
- uniform vec3 uLotusSubsurfaceColor;
1531
- uniform float uLotusSSS;
1532
- uniform float uLotusTransmissionBase;
1533
- uniform float uLotusTransmissionEdge;
1534
- uniform float uLotusVeinIntensity;
1535
- uniform float uLotusGrowth;
1536
- uniform float uLotusBloom;
1537
- uniform float uLotusTime;
1538
- varying vec2 vLotusPetalUv;
1539
- varying float vLotusVeinPhase;
1540
- varying vec3 vLotusWorldNormal;
1541
- varying vec3 vLotusViewDir;
1542
-
1543
- float lotusVeinField(vec2 uv, float phase) {
1544
- float signedX = uv.x * 2.0 - 1.0;
1545
- float major = pow(1.0 - abs(sin((signedX * 18.0 + uv.y * 6.0 + phase) * 3.14159265)), 20.0);
1546
- float secondary = pow(1.0 - abs(sin((signedX * 34.0 - uv.y * 4.0 - phase * 0.7) * 3.14159265)), 32.0);
1547
- float taper = (1.0 - smoothstep(0.82, 1.0, uv.y)) * (1.0 - abs(signedX) * 0.34);
1548
- return clamp((major * 0.62 + secondary * 0.38) * taper, 0.0, 1.0);
1549
- }
1550
- `,
1551
- /** Spliced after `#include <normal_fragment_maps>` — vein normal perturbation. */
1552
- fragmentNormalInjection: `
1553
- float lotusNormalVein = lotusVeinField(vLotusPetalUv, vLotusVeinPhase);
1554
- float lotusVeinSide = sign(vLotusPetalUv.x - 0.5);
1555
- normal = normalize(normal + vec3(
1556
- lotusNormalVein * lotusVeinSide * uLotusVeinIntensity * 1.7,
1557
- lotusNormalVein * uLotusVeinIntensity * 0.6,
1558
- 0.0
1559
- ));`,
1560
- /** Spliced after `#include <color_fragment>` — petal profile gradient + veins. */
1561
- fragmentColorInjection: `
1562
- float lotusEdge = abs(vLotusPetalUv.x * 2.0 - 1.0);
1563
- float lotusTip = smoothstep(0.78, 1.0, vLotusPetalUv.y);
1564
- vec3 lotusProfileColor = mix(uLotusBaseColor, uLotusMidColor, smoothstep(0.08, 0.72, vLotusPetalUv.y));
1565
- lotusProfileColor = mix(lotusProfileColor, uLotusRimColor, clamp(lotusEdge * lotusEdge * 0.42 + lotusTip * 0.35, 0.0, 0.82));
1566
- float lotusVeinColorField = lotusVeinField(vLotusPetalUv, vLotusVeinPhase);
1567
- vec3 lotusVeinColor = mix(uLotusShadowColor, uLotusRimColor, 0.58);
1568
- diffuseColor.rgb = mix(diffuseColor.rgb, diffuseColor.rgb * lotusProfileColor, 0.62);
1569
- diffuseColor.rgb += lotusVeinColor * lotusVeinColorField * uLotusVeinIntensity * uLotusGrowth * 7.5;
1570
- diffuseColor.a *= mix(0.7, 1.0, uLotusGrowth);`,
1571
- /** Spliced after `#include <emissivemap_fragment>` — backlit subsurface scatter. */
1572
- fragmentEmissiveInjection: `
1573
- // NaN-safe: guard normalize() of the interpolated normal/view vectors \u2014 on thin
1574
- // petals they can interpolate to ~0, and normalize(vec3(0)) divides by zero (X4008),
1575
- // leaking NaN/Inf that flickers across the bloom. Fall back to a +z facing vector.
1576
- float lotusNLen = length(vLotusWorldNormal);
1577
- float lotusVLen = length(vLotusViewDir);
1578
- vec3 lotusN = lotusNLen > 1e-4 ? vLotusWorldNormal / lotusNLen : vec3(0.0, 0.0, 1.0);
1579
- vec3 lotusV = lotusVLen > 1e-4 ? vLotusViewDir / lotusVLen : vec3(0.0, 0.0, 1.0);
1580
- float lotusBacklight = pow(1.0 - abs(dot(lotusN, lotusV)), 2.15);
1581
- float lotusTranslucency = mix(uLotusTransmissionBase, uLotusTransmissionEdge, lotusEdge);
1582
- float lotusPulse = 0.92 + sin(uLotusTime * 0.65 + vLotusVeinPhase * 6.28318) * 0.08;
1583
- vec3 lotusScatter = uLotusSubsurfaceColor * lotusBacklight * lotusTranslucency * uLotusSSS * uLotusGrowth * lotusPulse;
1584
- totalEmissiveRadiance += lotusScatter * (0.28 + uLotusBloom * 0.72);`
1585
- };
1586
- LOTUS_PETAL_CHUNK_ENTRIES = [
1587
- { stage: "vertex", include: "common", code: LOTUS_PETAL_SHADER_CHUNKS.vertexHeader },
1588
- { stage: "vertex", include: "begin_vertex", code: LOTUS_PETAL_SHADER_CHUNKS.vertexBend },
1589
- { stage: "vertex", include: "worldpos_vertex", code: LOTUS_PETAL_SHADER_CHUNKS.vertexWorld },
1590
- { stage: "fragment", include: "common", code: LOTUS_PETAL_SHADER_CHUNKS.fragmentHeader },
1591
- {
1592
- stage: "fragment",
1593
- include: "normal_fragment_maps",
1594
- code: LOTUS_PETAL_SHADER_CHUNKS.fragmentNormalInjection
1595
- },
1596
- {
1597
- stage: "fragment",
1598
- include: "color_fragment",
1599
- code: LOTUS_PETAL_SHADER_CHUNKS.fragmentColorInjection
1600
- },
1601
- {
1602
- stage: "fragment",
1603
- include: "emissivemap_fragment",
1604
- code: LOTUS_PETAL_SHADER_CHUNKS.fragmentEmissiveInjection
1605
- }
1606
- ];
1607
- LOTUS_PETAL_DEFAULT_DYNAMIC = {
1608
- devTime: 1,
1609
- curlScale: 1,
1610
- growth: 1,
1611
- bloom: 1,
1612
- time: 0
1613
- };
1614
- LOTUS_PETAL_UNIFORM_BINDINGS = {
1615
- uPetalDevTime: "devTime",
1616
- uLotusGrowth: "growth",
1617
- uLotusBloom: "bloom",
1618
- uLotusTime: "time"
1619
- };
1620
- DEFAULT_LOTUS_PETAL_GEOMETRY_PARAMS = {
1621
- length: 1.7,
1622
- // Broader (width/length 0.65 → 0.85) + a deeper cup so each petal reads as a wide
1623
- // cupped tear-drop, not a thin sliver; the obovate silhouette does the rest.
1624
- width: 1.45,
1625
- cup: 0.4,
1626
- ridge: 0.12,
1627
- gravitySag: 0.18,
1628
- segmentsU: 24,
1629
- segmentsV: 40,
1630
- veinPhase: 0,
1631
- thickness: 0.012
1632
- };
1633
- }
1634
- });
1635
1693
 
1636
- export { DEFAULT_BOTANICAL_LOTUS_CONFIG, DEFAULT_LOTUS_PETAL_GEOMETRY_PARAMS, LOTUS_GENESIS_SEED_PLACEHOLDER, LOTUS_GOLDEN_ANGLE_DEG, LOTUS_GROWTH_SECONDS, LOTUS_OUTER_PETAL_COLOR, LOTUS_PETAL_CHUNK_ENTRIES, LOTUS_PETAL_SHADER_CHUNKS, LOTUS_PETAL_UNIFORM_BINDINGS, LOTUS_RING_SCALING, assertBotanicalLotusConfig, botanicalLotusHandler, buildLotusFlowerPlacements, buildLotusPetalGeometryData, buildLotusPetalMaterialSpec, buildLotusSceneFromComposition, buildLotusSceneScaffold, createBotanicalLotusRenderProfile, createLotusMeristem, createLotusMorphogen, createLotusMorphogen2D, createLotusPetalTurgor, createLotusPond, deriveBotanicalLotusAnchorStatus, deriveLotusBloomFromGlow, disturbLotusPond, generateBotanicalNormalMap, generateBotanicalRoughnessMap, getBotanicalLotusPetalCount, init_BotanicalLotusTrait, lotusMorphogen2DPeaks, lotusMorphogen2DSampleAt, lotusMorphogenPeaks, lotusPetalGeometryParamsFromProfile, lotusPetalRenderColor, lotusPetalTurgorOpenProgress, lotusPetalTurgorTipDeg, lotusPondSurface, normalizeBotanicalLotusConfig, simulateLotusMorphogenesis, simulateLotusPetalGrowth, simulateLotusPhyllotaxis, stepLotusMeristem, stepLotusMorphogen, stepLotusMorphogen2D, stepLotusPetalTurgor, stepLotusPond, validateBotanicalLotusConfig };
1637
- //# sourceMappingURL=chunk-B4EKV6HQ.js.map
1638
- //# sourceMappingURL=chunk-B4EKV6HQ.js.map
1694
+ export { DEFAULT_BOTANICAL_LOTUS_CONFIG, DEFAULT_LOTUS_PETAL_GEOMETRY_PARAMS, LOTUS_GENESIS_SEED_PLACEHOLDER, LOTUS_GOLDEN_ANGLE_DEG, LOTUS_GROWTH_SECONDS, LOTUS_OUTER_PETAL_COLOR, LOTUS_PETAL_CHUNK_ENTRIES, LOTUS_PETAL_SHADER_CHUNKS, LOTUS_PETAL_UNIFORM_BINDINGS, LOTUS_RING_SCALING, assertBotanicalLotusConfig, botanicalLotusHandler, buildLotusFlowerPlacements, buildLotusPetalGeometryData, buildLotusPetalMaterialSpec, buildLotusPhyllotaxisPetalLayout, buildLotusSceneFromComposition, buildLotusSceneScaffold, createBotanicalLotusRenderProfile, createLotusMeristem, createLotusMorphogen, createLotusMorphogen2D, createLotusPetalTurgor, createLotusPond, deriveBotanicalLotusAnchorStatus, deriveLotusBloomFromGlow, disturbLotusPond, generateBotanicalNormalMap, generateBotanicalRoughnessMap, getBotanicalLotusPetalCount, lotusMorphogen2DPeaks, lotusMorphogen2DSampleAt, lotusMorphogenPeaks, lotusPetalGeometryParamsFromProfile, lotusPetalRenderColor, lotusPetalTurgorOpenProgress, lotusPetalTurgorTipDeg, lotusPondSurface, normalizeBotanicalLotusConfig, simulateLotusMorphogenesis, simulateLotusPetalGrowth, simulateLotusPhyllotaxis, stepLotusMeristem, stepLotusMorphogen, stepLotusMorphogen2D, stepLotusPetalTurgor, stepLotusPond, validateBotanicalLotusConfig };
1695
+ //# sourceMappingURL=chunk-VKCTYLDN.js.map
1696
+ //# sourceMappingURL=chunk-VKCTYLDN.js.map