@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.
- package/LICENSE +21 -0
- 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-Z6PMDS4G.js → chunk-5OUOMBKK.js} +1090 -53
- 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-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-7X5PNIQJ.js → chunk-BXSOEQI3.js} +27 -25
- package/dist/{chunk-WFKVS2K4.cjs → chunk-C65C5VED.cjs} +1101 -55
- 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-UGXHYIWT.cjs → chunk-LHNHO27U.cjs} +28 -28
- 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-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-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-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 +135 -69
- 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,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
|
|
260
|
-
|
|
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:
|
|
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
|
|
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
|
-
|
|
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
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
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
|
-
|
|
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,
|
|
1637
|
-
//# sourceMappingURL=chunk-
|
|
1638
|
-
//# sourceMappingURL=chunk-
|
|
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
|