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