framefields 2.0.2
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/LICENCE +202 -0
- package/README.md +740 -0
- package/dist/audio/index.d.mts +5 -0
- package/dist/audio/index.mjs +14 -0
- package/dist/audio-Dvwwz8xU.d.mts +37 -0
- package/dist/audio-Dvwwz8xU.d.mts.map +1 -0
- package/dist/audio-TAvPwzLR.mjs +214 -0
- package/dist/audio-TAvPwzLR.mjs.map +1 -0
- package/dist/audio-x28ZgQBP.mjs +85 -0
- package/dist/audio-x28ZgQBP.mjs.map +1 -0
- package/dist/chunk-GMkBE123.mjs +47 -0
- package/dist/client-C74hb7fy.mjs +66 -0
- package/dist/client-C74hb7fy.mjs.map +1 -0
- package/dist/dist-1iUYuPct.mjs +1859 -0
- package/dist/dist-1iUYuPct.mjs.map +1 -0
- package/dist/dist-Bx6J0VcM.mjs +1859 -0
- package/dist/dist-Bx6J0VcM.mjs.map +1 -0
- package/dist/dist-C_hjvkdN.mjs +2220 -0
- package/dist/dist-C_hjvkdN.mjs.map +1 -0
- package/dist/dist-DKm2IyEJ.mjs +94 -0
- package/dist/dist-DKm2IyEJ.mjs.map +1 -0
- package/dist/dist-cjs-B5EVqDFp.mjs +85 -0
- package/dist/dist-cjs-B5EVqDFp.mjs.map +1 -0
- package/dist/dist-cjs-BGJkdexX.mjs +437 -0
- package/dist/dist-cjs-BGJkdexX.mjs.map +1 -0
- package/dist/dist-cjs-BKmGCgtm.mjs +9069 -0
- package/dist/dist-cjs-BKmGCgtm.mjs.map +1 -0
- package/dist/dist-cjs-BUc0_kg-.mjs +1091 -0
- package/dist/dist-cjs-BUc0_kg-.mjs.map +1 -0
- package/dist/dist-cjs-BUwe2XhR.mjs +153 -0
- package/dist/dist-cjs-BUwe2XhR.mjs.map +1 -0
- package/dist/dist-cjs-BWgoUCXJ.mjs +137 -0
- package/dist/dist-cjs-BWgoUCXJ.mjs.map +1 -0
- package/dist/dist-cjs-CmZEMtO6.mjs +6 -0
- package/dist/dist-cjs-D7kEM-Mj.mjs +181 -0
- package/dist/dist-cjs-D7kEM-Mj.mjs.map +1 -0
- package/dist/dist-cjs-DFUmy89O.mjs +48 -0
- package/dist/dist-cjs-DFUmy89O.mjs.map +1 -0
- package/dist/dist-cjs-Df7144zM.mjs +209 -0
- package/dist/dist-cjs-Df7144zM.mjs.map +1 -0
- package/dist/dist-cjs-DgxjcvBN.mjs +98 -0
- package/dist/dist-cjs-DgxjcvBN.mjs.map +1 -0
- package/dist/dist-cjs-DsMdld8l.mjs +5015 -0
- package/dist/dist-cjs-DsMdld8l.mjs.map +1 -0
- package/dist/dist-cjs-Dzs5P3K0.mjs +51 -0
- package/dist/dist-cjs-Dzs5P3K0.mjs.map +1 -0
- package/dist/dist-cjs-ECMuIF57.mjs +323 -0
- package/dist/dist-cjs-ECMuIF57.mjs.map +1 -0
- package/dist/dist-cjs-lYvO8aDo.mjs +64 -0
- package/dist/dist-cjs-lYvO8aDo.mjs.map +1 -0
- package/dist/dist-cjs-qEJrwjGk.mjs +66 -0
- package/dist/dist-cjs-qEJrwjGk.mjs.map +1 -0
- package/dist/dist-cjs-x5cwlqA5.mjs +43 -0
- package/dist/dist-cjs-x5cwlqA5.mjs.map +1 -0
- package/dist/dist-gjHmorxL.mjs +27479 -0
- package/dist/dist-gjHmorxL.mjs.map +1 -0
- package/dist/effects/index.d.mts +5 -0
- package/dist/effects/index.mjs +35 -0
- package/dist/effects-CHWORCYd.mjs +811 -0
- package/dist/effects-CHWORCYd.mjs.map +1 -0
- package/dist/event-streams-D-APZ7Ke.mjs +204 -0
- package/dist/event-streams-D-APZ7Ke.mjs.map +1 -0
- package/dist/fonts/index.d.mts +2 -0
- package/dist/fonts/index.mjs +3 -0
- package/dist/fonts-DrGTBJJk.mjs +188 -0
- package/dist/fonts-DrGTBJJk.mjs.map +1 -0
- package/dist/index-B0BNPEoH.d.mts +2117 -0
- package/dist/index-B0BNPEoH.d.mts.map +1 -0
- package/dist/index-BMVVmc4G.d.mts +72 -0
- package/dist/index-BMVVmc4G.d.mts.map +1 -0
- package/dist/index-D1ZsMpke.d.mts +264 -0
- package/dist/index-D1ZsMpke.d.mts.map +1 -0
- package/dist/index-D2jDC7O5.d.mts +3643 -0
- package/dist/index-D2jDC7O5.d.mts.map +1 -0
- package/dist/index-D2wJqSl5.d.mts +114 -0
- package/dist/index-D2wJqSl5.d.mts.map +1 -0
- package/dist/index-DKFGNyMB.d.mts +309 -0
- package/dist/index-DKFGNyMB.d.mts.map +1 -0
- package/dist/index-DiSKzDGR.d.mts +65 -0
- package/dist/index-DiSKzDGR.d.mts.map +1 -0
- package/dist/index.d.mts +4425 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +2623 -0
- package/dist/index.mjs.map +1 -0
- package/dist/package-C58KmGKw.mjs +6 -0
- package/dist/package-C58KmGKw.mjs.map +1 -0
- package/dist/preview/index.d.mts +90 -0
- package/dist/preview/index.d.mts.map +1 -0
- package/dist/preview/index.mjs +15 -0
- package/dist/preview-engine/audio.mjs +1 -0
- package/dist/preview-engine/child_process-AIL2NBWS.mjs +1 -0
- package/dist/preview-engine/chunk-24P6DAB3.mjs +1 -0
- package/dist/preview-engine/chunk-37EFVZWT.mjs +1 -0
- package/dist/preview-engine/chunk-3O5OKR6D.mjs +223 -0
- package/dist/preview-engine/chunk-47VT677S.mjs +8 -0
- package/dist/preview-engine/chunk-4BEJJKEU.mjs +315 -0
- package/dist/preview-engine/chunk-4GEWSUX5.mjs +1 -0
- package/dist/preview-engine/chunk-55CCFPUX.mjs +237 -0
- package/dist/preview-engine/chunk-5JD65JSJ.mjs +110 -0
- package/dist/preview-engine/chunk-5UP7FSGT.mjs +294 -0
- package/dist/preview-engine/chunk-5XDHHOF2.mjs +367 -0
- package/dist/preview-engine/chunk-6YJP57MZ.mjs +729 -0
- package/dist/preview-engine/chunk-6ZOXGAYA.mjs +112 -0
- package/dist/preview-engine/chunk-AOLAHYVV.mjs +529 -0
- package/dist/preview-engine/chunk-B6PLCMBM.mjs +1 -0
- package/dist/preview-engine/chunk-BJKH76OM.mjs +264 -0
- package/dist/preview-engine/chunk-BUIQ5TUH.mjs +104 -0
- package/dist/preview-engine/chunk-BVF64D6H.mjs +1 -0
- package/dist/preview-engine/chunk-CA5N7JRZ.mjs +138 -0
- package/dist/preview-engine/chunk-CNSHAFEA.mjs +1 -0
- package/dist/preview-engine/chunk-CURR5X7D.mjs +1 -0
- package/dist/preview-engine/chunk-CVGM2U4J.mjs +47 -0
- package/dist/preview-engine/chunk-CYY366IE.mjs +1 -0
- package/dist/preview-engine/chunk-D5PHI6ET.mjs +109 -0
- package/dist/preview-engine/chunk-D7MZHP2Y.mjs +275 -0
- package/dist/preview-engine/chunk-DPPH3NK2.mjs +182 -0
- package/dist/preview-engine/chunk-DPST2XLC.mjs +418 -0
- package/dist/preview-engine/chunk-DRLEOHN5.mjs +1 -0
- package/dist/preview-engine/chunk-EDIZNO3P.mjs +1 -0
- package/dist/preview-engine/chunk-EHIIT4ZR.mjs +52 -0
- package/dist/preview-engine/chunk-FKZ4XXPE.mjs +1 -0
- package/dist/preview-engine/chunk-G3HW4VER.mjs +60 -0
- package/dist/preview-engine/chunk-G76HSKOS.mjs +184 -0
- package/dist/preview-engine/chunk-GYG2IIBR.mjs +1 -0
- package/dist/preview-engine/chunk-H2F5NVQ6.mjs +63 -0
- package/dist/preview-engine/chunk-H5BPCY7N.mjs +188 -0
- package/dist/preview-engine/chunk-HAXK42HG.mjs +997 -0
- package/dist/preview-engine/chunk-HXMDPMLB.mjs +1 -0
- package/dist/preview-engine/chunk-HYBAPT6I.mjs +1 -0
- package/dist/preview-engine/chunk-I4FH6HYU.mjs +73 -0
- package/dist/preview-engine/chunk-IYVN2QEL.mjs +1 -0
- package/dist/preview-engine/chunk-JPXQPP6J.mjs +1 -0
- package/dist/preview-engine/chunk-JWNHTRED.mjs +164 -0
- package/dist/preview-engine/chunk-KZOLCZIV.mjs +103 -0
- package/dist/preview-engine/chunk-L62MRHGZ.mjs +89 -0
- package/dist/preview-engine/chunk-LEEZXHQO.mjs +117 -0
- package/dist/preview-engine/chunk-LKYN3BM2.mjs +1 -0
- package/dist/preview-engine/chunk-LP3EP33S.mjs +610 -0
- package/dist/preview-engine/chunk-M2GRYRLM.mjs +111 -0
- package/dist/preview-engine/chunk-MC7TZZLD.mjs +134 -0
- package/dist/preview-engine/chunk-MT2DZQHO.mjs +1 -0
- package/dist/preview-engine/chunk-MTJHQATU.mjs +1 -0
- package/dist/preview-engine/chunk-N4LHIPHZ.mjs +340 -0
- package/dist/preview-engine/chunk-N4PWLBZ7.mjs +5 -0
- package/dist/preview-engine/chunk-NQZKBFC6.mjs +40 -0
- package/dist/preview-engine/chunk-NWRSVVTF.mjs +186 -0
- package/dist/preview-engine/chunk-P3HBP725.mjs +1 -0
- package/dist/preview-engine/chunk-PIAJWALT.mjs +1 -0
- package/dist/preview-engine/chunk-PJ3DVG45.mjs +1 -0
- package/dist/preview-engine/chunk-QP2NI4XD.mjs +82 -0
- package/dist/preview-engine/chunk-SA3JUR6D.mjs +52 -0
- package/dist/preview-engine/chunk-SRT2OCQW.mjs +1 -0
- package/dist/preview-engine/chunk-SWD76532.mjs +98 -0
- package/dist/preview-engine/chunk-SXX7HX34.mjs +191 -0
- package/dist/preview-engine/chunk-SZ7YRPKO.mjs +3 -0
- package/dist/preview-engine/chunk-TMRLZV5X.mjs +1 -0
- package/dist/preview-engine/chunk-U446SQP3.mjs +292 -0
- package/dist/preview-engine/chunk-UDNCEHUI.mjs +141 -0
- package/dist/preview-engine/chunk-V3H7WWOT.mjs +271 -0
- package/dist/preview-engine/chunk-V7ZVVUQU.mjs +108 -0
- package/dist/preview-engine/chunk-VJGK7MLJ.mjs +3 -0
- package/dist/preview-engine/chunk-VSSB73UU.mjs +58 -0
- package/dist/preview-engine/chunk-VXUJWPIK.mjs +1 -0
- package/dist/preview-engine/chunk-XD4GKD6H.mjs +5 -0
- package/dist/preview-engine/chunk-XKO4RYKN.mjs +3 -0
- package/dist/preview-engine/chunk-XOEEGC4Z.mjs +1 -0
- package/dist/preview-engine/chunk-YAQFFQPG.mjs +1 -0
- package/dist/preview-engine/chunk-YKMBRUAE.mjs +1 -0
- package/dist/preview-engine/chunk-YSTLMWCG.mjs +1 -0
- package/dist/preview-engine/chunk-Z4ERCLNF.mjs +1 -0
- package/dist/preview-engine/chunk-ZEYUXJIV.mjs +1 -0
- package/dist/preview-engine/chunk-ZX6APG6E.mjs +117 -0
- package/dist/preview-engine/effects.mjs +1 -0
- package/dist/preview-engine/esbuild-GWV7CM7D.mjs +1 -0
- package/dist/preview-engine/fonts.mjs +1 -0
- package/dist/preview-engine/framefields.mjs +1959 -0
- package/dist/preview-engine/onnxruntime-node-56GSZEH3.mjs +1 -0
- package/dist/preview-engine/player.mjs +155 -0
- package/dist/preview-engine/renderers-2AUSIYZN.mjs +1 -0
- package/dist/preview-engine/renderers-2QN6KZJP.mjs +1 -0
- package/dist/preview-engine/renderers-32SKW7ML.mjs +1 -0
- package/dist/preview-engine/renderers-5QYK6766.mjs +1 -0
- package/dist/preview-engine/renderers-6BJA6MSU.mjs +251 -0
- package/dist/preview-engine/renderers-6QAF3LQ2.mjs +1 -0
- package/dist/preview-engine/renderers-7AO5746S.mjs +296 -0
- package/dist/preview-engine/renderers-AFYKNM6N.mjs +1 -0
- package/dist/preview-engine/renderers-AGMH5CRH.mjs +1 -0
- package/dist/preview-engine/renderers-AHSGP6LY.mjs +126 -0
- package/dist/preview-engine/renderers-ASTBICLA.mjs +1 -0
- package/dist/preview-engine/renderers-BHVPLYNN.mjs +1 -0
- package/dist/preview-engine/renderers-D7PVQFVU.mjs +1 -0
- package/dist/preview-engine/renderers-DB4ABTNA.mjs +1 -0
- package/dist/preview-engine/renderers-F2NFJI5L.mjs +1 -0
- package/dist/preview-engine/renderers-FI7YHNLY.mjs +1 -0
- package/dist/preview-engine/renderers-GBHULMPH.mjs +1 -0
- package/dist/preview-engine/renderers-GUKQUMGG.mjs +55 -0
- package/dist/preview-engine/renderers-HGT7QDY3.mjs +1 -0
- package/dist/preview-engine/renderers-HOYLA7ZK.mjs +1 -0
- package/dist/preview-engine/renderers-KKI2D3MZ.mjs +1 -0
- package/dist/preview-engine/renderers-KRAJNV4E.mjs +1 -0
- package/dist/preview-engine/renderers-KUGZKSVE.mjs +1 -0
- package/dist/preview-engine/renderers-L2EQQIOC.mjs +1 -0
- package/dist/preview-engine/renderers-LK3NRMGR.mjs +1 -0
- package/dist/preview-engine/renderers-LX654SZ3.mjs +1 -0
- package/dist/preview-engine/renderers-MCFQFYEL.mjs +1 -0
- package/dist/preview-engine/renderers-O6HOYIPS.mjs +1 -0
- package/dist/preview-engine/renderers-OEVXCGE2.mjs +1 -0
- package/dist/preview-engine/renderers-QVD6C4CS.mjs +1 -0
- package/dist/preview-engine/renderers-R3XEYD5V.mjs +248 -0
- package/dist/preview-engine/renderers-RBFWJWVM.mjs +1 -0
- package/dist/preview-engine/renderers-RX3VLVLO.mjs +1 -0
- package/dist/preview-engine/renderers-SM6JP64K.mjs +1 -0
- package/dist/preview-engine/renderers-TKMAATVS.mjs +1 -0
- package/dist/preview-engine/renderers-UGZUPONY.mjs +1 -0
- package/dist/preview-engine/renderers-UTFXZE3G.mjs +1 -0
- package/dist/preview-engine/renderers-UWPH7HBH.mjs +1 -0
- package/dist/preview-engine/renderers-UZGECFVO.mjs +1 -0
- package/dist/preview-engine/renderers-VGU3LNLT.mjs +1 -0
- package/dist/preview-engine/renderers-W3VVM5HB.mjs +1 -0
- package/dist/preview-engine/renderers-WJUTT5BB.mjs +1 -0
- package/dist/preview-engine/renderers-XA2M4YXK.mjs +1 -0
- package/dist/preview-engine/renderers-XIHRFEFQ.mjs +1 -0
- package/dist/preview-engine/renderers-XJTA5MFG.mjs +1 -0
- package/dist/preview-engine/renderers-XLTY5APF.mjs +1 -0
- package/dist/preview-engine/renderers-XZ3VXFGZ.mjs +1 -0
- package/dist/preview-engine/renderers-YKUQUCTO.mjs +124 -0
- package/dist/preview-engine/renderers-YVN3EIOP.mjs +1 -0
- package/dist/preview-engine/renderers-YWRP23SZ.mjs +125 -0
- package/dist/preview-engine/renderers-ZPWOUWZJ.mjs +120 -0
- package/dist/preview-engine/resvg-js-VMU4A77S.mjs +1 -0
- package/dist/preview-engine/server-utils-2FAIV45N.mjs +1 -0
- package/dist/preview-engine/sharp-V6ZTBNDW.mjs +1 -0
- package/dist/preview-engine/shims/fs-promises.mjs +1 -0
- package/dist/preview-engine/shims/fs.mjs +1 -0
- package/dist/preview-engine/shims/module.mjs +1 -0
- package/dist/preview-engine/shims/os.mjs +1 -0
- package/dist/preview-engine/shims/path.mjs +1 -0
- package/dist/preview-engine/shims/url.mjs +1 -0
- package/dist/preview-engine/signals.mjs +1 -0
- package/dist/preview-engine/webgpu-NSSANM4F.mjs +1 -0
- package/dist/preview-uQM210iy.mjs +2149 -0
- package/dist/preview-uQM210iy.mjs.map +1 -0
- package/dist/program-Dl510wmI.mjs +5183 -0
- package/dist/program-Dl510wmI.mjs.map +1 -0
- package/dist/renderer/index.d.mts +3 -0
- package/dist/renderer/index.mjs +6 -0
- package/dist/renderer-3BNskNuJ.mjs +3 -0
- package/dist/renderer-7DOcIxFG.mjs +288 -0
- package/dist/renderer-7DOcIxFG.mjs.map +1 -0
- package/dist/renderer-9dHlMQGX.mjs +3 -0
- package/dist/renderer-B1CvhW4p.mjs +677 -0
- package/dist/renderer-B1CvhW4p.mjs.map +1 -0
- package/dist/renderer-B2XzjK0z.mjs +3 -0
- package/dist/renderer-B80s47yo.mjs +166 -0
- package/dist/renderer-B80s47yo.mjs.map +1 -0
- package/dist/renderer-B9-QSJcG.mjs +479 -0
- package/dist/renderer-B9-QSJcG.mjs.map +1 -0
- package/dist/renderer-BAQmR0Zo.mjs +3 -0
- package/dist/renderer-BDLnExoP.mjs +127 -0
- package/dist/renderer-BDLnExoP.mjs.map +1 -0
- package/dist/renderer-BGXU6vcW.mjs +270 -0
- package/dist/renderer-BGXU6vcW.mjs.map +1 -0
- package/dist/renderer-BGvORwkQ.mjs +3 -0
- package/dist/renderer-BLikd6BK.mjs +3 -0
- package/dist/renderer-BMovYRoR.mjs +3 -0
- package/dist/renderer-BQHbp-Sp.mjs +243 -0
- package/dist/renderer-BQHbp-Sp.mjs.map +1 -0
- package/dist/renderer-BREIjsUU.mjs +252 -0
- package/dist/renderer-BREIjsUU.mjs.map +1 -0
- package/dist/renderer-BSbTJBWc.mjs +3 -0
- package/dist/renderer-BTu2EVhF.mjs +3 -0
- package/dist/renderer-BU1rwNRT.mjs +3 -0
- package/dist/renderer-BXMmISWG.mjs +499 -0
- package/dist/renderer-BXMmISWG.mjs.map +1 -0
- package/dist/renderer-BZJm3m4f.mjs +3 -0
- package/dist/renderer-B_NuVaIP.mjs +744 -0
- package/dist/renderer-B_NuVaIP.mjs.map +1 -0
- package/dist/renderer-BfJSUjPN.mjs +3 -0
- package/dist/renderer-BqyAgNt3.mjs +3 -0
- package/dist/renderer-BryTM2g7.mjs +3 -0
- package/dist/renderer-BsgIcBKH.mjs +391 -0
- package/dist/renderer-BsgIcBKH.mjs.map +1 -0
- package/dist/renderer-ByDhfrPE.mjs +422 -0
- package/dist/renderer-ByDhfrPE.mjs.map +1 -0
- package/dist/renderer-C-H680_l.mjs +3 -0
- package/dist/renderer-C17wL9QX.mjs +181 -0
- package/dist/renderer-C17wL9QX.mjs.map +1 -0
- package/dist/renderer-C2n-EHxg.mjs +1 -0
- package/dist/renderer-CB5aWAaf.mjs +343 -0
- package/dist/renderer-CB5aWAaf.mjs.map +1 -0
- package/dist/renderer-CB7lH5K8.mjs +3 -0
- package/dist/renderer-CDLrNgfo.mjs +3 -0
- package/dist/renderer-CDOUAN7X.mjs +454 -0
- package/dist/renderer-CDOUAN7X.mjs.map +1 -0
- package/dist/renderer-CH8sdfYX.mjs +387 -0
- package/dist/renderer-CH8sdfYX.mjs.map +1 -0
- package/dist/renderer-CIvaRnP_.mjs +261 -0
- package/dist/renderer-CIvaRnP_.mjs.map +1 -0
- package/dist/renderer-CMzEjdzi.mjs +369 -0
- package/dist/renderer-CMzEjdzi.mjs.map +1 -0
- package/dist/renderer-COkcU3db.mjs +3302 -0
- package/dist/renderer-COkcU3db.mjs.map +1 -0
- package/dist/renderer-CQCoggIa.mjs +3 -0
- package/dist/renderer-CQdVj2JS.mjs +3 -0
- package/dist/renderer-CQiTodg9.mjs +337 -0
- package/dist/renderer-CQiTodg9.mjs.map +1 -0
- package/dist/renderer-CV2m6k1V.mjs +3 -0
- package/dist/renderer-CYY-poLe.mjs +3 -0
- package/dist/renderer-CZgB5st8.mjs +3 -0
- package/dist/renderer-C_Ki91kc.mjs +3 -0
- package/dist/renderer-CclIvsLO.mjs +3 -0
- package/dist/renderer-Cj-whdVr.mjs +655 -0
- package/dist/renderer-Cj-whdVr.mjs.map +1 -0
- package/dist/renderer-CkykdR_D.mjs +3 -0
- package/dist/renderer-Cl1oUXMi.mjs +1143 -0
- package/dist/renderer-Cl1oUXMi.mjs.map +1 -0
- package/dist/renderer-CmApuKjS.mjs +3 -0
- package/dist/renderer-CpkiHRhh.mjs +269 -0
- package/dist/renderer-CpkiHRhh.mjs.map +1 -0
- package/dist/renderer-CszOjcRW.mjs +3 -0
- package/dist/renderer-CtVkU_GA.mjs +44 -0
- package/dist/renderer-CtVkU_GA.mjs.map +1 -0
- package/dist/renderer-Cu074POw.mjs +3 -0
- package/dist/renderer-CwQhzcUn.mjs +644 -0
- package/dist/renderer-CwQhzcUn.mjs.map +1 -0
- package/dist/renderer-CzPWB0Ss.mjs +273 -0
- package/dist/renderer-CzPWB0Ss.mjs.map +1 -0
- package/dist/renderer-D4qLmox-.mjs +3 -0
- package/dist/renderer-D6bWQtr-.mjs +3 -0
- package/dist/renderer-D6cJ6MSq.mjs +3 -0
- package/dist/renderer-D7EX8IjU.mjs +240 -0
- package/dist/renderer-D7EX8IjU.mjs.map +1 -0
- package/dist/renderer-DDp7_TUi.d.mts +10 -0
- package/dist/renderer-DDp7_TUi.d.mts.map +1 -0
- package/dist/renderer-DFKsLrUs.mjs +256 -0
- package/dist/renderer-DFKsLrUs.mjs.map +1 -0
- package/dist/renderer-DPSsf8-t.mjs +3 -0
- package/dist/renderer-DQLGnEFc.mjs +3 -0
- package/dist/renderer-DY2SVYUW.mjs +3 -0
- package/dist/renderer-DZGtBUCx.mjs +792 -0
- package/dist/renderer-DZGtBUCx.mjs.map +1 -0
- package/dist/renderer-DabG62XS.mjs +406 -0
- package/dist/renderer-DabG62XS.mjs.map +1 -0
- package/dist/renderer-DbaQLI4z.mjs +771 -0
- package/dist/renderer-DbaQLI4z.mjs.map +1 -0
- package/dist/renderer-DjI45OYC.mjs +71 -0
- package/dist/renderer-DjI45OYC.mjs.map +1 -0
- package/dist/renderer-Dm08-hAU.mjs +323 -0
- package/dist/renderer-Dm08-hAU.mjs.map +1 -0
- package/dist/renderer-DoAY5JbB.mjs +4 -0
- package/dist/renderer-Dp_FfvF-.mjs +401 -0
- package/dist/renderer-Dp_FfvF-.mjs.map +1 -0
- package/dist/renderer-Dt6fzgX5.mjs +756 -0
- package/dist/renderer-Dt6fzgX5.mjs.map +1 -0
- package/dist/renderer-DuplLRbp.mjs +3 -0
- package/dist/renderer-DvfUbZ31.mjs +3 -0
- package/dist/renderer-DxjVQV6f.mjs +311 -0
- package/dist/renderer-DxjVQV6f.mjs.map +1 -0
- package/dist/renderer-Fco4EmAu.mjs +23868 -0
- package/dist/renderer-Fco4EmAu.mjs.map +1 -0
- package/dist/renderer-HFfcJlmR.mjs +981 -0
- package/dist/renderer-HFfcJlmR.mjs.map +1 -0
- package/dist/renderer-I-Sw3JBB.mjs +145 -0
- package/dist/renderer-I-Sw3JBB.mjs.map +1 -0
- package/dist/renderer-OWQmmg4Z.mjs +697 -0
- package/dist/renderer-OWQmmg4Z.mjs.map +1 -0
- package/dist/renderer-Q_uUQipO.mjs +3 -0
- package/dist/renderer-Ryo2CEFD.mjs +586 -0
- package/dist/renderer-Ryo2CEFD.mjs.map +1 -0
- package/dist/renderer-Tp6OXWNZ.mjs +257 -0
- package/dist/renderer-Tp6OXWNZ.mjs.map +1 -0
- package/dist/renderer-UQFCgeNx.mjs +3 -0
- package/dist/renderer-WkVrkCVA.mjs +83 -0
- package/dist/renderer-WkVrkCVA.mjs.map +1 -0
- package/dist/renderer-XcmYTd6P.mjs +3818 -0
- package/dist/renderer-XcmYTd6P.mjs.map +1 -0
- package/dist/renderer-_uvdg48N.mjs +333 -0
- package/dist/renderer-_uvdg48N.mjs.map +1 -0
- package/dist/renderer-bZU_ndxf.mjs +8 -0
- package/dist/renderer-bZU_ndxf.mjs.map +1 -0
- package/dist/renderer-eMsnzJg9.mjs +3 -0
- package/dist/renderer-ho_jXJ0H.mjs +254 -0
- package/dist/renderer-ho_jXJ0H.mjs.map +1 -0
- package/dist/renderer-k2JL79kM.mjs +306 -0
- package/dist/renderer-k2JL79kM.mjs.map +1 -0
- package/dist/renderer-pHiz78e0.mjs +3 -0
- package/dist/renderer-pxXf9dvk.mjs +394 -0
- package/dist/renderer-pxXf9dvk.mjs.map +1 -0
- package/dist/renderer-vCFTm0oe.mjs +226 -0
- package/dist/renderer-vCFTm0oe.mjs.map +1 -0
- package/dist/renderer-vvpdx1vk.mjs +379 -0
- package/dist/renderer-vvpdx1vk.mjs.map +1 -0
- package/dist/renderer-x2s9LmVL.mjs +1121 -0
- package/dist/renderer-x2s9LmVL.mjs.map +1 -0
- package/dist/renderers-BWg16W-V-BXG_cjhM.mjs +49 -0
- package/dist/renderers-BWg16W-V-BXG_cjhM.mjs.map +1 -0
- package/dist/signals/index.d.mts +7 -0
- package/dist/signals/index.mjs +10 -0
- package/dist/signals-BwbdO3AN.mjs +224 -0
- package/dist/signals-BwbdO3AN.mjs.map +1 -0
- package/dist/signin-CZj4Oc5s.mjs +865 -0
- package/dist/signin-CZj4Oc5s.mjs.map +1 -0
- package/dist/sso-oidc-C0_31ThY.mjs +1051 -0
- package/dist/sso-oidc-C0_31ThY.mjs.map +1 -0
- package/dist/sts-DD4ggEXC.mjs +6 -0
- package/dist/sts-nXw8RDJI.mjs +1395 -0
- package/dist/sts-nXw8RDJI.mjs.map +1 -0
- package/package.json +173 -0
|
@@ -0,0 +1,3643 @@
|
|
|
1
|
+
import z$1, { z } from "zod";
|
|
2
|
+
import { Input, VideoSample } from "mediabunny";
|
|
3
|
+
import "fontkit";
|
|
4
|
+
|
|
5
|
+
//#region ../core/dist/index.d.mts
|
|
6
|
+
//#region src/signals/programmatic.d.ts
|
|
7
|
+
interface ProgrammaticSignalOptions {
|
|
8
|
+
readonly fps?: number;
|
|
9
|
+
readonly durationFrames?: number;
|
|
10
|
+
readonly gpuBinding?: GPUTextureBinding;
|
|
11
|
+
readonly nodeId?: string;
|
|
12
|
+
readonly label?: string;
|
|
13
|
+
}
|
|
14
|
+
interface GateSignalOptions {
|
|
15
|
+
readonly mode?: "gate" | "trigger" | "toggle";
|
|
16
|
+
readonly debounceFrames?: number;
|
|
17
|
+
readonly holdFrames?: number;
|
|
18
|
+
readonly invert?: boolean;
|
|
19
|
+
}
|
|
20
|
+
type EvaluatorFn = (ctx: FrameContext) => number;
|
|
21
|
+
declare class ProgrammaticSignal implements FrameSignal<number> {
|
|
22
|
+
readonly gpuBinding?: GPUTextureBinding;
|
|
23
|
+
readonly label?: string;
|
|
24
|
+
private _evaluator;
|
|
25
|
+
private _samples?;
|
|
26
|
+
private _fps;
|
|
27
|
+
private _durationFrames?;
|
|
28
|
+
private _cachedFrame;
|
|
29
|
+
private _cachedValue;
|
|
30
|
+
private _seekedFrame;
|
|
31
|
+
private _subscribers;
|
|
32
|
+
private _children;
|
|
33
|
+
get fps(): number;
|
|
34
|
+
constructor(source: number | ArrayLike<number> | EvaluatorFn | Signal<number>, options?: ProgrammaticSignalOptions);
|
|
35
|
+
get value(): number;
|
|
36
|
+
get(ctx?: FrameContext): number;
|
|
37
|
+
peek(): number;
|
|
38
|
+
registerChild(child: ProgrammaticSignal): void;
|
|
39
|
+
private _derive;
|
|
40
|
+
seekFrame(frame: number): void;
|
|
41
|
+
invalidate(): void;
|
|
42
|
+
valueOf(): number;
|
|
43
|
+
[Symbol.toPrimitive](hint: string): unknown;
|
|
44
|
+
smooth(windowFrames: number): ProgrammaticSignal;
|
|
45
|
+
remap(inMin: number, inMax: number, outMin: number, outMax: number, clamp?: boolean): ProgrammaticSignal;
|
|
46
|
+
clamp(min: number, max: number): ProgrammaticSignal;
|
|
47
|
+
gate(threshold: number, options?: GateSignalOptions): ProgrammaticSignal;
|
|
48
|
+
velocity(dt?: number): ProgrammaticSignal;
|
|
49
|
+
delay(frames: number): ProgrammaticSignal;
|
|
50
|
+
spring(stiffness?: number, damping?: number): ProgrammaticSignal;
|
|
51
|
+
add(other: number | Signal<number>): ProgrammaticSignal;
|
|
52
|
+
subtract(other: number | Signal<number>): ProgrammaticSignal;
|
|
53
|
+
multiply(factor: number | Signal<number>): ProgrammaticSignal;
|
|
54
|
+
invert(): ProgrammaticSignal;
|
|
55
|
+
pow(exponent: number): ProgrammaticSignal;
|
|
56
|
+
map(fn: (val: number, ctx: FrameContext) => number): ProgrammaticSignal;
|
|
57
|
+
toFrameArray(totalFrames: number, fps?: number): Float32Array;
|
|
58
|
+
}
|
|
59
|
+
declare function programmaticSignal(source: number | ArrayLike<number> | EvaluatorFn | Signal<number>, options?: ProgrammaticSignalOptions): ProgrammaticSignal;
|
|
60
|
+
//#endregion
|
|
61
|
+
//#region src/signals/index.d.ts
|
|
62
|
+
interface FrameContext {
|
|
63
|
+
frame: number;
|
|
64
|
+
fps: number;
|
|
65
|
+
time: number;
|
|
66
|
+
duration: number;
|
|
67
|
+
durationMs: number;
|
|
68
|
+
progress: number;
|
|
69
|
+
deltaTime: number;
|
|
70
|
+
}
|
|
71
|
+
interface GPUTextureBinding {
|
|
72
|
+
nodeId: string;
|
|
73
|
+
channel?: "primary" | "beat" | "bass" | "energy";
|
|
74
|
+
textureView?: unknown;
|
|
75
|
+
texture?: unknown;
|
|
76
|
+
buffer?: unknown;
|
|
77
|
+
stats?: {
|
|
78
|
+
min: number;
|
|
79
|
+
max: number;
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
interface Signal<T> {
|
|
83
|
+
readonly value: T;
|
|
84
|
+
get(ctx?: FrameContext): T;
|
|
85
|
+
peek(): T;
|
|
86
|
+
}
|
|
87
|
+
interface WritableSignal<T> extends Signal<T> {
|
|
88
|
+
value: T;
|
|
89
|
+
set(value: T): void;
|
|
90
|
+
update(fn: (prev: T) => T): void;
|
|
91
|
+
}
|
|
92
|
+
interface FrameSignal<T = number> extends Signal<T> {
|
|
93
|
+
readonly gpuBinding?: GPUTextureBinding;
|
|
94
|
+
readonly fps?: number;
|
|
95
|
+
seekFrame?(frame: number): void;
|
|
96
|
+
}
|
|
97
|
+
type SignalContext = FrameContext;
|
|
98
|
+
type SignalValue<T = unknown> = T | Signal<T> | WritableSignal<T> | FrameSignal<T extends number ? number : T>;
|
|
99
|
+
declare function registerSignalDependency(subscribers: Set<ComputedImpl<unknown>>): void;
|
|
100
|
+
declare function isSignal(val: unknown): val is Signal<unknown>;
|
|
101
|
+
declare class ComputedImpl<T> implements Signal<T> {
|
|
102
|
+
private _fn;
|
|
103
|
+
private _value;
|
|
104
|
+
private _dirty;
|
|
105
|
+
private _evaluating;
|
|
106
|
+
deps: Set<Set<ComputedImpl<unknown>>>;
|
|
107
|
+
private _subscribers;
|
|
108
|
+
constructor(fn: () => T);
|
|
109
|
+
get value(): T;
|
|
110
|
+
get(): T;
|
|
111
|
+
peek(): T;
|
|
112
|
+
markDirty(): void;
|
|
113
|
+
private compute;
|
|
114
|
+
valueOf(): T;
|
|
115
|
+
[Symbol.toPrimitive](hint: string): unknown;
|
|
116
|
+
}
|
|
117
|
+
declare function signal<T>(initialValue: T): WritableSignal<T>;
|
|
118
|
+
declare function computed<T>(fn: () => T): Signal<T>;
|
|
119
|
+
declare function frameArraySignal(samples: ArrayLike<number>, fps?: number, gpuBinding?: GPUTextureBinding): FrameSignal<number>;
|
|
120
|
+
declare const frameSignal: WritableSignal<number>;
|
|
121
|
+
declare const timeSignal: WritableSignal<number>;
|
|
122
|
+
declare const progressSignal: WritableSignal<number>;
|
|
123
|
+
declare function updateClockSignals(frame: number, fps?: number, durationMs?: number): void;
|
|
124
|
+
interface SignalBuilderConfig {
|
|
125
|
+
type?: "sine" | "triangle" | "sawtooth" | "square" | "bounce" | "custom";
|
|
126
|
+
frequency?: number;
|
|
127
|
+
amplitude?: number;
|
|
128
|
+
offset?: number;
|
|
129
|
+
phase?: number;
|
|
130
|
+
wgsl?: string;
|
|
131
|
+
gpuBinding?: GPUTextureBinding;
|
|
132
|
+
fn?: (ctx: FrameContext) => number;
|
|
133
|
+
}
|
|
134
|
+
declare function signalBuilder(config: SignalBuilderConfig): FrameSignal<number>;
|
|
135
|
+
interface SineSignalOptions {
|
|
136
|
+
min?: number;
|
|
137
|
+
max?: number;
|
|
138
|
+
period?: number;
|
|
139
|
+
frequency?: number;
|
|
140
|
+
amplitude?: number;
|
|
141
|
+
offset?: number;
|
|
142
|
+
phase?: number;
|
|
143
|
+
}
|
|
144
|
+
declare function sineSignal(options?: SineSignalOptions): FrameSignal<number>;
|
|
145
|
+
declare function cosineSignal(options?: SineSignalOptions): FrameSignal<number>;
|
|
146
|
+
declare const Signal: {
|
|
147
|
+
state: typeof signal;
|
|
148
|
+
computed: typeof computed;
|
|
149
|
+
builder: typeof signalBuilder;
|
|
150
|
+
fromArray: typeof frameArraySignal;
|
|
151
|
+
programmatic: typeof programmaticSignal;
|
|
152
|
+
frame: WritableSignal<number>;
|
|
153
|
+
time: WritableSignal<number>;
|
|
154
|
+
progress: WritableSignal<number>;
|
|
155
|
+
sine: typeof sineSignal;
|
|
156
|
+
cosine: typeof cosineSignal;
|
|
157
|
+
};
|
|
158
|
+
//#endregion
|
|
159
|
+
//#region src/effects/index.d.ts
|
|
160
|
+
type EffectConfigValue<T> = T | Signal<T> | WritableSignal<T> | FrameSignal<T>;
|
|
161
|
+
type EffectConfig<T extends object> = { [K in keyof T]: EffectConfigValue<T[K]> };
|
|
162
|
+
declare abstract class Effect<TConfig extends object = Record<string, unknown>> {
|
|
163
|
+
abstract readonly op: string;
|
|
164
|
+
readonly signals: { [K in keyof TConfig]: WritableSignal<TConfig[K]> | Signal<TConfig[K]> };
|
|
165
|
+
readonly config: TConfig;
|
|
166
|
+
private _frameHooks;
|
|
167
|
+
constructor(initialConfig: TConfig);
|
|
168
|
+
/**
|
|
169
|
+
* Game-engine per-frame lifecycle hook.
|
|
170
|
+
* Invoked before rendering each frame so scripts or agents can mutate properties.
|
|
171
|
+
*/
|
|
172
|
+
onRequestFrame(callback: (ctx: FrameContext) => void): this;
|
|
173
|
+
notifyFrame(ctx: FrameContext): void;
|
|
174
|
+
/**
|
|
175
|
+
* Samples concrete scalar / config values for the current frame.
|
|
176
|
+
*/
|
|
177
|
+
resolveUniforms(ctx?: FrameContext): Record<string, unknown>;
|
|
178
|
+
/**
|
|
179
|
+
* Returns WebGPU texture bindings attached to any property signal.
|
|
180
|
+
*/
|
|
181
|
+
resolveTextures(): Record<string, unknown>;
|
|
182
|
+
/**
|
|
183
|
+
* Converts the effect into an operation node for the VirtualMediaData AST.
|
|
184
|
+
*/
|
|
185
|
+
toOperation(): Record<string, unknown>;
|
|
186
|
+
}
|
|
187
|
+
//#endregion
|
|
188
|
+
//#region src/errors.d.ts
|
|
189
|
+
declare class ModerationError extends Error {
|
|
190
|
+
constructor(message: string);
|
|
191
|
+
}
|
|
192
|
+
declare class ModerationUnrefundableError extends Error {
|
|
193
|
+
constructor(message: string);
|
|
194
|
+
}
|
|
195
|
+
//#endregion
|
|
196
|
+
//#region src/id-gen.d.ts
|
|
197
|
+
/**
|
|
198
|
+
* Generates a unique ID using nanoid.
|
|
199
|
+
* This function is cross-platform compatible (Node.js and Browser).
|
|
200
|
+
*
|
|
201
|
+
* @param size - Optional size of the ID (default is 21)
|
|
202
|
+
* @returns A unique string ID
|
|
203
|
+
*/
|
|
204
|
+
declare const generateId: (size?: number) => string;
|
|
205
|
+
//#endregion
|
|
206
|
+
//#region src/types/base.d.ts
|
|
207
|
+
declare const DataTypeVal: {
|
|
208
|
+
readonly Text: "Text";
|
|
209
|
+
readonly Number: "Number";
|
|
210
|
+
readonly Boolean: "Boolean";
|
|
211
|
+
readonly Image: "Image";
|
|
212
|
+
readonly Video: "Video";
|
|
213
|
+
readonly Audio: "Audio";
|
|
214
|
+
readonly SVG: "SVG";
|
|
215
|
+
readonly Caption: "Caption";
|
|
216
|
+
readonly Lottie: "Lottie";
|
|
217
|
+
readonly ThreeD: "ThreeD";
|
|
218
|
+
readonly GIF: "GIF";
|
|
219
|
+
readonly Signal: "Signal";
|
|
220
|
+
readonly LUT: "LUT";
|
|
221
|
+
};
|
|
222
|
+
declare const DataType: {
|
|
223
|
+
readonly Text: "Text";
|
|
224
|
+
readonly Number: "Number";
|
|
225
|
+
readonly Boolean: "Boolean";
|
|
226
|
+
readonly Image: "Image";
|
|
227
|
+
readonly Video: "Video";
|
|
228
|
+
readonly Audio: "Audio";
|
|
229
|
+
readonly SVG: "SVG";
|
|
230
|
+
readonly Caption: "Caption";
|
|
231
|
+
readonly Lottie: "Lottie";
|
|
232
|
+
readonly ThreeD: "ThreeD";
|
|
233
|
+
readonly GIF: "GIF";
|
|
234
|
+
readonly Signal: "Signal";
|
|
235
|
+
readonly LUT: "LUT";
|
|
236
|
+
};
|
|
237
|
+
type DataType = (typeof DataTypeVal)[keyof typeof DataTypeVal];
|
|
238
|
+
declare const DataTypes: [DataType, ...DataType[]];
|
|
239
|
+
type DataTypeEnum = DataType;
|
|
240
|
+
declare const HandleTypeVal: {
|
|
241
|
+
readonly Input: "Input";
|
|
242
|
+
readonly Output: "Output";
|
|
243
|
+
};
|
|
244
|
+
type HandleType = (typeof HandleTypeVal)[keyof typeof HandleTypeVal];
|
|
245
|
+
type JsonValue = string | number | boolean | null | JsonObject | JsonArray;
|
|
246
|
+
interface JsonObject {
|
|
247
|
+
[key: string]: JsonValue | undefined;
|
|
248
|
+
}
|
|
249
|
+
interface JsonArray extends Array<JsonValue> {}
|
|
250
|
+
declare const JsonValueSchema: z$1.ZodType<JsonValue>;
|
|
251
|
+
/**
|
|
252
|
+
* Zod schema for the FileAsset model
|
|
253
|
+
* Matches the Prisma schema definitions for types and nullability.
|
|
254
|
+
*/
|
|
255
|
+
declare const FileAssetSchema: z$1.ZodObject<{
|
|
256
|
+
id: z$1.ZodCUID2;
|
|
257
|
+
name: z$1.ZodString;
|
|
258
|
+
createdAt: z$1.z.ZodCoercedDate<unknown>;
|
|
259
|
+
updatedAt: z$1.z.ZodCoercedDate<unknown>;
|
|
260
|
+
userId: z$1.ZodNullable<z$1.ZodCUID2>;
|
|
261
|
+
width: z$1.ZodNullable<z$1.ZodNumber>;
|
|
262
|
+
height: z$1.ZodNullable<z$1.ZodNumber>;
|
|
263
|
+
bucket: z$1.ZodString;
|
|
264
|
+
size: z$1.ZodNumber;
|
|
265
|
+
mimeType: z$1.ZodString;
|
|
266
|
+
key: z$1.ZodString;
|
|
267
|
+
isUploaded: z$1.ZodDefault<z$1.ZodBoolean>;
|
|
268
|
+
duration: z$1.ZodNullable<z$1.ZodNumber>;
|
|
269
|
+
sampleRate: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodNumber>>;
|
|
270
|
+
channels: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodNumber>>;
|
|
271
|
+
bitDepth: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodNumber>>;
|
|
272
|
+
audioCodec: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
273
|
+
audioBitrate: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodNumber>>;
|
|
274
|
+
fps: z$1.ZodNullable<z$1.ZodNumber>;
|
|
275
|
+
fingerprint: z$1.ZodNullable<z$1.ZodString>;
|
|
276
|
+
}, z$1.z.core.$strip>;
|
|
277
|
+
type FileAsset = z$1.infer<typeof FileAssetSchema>;
|
|
278
|
+
interface XYPosition {
|
|
279
|
+
x: number;
|
|
280
|
+
y: number;
|
|
281
|
+
}
|
|
282
|
+
declare const NodeVisualConfigSchema: z$1.ZodObject<{
|
|
283
|
+
position: z$1.ZodOptional<z$1.ZodObject<{
|
|
284
|
+
x: z$1.ZodNumber;
|
|
285
|
+
y: z$1.ZodNumber;
|
|
286
|
+
}, z$1.z.core.$strip>>;
|
|
287
|
+
width: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodNumber>>;
|
|
288
|
+
height: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodNumber>>;
|
|
289
|
+
locked: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodBoolean>>;
|
|
290
|
+
collapsed: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodBoolean>>;
|
|
291
|
+
}, z$1.z.core.$loose>;
|
|
292
|
+
type NodeVisualConfig = z$1.infer<typeof NodeVisualConfigSchema>;
|
|
293
|
+
//#endregion
|
|
294
|
+
//#region src/node-metadata.d.ts
|
|
295
|
+
declare const ConfigHandleSchema: z$1.ZodObject<{
|
|
296
|
+
configKey: z$1.ZodString;
|
|
297
|
+
dataTypes: z$1.ZodCustom<DataType[], DataType[]>;
|
|
298
|
+
label: z$1.ZodString;
|
|
299
|
+
description: z$1.ZodOptional<z$1.ZodString>;
|
|
300
|
+
}, z$1.z.core.$strip>;
|
|
301
|
+
type ConfigHandle = z$1.infer<typeof ConfigHandleSchema>;
|
|
302
|
+
/**
|
|
303
|
+
* Function type for node config/input validation.
|
|
304
|
+
*/
|
|
305
|
+
type NodeValidationFn = (config: any, inputs?: Record<string, any>, handles?: any[]) => Record<string, string> | null;
|
|
306
|
+
/**
|
|
307
|
+
* Metadata defining the interface and identity of a node.
|
|
308
|
+
* This is safe to import in any environment.
|
|
309
|
+
*/
|
|
310
|
+
declare const NodeMetadataSchema: z$1.ZodObject<{
|
|
311
|
+
type: z$1.ZodString;
|
|
312
|
+
version: z$1.ZodOptional<z$1.ZodNumber>;
|
|
313
|
+
baseType: z$1.ZodOptional<z$1.ZodString>;
|
|
314
|
+
displayName: z$1.ZodString;
|
|
315
|
+
description: z$1.ZodOptional<z$1.ZodString>;
|
|
316
|
+
showInQuickAccess: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
317
|
+
showInSidebar: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
318
|
+
advanced: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
319
|
+
category: z$1.ZodString;
|
|
320
|
+
subcategory: z$1.ZodOptional<z$1.ZodString>;
|
|
321
|
+
defaultDimensions: z$1.ZodOptional<z$1.ZodObject<{
|
|
322
|
+
width: z$1.ZodOptional<z$1.ZodNumber>;
|
|
323
|
+
height: z$1.ZodOptional<z$1.ZodNumber>;
|
|
324
|
+
}, z$1.z.core.$strip>>;
|
|
325
|
+
handles: z$1.ZodObject<{
|
|
326
|
+
inputs: z$1.ZodArray<z$1.ZodObject<{
|
|
327
|
+
dataTypes: z$1.ZodCustom<DataType[], DataType[]>;
|
|
328
|
+
label: z$1.ZodString;
|
|
329
|
+
required: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
330
|
+
order: z$1.ZodNumber;
|
|
331
|
+
description: z$1.ZodOptional<z$1.ZodString>;
|
|
332
|
+
}, z$1.z.core.$strip>>;
|
|
333
|
+
outputs: z$1.ZodArray<z$1.ZodObject<{
|
|
334
|
+
dataTypes: z$1.ZodCustom<DataType[], DataType[]>;
|
|
335
|
+
label: z$1.ZodString;
|
|
336
|
+
required: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
337
|
+
order: z$1.ZodNumber;
|
|
338
|
+
description: z$1.ZodOptional<z$1.ZodString>;
|
|
339
|
+
}, z$1.z.core.$strip>>;
|
|
340
|
+
}, z$1.z.core.$strip>;
|
|
341
|
+
variableInputs: z$1.ZodOptional<z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
342
|
+
enabled: z$1.ZodLiteral<true>;
|
|
343
|
+
dataTypes: z$1.ZodCustom<DataType[], DataType[]>;
|
|
344
|
+
}, z$1.z.core.$strip>, z$1.ZodObject<{
|
|
345
|
+
enabled: z$1.ZodLiteral<false>;
|
|
346
|
+
dataTypes: z$1.ZodOptional<z$1.ZodCustom<DataType[], DataType[]>>;
|
|
347
|
+
}, z$1.z.core.$strip>], "enabled">>;
|
|
348
|
+
variableOutputs: z$1.ZodOptional<z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
349
|
+
enabled: z$1.ZodLiteral<true>;
|
|
350
|
+
dataTypes: z$1.ZodCustom<DataType[], DataType[]>;
|
|
351
|
+
}, z$1.z.core.$strip>, z$1.ZodObject<{
|
|
352
|
+
enabled: z$1.ZodLiteral<false>;
|
|
353
|
+
dataTypes: z$1.ZodOptional<z$1.ZodCustom<DataType[], DataType[]>>;
|
|
354
|
+
}, z$1.z.core.$strip>], "enabled">>;
|
|
355
|
+
isTerminal: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
356
|
+
isTransient: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
357
|
+
configSchema: z$1.ZodOptional<z$1.ZodCustom<z$1.ZodType<unknown, unknown, z$1.z.core.$ZodTypeInternals<unknown, unknown>>, z$1.ZodType<unknown, unknown, z$1.z.core.$ZodTypeInternals<unknown, unknown>>>>;
|
|
358
|
+
defaultConfig: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>>;
|
|
359
|
+
validation: z$1.ZodOptional<z$1.ZodAny>;
|
|
360
|
+
resultSchema: z$1.ZodOptional<z$1.ZodCustom<z$1.ZodType<unknown, unknown, z$1.z.core.$ZodTypeInternals<unknown, unknown>>, z$1.ZodType<unknown, unknown, z$1.z.core.$ZodTypeInternals<unknown, unknown>>>>;
|
|
361
|
+
configHandles: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
|
|
362
|
+
configKey: z$1.ZodString;
|
|
363
|
+
dataTypes: z$1.ZodCustom<DataType[], DataType[]>;
|
|
364
|
+
label: z$1.ZodString;
|
|
365
|
+
description: z$1.ZodOptional<z$1.ZodString>;
|
|
366
|
+
}, z$1.z.core.$strip>>>;
|
|
367
|
+
}, z$1.z.core.$strip>;
|
|
368
|
+
type NodeMetadata = Omit<z$1.infer<typeof NodeMetadataSchema>, "validation"> & {
|
|
369
|
+
validation?: NodeValidationFn;
|
|
370
|
+
};
|
|
371
|
+
//#endregion
|
|
372
|
+
//#region src/render-diagnostics.d.ts
|
|
373
|
+
/**
|
|
374
|
+
* Problems a render noticed about its document (as opposed to its output),
|
|
375
|
+
* collected per render id so the renderer can put them in its QA report.
|
|
376
|
+
* Producers report; the renderer takes them when the render ends.
|
|
377
|
+
*/
|
|
378
|
+
interface RenderDiagnostic {
|
|
379
|
+
readonly severity: "error" | "warning" | "info";
|
|
380
|
+
/** Stable machine-readable kind, e.g. "animation_truncated" */
|
|
381
|
+
readonly code: string;
|
|
382
|
+
readonly message: string;
|
|
383
|
+
readonly layerId?: string;
|
|
384
|
+
}
|
|
385
|
+
/** Record a diagnostic for a render; repeats (same code, layer and message) are kept once. */
|
|
386
|
+
declare function reportRenderDiagnostic(renderId: string, diagnostic: RenderDiagnostic): void;
|
|
387
|
+
/**
|
|
388
|
+
* Everything reported for a render, including its nested compositions (they
|
|
389
|
+
* render under derived ids, `${renderId}-…`), removing it from the store.
|
|
390
|
+
*/
|
|
391
|
+
declare function takeRenderDiagnostics(renderId: string): RenderDiagnostic[];
|
|
392
|
+
//#endregion
|
|
393
|
+
//#region src/types/config/colors.d.ts
|
|
394
|
+
declare const dataTypeColors: Record<string, {
|
|
395
|
+
bg: string;
|
|
396
|
+
stroke: string;
|
|
397
|
+
hex: string;
|
|
398
|
+
text: string;
|
|
399
|
+
border: string;
|
|
400
|
+
}>;
|
|
401
|
+
//#endregion
|
|
402
|
+
//#region src/types/config/schemas.d.ts
|
|
403
|
+
declare const DATA_TYPE_EXTENSIONS: Record<DataType, string>;
|
|
404
|
+
declare const MIME_TYPES: Record<string, string>;
|
|
405
|
+
declare const COMPOSITE_OPERATIONS: readonly ["source-over", "source-in", "source-out", "source-atop", "destination-over", "destination-in", "destination-out", "destination-atop", "lighter", "copy", "xor", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"];
|
|
406
|
+
declare const GlobalCompositeOperation: z.ZodEnum<{
|
|
407
|
+
"source-over": "source-over";
|
|
408
|
+
"source-in": "source-in";
|
|
409
|
+
"source-out": "source-out";
|
|
410
|
+
"source-atop": "source-atop";
|
|
411
|
+
"destination-over": "destination-over";
|
|
412
|
+
"destination-in": "destination-in";
|
|
413
|
+
"destination-out": "destination-out";
|
|
414
|
+
"destination-atop": "destination-atop";
|
|
415
|
+
lighter: "lighter";
|
|
416
|
+
copy: "copy";
|
|
417
|
+
xor: "xor";
|
|
418
|
+
multiply: "multiply";
|
|
419
|
+
screen: "screen";
|
|
420
|
+
overlay: "overlay";
|
|
421
|
+
darken: "darken";
|
|
422
|
+
lighten: "lighten";
|
|
423
|
+
"color-dodge": "color-dodge";
|
|
424
|
+
"color-burn": "color-burn";
|
|
425
|
+
"hard-light": "hard-light";
|
|
426
|
+
"soft-light": "soft-light";
|
|
427
|
+
difference: "difference";
|
|
428
|
+
exclusion: "exclusion";
|
|
429
|
+
hue: "hue";
|
|
430
|
+
saturation: "saturation";
|
|
431
|
+
color: "color";
|
|
432
|
+
luminosity: "luminosity";
|
|
433
|
+
}>;
|
|
434
|
+
type ZodSchemaType = z.ZodType<any, any, any>;
|
|
435
|
+
declare class ConfigSchemaRegistry {
|
|
436
|
+
private static schemas;
|
|
437
|
+
static register(type: string, schema: ZodSchemaType): void;
|
|
438
|
+
static get(type: string): ZodSchemaType | undefined;
|
|
439
|
+
static clear(): void;
|
|
440
|
+
}
|
|
441
|
+
//#endregion
|
|
442
|
+
//#region src/types/constants.d.ts
|
|
443
|
+
declare const COMPOSITOR_DEFAULTS: {
|
|
444
|
+
FONT_FAMILY: string;
|
|
445
|
+
FONT_SIZE: number;
|
|
446
|
+
FILL: string;
|
|
447
|
+
LINE_HEIGHT: number;
|
|
448
|
+
ALIGN: string;
|
|
449
|
+
VERTICAL_ALIGN: string;
|
|
450
|
+
LETTER_SPACING: number;
|
|
451
|
+
STROKE_WIDTH: number;
|
|
452
|
+
STROKE: string;
|
|
453
|
+
CORNER_RADIUS: number;
|
|
454
|
+
PADDING: number;
|
|
455
|
+
};
|
|
456
|
+
//#endregion
|
|
457
|
+
//#region src/types/video/virtual-video.d.ts
|
|
458
|
+
declare const MediaSourceSchema: z.ZodObject<{
|
|
459
|
+
entity: z.ZodOptional<z.ZodObject<{
|
|
460
|
+
id: z.ZodCUID2;
|
|
461
|
+
name: z.ZodString;
|
|
462
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
463
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
464
|
+
userId: z.ZodNullable<z.ZodCUID2>;
|
|
465
|
+
width: z.ZodNullable<z.ZodNumber>;
|
|
466
|
+
height: z.ZodNullable<z.ZodNumber>;
|
|
467
|
+
bucket: z.ZodString;
|
|
468
|
+
size: z.ZodNumber;
|
|
469
|
+
mimeType: z.ZodString;
|
|
470
|
+
key: z.ZodString;
|
|
471
|
+
isUploaded: z.ZodDefault<z.ZodBoolean>;
|
|
472
|
+
duration: z.ZodNullable<z.ZodNumber>;
|
|
473
|
+
sampleRate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
474
|
+
channels: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
475
|
+
bitDepth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
476
|
+
audioCodec: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
477
|
+
audioBitrate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
478
|
+
fps: z.ZodNullable<z.ZodNumber>;
|
|
479
|
+
fingerprint: z.ZodNullable<z.ZodString>;
|
|
480
|
+
}, z.core.$strip>>;
|
|
481
|
+
}, z.core.$strip>;
|
|
482
|
+
declare const MediaMetadataSchema: z.ZodObject<{
|
|
483
|
+
width: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
484
|
+
height: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
485
|
+
fps: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
486
|
+
durationMs: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
487
|
+
sampleRate: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
488
|
+
channels: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
489
|
+
bitDepth: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
490
|
+
audioCodec: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
491
|
+
audioBitrate: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
492
|
+
}, z.core.$strip>;
|
|
493
|
+
type MediaMetadata = z.infer<typeof MediaMetadataSchema>;
|
|
494
|
+
declare const TimelineSegmentSchema: z.ZodObject<{
|
|
495
|
+
startSec: z.ZodNumber;
|
|
496
|
+
endSec: z.ZodOptional<z.ZodNumber>;
|
|
497
|
+
}, z.core.$strip>;
|
|
498
|
+
declare const TimelineTransformSchema: z.ZodObject<{
|
|
499
|
+
startFrame: z.ZodOptional<z.ZodNumber>;
|
|
500
|
+
segments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
501
|
+
startSec: z.ZodNumber;
|
|
502
|
+
endSec: z.ZodOptional<z.ZodNumber>;
|
|
503
|
+
}, z.core.$strip>>>;
|
|
504
|
+
}, z.core.$strip>;
|
|
505
|
+
type TimelineTransform = z.infer<typeof TimelineTransformSchema>;
|
|
506
|
+
declare const BaseMediaOperationPropsSchema: z.ZodObject<{
|
|
507
|
+
volume: z.ZodOptional<z.ZodNumber>;
|
|
508
|
+
opacity: z.ZodOptional<z.ZodNumber>;
|
|
509
|
+
startFrame: z.ZodOptional<z.ZodNumber>;
|
|
510
|
+
timeline: z.ZodOptional<z.ZodObject<{
|
|
511
|
+
startFrame: z.ZodOptional<z.ZodNumber>;
|
|
512
|
+
segments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
513
|
+
startSec: z.ZodNumber;
|
|
514
|
+
endSec: z.ZodOptional<z.ZodNumber>;
|
|
515
|
+
}, z.core.$strip>>>;
|
|
516
|
+
}, z.core.$strip>>;
|
|
517
|
+
}, z.core.$strip>;
|
|
518
|
+
type BaseMediaOperationProps = z.infer<typeof BaseMediaOperationPropsSchema>;
|
|
519
|
+
/** Original source file (leaf node) */
|
|
520
|
+
declare const SourceOperationSchema: z.ZodObject<{
|
|
521
|
+
volume: z.ZodOptional<z.ZodNumber>;
|
|
522
|
+
opacity: z.ZodOptional<z.ZodNumber>;
|
|
523
|
+
startFrame: z.ZodOptional<z.ZodNumber>;
|
|
524
|
+
timeline: z.ZodOptional<z.ZodObject<{
|
|
525
|
+
startFrame: z.ZodOptional<z.ZodNumber>;
|
|
526
|
+
segments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
527
|
+
startSec: z.ZodNumber;
|
|
528
|
+
endSec: z.ZodOptional<z.ZodNumber>;
|
|
529
|
+
}, z.core.$strip>>>;
|
|
530
|
+
}, z.core.$strip>>;
|
|
531
|
+
op: z.ZodLiteral<"source">;
|
|
532
|
+
source: z.ZodObject<{
|
|
533
|
+
entity: z.ZodOptional<z.ZodObject<{
|
|
534
|
+
id: z.ZodCUID2;
|
|
535
|
+
name: z.ZodString;
|
|
536
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
537
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
538
|
+
userId: z.ZodNullable<z.ZodCUID2>;
|
|
539
|
+
width: z.ZodNullable<z.ZodNumber>;
|
|
540
|
+
height: z.ZodNullable<z.ZodNumber>;
|
|
541
|
+
bucket: z.ZodString;
|
|
542
|
+
size: z.ZodNumber;
|
|
543
|
+
mimeType: z.ZodString;
|
|
544
|
+
key: z.ZodString;
|
|
545
|
+
isUploaded: z.ZodDefault<z.ZodBoolean>;
|
|
546
|
+
duration: z.ZodNullable<z.ZodNumber>;
|
|
547
|
+
sampleRate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
548
|
+
channels: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
549
|
+
bitDepth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
550
|
+
audioCodec: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
551
|
+
audioBitrate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
552
|
+
fps: z.ZodNullable<z.ZodNumber>;
|
|
553
|
+
fingerprint: z.ZodNullable<z.ZodString>;
|
|
554
|
+
}, z.core.$strip>>;
|
|
555
|
+
}, z.core.$strip>;
|
|
556
|
+
sourceMeta: z.ZodObject<{
|
|
557
|
+
width: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
558
|
+
height: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
559
|
+
fps: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
560
|
+
durationMs: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
561
|
+
sampleRate: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
562
|
+
channels: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
563
|
+
bitDepth: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
564
|
+
audioCodec: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
565
|
+
audioBitrate: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
566
|
+
}, z.core.$strip>;
|
|
567
|
+
dataType: z.ZodEnum<{
|
|
568
|
+
Text: "Text";
|
|
569
|
+
Number: "Number";
|
|
570
|
+
Boolean: "Boolean";
|
|
571
|
+
Image: "Image";
|
|
572
|
+
Video: "Video";
|
|
573
|
+
Audio: "Audio";
|
|
574
|
+
SVG: "SVG";
|
|
575
|
+
Caption: "Caption";
|
|
576
|
+
Lottie: "Lottie";
|
|
577
|
+
ThreeD: "ThreeD";
|
|
578
|
+
GIF: "GIF";
|
|
579
|
+
Signal: "Signal";
|
|
580
|
+
LUT: "LUT";
|
|
581
|
+
}>;
|
|
582
|
+
}, z.core.$strip>;
|
|
583
|
+
/** Text content (leaf node) */
|
|
584
|
+
declare const TextOperationSchema: z.ZodObject<{
|
|
585
|
+
volume: z.ZodOptional<z.ZodNumber>;
|
|
586
|
+
opacity: z.ZodOptional<z.ZodNumber>;
|
|
587
|
+
startFrame: z.ZodOptional<z.ZodNumber>;
|
|
588
|
+
timeline: z.ZodOptional<z.ZodObject<{
|
|
589
|
+
startFrame: z.ZodOptional<z.ZodNumber>;
|
|
590
|
+
segments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
591
|
+
startSec: z.ZodNumber;
|
|
592
|
+
endSec: z.ZodOptional<z.ZodNumber>;
|
|
593
|
+
}, z.core.$strip>>>;
|
|
594
|
+
}, z.core.$strip>>;
|
|
595
|
+
op: z.ZodLiteral<"text">;
|
|
596
|
+
text: z.ZodString;
|
|
597
|
+
metadata: z.ZodOptional<z.ZodObject<{
|
|
598
|
+
width: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
599
|
+
height: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
600
|
+
fps: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
601
|
+
durationMs: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
602
|
+
sampleRate: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
603
|
+
channels: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
604
|
+
bitDepth: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
605
|
+
audioCodec: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
606
|
+
audioBitrate: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
607
|
+
}, z.core.$strip>>;
|
|
608
|
+
dataType: z.ZodEnum<{
|
|
609
|
+
Text: "Text";
|
|
610
|
+
Number: "Number";
|
|
611
|
+
Boolean: "Boolean";
|
|
612
|
+
Image: "Image";
|
|
613
|
+
Video: "Video";
|
|
614
|
+
Audio: "Audio";
|
|
615
|
+
SVG: "SVG";
|
|
616
|
+
Caption: "Caption";
|
|
617
|
+
Lottie: "Lottie";
|
|
618
|
+
ThreeD: "ThreeD";
|
|
619
|
+
GIF: "GIF";
|
|
620
|
+
Signal: "Signal";
|
|
621
|
+
LUT: "LUT";
|
|
622
|
+
}>;
|
|
623
|
+
}, z.core.$loose>;
|
|
624
|
+
declare const MediaOperationSchema: z.ZodType<MediaOperation>;
|
|
625
|
+
type MediaOperation = BaseMediaOperationProps & (({
|
|
626
|
+
op: "source";
|
|
627
|
+
} & z.infer<typeof SourceOperationSchema>) | ({
|
|
628
|
+
op: "text";
|
|
629
|
+
} & z.infer<typeof TextOperationSchema>) | ({
|
|
630
|
+
op: string;
|
|
631
|
+
metadata?: MediaMetadata;
|
|
632
|
+
dataType: DataType;
|
|
633
|
+
} & Record<string, any>));
|
|
634
|
+
type VirtualMediaData = {
|
|
635
|
+
metadata: MediaMetadata;
|
|
636
|
+
operation: MediaOperation;
|
|
637
|
+
children: VirtualMediaData[];
|
|
638
|
+
};
|
|
639
|
+
declare const VirtualMediaDataSchema: z.ZodType<VirtualMediaData>;
|
|
640
|
+
//#endregion
|
|
641
|
+
//#region src/types/node-result.d.ts
|
|
642
|
+
declare const FileDataSchema: z$1.ZodObject<{
|
|
643
|
+
entity: z$1.ZodOptional<z$1.ZodCustom<{
|
|
644
|
+
id: string;
|
|
645
|
+
name: string;
|
|
646
|
+
createdAt: Date;
|
|
647
|
+
updatedAt: Date;
|
|
648
|
+
userId: string | null;
|
|
649
|
+
width: number | null;
|
|
650
|
+
height: number | null;
|
|
651
|
+
bucket: string;
|
|
652
|
+
size: number;
|
|
653
|
+
mimeType: string;
|
|
654
|
+
key: string;
|
|
655
|
+
isUploaded: boolean;
|
|
656
|
+
duration: number | null;
|
|
657
|
+
fps: number | null;
|
|
658
|
+
fingerprint: string | null;
|
|
659
|
+
sampleRate?: number | null | undefined;
|
|
660
|
+
channels?: number | null | undefined;
|
|
661
|
+
bitDepth?: number | null | undefined;
|
|
662
|
+
audioCodec?: string | null | undefined;
|
|
663
|
+
audioBitrate?: number | null | undefined;
|
|
664
|
+
}, {
|
|
665
|
+
id: string;
|
|
666
|
+
name: string;
|
|
667
|
+
createdAt: Date;
|
|
668
|
+
updatedAt: Date;
|
|
669
|
+
userId: string | null;
|
|
670
|
+
width: number | null;
|
|
671
|
+
height: number | null;
|
|
672
|
+
bucket: string;
|
|
673
|
+
size: number;
|
|
674
|
+
mimeType: string;
|
|
675
|
+
key: string;
|
|
676
|
+
isUploaded: boolean;
|
|
677
|
+
duration: number | null;
|
|
678
|
+
fps: number | null;
|
|
679
|
+
fingerprint: string | null;
|
|
680
|
+
sampleRate?: number | null | undefined;
|
|
681
|
+
channels?: number | null | undefined;
|
|
682
|
+
bitDepth?: number | null | undefined;
|
|
683
|
+
audioCodec?: string | null | undefined;
|
|
684
|
+
audioBitrate?: number | null | undefined;
|
|
685
|
+
}>>;
|
|
686
|
+
}, z$1.z.core.$strip>;
|
|
687
|
+
type FileData = z$1.infer<typeof FileDataSchema>;
|
|
688
|
+
declare const SignalStatsSchema: z$1.ZodObject<{
|
|
689
|
+
min: z$1.ZodOptional<z$1.ZodNumber>;
|
|
690
|
+
max: z$1.ZodOptional<z$1.ZodNumber>;
|
|
691
|
+
mean: z$1.ZodOptional<z$1.ZodNumber>;
|
|
692
|
+
rms: z$1.ZodOptional<z$1.ZodNumber>;
|
|
693
|
+
peak: z$1.ZodOptional<z$1.ZodNumber>;
|
|
694
|
+
beats: z$1.ZodOptional<z$1.ZodArray<z$1.ZodNumber>>;
|
|
695
|
+
tempo: z$1.ZodOptional<z$1.ZodNumber>;
|
|
696
|
+
}, z$1.z.core.$strip>;
|
|
697
|
+
type SignalStats = z$1.infer<typeof SignalStatsSchema>;
|
|
698
|
+
declare const SignalChannelMetaSchema: z$1.ZodObject<{
|
|
699
|
+
id: z$1.ZodString;
|
|
700
|
+
name: z$1.ZodString;
|
|
701
|
+
index: z$1.ZodNumber;
|
|
702
|
+
stats: z$1.ZodOptional<z$1.ZodObject<{
|
|
703
|
+
min: z$1.ZodOptional<z$1.ZodNumber>;
|
|
704
|
+
max: z$1.ZodOptional<z$1.ZodNumber>;
|
|
705
|
+
mean: z$1.ZodOptional<z$1.ZodNumber>;
|
|
706
|
+
rms: z$1.ZodOptional<z$1.ZodNumber>;
|
|
707
|
+
peak: z$1.ZodOptional<z$1.ZodNumber>;
|
|
708
|
+
beats: z$1.ZodOptional<z$1.ZodArray<z$1.ZodNumber>>;
|
|
709
|
+
tempo: z$1.ZodOptional<z$1.ZodNumber>;
|
|
710
|
+
}, z$1.z.core.$strip>>;
|
|
711
|
+
}, z$1.z.core.$strip>;
|
|
712
|
+
type SignalChannelMeta = z$1.infer<typeof SignalChannelMetaSchema>;
|
|
713
|
+
declare const GeneratorSignalDataSchema: z$1.ZodObject<{
|
|
714
|
+
v: z$1.ZodOptional<z$1.ZodLiteral<2>>;
|
|
715
|
+
type: z$1.ZodLiteral<"generator">;
|
|
716
|
+
nodeId: z$1.ZodOptional<z$1.ZodString>;
|
|
717
|
+
baseType: z$1.ZodOptional<z$1.ZodString>;
|
|
718
|
+
func: z$1.ZodDefault<z$1.ZodUnion<[z$1.ZodEnum<{
|
|
719
|
+
custom: "custom";
|
|
720
|
+
sine: "sine";
|
|
721
|
+
triangle: "triangle";
|
|
722
|
+
sawtooth: "sawtooth";
|
|
723
|
+
square: "square";
|
|
724
|
+
}>, z$1.ZodString]>>;
|
|
725
|
+
frequency: z$1.ZodDefault<z$1.ZodNumber>;
|
|
726
|
+
amplitude: z$1.ZodDefault<z$1.ZodNumber>;
|
|
727
|
+
phase: z$1.ZodDefault<z$1.ZodNumber>;
|
|
728
|
+
offset: z$1.ZodDefault<z$1.ZodNumber>;
|
|
729
|
+
waveform: z$1.ZodOptional<z$1.ZodString>;
|
|
730
|
+
bpm: z$1.ZodOptional<z$1.ZodNumber>;
|
|
731
|
+
syncToBpm: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
732
|
+
fmFrequency: z$1.ZodOptional<z$1.ZodNumber>;
|
|
733
|
+
fmDepth: z$1.ZodOptional<z$1.ZodNumber>;
|
|
734
|
+
envelope: z$1.ZodOptional<z$1.ZodString>;
|
|
735
|
+
fnBody: z$1.ZodOptional<z$1.ZodString>;
|
|
736
|
+
fnParams: z$1.ZodOptional<z$1.ZodArray<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>>>;
|
|
737
|
+
customWGSL: z$1.ZodOptional<z$1.ZodString>;
|
|
738
|
+
signalFnName: z$1.ZodOptional<z$1.ZodString>;
|
|
739
|
+
outputType: z$1.ZodOptional<z$1.ZodString>;
|
|
740
|
+
fps: z$1.ZodOptional<z$1.ZodNumber>;
|
|
741
|
+
durationMs: z$1.ZodOptional<z$1.ZodNumber>;
|
|
742
|
+
stats: z$1.ZodOptional<z$1.ZodObject<{
|
|
743
|
+
min: z$1.ZodOptional<z$1.ZodNumber>;
|
|
744
|
+
max: z$1.ZodOptional<z$1.ZodNumber>;
|
|
745
|
+
mean: z$1.ZodOptional<z$1.ZodNumber>;
|
|
746
|
+
rms: z$1.ZodOptional<z$1.ZodNumber>;
|
|
747
|
+
peak: z$1.ZodOptional<z$1.ZodNumber>;
|
|
748
|
+
beats: z$1.ZodOptional<z$1.ZodArray<z$1.ZodNumber>>;
|
|
749
|
+
tempo: z$1.ZodOptional<z$1.ZodNumber>;
|
|
750
|
+
}, z$1.z.core.$strip>>;
|
|
751
|
+
}, z$1.z.core.$loose>;
|
|
752
|
+
type GeneratorSignalData = z$1.infer<typeof GeneratorSignalDataSchema>;
|
|
753
|
+
declare const AudioExtractorSignalDataSchema: z$1.ZodObject<{
|
|
754
|
+
v: z$1.ZodOptional<z$1.ZodLiteral<2>>;
|
|
755
|
+
type: z$1.ZodLiteral<"audio_extractor">;
|
|
756
|
+
nodeId: z$1.ZodOptional<z$1.ZodString>;
|
|
757
|
+
sourceUrl: z$1.ZodOptional<z$1.ZodString>;
|
|
758
|
+
channel: z$1.ZodOptional<z$1.ZodUnion<[z$1.ZodEnum<{
|
|
759
|
+
primary: "primary";
|
|
760
|
+
beat: "beat";
|
|
761
|
+
bass: "bass";
|
|
762
|
+
energy: "energy";
|
|
763
|
+
spectral_flux: "spectral_flux";
|
|
764
|
+
}>, z$1.ZodString]>>;
|
|
765
|
+
channelIndex: z$1.ZodOptional<z$1.ZodNumber>;
|
|
766
|
+
channels: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
|
|
767
|
+
id: z$1.ZodString;
|
|
768
|
+
name: z$1.ZodString;
|
|
769
|
+
index: z$1.ZodNumber;
|
|
770
|
+
stats: z$1.ZodOptional<z$1.ZodObject<{
|
|
771
|
+
min: z$1.ZodOptional<z$1.ZodNumber>;
|
|
772
|
+
max: z$1.ZodOptional<z$1.ZodNumber>;
|
|
773
|
+
mean: z$1.ZodOptional<z$1.ZodNumber>;
|
|
774
|
+
rms: z$1.ZodOptional<z$1.ZodNumber>;
|
|
775
|
+
peak: z$1.ZodOptional<z$1.ZodNumber>;
|
|
776
|
+
beats: z$1.ZodOptional<z$1.ZodArray<z$1.ZodNumber>>;
|
|
777
|
+
tempo: z$1.ZodOptional<z$1.ZodNumber>;
|
|
778
|
+
}, z$1.z.core.$strip>>;
|
|
779
|
+
}, z$1.z.core.$strip>>>;
|
|
780
|
+
extractionMode: z$1.ZodOptional<z$1.ZodString>;
|
|
781
|
+
attackMs: z$1.ZodOptional<z$1.ZodNumber>;
|
|
782
|
+
releaseMs: z$1.ZodOptional<z$1.ZodNumber>;
|
|
783
|
+
sensitivity: z$1.ZodOptional<z$1.ZodNumber>;
|
|
784
|
+
noiseFloorDb: z$1.ZodOptional<z$1.ZodNumber>;
|
|
785
|
+
dynamicRangeDb: z$1.ZodOptional<z$1.ZodNumber>;
|
|
786
|
+
autoRange: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
787
|
+
smoothing: z$1.ZodOptional<z$1.ZodNumber>;
|
|
788
|
+
curve: z$1.ZodOptional<z$1.ZodString>;
|
|
789
|
+
beatThreshold: z$1.ZodOptional<z$1.ZodNumber>;
|
|
790
|
+
beatDecayMs: z$1.ZodOptional<z$1.ZodNumber>;
|
|
791
|
+
previewMode: z$1.ZodOptional<z$1.ZodString>;
|
|
792
|
+
samples: z$1.ZodOptional<z$1.ZodUnion<readonly [z$1.ZodArray<z$1.ZodNumber>, z$1.ZodCustom<Float32Array<ArrayBuffer>, Float32Array<ArrayBuffer>>]>>;
|
|
793
|
+
fps: z$1.ZodOptional<z$1.ZodNumber>;
|
|
794
|
+
durationMs: z$1.ZodOptional<z$1.ZodNumber>;
|
|
795
|
+
stats: z$1.ZodOptional<z$1.ZodObject<{
|
|
796
|
+
min: z$1.ZodOptional<z$1.ZodNumber>;
|
|
797
|
+
max: z$1.ZodOptional<z$1.ZodNumber>;
|
|
798
|
+
mean: z$1.ZodOptional<z$1.ZodNumber>;
|
|
799
|
+
rms: z$1.ZodOptional<z$1.ZodNumber>;
|
|
800
|
+
peak: z$1.ZodOptional<z$1.ZodNumber>;
|
|
801
|
+
beats: z$1.ZodOptional<z$1.ZodArray<z$1.ZodNumber>>;
|
|
802
|
+
tempo: z$1.ZodOptional<z$1.ZodNumber>;
|
|
803
|
+
}, z$1.z.core.$strip>>;
|
|
804
|
+
state: z$1.ZodOptional<z$1.ZodEnum<{
|
|
805
|
+
pending: "pending";
|
|
806
|
+
ready: "ready";
|
|
807
|
+
failed: "failed";
|
|
808
|
+
}>>;
|
|
809
|
+
error: z$1.ZodOptional<z$1.ZodString>;
|
|
810
|
+
virtualMedia: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>>;
|
|
811
|
+
signalFnName: z$1.ZodOptional<z$1.ZodString>;
|
|
812
|
+
customWGSL: z$1.ZodOptional<z$1.ZodString>;
|
|
813
|
+
}, z$1.z.core.$loose>;
|
|
814
|
+
type AudioExtractorSignalData = z$1.infer<typeof AudioExtractorSignalDataSchema>;
|
|
815
|
+
declare const SignalMathDataSchema: z$1.ZodObject<{
|
|
816
|
+
v: z$1.ZodOptional<z$1.ZodLiteral<2>>;
|
|
817
|
+
type: z$1.ZodLiteral<"signal_math">;
|
|
818
|
+
nodeId: z$1.ZodOptional<z$1.ZodString>;
|
|
819
|
+
op: z$1.ZodOptional<z$1.ZodString>;
|
|
820
|
+
operation: z$1.ZodOptional<z$1.ZodString>;
|
|
821
|
+
signalA: z$1.ZodOptional<z$1.ZodUnknown>;
|
|
822
|
+
signalB: z$1.ZodOptional<z$1.ZodUnknown>;
|
|
823
|
+
bValue: z$1.ZodOptional<z$1.ZodNumber>;
|
|
824
|
+
inMin: z$1.ZodOptional<z$1.ZodNumber>;
|
|
825
|
+
inMax: z$1.ZodOptional<z$1.ZodNumber>;
|
|
826
|
+
outMin: z$1.ZodOptional<z$1.ZodNumber>;
|
|
827
|
+
outMax: z$1.ZodOptional<z$1.ZodNumber>;
|
|
828
|
+
clampMin: z$1.ZodOptional<z$1.ZodNumber>;
|
|
829
|
+
clampMax: z$1.ZodOptional<z$1.ZodNumber>;
|
|
830
|
+
exponent: z$1.ZodOptional<z$1.ZodNumber>;
|
|
831
|
+
edge0: z$1.ZodOptional<z$1.ZodNumber>;
|
|
832
|
+
edge1: z$1.ZodOptional<z$1.ZodNumber>;
|
|
833
|
+
customWGSL: z$1.ZodOptional<z$1.ZodString>;
|
|
834
|
+
stats: z$1.ZodOptional<z$1.ZodObject<{
|
|
835
|
+
min: z$1.ZodOptional<z$1.ZodNumber>;
|
|
836
|
+
max: z$1.ZodOptional<z$1.ZodNumber>;
|
|
837
|
+
mean: z$1.ZodOptional<z$1.ZodNumber>;
|
|
838
|
+
rms: z$1.ZodOptional<z$1.ZodNumber>;
|
|
839
|
+
peak: z$1.ZodOptional<z$1.ZodNumber>;
|
|
840
|
+
beats: z$1.ZodOptional<z$1.ZodArray<z$1.ZodNumber>>;
|
|
841
|
+
tempo: z$1.ZodOptional<z$1.ZodNumber>;
|
|
842
|
+
}, z$1.z.core.$strip>>;
|
|
843
|
+
}, z$1.z.core.$loose>;
|
|
844
|
+
type SignalMathData = z$1.infer<typeof SignalMathDataSchema>;
|
|
845
|
+
declare const SignalGateDataSchema: z$1.ZodObject<{
|
|
846
|
+
v: z$1.ZodOptional<z$1.ZodLiteral<2>>;
|
|
847
|
+
type: z$1.ZodLiteral<"gate">;
|
|
848
|
+
nodeId: z$1.ZodOptional<z$1.ZodString>;
|
|
849
|
+
sourceSignal: z$1.ZodOptional<z$1.ZodUnknown>;
|
|
850
|
+
threshold: z$1.ZodOptional<z$1.ZodNumber>;
|
|
851
|
+
debounceMs: z$1.ZodOptional<z$1.ZodNumber>;
|
|
852
|
+
mode: z$1.ZodOptional<z$1.ZodEnum<{
|
|
853
|
+
gate: "gate";
|
|
854
|
+
trigger: "trigger";
|
|
855
|
+
toggle: "toggle";
|
|
856
|
+
}>>;
|
|
857
|
+
holdFrames: z$1.ZodOptional<z$1.ZodNumber>;
|
|
858
|
+
invert: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
859
|
+
stats: z$1.ZodOptional<z$1.ZodObject<{
|
|
860
|
+
min: z$1.ZodOptional<z$1.ZodNumber>;
|
|
861
|
+
max: z$1.ZodOptional<z$1.ZodNumber>;
|
|
862
|
+
mean: z$1.ZodOptional<z$1.ZodNumber>;
|
|
863
|
+
rms: z$1.ZodOptional<z$1.ZodNumber>;
|
|
864
|
+
peak: z$1.ZodOptional<z$1.ZodNumber>;
|
|
865
|
+
beats: z$1.ZodOptional<z$1.ZodArray<z$1.ZodNumber>>;
|
|
866
|
+
tempo: z$1.ZodOptional<z$1.ZodNumber>;
|
|
867
|
+
}, z$1.z.core.$strip>>;
|
|
868
|
+
}, z$1.z.core.$loose>;
|
|
869
|
+
type SignalGateData = z$1.infer<typeof SignalGateDataSchema>;
|
|
870
|
+
declare const SignalDataSchema: z$1.ZodUnion<readonly [z$1.ZodObject<{
|
|
871
|
+
v: z$1.ZodOptional<z$1.ZodLiteral<2>>;
|
|
872
|
+
type: z$1.ZodLiteral<"generator">;
|
|
873
|
+
nodeId: z$1.ZodOptional<z$1.ZodString>;
|
|
874
|
+
baseType: z$1.ZodOptional<z$1.ZodString>;
|
|
875
|
+
func: z$1.ZodDefault<z$1.ZodUnion<[z$1.ZodEnum<{
|
|
876
|
+
custom: "custom";
|
|
877
|
+
sine: "sine";
|
|
878
|
+
triangle: "triangle";
|
|
879
|
+
sawtooth: "sawtooth";
|
|
880
|
+
square: "square";
|
|
881
|
+
}>, z$1.ZodString]>>;
|
|
882
|
+
frequency: z$1.ZodDefault<z$1.ZodNumber>;
|
|
883
|
+
amplitude: z$1.ZodDefault<z$1.ZodNumber>;
|
|
884
|
+
phase: z$1.ZodDefault<z$1.ZodNumber>;
|
|
885
|
+
offset: z$1.ZodDefault<z$1.ZodNumber>;
|
|
886
|
+
waveform: z$1.ZodOptional<z$1.ZodString>;
|
|
887
|
+
bpm: z$1.ZodOptional<z$1.ZodNumber>;
|
|
888
|
+
syncToBpm: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
889
|
+
fmFrequency: z$1.ZodOptional<z$1.ZodNumber>;
|
|
890
|
+
fmDepth: z$1.ZodOptional<z$1.ZodNumber>;
|
|
891
|
+
envelope: z$1.ZodOptional<z$1.ZodString>;
|
|
892
|
+
fnBody: z$1.ZodOptional<z$1.ZodString>;
|
|
893
|
+
fnParams: z$1.ZodOptional<z$1.ZodArray<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>>>;
|
|
894
|
+
customWGSL: z$1.ZodOptional<z$1.ZodString>;
|
|
895
|
+
signalFnName: z$1.ZodOptional<z$1.ZodString>;
|
|
896
|
+
outputType: z$1.ZodOptional<z$1.ZodString>;
|
|
897
|
+
fps: z$1.ZodOptional<z$1.ZodNumber>;
|
|
898
|
+
durationMs: z$1.ZodOptional<z$1.ZodNumber>;
|
|
899
|
+
stats: z$1.ZodOptional<z$1.ZodObject<{
|
|
900
|
+
min: z$1.ZodOptional<z$1.ZodNumber>;
|
|
901
|
+
max: z$1.ZodOptional<z$1.ZodNumber>;
|
|
902
|
+
mean: z$1.ZodOptional<z$1.ZodNumber>;
|
|
903
|
+
rms: z$1.ZodOptional<z$1.ZodNumber>;
|
|
904
|
+
peak: z$1.ZodOptional<z$1.ZodNumber>;
|
|
905
|
+
beats: z$1.ZodOptional<z$1.ZodArray<z$1.ZodNumber>>;
|
|
906
|
+
tempo: z$1.ZodOptional<z$1.ZodNumber>;
|
|
907
|
+
}, z$1.z.core.$strip>>;
|
|
908
|
+
}, z$1.z.core.$loose>, z$1.ZodObject<{
|
|
909
|
+
v: z$1.ZodOptional<z$1.ZodLiteral<2>>;
|
|
910
|
+
type: z$1.ZodLiteral<"audio_extractor">;
|
|
911
|
+
nodeId: z$1.ZodOptional<z$1.ZodString>;
|
|
912
|
+
sourceUrl: z$1.ZodOptional<z$1.ZodString>;
|
|
913
|
+
channel: z$1.ZodOptional<z$1.ZodUnion<[z$1.ZodEnum<{
|
|
914
|
+
primary: "primary";
|
|
915
|
+
beat: "beat";
|
|
916
|
+
bass: "bass";
|
|
917
|
+
energy: "energy";
|
|
918
|
+
spectral_flux: "spectral_flux";
|
|
919
|
+
}>, z$1.ZodString]>>;
|
|
920
|
+
channelIndex: z$1.ZodOptional<z$1.ZodNumber>;
|
|
921
|
+
channels: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
|
|
922
|
+
id: z$1.ZodString;
|
|
923
|
+
name: z$1.ZodString;
|
|
924
|
+
index: z$1.ZodNumber;
|
|
925
|
+
stats: z$1.ZodOptional<z$1.ZodObject<{
|
|
926
|
+
min: z$1.ZodOptional<z$1.ZodNumber>;
|
|
927
|
+
max: z$1.ZodOptional<z$1.ZodNumber>;
|
|
928
|
+
mean: z$1.ZodOptional<z$1.ZodNumber>;
|
|
929
|
+
rms: z$1.ZodOptional<z$1.ZodNumber>;
|
|
930
|
+
peak: z$1.ZodOptional<z$1.ZodNumber>;
|
|
931
|
+
beats: z$1.ZodOptional<z$1.ZodArray<z$1.ZodNumber>>;
|
|
932
|
+
tempo: z$1.ZodOptional<z$1.ZodNumber>;
|
|
933
|
+
}, z$1.z.core.$strip>>;
|
|
934
|
+
}, z$1.z.core.$strip>>>;
|
|
935
|
+
extractionMode: z$1.ZodOptional<z$1.ZodString>;
|
|
936
|
+
attackMs: z$1.ZodOptional<z$1.ZodNumber>;
|
|
937
|
+
releaseMs: z$1.ZodOptional<z$1.ZodNumber>;
|
|
938
|
+
sensitivity: z$1.ZodOptional<z$1.ZodNumber>;
|
|
939
|
+
noiseFloorDb: z$1.ZodOptional<z$1.ZodNumber>;
|
|
940
|
+
dynamicRangeDb: z$1.ZodOptional<z$1.ZodNumber>;
|
|
941
|
+
autoRange: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
942
|
+
smoothing: z$1.ZodOptional<z$1.ZodNumber>;
|
|
943
|
+
curve: z$1.ZodOptional<z$1.ZodString>;
|
|
944
|
+
beatThreshold: z$1.ZodOptional<z$1.ZodNumber>;
|
|
945
|
+
beatDecayMs: z$1.ZodOptional<z$1.ZodNumber>;
|
|
946
|
+
previewMode: z$1.ZodOptional<z$1.ZodString>;
|
|
947
|
+
samples: z$1.ZodOptional<z$1.ZodUnion<readonly [z$1.ZodArray<z$1.ZodNumber>, z$1.ZodCustom<Float32Array<ArrayBuffer>, Float32Array<ArrayBuffer>>]>>;
|
|
948
|
+
fps: z$1.ZodOptional<z$1.ZodNumber>;
|
|
949
|
+
durationMs: z$1.ZodOptional<z$1.ZodNumber>;
|
|
950
|
+
stats: z$1.ZodOptional<z$1.ZodObject<{
|
|
951
|
+
min: z$1.ZodOptional<z$1.ZodNumber>;
|
|
952
|
+
max: z$1.ZodOptional<z$1.ZodNumber>;
|
|
953
|
+
mean: z$1.ZodOptional<z$1.ZodNumber>;
|
|
954
|
+
rms: z$1.ZodOptional<z$1.ZodNumber>;
|
|
955
|
+
peak: z$1.ZodOptional<z$1.ZodNumber>;
|
|
956
|
+
beats: z$1.ZodOptional<z$1.ZodArray<z$1.ZodNumber>>;
|
|
957
|
+
tempo: z$1.ZodOptional<z$1.ZodNumber>;
|
|
958
|
+
}, z$1.z.core.$strip>>;
|
|
959
|
+
state: z$1.ZodOptional<z$1.ZodEnum<{
|
|
960
|
+
pending: "pending";
|
|
961
|
+
ready: "ready";
|
|
962
|
+
failed: "failed";
|
|
963
|
+
}>>;
|
|
964
|
+
error: z$1.ZodOptional<z$1.ZodString>;
|
|
965
|
+
virtualMedia: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>>;
|
|
966
|
+
signalFnName: z$1.ZodOptional<z$1.ZodString>;
|
|
967
|
+
customWGSL: z$1.ZodOptional<z$1.ZodString>;
|
|
968
|
+
}, z$1.z.core.$loose>, z$1.ZodObject<{
|
|
969
|
+
v: z$1.ZodOptional<z$1.ZodLiteral<2>>;
|
|
970
|
+
type: z$1.ZodLiteral<"signal_math">;
|
|
971
|
+
nodeId: z$1.ZodOptional<z$1.ZodString>;
|
|
972
|
+
op: z$1.ZodOptional<z$1.ZodString>;
|
|
973
|
+
operation: z$1.ZodOptional<z$1.ZodString>;
|
|
974
|
+
signalA: z$1.ZodOptional<z$1.ZodUnknown>;
|
|
975
|
+
signalB: z$1.ZodOptional<z$1.ZodUnknown>;
|
|
976
|
+
bValue: z$1.ZodOptional<z$1.ZodNumber>;
|
|
977
|
+
inMin: z$1.ZodOptional<z$1.ZodNumber>;
|
|
978
|
+
inMax: z$1.ZodOptional<z$1.ZodNumber>;
|
|
979
|
+
outMin: z$1.ZodOptional<z$1.ZodNumber>;
|
|
980
|
+
outMax: z$1.ZodOptional<z$1.ZodNumber>;
|
|
981
|
+
clampMin: z$1.ZodOptional<z$1.ZodNumber>;
|
|
982
|
+
clampMax: z$1.ZodOptional<z$1.ZodNumber>;
|
|
983
|
+
exponent: z$1.ZodOptional<z$1.ZodNumber>;
|
|
984
|
+
edge0: z$1.ZodOptional<z$1.ZodNumber>;
|
|
985
|
+
edge1: z$1.ZodOptional<z$1.ZodNumber>;
|
|
986
|
+
customWGSL: z$1.ZodOptional<z$1.ZodString>;
|
|
987
|
+
stats: z$1.ZodOptional<z$1.ZodObject<{
|
|
988
|
+
min: z$1.ZodOptional<z$1.ZodNumber>;
|
|
989
|
+
max: z$1.ZodOptional<z$1.ZodNumber>;
|
|
990
|
+
mean: z$1.ZodOptional<z$1.ZodNumber>;
|
|
991
|
+
rms: z$1.ZodOptional<z$1.ZodNumber>;
|
|
992
|
+
peak: z$1.ZodOptional<z$1.ZodNumber>;
|
|
993
|
+
beats: z$1.ZodOptional<z$1.ZodArray<z$1.ZodNumber>>;
|
|
994
|
+
tempo: z$1.ZodOptional<z$1.ZodNumber>;
|
|
995
|
+
}, z$1.z.core.$strip>>;
|
|
996
|
+
}, z$1.z.core.$loose>, z$1.ZodObject<{
|
|
997
|
+
v: z$1.ZodOptional<z$1.ZodLiteral<2>>;
|
|
998
|
+
type: z$1.ZodLiteral<"gate">;
|
|
999
|
+
nodeId: z$1.ZodOptional<z$1.ZodString>;
|
|
1000
|
+
sourceSignal: z$1.ZodOptional<z$1.ZodUnknown>;
|
|
1001
|
+
threshold: z$1.ZodOptional<z$1.ZodNumber>;
|
|
1002
|
+
debounceMs: z$1.ZodOptional<z$1.ZodNumber>;
|
|
1003
|
+
mode: z$1.ZodOptional<z$1.ZodEnum<{
|
|
1004
|
+
gate: "gate";
|
|
1005
|
+
trigger: "trigger";
|
|
1006
|
+
toggle: "toggle";
|
|
1007
|
+
}>>;
|
|
1008
|
+
holdFrames: z$1.ZodOptional<z$1.ZodNumber>;
|
|
1009
|
+
invert: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
1010
|
+
stats: z$1.ZodOptional<z$1.ZodObject<{
|
|
1011
|
+
min: z$1.ZodOptional<z$1.ZodNumber>;
|
|
1012
|
+
max: z$1.ZodOptional<z$1.ZodNumber>;
|
|
1013
|
+
mean: z$1.ZodOptional<z$1.ZodNumber>;
|
|
1014
|
+
rms: z$1.ZodOptional<z$1.ZodNumber>;
|
|
1015
|
+
peak: z$1.ZodOptional<z$1.ZodNumber>;
|
|
1016
|
+
beats: z$1.ZodOptional<z$1.ZodArray<z$1.ZodNumber>>;
|
|
1017
|
+
tempo: z$1.ZodOptional<z$1.ZodNumber>;
|
|
1018
|
+
}, z$1.z.core.$strip>>;
|
|
1019
|
+
}, z$1.z.core.$loose>, z$1.ZodObject<{
|
|
1020
|
+
type: z$1.ZodString;
|
|
1021
|
+
}, z$1.z.core.$loose>]>;
|
|
1022
|
+
type SignalData = z$1.infer<typeof SignalDataSchema>;
|
|
1023
|
+
declare function serializeSignalData(data: SignalData): string;
|
|
1024
|
+
declare function deserializeSignalData(raw: unknown): SignalData;
|
|
1025
|
+
type DataForType<R extends DataType> = R extends "Text" ? string : R extends "Number" ? number : R extends "Boolean" ? boolean : R extends "Signal" ? SignalData : R extends "Image" | "SVG" | "Caption" | "Video" | "Audio" | "Lottie" | "ThreeD" | "GIF" | "LUT" ? VirtualMediaData : R extends "Any" ? string | number | boolean | FileData | VirtualMediaData | SignalData : never;
|
|
1026
|
+
declare const OutputItemSchema: z$1.ZodObject<{
|
|
1027
|
+
type: z$1.ZodCustom<DataType, DataType>;
|
|
1028
|
+
data: z$1.ZodAny;
|
|
1029
|
+
outputHandleId: z$1.ZodOptional<z$1.ZodString>;
|
|
1030
|
+
}, z$1.z.core.$strip>;
|
|
1031
|
+
declare const createOutputItemSchema: <T extends DataType>(type: z$1.ZodLiteral<T>, dataSchema: z$1.ZodTypeAny) => z$1.ZodType<OutputItem<T>>;
|
|
1032
|
+
type OutputItem<R extends DataType> = {
|
|
1033
|
+
type: R;
|
|
1034
|
+
data: DataForType<R>;
|
|
1035
|
+
outputHandleId: string | undefined;
|
|
1036
|
+
};
|
|
1037
|
+
type Output$1 = {
|
|
1038
|
+
items: OutputItem<DataType>[];
|
|
1039
|
+
};
|
|
1040
|
+
declare const SingleOutputGenericSchema: <T extends DataType>(outputItemSchema: z$1.ZodType<OutputItem<T>>) => z$1.ZodObject<{
|
|
1041
|
+
selectedOutputIndex: z$1.ZodLiteral<0>;
|
|
1042
|
+
outputs: z$1.ZodTuple<[z$1.ZodObject<{
|
|
1043
|
+
items: z$1.ZodTuple<[z$1.ZodType<OutputItem<T>, unknown, z$1.z.core.$ZodTypeInternals<OutputItem<T>, unknown>>], null>;
|
|
1044
|
+
}, z$1.z.core.$strip>], null>;
|
|
1045
|
+
}, z$1.z.core.$strip>;
|
|
1046
|
+
type SingleOutputGeneric<T extends DataType> = {
|
|
1047
|
+
selectedOutputIndex: 0;
|
|
1048
|
+
outputs: [{
|
|
1049
|
+
items: [OutputItem<T>];
|
|
1050
|
+
}];
|
|
1051
|
+
};
|
|
1052
|
+
declare const MultiOutputGenericSchema: <T extends DataType>(outputItemSchema: z$1.ZodType<OutputItem<T>>) => z$1.ZodObject<{
|
|
1053
|
+
selectedOutputIndex: z$1.ZodNumber;
|
|
1054
|
+
outputs: z$1.ZodArray<z$1.ZodObject<{
|
|
1055
|
+
items: z$1.ZodArray<z$1.ZodType<OutputItem<T>, unknown, z$1.z.core.$ZodTypeInternals<OutputItem<T>, unknown>>>;
|
|
1056
|
+
}, z$1.z.core.$strip>>;
|
|
1057
|
+
sourceFingerprint: z$1.ZodOptional<z$1.ZodString>;
|
|
1058
|
+
}, z$1.z.core.$strip>;
|
|
1059
|
+
type MultiOutputGeneric<T extends DataType> = {
|
|
1060
|
+
selectedOutputIndex: number;
|
|
1061
|
+
outputs: {
|
|
1062
|
+
items: OutputItem<T>[];
|
|
1063
|
+
}[];
|
|
1064
|
+
sourceFingerprint?: string;
|
|
1065
|
+
};
|
|
1066
|
+
type AnyOutputUnion = OutputItem<"Video"> | OutputItem<"Image"> | OutputItem<"Audio"> | OutputItem<"Text"> | OutputItem<"Number"> | OutputItem<"Boolean"> | OutputItem<"SVG"> | OutputItem<"GIF"> | OutputItem<"Caption"> | OutputItem<"Lottie"> | OutputItem<"ThreeD"> | OutputItem<"Signal"> | OutputItem<"LUT">;
|
|
1067
|
+
declare const AnyOutputUnionSchema: z$1.ZodType<AnyOutputUnion>;
|
|
1068
|
+
declare const NodeResultSchema: z$1.ZodObject<{
|
|
1069
|
+
selectedOutputIndex: z$1.ZodNumber;
|
|
1070
|
+
outputs: z$1.ZodArray<z$1.ZodObject<{
|
|
1071
|
+
items: z$1.ZodArray<z$1.ZodType<AnyOutputUnion, unknown, z$1.z.core.$ZodTypeInternals<AnyOutputUnion, unknown>>>;
|
|
1072
|
+
}, z$1.z.core.$strip>>;
|
|
1073
|
+
}, z$1.z.core.$strip>;
|
|
1074
|
+
type NodeResult = z$1.infer<typeof NodeResultSchema>;
|
|
1075
|
+
declare const ExportResultSchema: z$1.ZodObject<{
|
|
1076
|
+
selectedOutputIndex: z$1.ZodNumber;
|
|
1077
|
+
outputs: z$1.ZodArray<z$1.ZodObject<{
|
|
1078
|
+
items: z$1.ZodArray<z$1.ZodType<OutputItem<"Text" | "Number" | "Boolean" | "Image" | "Video" | "Audio" | "SVG" | "Caption" | "Lottie" | "ThreeD" | "GIF" | "Signal" | "LUT">, unknown, z$1.z.core.$ZodTypeInternals<OutputItem<"Text" | "Number" | "Boolean" | "Image" | "Video" | "Audio" | "SVG" | "Caption" | "Lottie" | "ThreeD" | "GIF" | "Signal" | "LUT">, unknown>>>;
|
|
1079
|
+
}, z$1.z.core.$strip>>;
|
|
1080
|
+
sourceFingerprint: z$1.ZodOptional<z$1.ZodString>;
|
|
1081
|
+
}, z$1.z.core.$strip>;
|
|
1082
|
+
type ExportResult = {
|
|
1083
|
+
selectedOutputIndex: number;
|
|
1084
|
+
outputs: {
|
|
1085
|
+
items: AnyOutputUnion[];
|
|
1086
|
+
}[];
|
|
1087
|
+
sourceFingerprint?: string;
|
|
1088
|
+
};
|
|
1089
|
+
//#endregion
|
|
1090
|
+
//#region src/types/node-processor.d.ts
|
|
1091
|
+
type ConnectedInput = {
|
|
1092
|
+
connectionValid: boolean;
|
|
1093
|
+
outputItem: AnyOutputUnion | null;
|
|
1094
|
+
};
|
|
1095
|
+
interface NodeProcessorContext {
|
|
1096
|
+
getFirstOutputHandle: (nodeId: string, type?: DataTypeEnum) => string | undefined;
|
|
1097
|
+
getFirstOutputHandleWithLabel: (nodeId: string, label: string) => string | undefined;
|
|
1098
|
+
findInputData: (inputs: Record<string, ConnectedInput>, requiredType?: string, handleLabel?: string) => string | undefined;
|
|
1099
|
+
registerObjectUrl: (url: string) => void;
|
|
1100
|
+
getOutputHandle: (type: string, label?: string) => string | undefined;
|
|
1101
|
+
}
|
|
1102
|
+
type NodeProcessorParams<TNode = any> = {
|
|
1103
|
+
node: TNode;
|
|
1104
|
+
inputs: Record<string, ConnectedInput>;
|
|
1105
|
+
signal: AbortSignal;
|
|
1106
|
+
data: any;
|
|
1107
|
+
context: NodeProcessorContext;
|
|
1108
|
+
};
|
|
1109
|
+
type NodeRunFunction<TNode = any> = (params: NodeProcessorParams<TNode>) => Promise<NodeResult | null>;
|
|
1110
|
+
//#endregion
|
|
1111
|
+
//#region src/types/rich-text.d.ts
|
|
1112
|
+
interface TextSpanMark {
|
|
1113
|
+
background: string | Signal<string>;
|
|
1114
|
+
borderRadius?: number;
|
|
1115
|
+
paddingX?: number;
|
|
1116
|
+
paddingY?: number;
|
|
1117
|
+
}
|
|
1118
|
+
interface TextSpan {
|
|
1119
|
+
text: string | Signal<string>;
|
|
1120
|
+
fontFamily?: string;
|
|
1121
|
+
fontSize?: number | Signal<number>;
|
|
1122
|
+
fontWeight?: number | string;
|
|
1123
|
+
fontStyle?: "normal" | "italic";
|
|
1124
|
+
fill?: string | Signal<string>;
|
|
1125
|
+
letterSpacing?: number;
|
|
1126
|
+
baselineShift?: number;
|
|
1127
|
+
opacity?: number | Signal<number>;
|
|
1128
|
+
mark?: TextSpanMark;
|
|
1129
|
+
}
|
|
1130
|
+
//#endregion
|
|
1131
|
+
//#region src/types/services.d.ts
|
|
1132
|
+
/**
|
|
1133
|
+
* Interface for media processing and handling.
|
|
1134
|
+
*/
|
|
1135
|
+
interface MediaService {
|
|
1136
|
+
getImageDimensions: (buffer: Buffer) => Promise<{
|
|
1137
|
+
width: number;
|
|
1138
|
+
height: number;
|
|
1139
|
+
}> | {
|
|
1140
|
+
width: number;
|
|
1141
|
+
height: number;
|
|
1142
|
+
};
|
|
1143
|
+
getImageBuffer: (imageInput: FileData) => Promise<Buffer>;
|
|
1144
|
+
resolveFileDataUrl: (data: FileData | null) => string | Promise<string | null> | null;
|
|
1145
|
+
}
|
|
1146
|
+
/**
|
|
1147
|
+
* Interface for storage operations.
|
|
1148
|
+
*/
|
|
1149
|
+
interface StorageService {
|
|
1150
|
+
uploadToStorage: (buffer: Buffer, key: string, contentType?: string, bucketName?: string) => Promise<void>;
|
|
1151
|
+
uploadFileToStorage: (filePath: string, key: string, contentType?: string, bucketName?: string) => Promise<void>;
|
|
1152
|
+
getFromStorage?: (key: string, bucketName?: string) => Promise<Buffer>;
|
|
1153
|
+
deleteFromStorage?: (key: string, bucketName?: string) => Promise<void>;
|
|
1154
|
+
getPublicUrl?: (key: string, bucketName?: string) => string;
|
|
1155
|
+
}
|
|
1156
|
+
//#endregion
|
|
1157
|
+
//#region src/types/vision.d.ts
|
|
1158
|
+
/**
|
|
1159
|
+
* Shared vision types (engine-agnostic — no ONNX imports here).
|
|
1160
|
+
*
|
|
1161
|
+
* Consumed by @framefields/vision (the inference engine) and @framefields/framefields (the SDK).
|
|
1162
|
+
*/
|
|
1163
|
+
/**
|
|
1164
|
+
* Vision tasks and the model that serves each:
|
|
1165
|
+
* - `detect` / `segment` — RTMDet-Ins (COCO 80 boxes + instance masks, one forward pass)
|
|
1166
|
+
* - `pose` — RTMO (COCO-17 keypoints, multi-person)
|
|
1167
|
+
* - `matte` — MediaPipe Selfie Segmenter (fast person-vs-background alpha)
|
|
1168
|
+
*/
|
|
1169
|
+
type VisionTask = "detect" | "segment" | "pose" | "matte";
|
|
1170
|
+
/** Model size: `t` (tiny, fastest) · `s` (default) · `m` (most accurate). */
|
|
1171
|
+
type VisionVariant = "t" | "s" | "m";
|
|
1172
|
+
interface VisionConfig {
|
|
1173
|
+
readonly enableDetection?: boolean;
|
|
1174
|
+
readonly enableSegmentation?: boolean;
|
|
1175
|
+
readonly enablePose?: boolean;
|
|
1176
|
+
/** Fast person matte (Selfie Segmenter) alongside or instead of instance masks. */
|
|
1177
|
+
readonly enableMatte?: boolean;
|
|
1178
|
+
/** COCO class-name filter (all classes when omitted). */
|
|
1179
|
+
readonly classes?: readonly string[];
|
|
1180
|
+
/** Minimum detection score, 0..1. Default 0.3. */
|
|
1181
|
+
readonly confidence?: number;
|
|
1182
|
+
/** Model size. Default "s". */
|
|
1183
|
+
readonly variant?: VisionVariant;
|
|
1184
|
+
/** Model cache directory. Default `$FRAMEFIELDS_MODELS_DIR` or `~/.cache/framefields/models`. */
|
|
1185
|
+
readonly modelsDir?: string;
|
|
1186
|
+
/** Mirror origin for model downloads (`<baseUrl>/<filename>`). Default: pinned Hugging Face revisions. */
|
|
1187
|
+
readonly baseUrl?: string;
|
|
1188
|
+
/** Mask probability threshold (lower → fuller masks). Default 0.5. */
|
|
1189
|
+
readonly maskThreshold?: number;
|
|
1190
|
+
/** Soft-edge band around `maskThreshold`, 0..1. Default 0.05. */
|
|
1191
|
+
readonly featherRadius?: number;
|
|
1192
|
+
/** Vertical FOV (degrees) used to project landmarks into camera space. */
|
|
1193
|
+
readonly cameraFov?: number;
|
|
1194
|
+
}
|
|
1195
|
+
interface VisionNodeSpec {
|
|
1196
|
+
readonly id: string;
|
|
1197
|
+
readonly kind: "vision";
|
|
1198
|
+
readonly source?: unknown;
|
|
1199
|
+
readonly config: VisionConfig;
|
|
1200
|
+
}
|
|
1201
|
+
interface Landmark3D {
|
|
1202
|
+
readonly x: number;
|
|
1203
|
+
readonly y: number;
|
|
1204
|
+
readonly z: number;
|
|
1205
|
+
readonly visibility?: number;
|
|
1206
|
+
}
|
|
1207
|
+
type NormalizedLandmarkList = readonly Landmark3D[];
|
|
1208
|
+
interface ObjectBoundingBox {
|
|
1209
|
+
readonly originX: number;
|
|
1210
|
+
readonly originY: number;
|
|
1211
|
+
readonly width: number;
|
|
1212
|
+
readonly height: number;
|
|
1213
|
+
readonly normalizedX: number;
|
|
1214
|
+
readonly normalizedY: number;
|
|
1215
|
+
readonly normalizedWidth: number;
|
|
1216
|
+
readonly normalizedHeight: number;
|
|
1217
|
+
readonly angle?: number;
|
|
1218
|
+
}
|
|
1219
|
+
interface DetectedObject {
|
|
1220
|
+
readonly category: string;
|
|
1221
|
+
readonly score: number;
|
|
1222
|
+
readonly boundingBox: ObjectBoundingBox;
|
|
1223
|
+
readonly keypoints?: NormalizedLandmarkList;
|
|
1224
|
+
}
|
|
1225
|
+
interface TrackedObject {
|
|
1226
|
+
readonly trackId: number;
|
|
1227
|
+
readonly category: string;
|
|
1228
|
+
readonly score: number;
|
|
1229
|
+
readonly boundingBox: ObjectBoundingBox;
|
|
1230
|
+
readonly centerX: number;
|
|
1231
|
+
readonly centerY: number;
|
|
1232
|
+
readonly normalizedCenterX: number;
|
|
1233
|
+
readonly normalizedCenterY: number;
|
|
1234
|
+
readonly velocity: {
|
|
1235
|
+
readonly vx: number;
|
|
1236
|
+
readonly vy: number;
|
|
1237
|
+
};
|
|
1238
|
+
readonly speed: number;
|
|
1239
|
+
readonly age: number;
|
|
1240
|
+
readonly hits: number;
|
|
1241
|
+
readonly active: boolean;
|
|
1242
|
+
readonly isCoasting: boolean;
|
|
1243
|
+
}
|
|
1244
|
+
//#endregion
|
|
1245
|
+
//#region src/types/tensor.d.ts
|
|
1246
|
+
type TensorFormat = "r8unorm" | "r32float" | "rg16float" | "rgba16float" | "rgba8unorm";
|
|
1247
|
+
interface TensorDimensions {
|
|
1248
|
+
readonly width: number;
|
|
1249
|
+
readonly height: number;
|
|
1250
|
+
readonly channels: number;
|
|
1251
|
+
}
|
|
1252
|
+
interface OpticalFlowOptions {
|
|
1253
|
+
readonly scale?: number;
|
|
1254
|
+
readonly windowSize?: number;
|
|
1255
|
+
readonly regularization?: number;
|
|
1256
|
+
readonly outputFormat?: "rgba16float" | "rg32float";
|
|
1257
|
+
}
|
|
1258
|
+
interface DeflickerOptions {
|
|
1259
|
+
readonly blendWeight?: number | Signal<number>;
|
|
1260
|
+
readonly disocclusionThreshold?: number;
|
|
1261
|
+
readonly maxMotionPixels?: number;
|
|
1262
|
+
readonly opticalFlow?: OpticalFlowOptions;
|
|
1263
|
+
}
|
|
1264
|
+
interface NormalRelightingOptions {
|
|
1265
|
+
readonly normalMap?: GPUTexture | unknown;
|
|
1266
|
+
readonly depthScale?: number | Signal<number>;
|
|
1267
|
+
readonly roughness?: number | Signal<number>;
|
|
1268
|
+
readonly specularStrength?: number | Signal<number>;
|
|
1269
|
+
readonly metallic?: number | Signal<number>;
|
|
1270
|
+
readonly ambientIntensity?: number | Signal<number>;
|
|
1271
|
+
readonly volumetricDensity?: number | Signal<number>;
|
|
1272
|
+
}
|
|
1273
|
+
interface ControlNetConditioningOutputs {
|
|
1274
|
+
readonly canny?: GPUTexture;
|
|
1275
|
+
readonly depth?: GPUTexture;
|
|
1276
|
+
readonly normals?: GPUTexture;
|
|
1277
|
+
readonly poseSkeleton?: GPUTexture;
|
|
1278
|
+
readonly segmentationMask?: GPUTexture;
|
|
1279
|
+
readonly faceLandmarks?: GPUTexture;
|
|
1280
|
+
readonly motionVectors?: GPUTexture;
|
|
1281
|
+
readonly deflickered?: GPUTexture;
|
|
1282
|
+
}
|
|
1283
|
+
interface TensorData {
|
|
1284
|
+
readonly data: Float32Array;
|
|
1285
|
+
readonly shape: readonly number[];
|
|
1286
|
+
readonly dtype: "float32";
|
|
1287
|
+
}
|
|
1288
|
+
interface CannyOptions {
|
|
1289
|
+
readonly low?: number;
|
|
1290
|
+
readonly high?: number;
|
|
1291
|
+
readonly outputFormat?: "rgba8unorm" | "r32float";
|
|
1292
|
+
}
|
|
1293
|
+
interface DepthNormalsOptions {
|
|
1294
|
+
readonly depthQuality?: "high" | "standard";
|
|
1295
|
+
readonly depthScale?: number;
|
|
1296
|
+
readonly outputFormat?: "rgba16float" | "rgba8unorm";
|
|
1297
|
+
}
|
|
1298
|
+
interface PoseSkeletonOptions {
|
|
1299
|
+
readonly width?: number;
|
|
1300
|
+
readonly height?: number;
|
|
1301
|
+
readonly lineWidth?: number;
|
|
1302
|
+
readonly landmarks?: NormalizedLandmarkList;
|
|
1303
|
+
}
|
|
1304
|
+
interface FaceLandmarksOptions {
|
|
1305
|
+
readonly width?: number;
|
|
1306
|
+
readonly height?: number;
|
|
1307
|
+
readonly lineWidth?: number;
|
|
1308
|
+
readonly landmarks?: NormalizedLandmarkList;
|
|
1309
|
+
}
|
|
1310
|
+
interface SegmentationOptions {
|
|
1311
|
+
readonly threshold?: number;
|
|
1312
|
+
readonly feather?: number;
|
|
1313
|
+
readonly outputFormat?: "rgba8unorm" | "r8unorm";
|
|
1314
|
+
}
|
|
1315
|
+
interface TensorPipelineConfig {
|
|
1316
|
+
readonly canny?: CannyOptions;
|
|
1317
|
+
readonly depthNormals?: DepthNormalsOptions;
|
|
1318
|
+
readonly poseSkeleton?: PoseSkeletonOptions;
|
|
1319
|
+
readonly faceLandmarks?: FaceLandmarksOptions;
|
|
1320
|
+
readonly segmentation?: SegmentationOptions;
|
|
1321
|
+
readonly opticalFlow?: OpticalFlowOptions;
|
|
1322
|
+
readonly deflicker?: DeflickerOptions;
|
|
1323
|
+
}
|
|
1324
|
+
interface TensorNode {
|
|
1325
|
+
readonly id: string;
|
|
1326
|
+
readonly kind: "tensor";
|
|
1327
|
+
readonly source?: unknown;
|
|
1328
|
+
readonly config: TensorPipelineConfig;
|
|
1329
|
+
}
|
|
1330
|
+
interface MeshAudioDeformConfig {
|
|
1331
|
+
readonly audioTrackId?: string;
|
|
1332
|
+
/**
|
|
1333
|
+
* normal_extrusion pushes vertices out along their normals by the band's
|
|
1334
|
+
* energy; radial_pulse inflates the mesh from its origin on bass and
|
|
1335
|
+
* drums; harmonic_wave runs a sine along Y; twist turns each slice about
|
|
1336
|
+
* the Y axis in proportion to its height and the bass; ripple sends
|
|
1337
|
+
* concentric waves across the XY plane, struck by the drums.
|
|
1338
|
+
*/
|
|
1339
|
+
readonly mode: "radial_pulse" | "harmonic_wave" | "normal_extrusion" | "twist" | "ripple";
|
|
1340
|
+
readonly frequencyRange?: [minHz: number, maxHz: number];
|
|
1341
|
+
readonly amplitudeMultiplier?: number | Signal<number>;
|
|
1342
|
+
readonly damping?: number;
|
|
1343
|
+
}
|
|
1344
|
+
//#endregion
|
|
1345
|
+
//#region src/types/video/base-layer-schema.d.ts
|
|
1346
|
+
declare const AnimationTypeSchema: z.ZodEnum<{
|
|
1347
|
+
"fade-in": "fade-in";
|
|
1348
|
+
"fade-out": "fade-out";
|
|
1349
|
+
"slide-in-left": "slide-in-left";
|
|
1350
|
+
"slide-in-right": "slide-in-right";
|
|
1351
|
+
"slide-in-top": "slide-in-top";
|
|
1352
|
+
"slide-in-bottom": "slide-in-bottom";
|
|
1353
|
+
"zoom-in": "zoom-in";
|
|
1354
|
+
"zoom-out": "zoom-out";
|
|
1355
|
+
"rotate-cw": "rotate-cw";
|
|
1356
|
+
"rotate-ccw": "rotate-ccw";
|
|
1357
|
+
bounce: "bounce";
|
|
1358
|
+
shake: "shake";
|
|
1359
|
+
}>;
|
|
1360
|
+
type AnimationType = z.infer<typeof AnimationTypeSchema>;
|
|
1361
|
+
declare const VideoAnimationSchema: z.ZodObject<{
|
|
1362
|
+
id: z.ZodString;
|
|
1363
|
+
type: z.ZodEnum<{
|
|
1364
|
+
"fade-in": "fade-in";
|
|
1365
|
+
"fade-out": "fade-out";
|
|
1366
|
+
"slide-in-left": "slide-in-left";
|
|
1367
|
+
"slide-in-right": "slide-in-right";
|
|
1368
|
+
"slide-in-top": "slide-in-top";
|
|
1369
|
+
"slide-in-bottom": "slide-in-bottom";
|
|
1370
|
+
"zoom-in": "zoom-in";
|
|
1371
|
+
"zoom-out": "zoom-out";
|
|
1372
|
+
"rotate-cw": "rotate-cw";
|
|
1373
|
+
"rotate-ccw": "rotate-ccw";
|
|
1374
|
+
bounce: "bounce";
|
|
1375
|
+
shake: "shake";
|
|
1376
|
+
}>;
|
|
1377
|
+
value: z.ZodNumber;
|
|
1378
|
+
}, z.core.$strip>;
|
|
1379
|
+
type VideoAnimation = z.infer<typeof VideoAnimationSchema>;
|
|
1380
|
+
declare const VideoSpatialPropsSchema: z.ZodObject<{
|
|
1381
|
+
x: z.ZodDefault<z.ZodNumber>;
|
|
1382
|
+
y: z.ZodDefault<z.ZodNumber>;
|
|
1383
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
1384
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
1385
|
+
rotation: z.ZodDefault<z.ZodNumber>;
|
|
1386
|
+
scale: z.ZodDefault<z.ZodNumber>;
|
|
1387
|
+
opacity: z.ZodDefault<z.ZodNumber>;
|
|
1388
|
+
zIndex: z.ZodOptional<z.ZodNumber>;
|
|
1389
|
+
blendMode: z.ZodOptional<z.ZodEnum<{
|
|
1390
|
+
"source-over": "source-over";
|
|
1391
|
+
"source-in": "source-in";
|
|
1392
|
+
"source-out": "source-out";
|
|
1393
|
+
"source-atop": "source-atop";
|
|
1394
|
+
"destination-over": "destination-over";
|
|
1395
|
+
"destination-in": "destination-in";
|
|
1396
|
+
"destination-out": "destination-out";
|
|
1397
|
+
"destination-atop": "destination-atop";
|
|
1398
|
+
lighter: "lighter";
|
|
1399
|
+
copy: "copy";
|
|
1400
|
+
xor: "xor";
|
|
1401
|
+
multiply: "multiply";
|
|
1402
|
+
screen: "screen";
|
|
1403
|
+
overlay: "overlay";
|
|
1404
|
+
darken: "darken";
|
|
1405
|
+
lighten: "lighten";
|
|
1406
|
+
"color-dodge": "color-dodge";
|
|
1407
|
+
"color-burn": "color-burn";
|
|
1408
|
+
"hard-light": "hard-light";
|
|
1409
|
+
"soft-light": "soft-light";
|
|
1410
|
+
difference: "difference";
|
|
1411
|
+
exclusion: "exclusion";
|
|
1412
|
+
hue: "hue";
|
|
1413
|
+
saturation: "saturation";
|
|
1414
|
+
color: "color";
|
|
1415
|
+
luminosity: "luminosity";
|
|
1416
|
+
}>>;
|
|
1417
|
+
}, z.core.$strip>;
|
|
1418
|
+
declare const VideoTimingPropsSchema: z.ZodObject<{
|
|
1419
|
+
startFrame: z.ZodDefault<z.ZodNumber>;
|
|
1420
|
+
durationInMS: z.ZodOptional<z.ZodNumber>;
|
|
1421
|
+
trimStart: z.ZodOptional<z.ZodNumber>;
|
|
1422
|
+
trimEnd: z.ZodOptional<z.ZodNumber>;
|
|
1423
|
+
speed: z.ZodOptional<z.ZodNumber>;
|
|
1424
|
+
}, z.core.$strip>;
|
|
1425
|
+
declare const VideoTextPropsSchema: z.ZodObject<{
|
|
1426
|
+
text: z.ZodOptional<z.ZodString>;
|
|
1427
|
+
fontSize: z.ZodOptional<z.ZodNumber>;
|
|
1428
|
+
fontFamily: z.ZodOptional<z.ZodString>;
|
|
1429
|
+
fontStyle: z.ZodOptional<z.ZodString>;
|
|
1430
|
+
fontWeight: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
1431
|
+
fill: z.ZodOptional<z.ZodString>;
|
|
1432
|
+
align: z.ZodOptional<z.ZodString>;
|
|
1433
|
+
verticalAlign: z.ZodOptional<z.ZodString>;
|
|
1434
|
+
letterSpacing: z.ZodOptional<z.ZodNumber>;
|
|
1435
|
+
lineHeight: z.ZodOptional<z.ZodNumber>;
|
|
1436
|
+
padding: z.ZodOptional<z.ZodNumber>;
|
|
1437
|
+
stroke: z.ZodOptional<z.ZodString>;
|
|
1438
|
+
strokeWidth: z.ZodOptional<z.ZodNumber>;
|
|
1439
|
+
strokeAlign: z.ZodOptional<z.ZodEnum<{
|
|
1440
|
+
inside: "inside";
|
|
1441
|
+
center: "center";
|
|
1442
|
+
outside: "outside";
|
|
1443
|
+
}>>;
|
|
1444
|
+
textShadow: z.ZodOptional<z.ZodString>;
|
|
1445
|
+
textBackgroundColor: z.ZodOptional<z.ZodString>;
|
|
1446
|
+
shadows: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1447
|
+
color: z.ZodString;
|
|
1448
|
+
offset: z.ZodOptional<z.ZodObject<{
|
|
1449
|
+
x: z.ZodNumber;
|
|
1450
|
+
y: z.ZodNumber;
|
|
1451
|
+
}, z.core.$strip>>;
|
|
1452
|
+
blurRadius: z.ZodOptional<z.ZodNumber>;
|
|
1453
|
+
}, z.core.$strip>>>;
|
|
1454
|
+
textAnimation: z.ZodOptional<z.ZodAny>;
|
|
1455
|
+
bottomPadding: z.ZodOptional<z.ZodNumber>;
|
|
1456
|
+
maxWidth: z.ZodOptional<z.ZodNumber>;
|
|
1457
|
+
}, z.core.$strip>;
|
|
1458
|
+
declare const VideoStylePropsSchema: z.ZodObject<{
|
|
1459
|
+
backgroundColor: z.ZodOptional<z.ZodString>;
|
|
1460
|
+
borderColor: z.ZodOptional<z.ZodString>;
|
|
1461
|
+
borderWidth: z.ZodOptional<z.ZodNumber>;
|
|
1462
|
+
strokeRadius: z.ZodOptional<z.ZodNumber>;
|
|
1463
|
+
autoDimensions: z.ZodOptional<z.ZodBoolean>;
|
|
1464
|
+
}, z.core.$strip>;
|
|
1465
|
+
declare const VideoLayerTypeSchema: z.ZodEnum<{
|
|
1466
|
+
Text: "Text";
|
|
1467
|
+
Image: "Image";
|
|
1468
|
+
Video: "Video";
|
|
1469
|
+
Audio: "Audio";
|
|
1470
|
+
SVG: "SVG";
|
|
1471
|
+
Caption: "Caption";
|
|
1472
|
+
Lottie: "Lottie";
|
|
1473
|
+
GIF: "GIF";
|
|
1474
|
+
}>;
|
|
1475
|
+
type VideoLayerType = z.infer<typeof VideoLayerTypeSchema>;
|
|
1476
|
+
declare const BaseVideoLayerPropsSchema: z.ZodObject<{
|
|
1477
|
+
x: z.ZodDefault<z.ZodNumber>;
|
|
1478
|
+
y: z.ZodDefault<z.ZodNumber>;
|
|
1479
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
1480
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
1481
|
+
rotation: z.ZodDefault<z.ZodNumber>;
|
|
1482
|
+
scale: z.ZodDefault<z.ZodNumber>;
|
|
1483
|
+
opacity: z.ZodDefault<z.ZodNumber>;
|
|
1484
|
+
zIndex: z.ZodOptional<z.ZodNumber>;
|
|
1485
|
+
blendMode: z.ZodOptional<z.ZodEnum<{
|
|
1486
|
+
"source-over": "source-over";
|
|
1487
|
+
"source-in": "source-in";
|
|
1488
|
+
"source-out": "source-out";
|
|
1489
|
+
"source-atop": "source-atop";
|
|
1490
|
+
"destination-over": "destination-over";
|
|
1491
|
+
"destination-in": "destination-in";
|
|
1492
|
+
"destination-out": "destination-out";
|
|
1493
|
+
"destination-atop": "destination-atop";
|
|
1494
|
+
lighter: "lighter";
|
|
1495
|
+
copy: "copy";
|
|
1496
|
+
xor: "xor";
|
|
1497
|
+
multiply: "multiply";
|
|
1498
|
+
screen: "screen";
|
|
1499
|
+
overlay: "overlay";
|
|
1500
|
+
darken: "darken";
|
|
1501
|
+
lighten: "lighten";
|
|
1502
|
+
"color-dodge": "color-dodge";
|
|
1503
|
+
"color-burn": "color-burn";
|
|
1504
|
+
"hard-light": "hard-light";
|
|
1505
|
+
"soft-light": "soft-light";
|
|
1506
|
+
difference: "difference";
|
|
1507
|
+
exclusion: "exclusion";
|
|
1508
|
+
hue: "hue";
|
|
1509
|
+
saturation: "saturation";
|
|
1510
|
+
color: "color";
|
|
1511
|
+
luminosity: "luminosity";
|
|
1512
|
+
}>>;
|
|
1513
|
+
startFrame: z.ZodDefault<z.ZodNumber>;
|
|
1514
|
+
durationInMS: z.ZodOptional<z.ZodNumber>;
|
|
1515
|
+
trimStart: z.ZodOptional<z.ZodNumber>;
|
|
1516
|
+
trimEnd: z.ZodOptional<z.ZodNumber>;
|
|
1517
|
+
speed: z.ZodOptional<z.ZodNumber>;
|
|
1518
|
+
text: z.ZodOptional<z.ZodString>;
|
|
1519
|
+
fontSize: z.ZodOptional<z.ZodNumber>;
|
|
1520
|
+
fontFamily: z.ZodOptional<z.ZodString>;
|
|
1521
|
+
fontStyle: z.ZodOptional<z.ZodString>;
|
|
1522
|
+
fontWeight: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
1523
|
+
fill: z.ZodOptional<z.ZodString>;
|
|
1524
|
+
align: z.ZodOptional<z.ZodString>;
|
|
1525
|
+
verticalAlign: z.ZodOptional<z.ZodString>;
|
|
1526
|
+
letterSpacing: z.ZodOptional<z.ZodNumber>;
|
|
1527
|
+
lineHeight: z.ZodOptional<z.ZodNumber>;
|
|
1528
|
+
padding: z.ZodOptional<z.ZodNumber>;
|
|
1529
|
+
stroke: z.ZodOptional<z.ZodString>;
|
|
1530
|
+
strokeWidth: z.ZodOptional<z.ZodNumber>;
|
|
1531
|
+
strokeAlign: z.ZodOptional<z.ZodEnum<{
|
|
1532
|
+
inside: "inside";
|
|
1533
|
+
center: "center";
|
|
1534
|
+
outside: "outside";
|
|
1535
|
+
}>>;
|
|
1536
|
+
textShadow: z.ZodOptional<z.ZodString>;
|
|
1537
|
+
textBackgroundColor: z.ZodOptional<z.ZodString>;
|
|
1538
|
+
shadows: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1539
|
+
color: z.ZodString;
|
|
1540
|
+
offset: z.ZodOptional<z.ZodObject<{
|
|
1541
|
+
x: z.ZodNumber;
|
|
1542
|
+
y: z.ZodNumber;
|
|
1543
|
+
}, z.core.$strip>>;
|
|
1544
|
+
blurRadius: z.ZodOptional<z.ZodNumber>;
|
|
1545
|
+
}, z.core.$strip>>>;
|
|
1546
|
+
textAnimation: z.ZodOptional<z.ZodAny>;
|
|
1547
|
+
bottomPadding: z.ZodOptional<z.ZodNumber>;
|
|
1548
|
+
maxWidth: z.ZodOptional<z.ZodNumber>;
|
|
1549
|
+
backgroundColor: z.ZodOptional<z.ZodString>;
|
|
1550
|
+
borderColor: z.ZodOptional<z.ZodString>;
|
|
1551
|
+
borderWidth: z.ZodOptional<z.ZodNumber>;
|
|
1552
|
+
strokeRadius: z.ZodOptional<z.ZodNumber>;
|
|
1553
|
+
autoDimensions: z.ZodOptional<z.ZodBoolean>;
|
|
1554
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
1555
|
+
Text: "Text";
|
|
1556
|
+
Image: "Image";
|
|
1557
|
+
Video: "Video";
|
|
1558
|
+
Audio: "Audio";
|
|
1559
|
+
SVG: "SVG";
|
|
1560
|
+
Caption: "Caption";
|
|
1561
|
+
Lottie: "Lottie";
|
|
1562
|
+
GIF: "GIF";
|
|
1563
|
+
}>>;
|
|
1564
|
+
animations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1565
|
+
id: z.ZodString;
|
|
1566
|
+
type: z.ZodEnum<{
|
|
1567
|
+
"fade-in": "fade-in";
|
|
1568
|
+
"fade-out": "fade-out";
|
|
1569
|
+
"slide-in-left": "slide-in-left";
|
|
1570
|
+
"slide-in-right": "slide-in-right";
|
|
1571
|
+
"slide-in-top": "slide-in-top";
|
|
1572
|
+
"slide-in-bottom": "slide-in-bottom";
|
|
1573
|
+
"zoom-in": "zoom-in";
|
|
1574
|
+
"zoom-out": "zoom-out";
|
|
1575
|
+
"rotate-cw": "rotate-cw";
|
|
1576
|
+
"rotate-ccw": "rotate-ccw";
|
|
1577
|
+
bounce: "bounce";
|
|
1578
|
+
shake: "shake";
|
|
1579
|
+
}>;
|
|
1580
|
+
value: z.ZodNumber;
|
|
1581
|
+
}, z.core.$strip>>>;
|
|
1582
|
+
}, z.core.$strip>;
|
|
1583
|
+
type BaseVideoLayerProps = z.infer<typeof BaseVideoLayerPropsSchema>;
|
|
1584
|
+
//#endregion
|
|
1585
|
+
//#region src/types/video/layer-schema.d.ts
|
|
1586
|
+
declare const ExtendedLayerSchema: z.ZodObject<{
|
|
1587
|
+
x: z.ZodDefault<z.ZodNumber>;
|
|
1588
|
+
y: z.ZodDefault<z.ZodNumber>;
|
|
1589
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
1590
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
1591
|
+
rotation: z.ZodDefault<z.ZodNumber>;
|
|
1592
|
+
scale: z.ZodDefault<z.ZodNumber>;
|
|
1593
|
+
opacity: z.ZodDefault<z.ZodNumber>;
|
|
1594
|
+
blendMode: z.ZodOptional<z.ZodEnum<{
|
|
1595
|
+
"source-over": "source-over";
|
|
1596
|
+
"source-in": "source-in";
|
|
1597
|
+
"source-out": "source-out";
|
|
1598
|
+
"source-atop": "source-atop";
|
|
1599
|
+
"destination-over": "destination-over";
|
|
1600
|
+
"destination-in": "destination-in";
|
|
1601
|
+
"destination-out": "destination-out";
|
|
1602
|
+
"destination-atop": "destination-atop";
|
|
1603
|
+
lighter: "lighter";
|
|
1604
|
+
copy: "copy";
|
|
1605
|
+
xor: "xor";
|
|
1606
|
+
multiply: "multiply";
|
|
1607
|
+
screen: "screen";
|
|
1608
|
+
overlay: "overlay";
|
|
1609
|
+
darken: "darken";
|
|
1610
|
+
lighten: "lighten";
|
|
1611
|
+
"color-dodge": "color-dodge";
|
|
1612
|
+
"color-burn": "color-burn";
|
|
1613
|
+
"hard-light": "hard-light";
|
|
1614
|
+
"soft-light": "soft-light";
|
|
1615
|
+
difference: "difference";
|
|
1616
|
+
exclusion: "exclusion";
|
|
1617
|
+
hue: "hue";
|
|
1618
|
+
saturation: "saturation";
|
|
1619
|
+
color: "color";
|
|
1620
|
+
luminosity: "luminosity";
|
|
1621
|
+
}>>;
|
|
1622
|
+
startFrame: z.ZodDefault<z.ZodNumber>;
|
|
1623
|
+
trimStart: z.ZodOptional<z.ZodNumber>;
|
|
1624
|
+
trimEnd: z.ZodOptional<z.ZodNumber>;
|
|
1625
|
+
speed: z.ZodOptional<z.ZodNumber>;
|
|
1626
|
+
text: z.ZodOptional<z.ZodString>;
|
|
1627
|
+
fontSize: z.ZodOptional<z.ZodNumber>;
|
|
1628
|
+
fontFamily: z.ZodOptional<z.ZodString>;
|
|
1629
|
+
fontStyle: z.ZodOptional<z.ZodString>;
|
|
1630
|
+
fontWeight: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
1631
|
+
fill: z.ZodOptional<z.ZodString>;
|
|
1632
|
+
align: z.ZodOptional<z.ZodString>;
|
|
1633
|
+
verticalAlign: z.ZodOptional<z.ZodString>;
|
|
1634
|
+
letterSpacing: z.ZodOptional<z.ZodNumber>;
|
|
1635
|
+
lineHeight: z.ZodOptional<z.ZodNumber>;
|
|
1636
|
+
padding: z.ZodOptional<z.ZodNumber>;
|
|
1637
|
+
stroke: z.ZodOptional<z.ZodString>;
|
|
1638
|
+
strokeWidth: z.ZodOptional<z.ZodNumber>;
|
|
1639
|
+
strokeAlign: z.ZodOptional<z.ZodEnum<{
|
|
1640
|
+
inside: "inside";
|
|
1641
|
+
center: "center";
|
|
1642
|
+
outside: "outside";
|
|
1643
|
+
}>>;
|
|
1644
|
+
textShadow: z.ZodOptional<z.ZodString>;
|
|
1645
|
+
textBackgroundColor: z.ZodOptional<z.ZodString>;
|
|
1646
|
+
shadows: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1647
|
+
color: z.ZodString;
|
|
1648
|
+
offset: z.ZodOptional<z.ZodObject<{
|
|
1649
|
+
x: z.ZodNumber;
|
|
1650
|
+
y: z.ZodNumber;
|
|
1651
|
+
}, z.core.$strip>>;
|
|
1652
|
+
blurRadius: z.ZodOptional<z.ZodNumber>;
|
|
1653
|
+
}, z.core.$strip>>>;
|
|
1654
|
+
textAnimation: z.ZodOptional<z.ZodAny>;
|
|
1655
|
+
bottomPadding: z.ZodOptional<z.ZodNumber>;
|
|
1656
|
+
maxWidth: z.ZodOptional<z.ZodNumber>;
|
|
1657
|
+
backgroundColor: z.ZodOptional<z.ZodString>;
|
|
1658
|
+
borderColor: z.ZodOptional<z.ZodString>;
|
|
1659
|
+
borderWidth: z.ZodOptional<z.ZodNumber>;
|
|
1660
|
+
strokeRadius: z.ZodOptional<z.ZodNumber>;
|
|
1661
|
+
autoDimensions: z.ZodOptional<z.ZodBoolean>;
|
|
1662
|
+
animations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1663
|
+
id: z.ZodString;
|
|
1664
|
+
type: z.ZodEnum<{
|
|
1665
|
+
"fade-in": "fade-in";
|
|
1666
|
+
"fade-out": "fade-out";
|
|
1667
|
+
"slide-in-left": "slide-in-left";
|
|
1668
|
+
"slide-in-right": "slide-in-right";
|
|
1669
|
+
"slide-in-top": "slide-in-top";
|
|
1670
|
+
"slide-in-bottom": "slide-in-bottom";
|
|
1671
|
+
"zoom-in": "zoom-in";
|
|
1672
|
+
"zoom-out": "zoom-out";
|
|
1673
|
+
"rotate-cw": "rotate-cw";
|
|
1674
|
+
"rotate-ccw": "rotate-ccw";
|
|
1675
|
+
bounce: "bounce";
|
|
1676
|
+
shake: "shake";
|
|
1677
|
+
}>;
|
|
1678
|
+
value: z.ZodNumber;
|
|
1679
|
+
}, z.core.$strip>>>;
|
|
1680
|
+
id: z.ZodString;
|
|
1681
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1682
|
+
type: z.ZodEnum<{
|
|
1683
|
+
Text: "Text";
|
|
1684
|
+
Image: "Image";
|
|
1685
|
+
Video: "Video";
|
|
1686
|
+
Audio: "Audio";
|
|
1687
|
+
SVG: "SVG";
|
|
1688
|
+
Caption: "Caption";
|
|
1689
|
+
Lottie: "Lottie";
|
|
1690
|
+
GIF: "GIF";
|
|
1691
|
+
}>;
|
|
1692
|
+
virtualMedia: z.ZodOptional<z.ZodType<VirtualMediaData, unknown, z.core.$ZodTypeInternals<VirtualMediaData, unknown>>>;
|
|
1693
|
+
transitionIn: z.ZodOptional<z.ZodObject<{
|
|
1694
|
+
type: z.ZodEnum<{
|
|
1695
|
+
none: "none";
|
|
1696
|
+
crossfade: "crossfade";
|
|
1697
|
+
"wipe-left": "wipe-left";
|
|
1698
|
+
"wipe-right": "wipe-right";
|
|
1699
|
+
"slide-up": "slide-up";
|
|
1700
|
+
"slide-down": "slide-down";
|
|
1701
|
+
}>;
|
|
1702
|
+
durationFrames: z.ZodNumber;
|
|
1703
|
+
}, z.core.$strip>>;
|
|
1704
|
+
transitionOut: z.ZodOptional<z.ZodObject<{
|
|
1705
|
+
type: z.ZodEnum<{
|
|
1706
|
+
none: "none";
|
|
1707
|
+
crossfade: "crossfade";
|
|
1708
|
+
"wipe-left": "wipe-left";
|
|
1709
|
+
"wipe-right": "wipe-right";
|
|
1710
|
+
"slide-up": "slide-up";
|
|
1711
|
+
"slide-down": "slide-down";
|
|
1712
|
+
}>;
|
|
1713
|
+
durationFrames: z.ZodNumber;
|
|
1714
|
+
}, z.core.$strip>>;
|
|
1715
|
+
durationInMS: z.ZodNumber;
|
|
1716
|
+
maxDurationInMS: z.ZodOptional<z.ZodNumber>;
|
|
1717
|
+
src: z.ZodOptional<z.ZodString>;
|
|
1718
|
+
volume: z.ZodDefault<z.ZodNumber>;
|
|
1719
|
+
inputHandleId: z.ZodOptional<z.ZodString>;
|
|
1720
|
+
isPlaceholder: z.ZodOptional<z.ZodBoolean>;
|
|
1721
|
+
lockAspect: z.ZodOptional<z.ZodBoolean>;
|
|
1722
|
+
lockRatio: z.ZodOptional<z.ZodBoolean>;
|
|
1723
|
+
zIndex: z.ZodOptional<z.ZodNumber>;
|
|
1724
|
+
}, z.core.$strict>;
|
|
1725
|
+
type ExtendedLayer = z.infer<typeof ExtendedLayerSchema>;
|
|
1726
|
+
//#endregion
|
|
1727
|
+
//#region src/types/video/rendering-defaults.d.ts
|
|
1728
|
+
declare const DEFAULT_FPS = 60;
|
|
1729
|
+
declare const DEFAULT_DURATION_MS = 3000;
|
|
1730
|
+
declare const DEFAULT_MEDIA_DIMENSION = 1080;
|
|
1731
|
+
/** Default styling applied to new Text layers. */
|
|
1732
|
+
declare const TEXT_LAYER_DEFAULTS: Partial<ExtendedLayer>;
|
|
1733
|
+
/** Default styling applied to new Caption layers. */
|
|
1734
|
+
declare const CAPTION_LAYER_DEFAULTS: Partial<ExtendedLayer>;
|
|
1735
|
+
//#endregion
|
|
1736
|
+
//#region src/types/video/resolve-media.d.ts
|
|
1737
|
+
type MediaSourceDescriptor = {
|
|
1738
|
+
url?: string;
|
|
1739
|
+
path?: string;
|
|
1740
|
+
width?: number;
|
|
1741
|
+
height?: number;
|
|
1742
|
+
durationMs?: number;
|
|
1743
|
+
fps?: number;
|
|
1744
|
+
mimeType?: string;
|
|
1745
|
+
sampleRate?: number;
|
|
1746
|
+
channels?: number;
|
|
1747
|
+
bitDepth?: number;
|
|
1748
|
+
audioCodec?: string;
|
|
1749
|
+
audioBitrate?: number;
|
|
1750
|
+
entity?: any;
|
|
1751
|
+
};
|
|
1752
|
+
type MediaSourceInput = VirtualMediaData | string | MediaSourceDescriptor | FileData;
|
|
1753
|
+
/**
|
|
1754
|
+
* Identify the actual leaf media type (Video, Image, etc) by walking down the tree.
|
|
1755
|
+
* This can differ from getMediaType() if an operation (like Ken Burns) upgrades
|
|
1756
|
+
* an Image to a Video.
|
|
1757
|
+
*/
|
|
1758
|
+
declare function getLeafMediaType(vv: VirtualMediaData | undefined | null): DataType | undefined;
|
|
1759
|
+
/**
|
|
1760
|
+
* Resolve the MIME type of the leaf source media.
|
|
1761
|
+
*/
|
|
1762
|
+
declare function resolveMediaMimeType(vv: VirtualMediaData | undefined | null): string | undefined;
|
|
1763
|
+
/**
|
|
1764
|
+
* Create a VirtualMediaData from a FileData source or Text.
|
|
1765
|
+
* Used by Import, VideoGen, and Text nodes to wrap concrete content.
|
|
1766
|
+
*/
|
|
1767
|
+
declare function createVirtualMedia(source: MediaSourceInput, type?: DataType): VirtualMediaData;
|
|
1768
|
+
/**
|
|
1769
|
+
* Identify if a VirtualMediaData node is intended to be Video, Audio, Image, or Text.
|
|
1770
|
+
*/
|
|
1771
|
+
declare function getMediaType(vv: VirtualMediaData): DataType;
|
|
1772
|
+
/**
|
|
1773
|
+
* Append an operation to an existing VirtualMediaData (recursive).
|
|
1774
|
+
* This creates a new parent node wrapping the current one as a child.
|
|
1775
|
+
*/
|
|
1776
|
+
declare function appendOperation(vv: VirtualMediaData, operation: MediaOperation): VirtualMediaData;
|
|
1777
|
+
declare function getFileDataMetadata(filedata: {
|
|
1778
|
+
entity?: {
|
|
1779
|
+
width?: number | null;
|
|
1780
|
+
height?: number | null;
|
|
1781
|
+
duration?: number | null;
|
|
1782
|
+
fps?: number | null;
|
|
1783
|
+
mimeType?: string | null;
|
|
1784
|
+
sampleRate?: number | null;
|
|
1785
|
+
channels?: number | null;
|
|
1786
|
+
bitDepth?: number | null;
|
|
1787
|
+
audioCodec?: string | null;
|
|
1788
|
+
audioBitrate?: number | null;
|
|
1789
|
+
name?: string | null;
|
|
1790
|
+
};
|
|
1791
|
+
} | null | undefined): MediaMetadata | null;
|
|
1792
|
+
/**
|
|
1793
|
+
* Get the active metadata from the VirtualMediaData node.
|
|
1794
|
+
* Simply returns the metadata property of the node.
|
|
1795
|
+
* Supports legacy formats (sourceMeta) and extracts from source if needed.
|
|
1796
|
+
*/
|
|
1797
|
+
declare function getActiveMediaMetadata(vv: VirtualMediaData | undefined | null): MediaMetadata | null;
|
|
1798
|
+
/**
|
|
1799
|
+
* Compute the dimensions and offsets for rendering a cropped video.
|
|
1800
|
+
* Traverses the VirtualMediaData tree to find nested crops and source dimensions.
|
|
1801
|
+
*/
|
|
1802
|
+
declare function computeVideoCropRenderProps(virtualMedia: VirtualMediaData): {
|
|
1803
|
+
videoNaturalWidth: number;
|
|
1804
|
+
videoNaturalHeight: number;
|
|
1805
|
+
cropTranslatePercentageX: number;
|
|
1806
|
+
cropTranslatePercentageY: number;
|
|
1807
|
+
} | null;
|
|
1808
|
+
//#endregion
|
|
1809
|
+
//#region src/types/video/transition-schema.d.ts
|
|
1810
|
+
declare const TransitionTypeSchema: z.ZodEnum<{
|
|
1811
|
+
none: "none";
|
|
1812
|
+
crossfade: "crossfade";
|
|
1813
|
+
"wipe-left": "wipe-left";
|
|
1814
|
+
"wipe-right": "wipe-right";
|
|
1815
|
+
"slide-up": "slide-up";
|
|
1816
|
+
"slide-down": "slide-down";
|
|
1817
|
+
}>;
|
|
1818
|
+
declare const TransitionSchema: z.ZodObject<{
|
|
1819
|
+
type: z.ZodEnum<{
|
|
1820
|
+
none: "none";
|
|
1821
|
+
crossfade: "crossfade";
|
|
1822
|
+
"wipe-left": "wipe-left";
|
|
1823
|
+
"wipe-right": "wipe-right";
|
|
1824
|
+
"slide-up": "slide-up";
|
|
1825
|
+
"slide-down": "slide-down";
|
|
1826
|
+
}>;
|
|
1827
|
+
durationFrames: z.ZodNumber;
|
|
1828
|
+
}, z.core.$strip>;
|
|
1829
|
+
type TransitionType = z.infer<typeof TransitionTypeSchema>;
|
|
1830
|
+
type Transition = z.infer<typeof TransitionSchema>;
|
|
1831
|
+
//#endregion
|
|
1832
|
+
//#region src/utils/is-equal.d.ts
|
|
1833
|
+
/**
|
|
1834
|
+
* Performs a deep comparison between two values to determine if they are equivalent.
|
|
1835
|
+
* Handles primitives, objects, arrays, Dates, and NaNs.
|
|
1836
|
+
*/
|
|
1837
|
+
declare function isEqual(a: any, b: any): boolean;
|
|
1838
|
+
//#endregion
|
|
1839
|
+
//#region src/utils/result-cache.d.ts
|
|
1840
|
+
/**
|
|
1841
|
+
* Checks if a cached node result can be reused based on source fingerprint.
|
|
1842
|
+
* Returns the valid cached result, or null if the cache is stale.
|
|
1843
|
+
*/
|
|
1844
|
+
declare function checkNodeResultCache<T extends {
|
|
1845
|
+
sourceFingerprint?: string;
|
|
1846
|
+
}>(currentResult: T | undefined | null, input: unknown): T | null;
|
|
1847
|
+
/**
|
|
1848
|
+
* Creates a fresh result with a source fingerprint stamp.
|
|
1849
|
+
*/
|
|
1850
|
+
declare function stampResult<T>(result: T, input: unknown): T & {
|
|
1851
|
+
sourceFingerprint: string;
|
|
1852
|
+
};
|
|
1853
|
+
//#endregion
|
|
1854
|
+
//#region src/utils/svg.d.ts
|
|
1855
|
+
/**
|
|
1856
|
+
* Attempts to parse the width and height of an SVG from its buffer.
|
|
1857
|
+
* Falls back to viewBox ratios if explicitly defined sizes are missing.
|
|
1858
|
+
*/
|
|
1859
|
+
declare function extractSvgDimensions(buffer: Buffer): {
|
|
1860
|
+
w: number;
|
|
1861
|
+
h: number;
|
|
1862
|
+
} | null;
|
|
1863
|
+
//#endregion
|
|
1864
|
+
//#region src/utils/virtual-media.d.ts
|
|
1865
|
+
/**
|
|
1866
|
+
* Generates a fingerprint for the given data.
|
|
1867
|
+
*/
|
|
1868
|
+
declare function getFingerprint(data: unknown): string;
|
|
1869
|
+
/**
|
|
1870
|
+
* Generates a version-aware fingerprint for render caching.
|
|
1871
|
+
* Includes app version so cached renders are invalidated on version bumps.
|
|
1872
|
+
*/
|
|
1873
|
+
declare function getRenderFingerprint(data: unknown, appVersion: string, extra?: Record<string, unknown>): string;
|
|
1874
|
+
/**
|
|
1875
|
+
* Checks if data is VirtualMediaData.
|
|
1876
|
+
*/
|
|
1877
|
+
declare function isVirtualMediaData(data: any): data is VirtualMediaData;
|
|
1878
|
+
/**
|
|
1879
|
+
* Checks if the virtual media is just a raw source without any significant operations
|
|
1880
|
+
* that would require a rendering step (like transformations, trimming, or effects).
|
|
1881
|
+
*/
|
|
1882
|
+
declare function hasOnlySingleSource(data: any): boolean;
|
|
1883
|
+
/**
|
|
1884
|
+
* Finds the source asset in a virtual media tree.
|
|
1885
|
+
*/
|
|
1886
|
+
declare function findSourceAsset(vm: VirtualMediaData): FileData | null;
|
|
1887
|
+
//#endregion
|
|
1888
|
+
//#endregion
|
|
1889
|
+
//#region ../webgpu-renderers/dist/index.d.mts
|
|
1890
|
+
interface CachedPipelineAndState {
|
|
1891
|
+
pipeline: GPUComputePipeline;
|
|
1892
|
+
stateBuffer: GPUBuffer;
|
|
1893
|
+
activeSignalsKey: string;
|
|
1894
|
+
inputBuffer?: GPUBuffer;
|
|
1895
|
+
outputBuffer?: GPUBuffer;
|
|
1896
|
+
uniformBuffer?: GPUBuffer;
|
|
1897
|
+
allocatedSamples?: number;
|
|
1898
|
+
allocatedChannels?: number;
|
|
1899
|
+
allocatedUniformsFloatCount?: number;
|
|
1900
|
+
_reverbStateInitialized?: boolean;
|
|
1901
|
+
}
|
|
1902
|
+
declare class WebGPUAudioProcessor {
|
|
1903
|
+
private static devicePipelineCache;
|
|
1904
|
+
private static getDeviceCache;
|
|
1905
|
+
static getCache(device: GPUDevice, renderId: string | undefined, nodeId: string, activeSignalsKey?: string, stateFloatCount?: number): CachedPipelineAndState | undefined;
|
|
1906
|
+
static clearCache(renderId: string, device?: GPUDevice): void;
|
|
1907
|
+
static process(device: GPUDevice, nodeId: string, channels: Float32Array[], _sampleRate: number, virtualMedia: VirtualMediaData, frame: number, fps: number, shaderTemplate: (params: {
|
|
1908
|
+
customSignalWGSL: string;
|
|
1909
|
+
makeupGainModulation: string;
|
|
1910
|
+
}) => string, getUniforms: (t: number) => number[], uniformsFloatCount: number, stateFloatCount?: number, renderId?: string, isStatic?: boolean, elapsedMs?: number, durationMs?: number, initialState?: Float32Array, stateUpdate?: Float32Array, paramOrder?: string[]): Promise<void>;
|
|
1911
|
+
}
|
|
1912
|
+
//#endregion
|
|
1913
|
+
//#region src/audio/audio-latent-engine.d.ts
|
|
1914
|
+
/**
|
|
1915
|
+
* @file audio-latent-engine.ts
|
|
1916
|
+
* Real-time Audio Latent & Spectral Vector Engine for 3D Mesh Deformation.
|
|
1917
|
+
* Implements 2048-point Hann-windowed Radix-2 STFT, 1024-band frequency spectrum calculation,
|
|
1918
|
+
* multi-band latent energy extraction (bass, drum transient flux, vocal formant),
|
|
1919
|
+
* and WebGPU AudioLatentBuffer storage packing.
|
|
1920
|
+
*/
|
|
1921
|
+
interface AudioLatentData {
|
|
1922
|
+
/** 1024 positive frequency bin magnitudes [0, 1023] normalized */
|
|
1923
|
+
fftBins: Float32Array;
|
|
1924
|
+
/** Normalized low-frequency energy (20 - 150 Hz sub-bass / kick envelope) */
|
|
1925
|
+
bassEnergy: number;
|
|
1926
|
+
/** Percussive transient attack / spectral flux delta */
|
|
1927
|
+
drumTransient: number;
|
|
1928
|
+
/** Mid-frequency speech / melody formant presence (300 - 3400 Hz) */
|
|
1929
|
+
vocalEnergy: number;
|
|
1930
|
+
/** Frame timestamp in milliseconds */
|
|
1931
|
+
timeMs: number;
|
|
1932
|
+
}
|
|
1933
|
+
/**
|
|
1934
|
+
* Fast Audio Latent and Spectral Vector Processor.
|
|
1935
|
+
*/
|
|
1936
|
+
declare class AudioLatentEngine {
|
|
1937
|
+
private tempReal;
|
|
1938
|
+
private tempImag;
|
|
1939
|
+
private previousBins;
|
|
1940
|
+
/**
|
|
1941
|
+
* Extracts 1024-band FFT and audio latent energies at a specific playback time.
|
|
1942
|
+
*/
|
|
1943
|
+
extractAtTime(channels: Float32Array[], sampleRate: number, timeSec: number): AudioLatentData;
|
|
1944
|
+
/**
|
|
1945
|
+
* Packs AudioLatentData into a Float32Array suitable for WebGPU storage buffer upload.
|
|
1946
|
+
* Struct layout:
|
|
1947
|
+
* 0..1023: fftBins (array<f32, 1024>)
|
|
1948
|
+
* 1024: bassEnergy
|
|
1949
|
+
* 1025: drumTransient
|
|
1950
|
+
* 1026: vocalEnergy
|
|
1951
|
+
* 1027: timeMs
|
|
1952
|
+
*/
|
|
1953
|
+
static packBufferData(data: AudioLatentData): Float32Array;
|
|
1954
|
+
/**
|
|
1955
|
+
* Creates a WebGPU GPUBuffer initialized with AudioLatentData.
|
|
1956
|
+
*/
|
|
1957
|
+
static createGpuBuffer(device: GPUDevice, data?: AudioLatentData): GPUBuffer;
|
|
1958
|
+
/**
|
|
1959
|
+
* Updates an existing WebGPU AudioLatentBuffer with new frame data.
|
|
1960
|
+
*/
|
|
1961
|
+
static updateGpuBuffer(device: GPUDevice, buffer: GPUBuffer, data: AudioLatentData): void;
|
|
1962
|
+
}
|
|
1963
|
+
/**
|
|
1964
|
+
* Cache for a full audio track timeline providing O(1) frame lookup during video rendering.
|
|
1965
|
+
*/
|
|
1966
|
+
declare class AudioLatentTrackCache {
|
|
1967
|
+
readonly channels: Float32Array[];
|
|
1968
|
+
readonly sampleRate: number;
|
|
1969
|
+
readonly fps: number;
|
|
1970
|
+
readonly totalFrames: number;
|
|
1971
|
+
private frames;
|
|
1972
|
+
private gpuBuffers;
|
|
1973
|
+
constructor(channels: Float32Array[], sampleRate: number, fps: number, totalFrames: number);
|
|
1974
|
+
getFrameData(frame: number): AudioLatentData;
|
|
1975
|
+
getGpuBuffer(device: GPUDevice, frame: number): GPUBuffer;
|
|
1976
|
+
}
|
|
1977
|
+
//#endregion
|
|
1978
|
+
//#region src/renderer2d/transform-stack.d.ts
|
|
1979
|
+
declare class TransformStack {
|
|
1980
|
+
private stack;
|
|
1981
|
+
push(matrix: DOMMatrix): void;
|
|
1982
|
+
pop(): void;
|
|
1983
|
+
getCurrent(): DOMMatrix;
|
|
1984
|
+
packIntoBuffer(bufferData: Float32Array, opacity: number, surfaceWidth: number, surfaceHeight: number, localOverride?: DOMMatrix, customParam?: number): void;
|
|
1985
|
+
destroy(): void;
|
|
1986
|
+
}
|
|
1987
|
+
//#endregion
|
|
1988
|
+
//#region src/slug/slug-loader.d.ts
|
|
1989
|
+
interface SlugCodePoint {
|
|
1990
|
+
codePoint: number;
|
|
1991
|
+
width: number;
|
|
1992
|
+
height: number;
|
|
1993
|
+
advanceWidth: number;
|
|
1994
|
+
bearingX: number;
|
|
1995
|
+
bearingY: number;
|
|
1996
|
+
bandCount: number;
|
|
1997
|
+
bandDimX: number;
|
|
1998
|
+
bandDimY: number;
|
|
1999
|
+
bandsTexCoordX: number;
|
|
2000
|
+
bandsTexCoordY: number;
|
|
2001
|
+
}
|
|
2002
|
+
interface SlugFont {
|
|
2003
|
+
codePoints: Map<number, SlugCodePoint>;
|
|
2004
|
+
curvesTex: GPUTexture;
|
|
2005
|
+
bandsTex: GPUTexture;
|
|
2006
|
+
ascender: number;
|
|
2007
|
+
descender: number;
|
|
2008
|
+
lineGap: number;
|
|
2009
|
+
unitsPerEm: number;
|
|
2010
|
+
fontFamily?: string;
|
|
2011
|
+
hasTrueWeight?: boolean;
|
|
2012
|
+
weight?: number;
|
|
2013
|
+
}
|
|
2014
|
+
//#endregion
|
|
2015
|
+
//#region src/slug/slug-pipeline.d.ts
|
|
2016
|
+
/** The glyphs one Slug draw would have issued, kept to be drawn elsewhere. */
|
|
2017
|
+
interface SlugGlyphBatch {
|
|
2018
|
+
font: SlugFont;
|
|
2019
|
+
/** 24 floats per glyph, as the Slug vertex shaders read them */
|
|
2020
|
+
instances: Float32Array;
|
|
2021
|
+
instanceCount: number;
|
|
2022
|
+
opacity: number;
|
|
2023
|
+
/** Synthetic italic shear */
|
|
2024
|
+
slant: number;
|
|
2025
|
+
/** Paragraph space to target pixels, as the 2D affine [a, b, c, d, e, f] */
|
|
2026
|
+
transform: [number, number, number, number, number, number];
|
|
2027
|
+
}
|
|
2028
|
+
declare class SlugPipeline {
|
|
2029
|
+
private device;
|
|
2030
|
+
private pipeline;
|
|
2031
|
+
private uniformLayout;
|
|
2032
|
+
private textureLayout;
|
|
2033
|
+
private uniformPool;
|
|
2034
|
+
private instancePool;
|
|
2035
|
+
private uniformBindGroupCache;
|
|
2036
|
+
private uniformData;
|
|
2037
|
+
private captured;
|
|
2038
|
+
constructor(device: GPUDevice, format: GPUTextureFormat);
|
|
2039
|
+
resetPools(): void;
|
|
2040
|
+
/**
|
|
2041
|
+
* Record glyph draws instead of issuing them, until endCapture: a 3D text
|
|
2042
|
+
* layer hands its glyphs to the 3D pass rather than rasterizing them.
|
|
2043
|
+
*/
|
|
2044
|
+
beginCapture(): void;
|
|
2045
|
+
endCapture(): SlugGlyphBatch[];
|
|
2046
|
+
draw(pass: GPURenderPassEncoder, transformStack: TransformStack, font: SlugFont, instanceData: Float32Array, instanceCount: number, _color: Color | string, surfaceWidth: number, surfaceHeight: number, opts?: DrawOpts): void;
|
|
2047
|
+
/** Draw captured batches into a 2D pass, with the transforms they were captured under. */
|
|
2048
|
+
drawBatches(pass: GPURenderPassEncoder, batches: SlugGlyphBatch[], surfaceWidth: number, surfaceHeight: number): void;
|
|
2049
|
+
private encode;
|
|
2050
|
+
destroy(): void;
|
|
2051
|
+
}
|
|
2052
|
+
//#endregion
|
|
2053
|
+
//#region src/renderer2d/bind-group-cache.d.ts
|
|
2054
|
+
declare class BindGroupCache {
|
|
2055
|
+
private cache;
|
|
2056
|
+
private dualCache;
|
|
2057
|
+
getBindGroup(device: GPUDevice, layout: GPUBindGroupLayout, texture: GPUTexture, sampler: GPUSampler): GPUBindGroup;
|
|
2058
|
+
getCompositeBindGroup(device: GPUDevice, layout: GPUBindGroupLayout, baseTexture: GPUTexture, overlayTexture: GPUTexture, sampler: GPUSampler): GPUBindGroup;
|
|
2059
|
+
destroy(): void;
|
|
2060
|
+
}
|
|
2061
|
+
//#endregion
|
|
2062
|
+
//#region src/renderer2d/clip-stack.d.ts
|
|
2063
|
+
interface ScissorEntry {
|
|
2064
|
+
rect: Rect;
|
|
2065
|
+
surfaceWidth?: number;
|
|
2066
|
+
surfaceHeight?: number;
|
|
2067
|
+
}
|
|
2068
|
+
//#endregion
|
|
2069
|
+
//#region src/renderer2d/sampler-cache.d.ts
|
|
2070
|
+
interface SamplerDescriptor {
|
|
2071
|
+
magFilter?: GPUFilterMode;
|
|
2072
|
+
minFilter?: GPUFilterMode;
|
|
2073
|
+
mipmapFilter?: GPUMipmapFilterMode;
|
|
2074
|
+
addressModeU?: GPUAddressMode;
|
|
2075
|
+
addressModeV?: GPUAddressMode;
|
|
2076
|
+
maxAnisotropy?: number;
|
|
2077
|
+
}
|
|
2078
|
+
declare class SamplerCache {
|
|
2079
|
+
private samplers;
|
|
2080
|
+
private lru;
|
|
2081
|
+
private maxCapacity;
|
|
2082
|
+
constructor(maxCapacity?: number);
|
|
2083
|
+
getSampler(device: GPUDevice, desc?: SamplerDescriptor): GPUSampler;
|
|
2084
|
+
destroy(): void;
|
|
2085
|
+
}
|
|
2086
|
+
//#endregion
|
|
2087
|
+
//#region src/renderer2d/effect-pipeline.d.ts
|
|
2088
|
+
declare class EffectPipeline {
|
|
2089
|
+
private device;
|
|
2090
|
+
private compositeUniformLayout;
|
|
2091
|
+
private dualTextureLayout;
|
|
2092
|
+
private motionBlurUniformLayout;
|
|
2093
|
+
private singleTextureLayout;
|
|
2094
|
+
private compositePipeline;
|
|
2095
|
+
private motionBlurPipeline;
|
|
2096
|
+
private compositePool;
|
|
2097
|
+
private motionBlurPool;
|
|
2098
|
+
private texturePool;
|
|
2099
|
+
private compositeUniformBindGroupCache;
|
|
2100
|
+
private motionBlurUniformBindGroupCache;
|
|
2101
|
+
private compositeData;
|
|
2102
|
+
private motionBlurData;
|
|
2103
|
+
constructor(device: GPUDevice, format: GPUTextureFormat);
|
|
2104
|
+
resetPools(): void;
|
|
2105
|
+
getTexture(device: GPUDevice, width: number, height: number, format: GPUTextureFormat, exclude?: GPUTexture | GPUTexture[]): GPUTexture;
|
|
2106
|
+
getBuffer(device: GPUDevice, data: ArrayBufferView): GPUBuffer;
|
|
2107
|
+
composite(encoder: GPUCommandEncoder, bindGroupCache: BindGroupCache, samplerCache: SamplerCache, baseTex: GPUTexture, overlayTex: GPUTexture, mode: BlendMode, format: GPUTextureFormat, exclude?: GPUTexture | GPUTexture[]): GPUTexture;
|
|
2108
|
+
applyMotionBlur(encoder: GPUCommandEncoder, bindGroupCache: BindGroupCache, samplerCache: SamplerCache, sourceTex: GPUTexture, vx: number, vy: number, shutterAngle: number | undefined, samples: number | undefined, format: GPUTextureFormat, exclude?: GPUTexture | GPUTexture[]): GPUTexture;
|
|
2109
|
+
destroy(): void;
|
|
2110
|
+
}
|
|
2111
|
+
//#endregion
|
|
2112
|
+
//#region src/renderer2d/path-geometry.d.ts
|
|
2113
|
+
interface Point {
|
|
2114
|
+
x: number;
|
|
2115
|
+
y: number;
|
|
2116
|
+
}
|
|
2117
|
+
interface PathSegment {
|
|
2118
|
+
p0: Point;
|
|
2119
|
+
p1: Point;
|
|
2120
|
+
}
|
|
2121
|
+
/**
|
|
2122
|
+
* Sample a cubic bezier curve into linear segments.
|
|
2123
|
+
*/
|
|
2124
|
+
|
|
2125
|
+
type ShapeType = "rect" | "circle" | "ellipse" | "polygon" | "star" | "arrow" | "path";
|
|
2126
|
+
interface ShapeGeometryConfig {
|
|
2127
|
+
shapeType: ShapeType;
|
|
2128
|
+
width: number;
|
|
2129
|
+
height: number;
|
|
2130
|
+
path?: string;
|
|
2131
|
+
cornerRadius?: number;
|
|
2132
|
+
starPoints?: number;
|
|
2133
|
+
starInnerRadiusRatio?: number;
|
|
2134
|
+
polygonSides?: number;
|
|
2135
|
+
arrowHeadWidth?: number;
|
|
2136
|
+
arrowHeadLength?: number;
|
|
2137
|
+
arrowShaftWidth?: number;
|
|
2138
|
+
}
|
|
2139
|
+
//#endregion
|
|
2140
|
+
//#region src/renderer2d/path-pipeline.d.ts
|
|
2141
|
+
interface PathDrawOpts extends DrawOpts {
|
|
2142
|
+
trimStart?: number;
|
|
2143
|
+
trimEnd?: number;
|
|
2144
|
+
trimOffset?: number;
|
|
2145
|
+
strokeLineCap?: "round" | "butt" | "square";
|
|
2146
|
+
strokeDashArray?: number[];
|
|
2147
|
+
strokeDashOffset?: number;
|
|
2148
|
+
}
|
|
2149
|
+
declare class PathPipeline {
|
|
2150
|
+
private device;
|
|
2151
|
+
private pipeline;
|
|
2152
|
+
private maxPipeline;
|
|
2153
|
+
private uniformLayout;
|
|
2154
|
+
private uniformPool;
|
|
2155
|
+
private vertexPool;
|
|
2156
|
+
private uniformBindGroupCache;
|
|
2157
|
+
private scratchData;
|
|
2158
|
+
constructor(device: GPUDevice, format: GPUTextureFormat);
|
|
2159
|
+
resetPools(): void;
|
|
2160
|
+
drawPath(pass: GPURenderPassEncoder, transformStack: TransformStack, pathStr: string, color: Color | string, strokeWidth: number, surfaceWidth: number, surfaceHeight: number, opts?: PathDrawOpts): void;
|
|
2161
|
+
drawSegments(pass: GPURenderPassEncoder, transformStack: TransformStack, segments: PathSegment[], color: Color | string, strokeWidth: number, surfaceWidth: number, surfaceHeight: number, opts?: PathDrawOpts): void;
|
|
2162
|
+
private drawSegment;
|
|
2163
|
+
destroy(): void;
|
|
2164
|
+
}
|
|
2165
|
+
//#endregion
|
|
2166
|
+
//#region src/renderer2d/quad-pipeline.d.ts
|
|
2167
|
+
declare class QuadPipeline {
|
|
2168
|
+
private device;
|
|
2169
|
+
private pipeline;
|
|
2170
|
+
private uniformLayout;
|
|
2171
|
+
private textureLayout;
|
|
2172
|
+
private uniformPool;
|
|
2173
|
+
private vertexPool;
|
|
2174
|
+
private uniformBindGroupCache;
|
|
2175
|
+
private uniformData;
|
|
2176
|
+
private vertexData;
|
|
2177
|
+
constructor(device: GPUDevice, format: GPUTextureFormat);
|
|
2178
|
+
resetPools(): void;
|
|
2179
|
+
draw(pass: GPURenderPassEncoder, bindGroupCache: BindGroupCache, transformStack: TransformStack, texture: GPUTexture, sampler: GPUSampler, src: Rect, dst: Rect, surfaceWidth: number, surfaceHeight: number, opts?: DrawOpts): void;
|
|
2180
|
+
destroy(): void;
|
|
2181
|
+
}
|
|
2182
|
+
//#endregion
|
|
2183
|
+
//#region src/renderer2d/shape-fill-pipeline.d.ts
|
|
2184
|
+
type ShapeFillType = "solid" | "linear" | "radial" | "none";
|
|
2185
|
+
interface ShapeFillConfig {
|
|
2186
|
+
type?: ShapeFillType;
|
|
2187
|
+
color?: Color | string;
|
|
2188
|
+
color2?: Color | string;
|
|
2189
|
+
startX?: number;
|
|
2190
|
+
startY?: number;
|
|
2191
|
+
endX?: number;
|
|
2192
|
+
endY?: number;
|
|
2193
|
+
cx?: number;
|
|
2194
|
+
cy?: number;
|
|
2195
|
+
radius?: number;
|
|
2196
|
+
}
|
|
2197
|
+
declare class ShapeFillPipeline {
|
|
2198
|
+
private device;
|
|
2199
|
+
private pipeline;
|
|
2200
|
+
private uniformLayout;
|
|
2201
|
+
private uniformPool;
|
|
2202
|
+
private vertexPool;
|
|
2203
|
+
private uniformData;
|
|
2204
|
+
constructor(device: GPUDevice, format: GPUTextureFormat);
|
|
2205
|
+
resetPools(): void;
|
|
2206
|
+
draw(pass: GPURenderPassEncoder, transformStack: TransformStack, vertices: Float32Array, fill: ShapeFillConfig, bounds: Rect, surfaceWidth: number, surfaceHeight: number, opts?: DrawOpts): void;
|
|
2207
|
+
destroy(): void;
|
|
2208
|
+
}
|
|
2209
|
+
//#endregion
|
|
2210
|
+
//#region src/renderer2d/solid-pipeline.d.ts
|
|
2211
|
+
declare class SolidPipeline {
|
|
2212
|
+
private device;
|
|
2213
|
+
private pipeline;
|
|
2214
|
+
private uniformLayout;
|
|
2215
|
+
private uniformPool;
|
|
2216
|
+
private vertexPool;
|
|
2217
|
+
private uniformBindGroupCache;
|
|
2218
|
+
private uniformData;
|
|
2219
|
+
private vertexData;
|
|
2220
|
+
constructor(device: GPUDevice, format: GPUTextureFormat);
|
|
2221
|
+
resetPools(): void;
|
|
2222
|
+
draw(pass: GPURenderPassEncoder, transformStack: TransformStack, rect: Rect, color: Color | string, surfaceWidth: number, surfaceHeight: number, cornerRadius?: number, opts?: DrawOpts): void;
|
|
2223
|
+
destroy(): void;
|
|
2224
|
+
}
|
|
2225
|
+
//#endregion
|
|
2226
|
+
//#region src/renderer2d/index.d.ts
|
|
2227
|
+
interface Rect {
|
|
2228
|
+
x: number;
|
|
2229
|
+
y: number;
|
|
2230
|
+
width: number;
|
|
2231
|
+
height: number;
|
|
2232
|
+
}
|
|
2233
|
+
interface RRect {
|
|
2234
|
+
rect: Rect;
|
|
2235
|
+
rx: number;
|
|
2236
|
+
ry: number;
|
|
2237
|
+
}
|
|
2238
|
+
interface Color {
|
|
2239
|
+
r: number;
|
|
2240
|
+
g: number;
|
|
2241
|
+
b: number;
|
|
2242
|
+
a: number;
|
|
2243
|
+
}
|
|
2244
|
+
type BlendMode = "normal" | "multiply" | "screen" | "overlay" | "darken" | "lighten" | "color-dodge" | "color-burn" | "hard-light" | "soft-light" | "difference" | "exclusion" | "hue" | "saturation" | "color" | "luminosity" | "mask-in" | "mask-out" | "source-over" | "source-in" | "source-out" | "source-atop" | "destination-over" | "destination-in" | "destination-out" | "destination-atop" | "lighter" | "copy" | "xor";
|
|
2245
|
+
interface DrawOpts {
|
|
2246
|
+
opacity?: number;
|
|
2247
|
+
blendMode?: GPUBlendFactor | BlendMode;
|
|
2248
|
+
transform?: DOMMatrix;
|
|
2249
|
+
customParam?: number;
|
|
2250
|
+
}
|
|
2251
|
+
interface ClipPath {
|
|
2252
|
+
path: string;
|
|
2253
|
+
}
|
|
2254
|
+
declare class Renderer2D {
|
|
2255
|
+
private device;
|
|
2256
|
+
private transformStack;
|
|
2257
|
+
private clipStack;
|
|
2258
|
+
quadPipeline: QuadPipeline;
|
|
2259
|
+
solidPipeline: SolidPipeline;
|
|
2260
|
+
shapeFillPipeline: ShapeFillPipeline;
|
|
2261
|
+
pathPipeline: PathPipeline;
|
|
2262
|
+
effectPipeline: EffectPipeline;
|
|
2263
|
+
slugPipeline: SlugPipeline;
|
|
2264
|
+
bindGroupCache: BindGroupCache;
|
|
2265
|
+
samplerCache: SamplerCache;
|
|
2266
|
+
format: GPUTextureFormat;
|
|
2267
|
+
isDestroyed: boolean;
|
|
2268
|
+
/**
|
|
2269
|
+
* Non-glyph draws issued so far. A 3D text layer compares it across its
|
|
2270
|
+
* content to learn whether anything besides captured glyphs (a backdrop,
|
|
2271
|
+
* an emoji) landed in its texture.
|
|
2272
|
+
*/
|
|
2273
|
+
rasterDrawCount: number;
|
|
2274
|
+
private surfaceWidth;
|
|
2275
|
+
private surfaceHeight;
|
|
2276
|
+
private lastEncoder;
|
|
2277
|
+
constructor(device: GPUDevice, format: GPUTextureFormat);
|
|
2278
|
+
beginFrame(encoder: GPUCommandEncoder, targetView: GPUTextureView, clearColor: GPUColor | undefined, surfaceWidth: number, surfaceHeight: number, loadOp?: GPULoadOp): GPURenderPassEncoder;
|
|
2279
|
+
endFrame(_encoder: GPUCommandEncoder): void;
|
|
2280
|
+
resetPools(): void;
|
|
2281
|
+
drawTexture(pass: GPURenderPassEncoder, tex: GPUTexture, dst: Rect, opts?: DrawOpts): void;
|
|
2282
|
+
drawTextureRegion(pass: GPURenderPassEncoder, tex: GPUTexture, src: Rect, dst: Rect, opts?: DrawOpts): void;
|
|
2283
|
+
drawRect(pass: GPURenderPassEncoder, rect: Rect, color: Color | string, cornerRadius?: number | DrawOpts, opts?: DrawOpts): void;
|
|
2284
|
+
drawPath(pass: GPURenderPassEncoder, pathStr: string, color: Color | string, strokeWidth: number, opts?: PathDrawOpts): void;
|
|
2285
|
+
drawShapeFill(pass: GPURenderPassEncoder, vertices: Float32Array, fill: ShapeFillConfig, bounds: Rect, opts?: DrawOpts): void;
|
|
2286
|
+
drawShape(pass: GPURenderPassEncoder, config: ShapeGeometryConfig, fill?: ShapeFillConfig, stroke?: {
|
|
2287
|
+
color?: Color | string;
|
|
2288
|
+
width?: number;
|
|
2289
|
+
cap?: "round" | "butt" | "square";
|
|
2290
|
+
trimStart?: number;
|
|
2291
|
+
trimEnd?: number;
|
|
2292
|
+
trimOffset?: number;
|
|
2293
|
+
dashArray?: number[];
|
|
2294
|
+
dashOffset?: number;
|
|
2295
|
+
}, opts?: DrawOpts): void;
|
|
2296
|
+
drawRRect(pass: GPURenderPassEncoder, rrect: RRect, color: Color | string, opts?: DrawOpts): void;
|
|
2297
|
+
getTemporaryTexture(width: number, height: number, exclude?: GPUTexture | GPUTexture[]): GPUTexture;
|
|
2298
|
+
getTemporaryBuffer(data: ArrayBufferView): GPUBuffer;
|
|
2299
|
+
composite(encoder: GPUCommandEncoder, base: GPUTexture, overlay: GPUTexture, mode: BlendMode, exclude?: GPUTexture | GPUTexture[]): GPUTexture;
|
|
2300
|
+
applyMotionBlur(encoder: GPUCommandEncoder, sourceTex: GPUTexture, vx: number, vy: number, shutterAngle?: number, samples?: number, exclude?: GPUTexture | GPUTexture[]): GPUTexture;
|
|
2301
|
+
getCurrentTransform(): DOMMatrix;
|
|
2302
|
+
getTransformStack(): TransformStack;
|
|
2303
|
+
getSurfaceWidth(): number;
|
|
2304
|
+
getSurfaceHeight(): number;
|
|
2305
|
+
pushIdentity(): void;
|
|
2306
|
+
pushTransform(matrix: DOMMatrix): void;
|
|
2307
|
+
popTransform(): void;
|
|
2308
|
+
pushScissor(rect: Rect): void;
|
|
2309
|
+
pushScissorLocal(rect: Rect): void;
|
|
2310
|
+
popScissor(): void;
|
|
2311
|
+
suspendScissors(): ScissorEntry[];
|
|
2312
|
+
resumeScissors(saved: ScissorEntry[]): void;
|
|
2313
|
+
pushStencilClip(path: ClipPath): void;
|
|
2314
|
+
popStencilClip(): void;
|
|
2315
|
+
destroy(): void;
|
|
2316
|
+
}
|
|
2317
|
+
//#endregion
|
|
2318
|
+
//#region src/color.d.ts
|
|
2319
|
+
/**
|
|
2320
|
+
* Parse any CSS color string into a normalized {r,g,b,a} Color
|
|
2321
|
+
* with channel values in [0,1].
|
|
2322
|
+
*
|
|
2323
|
+
* Supports:
|
|
2324
|
+
* - Hex: #RGB, #RGBA, #RRGGBB, #RRGGBBAA
|
|
2325
|
+
* - Functional: rgb(r,g,b), rgba(r,g,b,a)
|
|
2326
|
+
* - Named: black, white, red, green, blue, yellow, transparent, etc.
|
|
2327
|
+
* - Color objects pass through unchanged.
|
|
2328
|
+
*
|
|
2329
|
+
* Returns `{ r: 0, g: 0, b: 0, a: 0 }` (transparent black) for
|
|
2330
|
+
* null/undefined/unrecognised input.
|
|
2331
|
+
*/
|
|
2332
|
+
|
|
2333
|
+
declare const ensureDevice: (opts?: GPURequestAdapterOptions) => Promise<GPUDevice>;
|
|
2334
|
+
//#endregion
|
|
2335
|
+
//#region src/headless/init.d.ts
|
|
2336
|
+
declare function initHeadlessWebGPU(): Promise<void>;
|
|
2337
|
+
//#endregion
|
|
2338
|
+
//#region src/headless-font-loader.d.ts
|
|
2339
|
+
|
|
2340
|
+
//#endregion
|
|
2341
|
+
//#region src/input-store.d.ts
|
|
2342
|
+
declare class InputStore {
|
|
2343
|
+
private store;
|
|
2344
|
+
acquire(url: string): Promise<Input>;
|
|
2345
|
+
release(url: string): void;
|
|
2346
|
+
}
|
|
2347
|
+
declare const inputStore: InputStore;
|
|
2348
|
+
//#endregion
|
|
2349
|
+
//#region src/lut-store.d.ts
|
|
2350
|
+
interface GPUModelLut {
|
|
2351
|
+
texture: GPUTexture;
|
|
2352
|
+
type: "1D" | "3D";
|
|
2353
|
+
size: number;
|
|
2354
|
+
vertexBuffer: GPUBuffer;
|
|
2355
|
+
vertexCount: number;
|
|
2356
|
+
}
|
|
2357
|
+
interface RawLutData {
|
|
2358
|
+
points: Array<[number, number, number]>;
|
|
2359
|
+
size: number;
|
|
2360
|
+
type: "1D" | "3D";
|
|
2361
|
+
}
|
|
2362
|
+
declare class LutStore {
|
|
2363
|
+
private deviceCaches;
|
|
2364
|
+
private devicePromises;
|
|
2365
|
+
private rawDataCache;
|
|
2366
|
+
private rawDataPromises;
|
|
2367
|
+
private listeners;
|
|
2368
|
+
onChange(listener: (key: string) => void): () => void;
|
|
2369
|
+
private emit;
|
|
2370
|
+
getAnyMatching(prefix: string, device: GPUDevice): GPUModelLut | undefined;
|
|
2371
|
+
private getOrCreateRawDataPromise;
|
|
2372
|
+
rejectRawDataPromise(key: string, error: any): void;
|
|
2373
|
+
private getCache;
|
|
2374
|
+
private getPromises;
|
|
2375
|
+
get(key: string, device: GPUDevice): GPUModelLut | undefined;
|
|
2376
|
+
set(key: string, device: GPUDevice, lut: GPUModelLut): void;
|
|
2377
|
+
/** Get cached raw (device-independent) data for a key. */
|
|
2378
|
+
getRawData(key: string): RawLutData | undefined;
|
|
2379
|
+
/** Get any available raw LUT data from cache. */
|
|
2380
|
+
getAnyRawData(): RawLutData | undefined;
|
|
2381
|
+
createOrUpdate(key: string, device: GPUDevice, points: Array<[number, number, number]>, size: number, type: "1D" | "3D"): GPUModelLut;
|
|
2382
|
+
getOrLoad(src: string, device: GPUDevice, signal?: AbortSignal): Promise<GPUModelLut>;
|
|
2383
|
+
evict(key: string, device: GPUDevice): void;
|
|
2384
|
+
hasPending(device: GPUDevice): boolean;
|
|
2385
|
+
awaitAllPending(device: GPUDevice): Promise<void>;
|
|
2386
|
+
destroy(): void;
|
|
2387
|
+
}
|
|
2388
|
+
declare const lutStore: LutStore;
|
|
2389
|
+
//#endregion
|
|
2390
|
+
//#region src/surface-provider.d.ts
|
|
2391
|
+
interface SurfaceProvider {
|
|
2392
|
+
readonly width: number;
|
|
2393
|
+
readonly height: number;
|
|
2394
|
+
readonly colorFormat: GPUTextureFormat;
|
|
2395
|
+
/** Current frame's render target view */
|
|
2396
|
+
getCurrentTextureView(): GPUTextureView;
|
|
2397
|
+
/** Current frame's render target texture */
|
|
2398
|
+
getCurrentTexture(): GPUTexture;
|
|
2399
|
+
/** Present / flush the frame (browser: swap chain; node: no-op) */
|
|
2400
|
+
present(): void;
|
|
2401
|
+
/** Read RGBA pixels back to CPU (node: staging buffer; browser: copyToBuffer) */
|
|
2402
|
+
readPixels(): Promise<Uint8ClampedArray>;
|
|
2403
|
+
destroy(): void;
|
|
2404
|
+
}
|
|
2405
|
+
//#endregion
|
|
2406
|
+
//#region src/render-context.d.ts
|
|
2407
|
+
interface RenderContextValue {
|
|
2408
|
+
device: GPUDevice;
|
|
2409
|
+
renderer: Renderer2D;
|
|
2410
|
+
surface: SurfaceProvider;
|
|
2411
|
+
}
|
|
2412
|
+
//#endregion
|
|
2413
|
+
//#region src/text-animations/advanced-types.d.ts
|
|
2414
|
+
|
|
2415
|
+
//#endregion
|
|
2416
|
+
//#region src/shader-store.d.ts
|
|
2417
|
+
interface RegisteredShader {
|
|
2418
|
+
wgsl: string;
|
|
2419
|
+
name: string;
|
|
2420
|
+
outputType: string;
|
|
2421
|
+
fnParams: Array<{
|
|
2422
|
+
name: string;
|
|
2423
|
+
type: string;
|
|
2424
|
+
defaultValue: number;
|
|
2425
|
+
}>;
|
|
2426
|
+
}
|
|
2427
|
+
declare class ShaderStore {
|
|
2428
|
+
private store;
|
|
2429
|
+
private getCacheKey;
|
|
2430
|
+
register(nodeId: string, shader: RegisteredShader, renderId?: string): void;
|
|
2431
|
+
get(nodeId: string, renderId?: string): RegisteredShader | undefined;
|
|
2432
|
+
delete(nodeId: string, renderId?: string): void;
|
|
2433
|
+
clear(renderId: string): void;
|
|
2434
|
+
registerSignalsFromComposition(renderId: string | undefined, virtualMedia: VirtualMediaData): void;
|
|
2435
|
+
}
|
|
2436
|
+
declare const shaderStore: ShaderStore;
|
|
2437
|
+
//#endregion
|
|
2438
|
+
//#region src/shaders/audio-mesh-displace.d.ts
|
|
2439
|
+
/**
|
|
2440
|
+
* @file audio-mesh-displace.ts
|
|
2441
|
+
* WGSL compute shader for audio FFT & latent vector 3D mesh vertex displacement.
|
|
2442
|
+
* Processes 16-float (64-byte) vertex streams in parallel at 256 threads per workgroup.
|
|
2443
|
+
*/
|
|
2444
|
+
|
|
2445
|
+
//#endregion
|
|
2446
|
+
//#region src/signals/audio-signal-compute.d.ts
|
|
2447
|
+
interface AudioSignalComputeConfig {
|
|
2448
|
+
extractionMode?: "rms_envelope" | "transient_beat" | "sub_bass" | "bass" | "mid" | "high" | "spectral_flux";
|
|
2449
|
+
attackMs?: number;
|
|
2450
|
+
releaseMs?: number;
|
|
2451
|
+
sensitivity?: number;
|
|
2452
|
+
noiseFloorDb?: number;
|
|
2453
|
+
dynamicRangeDb?: number;
|
|
2454
|
+
autoRange?: boolean;
|
|
2455
|
+
smoothing?: number;
|
|
2456
|
+
curve?: "linear" | "exponential" | "logarithmic" | "square" | "smoothstep";
|
|
2457
|
+
beatThreshold?: number;
|
|
2458
|
+
beatDecayMs?: number;
|
|
2459
|
+
}
|
|
2460
|
+
interface ExtractedSignalStats {
|
|
2461
|
+
primary: {
|
|
2462
|
+
min: number;
|
|
2463
|
+
max: number;
|
|
2464
|
+
};
|
|
2465
|
+
beat: {
|
|
2466
|
+
min: number;
|
|
2467
|
+
max: number;
|
|
2468
|
+
};
|
|
2469
|
+
bass: {
|
|
2470
|
+
min: number;
|
|
2471
|
+
max: number;
|
|
2472
|
+
};
|
|
2473
|
+
energy: {
|
|
2474
|
+
min: number;
|
|
2475
|
+
max: number;
|
|
2476
|
+
};
|
|
2477
|
+
}
|
|
2478
|
+
interface ExtractedAudioSignals {
|
|
2479
|
+
primaryBuffer: GPUBuffer;
|
|
2480
|
+
beatBuffer: GPUBuffer;
|
|
2481
|
+
bassBuffer: GPUBuffer;
|
|
2482
|
+
energyBuffer: GPUBuffer;
|
|
2483
|
+
texture: GPUTexture;
|
|
2484
|
+
textureView: GPUTextureView;
|
|
2485
|
+
numFrames: number;
|
|
2486
|
+
durationSec: number;
|
|
2487
|
+
stats: ExtractedSignalStats;
|
|
2488
|
+
channelSamples?: {
|
|
2489
|
+
primary: Float32Array;
|
|
2490
|
+
beat: Float32Array;
|
|
2491
|
+
bass: Float32Array;
|
|
2492
|
+
energy: Float32Array;
|
|
2493
|
+
};
|
|
2494
|
+
}
|
|
2495
|
+
/**
|
|
2496
|
+
* 1. Biquad IIR Filter Bank Compute Shader
|
|
2497
|
+
* Applies resonant bandpass/lowpass/highpass filtering on PCM audio buffer.
|
|
2498
|
+
*/
|
|
2499
|
+
|
|
2500
|
+
declare class AudioSignalComputePipeline {
|
|
2501
|
+
private static pipelineCache;
|
|
2502
|
+
private static getPipeline;
|
|
2503
|
+
/**
|
|
2504
|
+
* Processes raw PCM audio channels on the GPU and outputs extracted feature buffers and textures.
|
|
2505
|
+
*/
|
|
2506
|
+
static extractFeatures(device: GPUDevice, audioChannels: Float32Array[], sampleRate: number, fps: number, config?: AudioSignalComputeConfig, targetWidth?: number): Promise<ExtractedAudioSignals>;
|
|
2507
|
+
/**
|
|
2508
|
+
* Computes cumulative speed-ramped presentation timestamps for video pace control.
|
|
2509
|
+
*/
|
|
2510
|
+
static computePaceTimestamps(device: GPUDevice, signalBuffer: GPUBuffer, numFrames: number, fps: number, baseSpeed?: number, gain?: number): GPUBuffer;
|
|
2511
|
+
}
|
|
2512
|
+
//#endregion
|
|
2513
|
+
//#region src/signals/signal-registry.d.ts
|
|
2514
|
+
interface SignalRegistryResource {
|
|
2515
|
+
type: "1d-buffer" | "2d-texture" | "combined";
|
|
2516
|
+
buffer?: GPUBuffer;
|
|
2517
|
+
texture?: GPUTexture;
|
|
2518
|
+
textureView?: GPUTextureView;
|
|
2519
|
+
lastProcessedFrame: number;
|
|
2520
|
+
lastFingerprint?: string;
|
|
2521
|
+
uniformBuffer?: GPUBuffer;
|
|
2522
|
+
bindGroup?: GPUBindGroup;
|
|
2523
|
+
isExternal?: boolean;
|
|
2524
|
+
duration?: number;
|
|
2525
|
+
stats?: {
|
|
2526
|
+
min: number;
|
|
2527
|
+
max: number;
|
|
2528
|
+
};
|
|
2529
|
+
}
|
|
2530
|
+
interface MasterAudioEntry {
|
|
2531
|
+
texture: GPUTexture;
|
|
2532
|
+
textureView: GPUTextureView;
|
|
2533
|
+
durationSec: number;
|
|
2534
|
+
stats: {
|
|
2535
|
+
min: number;
|
|
2536
|
+
max: number;
|
|
2537
|
+
};
|
|
2538
|
+
lastFingerprint?: string;
|
|
2539
|
+
}
|
|
2540
|
+
declare class SignalRegistry {
|
|
2541
|
+
private deviceCache;
|
|
2542
|
+
private statsMap;
|
|
2543
|
+
private statsListeners;
|
|
2544
|
+
setStats(nodeId: string, stats: {
|
|
2545
|
+
min: number;
|
|
2546
|
+
max: number;
|
|
2547
|
+
}): void;
|
|
2548
|
+
getStats(nodeId: string): {
|
|
2549
|
+
min: number;
|
|
2550
|
+
max: number;
|
|
2551
|
+
} | undefined;
|
|
2552
|
+
onStats(nodeId: string, listener: (stats: {
|
|
2553
|
+
min: number;
|
|
2554
|
+
max: number;
|
|
2555
|
+
}) => void): () => void;
|
|
2556
|
+
/**
|
|
2557
|
+
* Recursively computes a deterministic cache fingerprint for a signal descriptor
|
|
2558
|
+
* and its upstream dependencies (signalA, signalB, and upstream calculated stats).
|
|
2559
|
+
*/
|
|
2560
|
+
computeSignalFingerprint(sd: unknown, depth?: number, visited?: Set<unknown>): string;
|
|
2561
|
+
private getDeviceResources;
|
|
2562
|
+
getSampler(device: GPUDevice): GPUSampler;
|
|
2563
|
+
/**
|
|
2564
|
+
* Clears frame resources. Typically called on renderId reset or context destruction.
|
|
2565
|
+
*/
|
|
2566
|
+
clear(renderId: string, device?: GPUDevice): void;
|
|
2567
|
+
getDummy1x1TextureView(device: GPUDevice): GPUTextureView;
|
|
2568
|
+
getDummyBuffer(device: GPUDevice): GPUBuffer;
|
|
2569
|
+
registerBuffer(device: GPUDevice, nodeId: string, buffer: GPUBuffer, renderId?: string): void;
|
|
2570
|
+
registerTexture(device: GPUDevice, nodeId: string, texture: GPUTexture, textureView: GPUTextureView, renderId?: string, duration?: number): void;
|
|
2571
|
+
getMasterTextureView(device: GPUDevice, nodeId: string, renderId?: string): GPUTextureView | undefined;
|
|
2572
|
+
getMasterTexture(device: GPUDevice, nodeId: string, renderId?: string): GPUTexture | undefined;
|
|
2573
|
+
private channelSamplesMap;
|
|
2574
|
+
setChannelSamples(nodeId: string, samples: {
|
|
2575
|
+
primary?: Float32Array;
|
|
2576
|
+
beat?: Float32Array;
|
|
2577
|
+
bass?: Float32Array;
|
|
2578
|
+
energy?: Float32Array;
|
|
2579
|
+
}, renderId?: string): void;
|
|
2580
|
+
getChannelSamples(nodeId: string, channel?: string, renderId?: string): Float32Array | undefined;
|
|
2581
|
+
getDuration(device: GPUDevice, nodeId: string, renderId?: string): number | undefined;
|
|
2582
|
+
private extractionPromises;
|
|
2583
|
+
has(device: GPUDevice, nodeId: string, renderId?: string): boolean;
|
|
2584
|
+
/**
|
|
2585
|
+
* Recursively scans a signal descriptor (and upstream signalA/signalB trees)
|
|
2586
|
+
* for any audio sources and ensures they have been decoded and extracted.
|
|
2587
|
+
*/
|
|
2588
|
+
ensureAudioSourcesExtracted(device: GPUDevice, sd: unknown, fps?: number, renderId?: string, visited?: Set<unknown>): Promise<void>;
|
|
2589
|
+
extractFromAudioSource(device: GPUDevice, sourceUrl: string, config: AudioSignalComputeConfig | undefined, nodeId: string, fps?: number, renderId?: string): Promise<void>;
|
|
2590
|
+
/**
|
|
2591
|
+
* Resolves or creates a 1D GPUBuffer for a time-varying signal.
|
|
2592
|
+
* If not evaluated yet for the current frame, it dispatches the generator compute pass.
|
|
2593
|
+
*/
|
|
2594
|
+
getOrCreate1DBuffer(device: GPUDevice, _encoder: GPUCommandEncoder | null, nodeId: string, elapsedTime: number, duration: number, sd: any, numSamples: number, sampleRate: number, renderId?: string, frame?: number, fps?: number): GPUBuffer;
|
|
2595
|
+
/**
|
|
2596
|
+
* Resolves or creates a 2D GPUTextureView for spatial modulation.
|
|
2597
|
+
* If not evaluated yet for the current frame, it dispatches the generator render pass.
|
|
2598
|
+
*/
|
|
2599
|
+
getOrCreate2DTextureView(device: GPUDevice, _encoder: GPUCommandEncoder | null, nodeId: string, elapsedTime: number, duration: number, sd: any, width: number, _height: number, renderId?: string, frame?: number, fps?: number): GPUTextureView;
|
|
2600
|
+
private dispatch1DGenerator;
|
|
2601
|
+
private dispatch1DAudioSignal;
|
|
2602
|
+
private dispatch1DMathSignal;
|
|
2603
|
+
private dispatch2DGenerator;
|
|
2604
|
+
private dispatch2DAudioSignal;
|
|
2605
|
+
private dispatch2DSignalMath;
|
|
2606
|
+
private dispatch2DSignalGate;
|
|
2607
|
+
private dispatch1DGateSignal;
|
|
2608
|
+
}
|
|
2609
|
+
declare const signalRegistry: SignalRegistry;
|
|
2610
|
+
//#endregion
|
|
2611
|
+
//#region src/signals/types.d.ts
|
|
2612
|
+
type WGSLOutputType = "f32" | "vec2f" | "vec3f" | "vec4f";
|
|
2613
|
+
type WGSLParamType = "f32" | "i32" | "u32" | "vec2f" | "vec3f" | "vec4f";
|
|
2614
|
+
interface FnParam {
|
|
2615
|
+
name: string;
|
|
2616
|
+
type: WGSLParamType;
|
|
2617
|
+
defaultValue: number;
|
|
2618
|
+
}
|
|
2619
|
+
type EasingFamily = "linear" | "sine" | "quad" | "cubic" | "quart" | "quint" | "expo" | "circ" | "back" | "elastic" | "bounce" | "smoothstep" | "smootherstep";
|
|
2620
|
+
type EasingMode = "in" | "out" | "in_out";
|
|
2621
|
+
type EnvelopePattern = "ramp_up" | "ramp_down" | "bell" | "loop";
|
|
2622
|
+
interface SignalNodeConfig {
|
|
2623
|
+
amplitude?: number;
|
|
2624
|
+
frequency?: number;
|
|
2625
|
+
phase?: number;
|
|
2626
|
+
offset?: number;
|
|
2627
|
+
amplitudeMin?: number;
|
|
2628
|
+
amplitudeMax?: number;
|
|
2629
|
+
spatialScale?: number;
|
|
2630
|
+
spatialSpeed?: number;
|
|
2631
|
+
fmAmplitude?: number;
|
|
2632
|
+
fmFrequency?: number;
|
|
2633
|
+
gateEnabled?: boolean;
|
|
2634
|
+
gateStartFrame?: number;
|
|
2635
|
+
gateEndFrame?: number;
|
|
2636
|
+
gateIdleValue?: number;
|
|
2637
|
+
envelopeUseFrame?: boolean;
|
|
2638
|
+
fnBody?: string;
|
|
2639
|
+
fnOutputType?: WGSLOutputType;
|
|
2640
|
+
fnParams?: FnParam[];
|
|
2641
|
+
previewMode?: "pattern" | "cartesian" | "3d";
|
|
2642
|
+
baseEnabled?: boolean;
|
|
2643
|
+
baseType?: "sine" | "triangle" | "sawtooth" | "square" | "constant" | "noise_smooth" | "noise_white" | "pulse" | "bounce" | "staircase" | "custom";
|
|
2644
|
+
fmEnabled?: boolean;
|
|
2645
|
+
envelopeEnabled?: boolean;
|
|
2646
|
+
envelopeFamily?: EasingFamily;
|
|
2647
|
+
envelopeMode?: EasingMode;
|
|
2648
|
+
envelopePattern?: EnvelopePattern;
|
|
2649
|
+
envelopeCycles?: number;
|
|
2650
|
+
}
|
|
2651
|
+
//#endregion
|
|
2652
|
+
//#region src/signals/wgsl.d.ts
|
|
2653
|
+
interface WGSLSignalFn {
|
|
2654
|
+
/** WGSL identifier, safe to paste into any shader. */
|
|
2655
|
+
name: string;
|
|
2656
|
+
/** Full ready-to-embed WGSL text (constants + fn declaration). */
|
|
2657
|
+
wgsl: string;
|
|
2658
|
+
/** The fn signature line only — useful for downstream shader templates. */
|
|
2659
|
+
signature: string;
|
|
2660
|
+
/** Return type of the function. */
|
|
2661
|
+
outputType: WGSLOutputType;
|
|
2662
|
+
/** User-defined param descriptors (mirrors config.fnParams). */
|
|
2663
|
+
params: FnParam[];
|
|
2664
|
+
/**
|
|
2665
|
+
* True when the source compiled without any syntactic red-flags.
|
|
2666
|
+
* (Basic heuristic — real validation must happen in the WebGPU device.)
|
|
2667
|
+
*/
|
|
2668
|
+
valid: boolean;
|
|
2669
|
+
/** Human-readable warning if `valid` is false. */
|
|
2670
|
+
validationWarning?: string;
|
|
2671
|
+
}
|
|
2672
|
+
declare function buildWGSLSignalFn(config: SignalNodeConfig, /** Node id — used to produce a unique fn name. */
|
|
2673
|
+
nodeId: string): WGSLSignalFn;
|
|
2674
|
+
//#endregion
|
|
2675
|
+
//#region src/slug/slug-generator.d.ts
|
|
2676
|
+
interface FontkitGlyph {
|
|
2677
|
+
codePoints: number[];
|
|
2678
|
+
advanceWidth: number;
|
|
2679
|
+
bbox: {
|
|
2680
|
+
minX: number;
|
|
2681
|
+
minY: number;
|
|
2682
|
+
maxX: number;
|
|
2683
|
+
maxY: number;
|
|
2684
|
+
};
|
|
2685
|
+
path: {
|
|
2686
|
+
commands: Array<{
|
|
2687
|
+
command: "moveTo" | "lineTo" | "quadraticCurveTo" | "bezierCurveTo" | "closePath";
|
|
2688
|
+
args: number[];
|
|
2689
|
+
}>;
|
|
2690
|
+
};
|
|
2691
|
+
}
|
|
2692
|
+
interface FontkitFont {
|
|
2693
|
+
numGlyphs: number;
|
|
2694
|
+
getGlyph?(id: number): FontkitGlyph;
|
|
2695
|
+
glyphForCodePoint?(codePoint: number): FontkitGlyph;
|
|
2696
|
+
characterSet: number[] | Iterable<number>;
|
|
2697
|
+
ascent: number;
|
|
2698
|
+
descent: number;
|
|
2699
|
+
lineGap: number;
|
|
2700
|
+
unitsPerEm: number;
|
|
2701
|
+
variationAxes?: Record<string, unknown>;
|
|
2702
|
+
getVariation?(settings: Record<string, number>): FontkitFont;
|
|
2703
|
+
/** Shapes a string (kerning, ligatures); fontkit fonts always have it. */
|
|
2704
|
+
layout?(text: string): {
|
|
2705
|
+
glyphs: unknown[];
|
|
2706
|
+
positions: Array<{
|
|
2707
|
+
xAdvance: number;
|
|
2708
|
+
}>;
|
|
2709
|
+
};
|
|
2710
|
+
}
|
|
2711
|
+
//#endregion
|
|
2712
|
+
//#region src/slug/slug-font-cache.d.ts
|
|
2713
|
+
type FontLoadListener = (fontFamily: string) => void;
|
|
2714
|
+
declare class SlugFontCache {
|
|
2715
|
+
private static get cache();
|
|
2716
|
+
private static get parsedFontCache();
|
|
2717
|
+
/** Register an already parsed font (e.g. by FontManager) under a family name. */
|
|
2718
|
+
static setParsed(fontFamily: string, font: FontkitFont): void;
|
|
2719
|
+
static getParsed(fontFamily: string): FontkitFont | null;
|
|
2720
|
+
static getAllParsed(): FontkitFont[];
|
|
2721
|
+
static getFirstParsed(): FontkitFont | null;
|
|
2722
|
+
static hasPending(): boolean;
|
|
2723
|
+
private static listeners;
|
|
2724
|
+
private static get loadingPromises();
|
|
2725
|
+
private static get failedFonts();
|
|
2726
|
+
static emojiFontPath: string | null;
|
|
2727
|
+
static emojiFontUrl: string | null;
|
|
2728
|
+
static emojiTextureCache: Map<string, GPUTexture>;
|
|
2729
|
+
private static emojiFontBuffer;
|
|
2730
|
+
private static emojiFontLoadPromise;
|
|
2731
|
+
private static emojiFontFaceLoadPromise;
|
|
2732
|
+
private static cmapOffset;
|
|
2733
|
+
private static cblcOffset;
|
|
2734
|
+
private static cbdtOffset;
|
|
2735
|
+
/**
|
|
2736
|
+
* Parse the SFNT table directory from a raw font buffer and cache
|
|
2737
|
+
* the offsets for cmap, CBLC, and CBDT tables.
|
|
2738
|
+
*/
|
|
2739
|
+
private static parseTableDirectory;
|
|
2740
|
+
/**
|
|
2741
|
+
* Load the emoji font binary from a local filesystem path (Node.js only)
|
|
2742
|
+
* or from an HTTP URL via fetch.
|
|
2743
|
+
*/
|
|
2744
|
+
private static loadEmojiFontBinary;
|
|
2745
|
+
static getEmojiPngBuffer(codePoint: number): Promise<{
|
|
2746
|
+
buffer: Uint8Array;
|
|
2747
|
+
width: number;
|
|
2748
|
+
height: number;
|
|
2749
|
+
} | null>;
|
|
2750
|
+
static preloadEmoji(device: GPUDevice, char: string, fontSize: number): Promise<GPUTexture>;
|
|
2751
|
+
static getFont(fontFamily: string, fontWeight?: string | number, device?: GPUDevice | null, strokeWidth?: number, fontSize?: number, variableAxes?: Record<string, number>): SlugFont | undefined;
|
|
2752
|
+
static registerFont(fontFamily: string, font: SlugFont): void;
|
|
2753
|
+
static ensureTextures(device: GPUDevice, font: SlugFont): void;
|
|
2754
|
+
static addListener(listener: FontLoadListener): () => void;
|
|
2755
|
+
static isFailed(fontFamily: string): boolean;
|
|
2756
|
+
static clearFailed(fontFamily?: string): void;
|
|
2757
|
+
static preloadSlugFont(device: GPUDevice | null, fontFamily: string, fontUrl: string, whitelist?: number[], renderId?: string): Promise<SlugFont>;
|
|
2758
|
+
/**
|
|
2759
|
+
* Preloads the emoji font in the browser using the Cache API and registers
|
|
2760
|
+
* a FontFace so canvas 2D can render emojis natively.
|
|
2761
|
+
* No-op in Node.js environments.
|
|
2762
|
+
*/
|
|
2763
|
+
static preloadEmojiFontFace(url: string): Promise<void>;
|
|
2764
|
+
static destroy(): void;
|
|
2765
|
+
}
|
|
2766
|
+
//#endregion
|
|
2767
|
+
//#region src/slug/slug-geometry.d.ts
|
|
2768
|
+
|
|
2769
|
+
//#endregion
|
|
2770
|
+
//#region src/texture-cache.d.ts
|
|
2771
|
+
declare class TextureCache {
|
|
2772
|
+
private textures;
|
|
2773
|
+
private refs;
|
|
2774
|
+
private lruMap;
|
|
2775
|
+
activeKeys: Set<string>;
|
|
2776
|
+
/**
|
|
2777
|
+
* Evicted textures wait here until the frame being recorded has been
|
|
2778
|
+
* submitted: a command encoder may already reference them, and a frame's
|
|
2779
|
+
* recording can span awaits (decodes, inference) during which they are
|
|
2780
|
+
* evicted. `flushRetired` hands them to the GPU queue for destruction.
|
|
2781
|
+
*/
|
|
2782
|
+
private retired;
|
|
2783
|
+
acquire(key: string): GPUTexture | undefined;
|
|
2784
|
+
has(key: string): boolean;
|
|
2785
|
+
hasPrefix(prefix: string): boolean;
|
|
2786
|
+
contains(str: string): boolean;
|
|
2787
|
+
set(key: string, tex: GPUTexture, device?: GPUDevice): void;
|
|
2788
|
+
create(key: string, device: GPUDevice, width: number, height: number, format?: GPUTextureFormat): GPUTexture;
|
|
2789
|
+
release(key: string): void;
|
|
2790
|
+
evict(key: string, device?: GPUDevice): void;
|
|
2791
|
+
prune(device?: GPUDevice, maxInactive?: number): void;
|
|
2792
|
+
private retire;
|
|
2793
|
+
/**
|
|
2794
|
+
* Destroys textures retired before the last submit, once the GPU is done
|
|
2795
|
+
* with that work. Call at the start of a frame, after the previous one was
|
|
2796
|
+
* submitted (`Renderer2D.resetPools` does).
|
|
2797
|
+
*/
|
|
2798
|
+
flushRetired(device: GPUDevice): void;
|
|
2799
|
+
private updateLru;
|
|
2800
|
+
destroy(): void;
|
|
2801
|
+
}
|
|
2802
|
+
declare const textureCache: TextureCache;
|
|
2803
|
+
//#endregion
|
|
2804
|
+
//#region src/utils.d.ts
|
|
2805
|
+
declare global {
|
|
2806
|
+
var __GATEWAI_DELAYS__: Set<number>;
|
|
2807
|
+
}
|
|
2808
|
+
//#endregion
|
|
2809
|
+
//#region src/math3d/vector3.d.ts
|
|
2810
|
+
/**
|
|
2811
|
+
* 3D Vector mathematics for camera kinematics, scene projections, and spatial transforms.
|
|
2812
|
+
* Fully typed, pure functional routines with zero runtime allocations where possible.
|
|
2813
|
+
*/
|
|
2814
|
+
type Vec3 = [number, number, number];
|
|
2815
|
+
//#endregion
|
|
2816
|
+
//#region src/math3d/matrix4.d.ts
|
|
2817
|
+
type Mat4 = [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number];
|
|
2818
|
+
//#endregion
|
|
2819
|
+
//#region src/math3d/camera3d.d.ts
|
|
2820
|
+
interface Camera3DPose {
|
|
2821
|
+
/** Camera Eye position in world space [x, y, z] */
|
|
2822
|
+
eye: Vec3;
|
|
2823
|
+
/** LookAt Target / Point of Interest [x, y, z] */
|
|
2824
|
+
target: Vec3;
|
|
2825
|
+
/** Camera Up vector (default [0, -1, 0] for Y-down screen coordinates) */
|
|
2826
|
+
up: Vec3;
|
|
2827
|
+
/** Vertical field of view in degrees (default 50) */
|
|
2828
|
+
fov: number;
|
|
2829
|
+
/** Viewport aspect ratio (width / height) */
|
|
2830
|
+
aspect: number;
|
|
2831
|
+
/** Near clipping plane distance (default 1.0) */
|
|
2832
|
+
near: number;
|
|
2833
|
+
/** Far clipping plane distance (default 50000.0) */
|
|
2834
|
+
far: number;
|
|
2835
|
+
/** Optical zoom multiplier (default 1.0) */
|
|
2836
|
+
zoom: number;
|
|
2837
|
+
/** Focal plane distance from camera for Depth of Field in pixels */
|
|
2838
|
+
focusDistance?: number;
|
|
2839
|
+
/** Lens f-number / aperture (e.g. 1.4, 2.8, 5.6) */
|
|
2840
|
+
fStop?: number;
|
|
2841
|
+
/** Maximum bokeh blur radius in pixels (default 32) */
|
|
2842
|
+
maxBlurRadius?: number;
|
|
2843
|
+
}
|
|
2844
|
+
interface CameraShakeOptions {
|
|
2845
|
+
translationAmplitude: number;
|
|
2846
|
+
rotationAmplitude: number;
|
|
2847
|
+
frequency?: number;
|
|
2848
|
+
octaves?: number;
|
|
2849
|
+
seed?: number;
|
|
2850
|
+
}
|
|
2851
|
+
type FrustumPlane = [number, number, number, number];
|
|
2852
|
+
interface FrustumPlanes {
|
|
2853
|
+
left: FrustumPlane;
|
|
2854
|
+
right: FrustumPlane;
|
|
2855
|
+
bottom: FrustumPlane;
|
|
2856
|
+
top: FrustumPlane;
|
|
2857
|
+
near: FrustumPlane;
|
|
2858
|
+
far: FrustumPlane;
|
|
2859
|
+
}
|
|
2860
|
+
declare const Camera3D: {
|
|
2861
|
+
/**
|
|
2862
|
+
* Creates a default canvas-aligned 3D camera.
|
|
2863
|
+
* Calibrated so that layers at Z=0 project 1:1 with 2D canvas pixel coordinates.
|
|
2864
|
+
*/
|
|
2865
|
+
createDefaultCamera(width: number, height: number, fovDegrees?: number): Camera3DPose;
|
|
2866
|
+
/**
|
|
2867
|
+
* Computes LookAt view matrix from camera pose.
|
|
2868
|
+
*/
|
|
2869
|
+
computeViewMatrix(camera: Camera3DPose): Mat4;
|
|
2870
|
+
/**
|
|
2871
|
+
* Computes WebGPU [0, 1] perspective projection matrix with zoom factor.
|
|
2872
|
+
*/
|
|
2873
|
+
computeProjectionMatrix(camera: Camera3DPose): Mat4;
|
|
2874
|
+
/**
|
|
2875
|
+
* Computes combined View-Projection matrix: VP = P x V.
|
|
2876
|
+
*/
|
|
2877
|
+
computeViewProjectionMatrix(camera: Camera3DPose): Mat4;
|
|
2878
|
+
/**
|
|
2879
|
+
* Dolly camera along optical viewing axis.
|
|
2880
|
+
* Positive delta moves eye closer to target.
|
|
2881
|
+
*/
|
|
2882
|
+
dolly(eye: Vec3, target: Vec3, deltaDistance: number): {
|
|
2883
|
+
eye: Vec3;
|
|
2884
|
+
target: Vec3;
|
|
2885
|
+
};
|
|
2886
|
+
/**
|
|
2887
|
+
* Truck (lateral X) and Pedestal (vertical Y) camera translation in local camera space.
|
|
2888
|
+
*/
|
|
2889
|
+
truckPedestal(eye: Vec3, target: Vec3, up: Vec3, deltaX: number, deltaY: number): {
|
|
2890
|
+
eye: Vec3;
|
|
2891
|
+
target: Vec3;
|
|
2892
|
+
};
|
|
2893
|
+
/**
|
|
2894
|
+
* Computes camera Eye position orbiting around target in spherical coordinates.
|
|
2895
|
+
* @param target Center point of orbit.
|
|
2896
|
+
* @param radius Distance from target.
|
|
2897
|
+
* @param azimuthDeg Horizontal orbit angle in degrees.
|
|
2898
|
+
* @param elevationDeg Vertical elevation angle in degrees (from horizon).
|
|
2899
|
+
*/
|
|
2900
|
+
orbit(target: Vec3, radius: number, azimuthDeg: number, elevationDeg: number): Vec3;
|
|
2901
|
+
/**
|
|
2902
|
+
* Applies Euler orientation angles (pitch, yaw, roll) in degrees to a camera pose.
|
|
2903
|
+
* Pitch rotates around camera local Right axis (tilt up/down).
|
|
2904
|
+
* Yaw rotates around camera local Up axis (pan left/right).
|
|
2905
|
+
* Roll rotates around camera optical Forward axis (bank counter/clockwise).
|
|
2906
|
+
*/
|
|
2907
|
+
applyOrientation(pose: Camera3DPose, pitchDeg: number, yawDeg: number, rollDeg: number): Camera3DPose;
|
|
2908
|
+
/**
|
|
2909
|
+
* Applies continuous procedural 3D camera shake (Simplex/harmonic noise).
|
|
2910
|
+
*/
|
|
2911
|
+
applyCameraShake(pose: Camera3DPose, timeSeconds: number, options: CameraShakeOptions): Camera3DPose;
|
|
2912
|
+
/**
|
|
2913
|
+
* Computes Circle of Confusion (CoC) blur radius for Depth of Field.
|
|
2914
|
+
* Points at depth == focusDistance produce 0.0 (sharp).
|
|
2915
|
+
*/
|
|
2916
|
+
computeCircleOfConfusion(depth: number, focusDistance: number, focalLengthMm: number, fStop: number, maxBlurRadius?: number): number;
|
|
2917
|
+
/**
|
|
2918
|
+
* Extracts the 6 frustum clipping planes from a View-Projection matrix.
|
|
2919
|
+
*/
|
|
2920
|
+
computeCameraFrustumPlanes(vp: Mat4): FrustumPlanes;
|
|
2921
|
+
/**
|
|
2922
|
+
* Checks whether an axis-aligned 3D bounding box intersects the camera frustum.
|
|
2923
|
+
*/
|
|
2924
|
+
isBoxInFrustum(min: Vec3, max: Vec3, planes: FrustumPlanes): boolean;
|
|
2925
|
+
};
|
|
2926
|
+
//#endregion
|
|
2927
|
+
//#region src/math3d/path3d.d.ts
|
|
2928
|
+
interface Path3DPoint {
|
|
2929
|
+
/** Position in 3D world space [x, y, z] */
|
|
2930
|
+
position: Vec3;
|
|
2931
|
+
/** Normalized unit tangent forward vector */
|
|
2932
|
+
tangent: Vec3;
|
|
2933
|
+
/** Normalized unit normal vector (orthogonal to tangent) */
|
|
2934
|
+
normal: Vec3;
|
|
2935
|
+
/** Normalized unit binormal vector: cross(tangent, normal) */
|
|
2936
|
+
binormal: Vec3;
|
|
2937
|
+
/** Cumulative arc length distance in pixels from path origin */
|
|
2938
|
+
distance: number;
|
|
2939
|
+
/** Normalized progress along path in [0, 1] */
|
|
2940
|
+
t: number;
|
|
2941
|
+
/** Euler orientation angles in degrees [pitch, yaw, roll] */
|
|
2942
|
+
rotation: Vec3;
|
|
2943
|
+
}
|
|
2944
|
+
interface Path3DSample {
|
|
2945
|
+
position: Vec3;
|
|
2946
|
+
tangent: Vec3;
|
|
2947
|
+
distance: number;
|
|
2948
|
+
}
|
|
2949
|
+
interface CatmullRomOptions {
|
|
2950
|
+
/** Tension factor between 0 (loose) and 1 (tight); defaults to 0.5 (centripetal-like) */
|
|
2951
|
+
tension?: number;
|
|
2952
|
+
/** Whether path closes in a continuous loop */
|
|
2953
|
+
closed?: boolean;
|
|
2954
|
+
/** Samples per segment for arc-length integration (default 40) */
|
|
2955
|
+
samplesPerSegment?: number;
|
|
2956
|
+
}
|
|
2957
|
+
interface BezierSegment3D {
|
|
2958
|
+
p0: Vec3;
|
|
2959
|
+
p1: Vec3;
|
|
2960
|
+
p2: Vec3;
|
|
2961
|
+
p3: Vec3;
|
|
2962
|
+
}
|
|
2963
|
+
interface HelixOptions {
|
|
2964
|
+
center: Vec3;
|
|
2965
|
+
radius: number;
|
|
2966
|
+
pitch: number;
|
|
2967
|
+
turns: number;
|
|
2968
|
+
axis?: "x" | "y" | "z";
|
|
2969
|
+
samplesPerTurn?: number;
|
|
2970
|
+
}
|
|
2971
|
+
interface CirclePathOptions {
|
|
2972
|
+
center: Vec3;
|
|
2973
|
+
radius: number;
|
|
2974
|
+
normal?: Vec3;
|
|
2975
|
+
startAngleDeg?: number;
|
|
2976
|
+
endAngleDeg?: number;
|
|
2977
|
+
samples?: number;
|
|
2978
|
+
}
|
|
2979
|
+
declare class Path3D {
|
|
2980
|
+
private samples;
|
|
2981
|
+
private frames;
|
|
2982
|
+
totalLength: number;
|
|
2983
|
+
constructor(samples: Path3DSample[]);
|
|
2984
|
+
/**
|
|
2985
|
+
* Computes continuous Rotation-Minimizing Frames (RMF) along the path
|
|
2986
|
+
* using the Double Reflection Method (Wang et al. 2008), preventing gimbal flips.
|
|
2987
|
+
*/
|
|
2988
|
+
private computeRotationMinimizingFrames;
|
|
2989
|
+
/**
|
|
2990
|
+
* Extracts pitch, yaw, roll Euler angles in degrees from the orthonormal frame.
|
|
2991
|
+
*/
|
|
2992
|
+
private eulerFromFrame;
|
|
2993
|
+
/**
|
|
2994
|
+
* Evaluates point, tangent, normal, binormal, and rotation at normalized progress u in [0, 1].
|
|
2995
|
+
* Progression moves with constant velocity along the arc length of the path.
|
|
2996
|
+
*/
|
|
2997
|
+
getPointAt(u: number): Path3DPoint;
|
|
2998
|
+
/**
|
|
2999
|
+
* Evaluates point along path by absolute arc-length distance in pixels.
|
|
3000
|
+
*/
|
|
3001
|
+
getPointAtDistance(distance: number): Path3DPoint;
|
|
3002
|
+
/**
|
|
3003
|
+
* Creates a smooth Catmull-Rom spline path interpolating through 3D waypoints.
|
|
3004
|
+
*/
|
|
3005
|
+
static catmullRom(waypoints: Vec3[], options?: CatmullRomOptions): Path3D;
|
|
3006
|
+
/**
|
|
3007
|
+
* Creates a continuous 3D path from a chain of cubic Bezier segments.
|
|
3008
|
+
*/
|
|
3009
|
+
static bezier(segments: BezierSegment3D[], samplesPerSegment?: number): Path3D;
|
|
3010
|
+
/**
|
|
3011
|
+
* Creates a 3D volumetric helix / spiral path.
|
|
3012
|
+
*/
|
|
3013
|
+
static helix(options: HelixOptions): Path3D;
|
|
3014
|
+
/**
|
|
3015
|
+
* Creates a 3D circular or arc orbit path.
|
|
3016
|
+
*/
|
|
3017
|
+
static circle(options: CirclePathOptions): Path3D;
|
|
3018
|
+
}
|
|
3019
|
+
//#endregion
|
|
3020
|
+
//#region src/math3d/light3d.d.ts
|
|
3021
|
+
type LightKind = "ambient" | "directional" | "point" | "spot";
|
|
3022
|
+
interface Light3DOptions {
|
|
3023
|
+
id?: string;
|
|
3024
|
+
lightType?: LightKind;
|
|
3025
|
+
type?: LightKind;
|
|
3026
|
+
color?: string | [number, number, number] | [number, number, number, number] | {
|
|
3027
|
+
r: number;
|
|
3028
|
+
g: number;
|
|
3029
|
+
b: number;
|
|
3030
|
+
a?: number;
|
|
3031
|
+
} | unknown;
|
|
3032
|
+
intensity?: number;
|
|
3033
|
+
x?: number;
|
|
3034
|
+
y?: number;
|
|
3035
|
+
z?: number;
|
|
3036
|
+
position?: [number, number, number];
|
|
3037
|
+
targetX?: number;
|
|
3038
|
+
targetY?: number;
|
|
3039
|
+
targetZ?: number;
|
|
3040
|
+
target?: [number, number, number];
|
|
3041
|
+
direction?: [number, number, number];
|
|
3042
|
+
radius?: number;
|
|
3043
|
+
decay?: number;
|
|
3044
|
+
angle?: number;
|
|
3045
|
+
penumbra?: number;
|
|
3046
|
+
}
|
|
3047
|
+
interface GPULightData {
|
|
3048
|
+
/** xyz = position, w = type (0=ambient, 1=directional, 2=point, 3=spot) */
|
|
3049
|
+
posType: [number, number, number, number];
|
|
3050
|
+
/** xyz = normalized direction, w = radius */
|
|
3051
|
+
dirRadius: [number, number, number, number];
|
|
3052
|
+
/** rgb = linear color, w = intensity */
|
|
3053
|
+
colorIntensity: [number, number, number, number];
|
|
3054
|
+
/** x = cos(outer), y = cos(inner), z = decay, w = 0 */
|
|
3055
|
+
spotParams: [number, number, number, number];
|
|
3056
|
+
}
|
|
3057
|
+
declare const Light3D: {
|
|
3058
|
+
/**
|
|
3059
|
+
* Computes the 3x3 normal matrix (stored in 4x4 layout) from a 4x4 Model matrix.
|
|
3060
|
+
* Evaluates N = (M^-1)^T to preserve true orthogonal surface normals under non-uniform scaling.
|
|
3061
|
+
*/
|
|
3062
|
+
computeNormalMatrix(modelMatrix: Mat4): Mat4;
|
|
3063
|
+
/**
|
|
3064
|
+
* Converts high-level light options into uniform data ready for GPU packing.
|
|
3065
|
+
*/
|
|
3066
|
+
processLight(opt: Light3DOptions): GPULightData;
|
|
3067
|
+
/**
|
|
3068
|
+
* Packs active scene lights into a Float32Array matching WGSL LightsUniforms layout.
|
|
3069
|
+
*/
|
|
3070
|
+
packLightsUniforms(lights: Light3DOptions[]): Float32Array;
|
|
3071
|
+
};
|
|
3072
|
+
//#endregion
|
|
3073
|
+
//#region src/loaders/types.d.ts
|
|
3074
|
+
interface Mesh3DData {
|
|
3075
|
+
id?: string;
|
|
3076
|
+
name?: string;
|
|
3077
|
+
positions: Float32Array;
|
|
3078
|
+
normals: Float32Array;
|
|
3079
|
+
uvs: Float32Array;
|
|
3080
|
+
indices: Uint16Array | Uint32Array;
|
|
3081
|
+
colors?: Float32Array;
|
|
3082
|
+
tangents?: Float32Array;
|
|
3083
|
+
jointIndices?: Float32Array;
|
|
3084
|
+
jointWeights?: Float32Array;
|
|
3085
|
+
materialName?: string;
|
|
3086
|
+
/** Scene node that places this mesh (Model3DData.nodes); its world matrix applies unless the mesh is skinned. */
|
|
3087
|
+
node?: number;
|
|
3088
|
+
/** Skin (Model3DData.skins) whose joints deform this mesh; jointIndices index its `joints`. */
|
|
3089
|
+
skin?: number;
|
|
3090
|
+
}
|
|
3091
|
+
interface Material3D {
|
|
3092
|
+
name: string;
|
|
3093
|
+
diffuseColor?: [number, number, number, number];
|
|
3094
|
+
specularColor?: [number, number, number];
|
|
3095
|
+
ambientColor?: [number, number, number];
|
|
3096
|
+
shininess?: number;
|
|
3097
|
+
/**
|
|
3098
|
+
* Specular strength parsed from the file (e.g. OBJ `Ks`). The mesh pass
|
|
3099
|
+
* lights with the layer's `specularIntensity`; this is not applied yet.
|
|
3100
|
+
*/
|
|
3101
|
+
specularIntensity?: number;
|
|
3102
|
+
roughness?: number;
|
|
3103
|
+
metallic?: number;
|
|
3104
|
+
opacity?: number;
|
|
3105
|
+
diffuseTexture?: string;
|
|
3106
|
+
diffuseTextureBuffer?: Uint8Array | ArrayBuffer;
|
|
3107
|
+
/** MIME type of `diffuseTextureBuffer` (image/png, image/jpeg, …). */
|
|
3108
|
+
diffuseTextureMime?: string;
|
|
3109
|
+
/** Texture addressing for UVs outside [0, 1] (glTF samplers default to repeat). */
|
|
3110
|
+
textureWrap?: "repeat" | "clamp" | "mirror";
|
|
3111
|
+
normalTexture?: string;
|
|
3112
|
+
twoSided?: boolean;
|
|
3113
|
+
/** "mask" discards texels below `alphaCutoff`; "blend" draws after the opaque meshes. */
|
|
3114
|
+
alphaMode?: "opaque" | "mask" | "blend";
|
|
3115
|
+
alphaCutoff?: number;
|
|
3116
|
+
/** How the material wants to be lit when the layer leaves `material` unset. */
|
|
3117
|
+
shading?: "lit" | "unlit" | "toon";
|
|
3118
|
+
/** Toon shading: the color multiplier of the shadowed side. */
|
|
3119
|
+
shadeColor?: [number, number, number];
|
|
3120
|
+
}
|
|
3121
|
+
/** A scene-graph node: its rest transform and parent (glTF node semantics). */
|
|
3122
|
+
interface ModelNode3D {
|
|
3123
|
+
name: string;
|
|
3124
|
+
/** Index into Model3DData.nodes, -1 for a root. */
|
|
3125
|
+
parent: number;
|
|
3126
|
+
translation: Vec3;
|
|
3127
|
+
/** Unit quaternion [x, y, z, w]. */
|
|
3128
|
+
rotation: [number, number, number, number];
|
|
3129
|
+
scale: Vec3;
|
|
3130
|
+
/** A fixed local matrix (glTF `matrix`): such a node is not animated by TRS tracks. */
|
|
3131
|
+
matrix?: Mat4;
|
|
3132
|
+
}
|
|
3133
|
+
interface Skin3D {
|
|
3134
|
+
/** Joint node indices (Model3DData.nodes), in the order jointIndices refer to them. */
|
|
3135
|
+
joints: number[];
|
|
3136
|
+
/** One column-major 4x4 per joint. */
|
|
3137
|
+
inverseBindMatrices: Float32Array;
|
|
3138
|
+
}
|
|
3139
|
+
interface Bone3D {
|
|
3140
|
+
name: string;
|
|
3141
|
+
index: number;
|
|
3142
|
+
parentIndex: number;
|
|
3143
|
+
inverseBindMatrix: Mat4;
|
|
3144
|
+
bindMatrix: Mat4;
|
|
3145
|
+
localTransform: Mat4;
|
|
3146
|
+
worldTransform?: Mat4;
|
|
3147
|
+
}
|
|
3148
|
+
interface Skeleton3D {
|
|
3149
|
+
bones: Bone3D[];
|
|
3150
|
+
boneIndicesByName: Record<string, number>;
|
|
3151
|
+
}
|
|
3152
|
+
interface NodeAnimationTrack3D {
|
|
3153
|
+
nodeName: string;
|
|
3154
|
+
/** Target node index (Model3DData.nodes) when the model has a scene graph. */
|
|
3155
|
+
node?: number;
|
|
3156
|
+
times: Float32Array;
|
|
3157
|
+
translations?: Float32Array;
|
|
3158
|
+
rotations?: Float32Array;
|
|
3159
|
+
scales?: Float32Array;
|
|
3160
|
+
/** "cubic" (glTF CUBICSPLINE) stores [inTangent, value, outTangent] per keyframe. */
|
|
3161
|
+
interpolation?: "linear" | "step" | "cubic";
|
|
3162
|
+
}
|
|
3163
|
+
interface AnimationClip3D {
|
|
3164
|
+
name: string;
|
|
3165
|
+
duration: number;
|
|
3166
|
+
fps: number;
|
|
3167
|
+
tracks: NodeAnimationTrack3D[];
|
|
3168
|
+
}
|
|
3169
|
+
interface Model3DData {
|
|
3170
|
+
name?: string;
|
|
3171
|
+
meshes: Mesh3DData[];
|
|
3172
|
+
materials: Record<string, Material3D>;
|
|
3173
|
+
skeleton?: Skeleton3D;
|
|
3174
|
+
/** Scene graph (glTF): meshes, skins and animation tracks refer to these by index. */
|
|
3175
|
+
nodes?: ModelNode3D[];
|
|
3176
|
+
skins?: Skin3D[];
|
|
3177
|
+
/** Centering and size normalization, applied above the scene graph instead of baked into vertices. */
|
|
3178
|
+
rootTransform?: Mat4;
|
|
3179
|
+
animations: AnimationClip3D[];
|
|
3180
|
+
bounds: {
|
|
3181
|
+
min: Vec3;
|
|
3182
|
+
max: Vec3;
|
|
3183
|
+
center: Vec3;
|
|
3184
|
+
size: Vec3;
|
|
3185
|
+
boundingSphereRadius: number;
|
|
3186
|
+
};
|
|
3187
|
+
}
|
|
3188
|
+
interface LoadModelOptions {
|
|
3189
|
+
center?: boolean;
|
|
3190
|
+
normalizeSize?: number;
|
|
3191
|
+
scale?: number | [number, number, number];
|
|
3192
|
+
smoothNormals?: boolean;
|
|
3193
|
+
defaultMaterial?: Partial<Material3D>;
|
|
3194
|
+
basePath?: string;
|
|
3195
|
+
mtlText?: string;
|
|
3196
|
+
}
|
|
3197
|
+
//#endregion
|
|
3198
|
+
//#region src/loaders/obj-loader.d.ts
|
|
3199
|
+
|
|
3200
|
+
declare function parseOBJ(objText: string, mtlText?: string, options?: LoadModelOptions): Model3DData;
|
|
3201
|
+
declare function parseMTL(mtlText: string): Record<string, Material3D>;
|
|
3202
|
+
declare function loadOBJ(srcOrData: string | ArrayBuffer | Uint8Array, mtlText?: string, options?: LoadModelOptions): Model3DData;
|
|
3203
|
+
//#endregion
|
|
3204
|
+
//#region src/loaders/fbx-loader.d.ts
|
|
3205
|
+
|
|
3206
|
+
declare function parseFBX(bufferOrText: ArrayBuffer | Uint8Array | string, options?: LoadModelOptions): Model3DData;
|
|
3207
|
+
declare function loadFBX(srcOrData: string | ArrayBuffer | Uint8Array, options?: LoadModelOptions): Model3DData;
|
|
3208
|
+
//#endregion
|
|
3209
|
+
//#region src/loaders/stl-loader.d.ts
|
|
3210
|
+
|
|
3211
|
+
//#endregion
|
|
3212
|
+
//#region src/renderer3d/audio-mesh-deform-pipeline.d.ts
|
|
3213
|
+
interface DeformDispatchOptions {
|
|
3214
|
+
config: MeshAudioDeformConfig;
|
|
3215
|
+
audioLatentBuffer: GPUBuffer;
|
|
3216
|
+
vertexCount: number;
|
|
3217
|
+
timeMs?: number;
|
|
3218
|
+
sampleRate?: number;
|
|
3219
|
+
}
|
|
3220
|
+
declare class AudioMeshDeformPipeline {
|
|
3221
|
+
private device;
|
|
3222
|
+
pipeline: GPUComputePipeline;
|
|
3223
|
+
bindGroupLayout: GPUBindGroupLayout;
|
|
3224
|
+
private uniformPool;
|
|
3225
|
+
private deformedBuffers;
|
|
3226
|
+
private uniformData;
|
|
3227
|
+
private uniformUint32;
|
|
3228
|
+
private uniformFloat32;
|
|
3229
|
+
constructor(device: GPUDevice);
|
|
3230
|
+
getOrCreateDeformedBuffer(srcBuffer: GPUBuffer, byteLength: number): GPUBuffer;
|
|
3231
|
+
execute(encoder: GPUCommandEncoder, srcVertexBuffer: GPUBuffer, options: DeformDispatchOptions): GPUBuffer;
|
|
3232
|
+
resetPools(): void;
|
|
3233
|
+
destroy(): void;
|
|
3234
|
+
}
|
|
3235
|
+
//#endregion
|
|
3236
|
+
//#region src/renderer3d/glass-pipeline.d.ts
|
|
3237
|
+
/**
|
|
3238
|
+
* @file renderer3d/glass-pipeline.ts
|
|
3239
|
+
* @module @framefields/webgpu-renderers/renderer3d/glass-pipeline
|
|
3240
|
+
*
|
|
3241
|
+
* WebGPU Pipeline for PBR Glass, Acrylic, Frosted & Metallic Refraction rendering.
|
|
3242
|
+
*/
|
|
3243
|
+
interface GlassUniformData {
|
|
3244
|
+
ior?: number;
|
|
3245
|
+
roughness?: number;
|
|
3246
|
+
f0?: number;
|
|
3247
|
+
transmission?: number;
|
|
3248
|
+
dispersion?: number;
|
|
3249
|
+
envIntensity?: number;
|
|
3250
|
+
fresnelPower?: number;
|
|
3251
|
+
viewportWidth: number;
|
|
3252
|
+
viewportHeight: number;
|
|
3253
|
+
tintColor?: [number, number, number, number];
|
|
3254
|
+
modelMatrix: Float32Array | number[];
|
|
3255
|
+
normalMatrix?: Float32Array | number[];
|
|
3256
|
+
colorTint?: [number, number, number, number];
|
|
3257
|
+
opacity?: number;
|
|
3258
|
+
}
|
|
3259
|
+
declare class GlassPipeline {
|
|
3260
|
+
private device;
|
|
3261
|
+
pipeline: GPURenderPipeline;
|
|
3262
|
+
cameraLayout: GPUBindGroupLayout;
|
|
3263
|
+
modelLayout: GPUBindGroupLayout;
|
|
3264
|
+
glassLayout: GPUBindGroupLayout;
|
|
3265
|
+
backdropLayout: GPUBindGroupLayout;
|
|
3266
|
+
private modelPool;
|
|
3267
|
+
private glassPool;
|
|
3268
|
+
private vertexBuffer;
|
|
3269
|
+
private indexBuffer;
|
|
3270
|
+
private modelData;
|
|
3271
|
+
private glassData;
|
|
3272
|
+
constructor(device: GPUDevice, format: GPUTextureFormat, depthFormat?: GPUTextureFormat, cameraLayout?: GPUBindGroupLayout);
|
|
3273
|
+
resetPools(): void;
|
|
3274
|
+
draw(pass: GPURenderPassEncoder, cameraBindGroup: GPUBindGroup, backdropTexture: GPUTexture, sampler: GPUSampler, data: GlassUniformData): void;
|
|
3275
|
+
destroy(): void;
|
|
3276
|
+
}
|
|
3277
|
+
//#endregion
|
|
3278
|
+
//#region src/renderer3d/mesh3d-pipeline.d.ts
|
|
3279
|
+
interface MeshUniformData {
|
|
3280
|
+
modelMatrix: Float32Array | number[];
|
|
3281
|
+
normalMatrix?: Float32Array | number[];
|
|
3282
|
+
colorTint?: [number, number, number, number];
|
|
3283
|
+
opacity?: number;
|
|
3284
|
+
twoSided?: boolean;
|
|
3285
|
+
wireframe?: boolean;
|
|
3286
|
+
isSkinned?: boolean;
|
|
3287
|
+
skinningMatrices?: Float32Array;
|
|
3288
|
+
material?: "lit" | "unlit" | "toon";
|
|
3289
|
+
/** Toon shading: the shadowed side's color multiplier. */
|
|
3290
|
+
shadeColor?: [number, number, number];
|
|
3291
|
+
/** Texels with alpha below this are discarded (glTF MASK). */
|
|
3292
|
+
alphaCutoff?: number;
|
|
3293
|
+
shininess?: number;
|
|
3294
|
+
roughness?: number;
|
|
3295
|
+
specularIntensity?: number;
|
|
3296
|
+
ambientIntensity?: number;
|
|
3297
|
+
metallic?: number;
|
|
3298
|
+
}
|
|
3299
|
+
interface GPUMeshBuffers {
|
|
3300
|
+
vertexBuffer: GPUBuffer;
|
|
3301
|
+
indexBuffer: GPUBuffer;
|
|
3302
|
+
indexCount: number;
|
|
3303
|
+
indexFormat: GPUIndexFormat;
|
|
3304
|
+
}
|
|
3305
|
+
declare class Mesh3DPipeline {
|
|
3306
|
+
private device;
|
|
3307
|
+
pipelineSingle: GPURenderPipeline;
|
|
3308
|
+
pipelineMrt: GPURenderPipeline;
|
|
3309
|
+
cameraLayout: GPUBindGroupLayout;
|
|
3310
|
+
modelLayout: GPUBindGroupLayout;
|
|
3311
|
+
textureLayout: GPUBindGroupLayout;
|
|
3312
|
+
lightsLayout: GPUBindGroupLayout;
|
|
3313
|
+
private modelPool;
|
|
3314
|
+
private skinningPool;
|
|
3315
|
+
defaultWhiteTexture: GPUTexture;
|
|
3316
|
+
private defaultSkinningBuffer;
|
|
3317
|
+
private modelData;
|
|
3318
|
+
constructor(device: GPUDevice, format: GPUTextureFormat, depthFormat?: GPUTextureFormat, cameraLayout?: GPUBindGroupLayout, lightsLayout?: GPUBindGroupLayout, /** Samples per pixel of the pass this draws into (MSAA). */
|
|
3319
|
+
sampleCount?: number);
|
|
3320
|
+
resetPools(): void;
|
|
3321
|
+
draw(pass: GPURenderPassEncoder, cameraBindGroup: GPUBindGroup, lightsBindGroup: GPUBindGroup, meshBuffers: GPUMeshBuffers, texture: GPUTexture | undefined, sampler: GPUSampler, data: MeshUniformData, useMrt?: boolean): void;
|
|
3322
|
+
destroy(): void;
|
|
3323
|
+
}
|
|
3324
|
+
//#endregion
|
|
3325
|
+
//#region src/renderer3d/motion-blur-pipeline.d.ts
|
|
3326
|
+
/**
|
|
3327
|
+
* @file packages/webgpu-renderers/src/renderer3d/motion-blur-pipeline.ts
|
|
3328
|
+
* WebGPU render pipeline for camera shutter motion blur using screen-space velocity buffers.
|
|
3329
|
+
*/
|
|
3330
|
+
interface MotionBlurPassOptions {
|
|
3331
|
+
shutterAngle?: number;
|
|
3332
|
+
sampleCount?: number;
|
|
3333
|
+
maxVelocity?: number;
|
|
3334
|
+
depthThreshold?: number;
|
|
3335
|
+
curveType?: "box" | "gaussian" | "triangle";
|
|
3336
|
+
width: number;
|
|
3337
|
+
height: number;
|
|
3338
|
+
}
|
|
3339
|
+
declare class MotionBlurPipeline {
|
|
3340
|
+
private device;
|
|
3341
|
+
private pipeline;
|
|
3342
|
+
private bindGroupLayout;
|
|
3343
|
+
private uniformBuffer;
|
|
3344
|
+
private sampler;
|
|
3345
|
+
constructor(device: GPUDevice);
|
|
3346
|
+
render(commandEncoder: GPUCommandEncoder, colorView: GPUTextureView, velocityView: GPUTextureView, depthView: GPUTextureView, targetView: GPUTextureView, options: MotionBlurPassOptions): void;
|
|
3347
|
+
destroy(): void;
|
|
3348
|
+
}
|
|
3349
|
+
//#endregion
|
|
3350
|
+
//#region src/renderer3d/quad3d-pipeline.d.ts
|
|
3351
|
+
interface ModelUniformData {
|
|
3352
|
+
modelMatrix: Float32Array | number[];
|
|
3353
|
+
normalMatrix?: Float32Array | number[];
|
|
3354
|
+
colorTint?: [number, number, number, number];
|
|
3355
|
+
borderColor?: [number, number, number, number];
|
|
3356
|
+
borderWidth?: number;
|
|
3357
|
+
opacity?: number;
|
|
3358
|
+
borderRadius?: number;
|
|
3359
|
+
twoSided?: boolean;
|
|
3360
|
+
width?: number;
|
|
3361
|
+
height?: number;
|
|
3362
|
+
/** Fraction of the texture the layer covers, [u, v] (default the whole texture) */
|
|
3363
|
+
textureExtent?: [number, number];
|
|
3364
|
+
material?: "lit" | "unlit";
|
|
3365
|
+
shininess?: number;
|
|
3366
|
+
roughness?: number;
|
|
3367
|
+
specularIntensity?: number;
|
|
3368
|
+
ambientIntensity?: number;
|
|
3369
|
+
metallic?: number;
|
|
3370
|
+
}
|
|
3371
|
+
type MaterialUniformData = Pick<ModelUniformData, "material" | "shininess" | "roughness" | "specularIntensity" | "ambientIntensity" | "metallic">;
|
|
3372
|
+
/** [shininess, specularIntensity, ambientIntensity, materialMode] as the 3D shaders' lighting reads them. */
|
|
3373
|
+
|
|
3374
|
+
declare class Quad3DPipeline {
|
|
3375
|
+
private device;
|
|
3376
|
+
pipelineSingle: GPURenderPipeline;
|
|
3377
|
+
pipelineMrt: GPURenderPipeline;
|
|
3378
|
+
cameraLayout: GPUBindGroupLayout;
|
|
3379
|
+
modelLayout: GPUBindGroupLayout;
|
|
3380
|
+
textureLayout: GPUBindGroupLayout;
|
|
3381
|
+
lightsLayout: GPUBindGroupLayout;
|
|
3382
|
+
private modelPool;
|
|
3383
|
+
private vertexBuffer;
|
|
3384
|
+
private indexBuffer;
|
|
3385
|
+
private modelData;
|
|
3386
|
+
constructor(device: GPUDevice, format: GPUTextureFormat, depthFormat?: GPUTextureFormat, /** Samples per pixel of the pass this draws into (MSAA). */
|
|
3387
|
+
sampleCount?: number);
|
|
3388
|
+
resetPools(): void;
|
|
3389
|
+
draw(pass: GPURenderPassEncoder, cameraBindGroup: GPUBindGroup, lightsBindGroup: GPUBindGroup, texture: GPUTexture, sampler: GPUSampler, data: ModelUniformData, useMrt?: boolean): void;
|
|
3390
|
+
destroy(): void;
|
|
3391
|
+
}
|
|
3392
|
+
//#endregion
|
|
3393
|
+
//#region src/renderer3d/slug3d-pipeline.d.ts
|
|
3394
|
+
interface Slug3DUniformData extends MaterialUniformData {
|
|
3395
|
+
/** Paragraph px to world */
|
|
3396
|
+
modelMatrix: Mat4;
|
|
3397
|
+
normalMatrix: Mat4;
|
|
3398
|
+
opacity: number;
|
|
3399
|
+
/** Synthetic italic shear */
|
|
3400
|
+
slant: number;
|
|
3401
|
+
twoSided: boolean;
|
|
3402
|
+
/** Fraction of the distance to the eye the glyphs slide toward it, to stack on their plane */
|
|
3403
|
+
depthPull: number;
|
|
3404
|
+
}
|
|
3405
|
+
/** Slug glyphs in the 3D pass: depth-tested, lit and resolution independent. */
|
|
3406
|
+
declare class Slug3DPipeline {
|
|
3407
|
+
private device;
|
|
3408
|
+
private pipelineSingle;
|
|
3409
|
+
private pipelineMrt;
|
|
3410
|
+
private modelLayout;
|
|
3411
|
+
private fontLayout;
|
|
3412
|
+
private modelPool;
|
|
3413
|
+
private instancePool;
|
|
3414
|
+
private fontBindGroups;
|
|
3415
|
+
private modelData;
|
|
3416
|
+
constructor(device: GPUDevice, format: GPUTextureFormat, depthFormat: GPUTextureFormat, cameraLayout: GPUBindGroupLayout, lightsLayout: GPUBindGroupLayout, /** Samples per pixel of the pass this draws into (MSAA). */
|
|
3417
|
+
sampleCount?: number);
|
|
3418
|
+
resetPools(): void;
|
|
3419
|
+
draw(pass: GPURenderPassEncoder, cameraBindGroup: GPUBindGroup, lightsBindGroup: GPUBindGroup, font: SlugFont, instances: Float32Array, instanceCount: number, data: Slug3DUniformData, useMrt?: boolean): void;
|
|
3420
|
+
/** A font's textures live as long as the font: bind them once, not per draw. */
|
|
3421
|
+
private fontBindGroup;
|
|
3422
|
+
destroy(): void;
|
|
3423
|
+
}
|
|
3424
|
+
//#endregion
|
|
3425
|
+
//#region src/renderer3d/renderer3d.d.ts
|
|
3426
|
+
interface DrawQuad3DOpts {
|
|
3427
|
+
/** 3D world position [x, y, z] */
|
|
3428
|
+
position: [number, number, number];
|
|
3429
|
+
/** Layer surface width */
|
|
3430
|
+
width: number;
|
|
3431
|
+
/** Layer surface height */
|
|
3432
|
+
height: number;
|
|
3433
|
+
/** Fraction of the texture the layer covers, [u, v] (default the whole texture) */
|
|
3434
|
+
textureExtent?: [number, number];
|
|
3435
|
+
/** Euler rotations in degrees [rx, ry, rz] */
|
|
3436
|
+
rotation?: Vec3;
|
|
3437
|
+
/** 3D scale [sx, sy, sz] */
|
|
3438
|
+
scale?: Vec3;
|
|
3439
|
+
/** Anchor pivot ratio [ax, ay] (default [0.5, 0.5]) */
|
|
3440
|
+
anchor?: [number, number];
|
|
3441
|
+
/** Layer opacity [0, 1] */
|
|
3442
|
+
opacity?: number;
|
|
3443
|
+
/** RGBA color tint */
|
|
3444
|
+
colorTint?: [number, number, number, number];
|
|
3445
|
+
/** Border color (string, Color, or [r, g, b, a]) */
|
|
3446
|
+
borderColor?: [number, number, number, number] | string | Color;
|
|
3447
|
+
/** Border stroke width */
|
|
3448
|
+
borderWidth?: number;
|
|
3449
|
+
/** Rounded corner radius */
|
|
3450
|
+
borderRadius?: number;
|
|
3451
|
+
/** Whether backface is rendered */
|
|
3452
|
+
twoSided?: boolean;
|
|
3453
|
+
/** Pre-computed model matrix overriding position/rotation/scale if supplied */
|
|
3454
|
+
modelMatrix?: Mat4;
|
|
3455
|
+
/** Pre-computed normal matrix */
|
|
3456
|
+
normalMatrix?: Mat4;
|
|
3457
|
+
/** Material shading mode ("lit" vs "unlit") */
|
|
3458
|
+
material?: "lit" | "unlit";
|
|
3459
|
+
/** Blinn-Phong specular shininess exponent */
|
|
3460
|
+
shininess?: number;
|
|
3461
|
+
/** Roughness factor [0, 1] */
|
|
3462
|
+
roughness?: number;
|
|
3463
|
+
/** Specular highlight intensity [0, 10] */
|
|
3464
|
+
specularIntensity?: number;
|
|
3465
|
+
/** Ambient light reflection multiplier */
|
|
3466
|
+
ambientIntensity?: number;
|
|
3467
|
+
/** Metallic factor [0, 1] */
|
|
3468
|
+
metallic?: number;
|
|
3469
|
+
}
|
|
3470
|
+
interface DrawMesh3DOpts {
|
|
3471
|
+
/** 3D world position [x, y, z] */
|
|
3472
|
+
position?: Vec3;
|
|
3473
|
+
/** Euler rotations in degrees [rx, ry, rz] */
|
|
3474
|
+
rotation?: Vec3;
|
|
3475
|
+
/** 3D scale [sx, sy, sz] */
|
|
3476
|
+
scale?: Vec3;
|
|
3477
|
+
/** Layer opacity [0, 1] */
|
|
3478
|
+
opacity?: number;
|
|
3479
|
+
/** RGBA color tint */
|
|
3480
|
+
colorTint?: [number, number, number, number];
|
|
3481
|
+
/** Whether backface is rendered */
|
|
3482
|
+
twoSided?: boolean;
|
|
3483
|
+
/** Wireframe mode */
|
|
3484
|
+
wireframe?: boolean;
|
|
3485
|
+
/** Whether vertex skinning is enabled */
|
|
3486
|
+
isSkinned?: boolean;
|
|
3487
|
+
/** Skinning matrices (128 * 16 floats) */
|
|
3488
|
+
skinningMatrices?: Float32Array;
|
|
3489
|
+
/** Pre-computed model matrix overriding position/rotation/scale if supplied */
|
|
3490
|
+
modelMatrix?: Mat4;
|
|
3491
|
+
/** Pre-computed normal matrix */
|
|
3492
|
+
normalMatrix?: Mat4;
|
|
3493
|
+
/** Material shading mode */
|
|
3494
|
+
material?: "lit" | "unlit" | "toon";
|
|
3495
|
+
/** Toon shading: the shadowed side's color multiplier */
|
|
3496
|
+
shadeColor?: [number, number, number];
|
|
3497
|
+
/** Discard texels whose alpha is below this (glTF MASK) */
|
|
3498
|
+
alphaCutoff?: number;
|
|
3499
|
+
/** Texture addressing outside [0, 1] */
|
|
3500
|
+
textureWrap?: "repeat" | "clamp" | "mirror";
|
|
3501
|
+
/** Blinn-Phong specular shininess exponent */
|
|
3502
|
+
shininess?: number;
|
|
3503
|
+
/** Roughness factor [0, 1] */
|
|
3504
|
+
roughness?: number;
|
|
3505
|
+
/** Specular highlight intensity [0, 10] */
|
|
3506
|
+
specularIntensity?: number;
|
|
3507
|
+
/** Ambient light reflection multiplier */
|
|
3508
|
+
ambientIntensity?: number;
|
|
3509
|
+
/** Metallic factor [0, 1] */
|
|
3510
|
+
metallic?: number;
|
|
3511
|
+
/** Optional audio latent mesh deformation options */
|
|
3512
|
+
audioDeform?: {
|
|
3513
|
+
config: MeshAudioDeformConfig;
|
|
3514
|
+
latentBuffer: GPUBuffer;
|
|
3515
|
+
timeMs?: number;
|
|
3516
|
+
sampleRate?: number;
|
|
3517
|
+
};
|
|
3518
|
+
}
|
|
3519
|
+
declare class Renderer3D {
|
|
3520
|
+
private device;
|
|
3521
|
+
format: GPUTextureFormat;
|
|
3522
|
+
quad3dPipeline: Quad3DPipeline;
|
|
3523
|
+
slug3dPipeline: Slug3DPipeline;
|
|
3524
|
+
mesh3dPipeline: Mesh3DPipeline;
|
|
3525
|
+
audioMeshDeformPipeline: AudioMeshDeformPipeline;
|
|
3526
|
+
private dofPipeline;
|
|
3527
|
+
private dofBindGroupLayout;
|
|
3528
|
+
private cameraPool;
|
|
3529
|
+
private lightsPool;
|
|
3530
|
+
private cameraUniformBindGroupCache;
|
|
3531
|
+
private lightsUniformBindGroupCache;
|
|
3532
|
+
private samplerCache;
|
|
3533
|
+
private depthTexture;
|
|
3534
|
+
private linearDepthTexture;
|
|
3535
|
+
private msaaColorTexture;
|
|
3536
|
+
private msaaLinearDepthTexture;
|
|
3537
|
+
private cameraUniformData;
|
|
3538
|
+
private meshBuffersCache;
|
|
3539
|
+
private materialTextures;
|
|
3540
|
+
/** Parsed models by source and load options: a model file is read once, not every frame. */
|
|
3541
|
+
private modelCache;
|
|
3542
|
+
private lastCameraPose;
|
|
3543
|
+
private lastCameraBuffer;
|
|
3544
|
+
/**
|
|
3545
|
+
* Samples per pixel in the 3D pass. Mesh silhouettes (extruded text,
|
|
3546
|
+
* models) are rasterized triangles: without MSAA every edge is a hard
|
|
3547
|
+
* stair-step. 4 is the count every WebGPU device supports; 1 turns it off.
|
|
3548
|
+
*/
|
|
3549
|
+
readonly sampleCount: number;
|
|
3550
|
+
constructor(device: GPUDevice, format: GPUTextureFormat, sampleCount?: number);
|
|
3551
|
+
resetPools(): void;
|
|
3552
|
+
getOrCreateDepthTexture(width: number, height: number): GPUTexture;
|
|
3553
|
+
private getOrCreateMsaaTexture;
|
|
3554
|
+
getOrCreateLinearDepthTexture(width: number, height: number): GPUTexture;
|
|
3555
|
+
packCameraUniforms(camera: Camera3DPose, surfaceWidth: number, surfaceHeight: number, time?: number): GPUBuffer;
|
|
3556
|
+
createCameraBindGroup(cameraBuffer: GPUBuffer): GPUBindGroup;
|
|
3557
|
+
getOrCreateLightsBuffer(lights?: Light3DOptions[]): GPUBuffer;
|
|
3558
|
+
beginPass(encoder: GPUCommandEncoder, colorTargetView: GPUTextureView, surfaceWidth: number, surfaceHeight: number, camera: Camera3DPose, loadOp?: GPULoadOp, clearColor?: GPUColor, linearDepthTargetView?: GPUTextureView, lights?: Light3DOptions[]): {
|
|
3559
|
+
pass: GPURenderPassEncoder;
|
|
3560
|
+
cameraBindGroup: GPUBindGroup;
|
|
3561
|
+
cameraBuffer: GPUBuffer;
|
|
3562
|
+
lightsBindGroup: GPUBindGroup;
|
|
3563
|
+
};
|
|
3564
|
+
/**
|
|
3565
|
+
* A layer's unit quad ([-0.5, 0.5] square) in world space:
|
|
3566
|
+
* T(pos) * Rz * Ry * Rx * S(w * sx, h * sy, sz) * T(0.5 - ax, 0.5 - ay, 0).
|
|
3567
|
+
*/
|
|
3568
|
+
private quadModelMatrix;
|
|
3569
|
+
/**
|
|
3570
|
+
* Draw a text layer's captured Slug glyphs on the plane its texture quad
|
|
3571
|
+
* would cover. Glyph coverage is solved per screen pixel, so the text is
|
|
3572
|
+
* as sharp at a glancing angle or up close as it is flat on screen.
|
|
3573
|
+
* `stackBase` is how many passes already sit on this plane (a backdrop
|
|
3574
|
+
* quad): each batch draws just in front of the one before.
|
|
3575
|
+
*/
|
|
3576
|
+
drawSlugText(pass: GPURenderPassEncoder, cameraBindGroup: GPUBindGroup, lightsBindGroup: GPUBindGroup, batches: SlugGlyphBatch[], opts: DrawQuad3DOpts, stackBase?: number, useMrt?: boolean): void;
|
|
3577
|
+
drawTextureQuad(pass: GPURenderPassEncoder, cameraBindGroup: GPUBindGroup, lightsBindGroup: GPUBindGroup, texture: GPUTexture, opts: DrawQuad3DOpts, useMrt?: boolean): void;
|
|
3578
|
+
getOrCreateMeshBuffers(mesh: Mesh3DData): GPUMeshBuffers;
|
|
3579
|
+
deformMesh(encoder: GPUCommandEncoder, mesh: Mesh3DData, audioDeform: {
|
|
3580
|
+
config: MeshAudioDeformConfig;
|
|
3581
|
+
latentBuffer: GPUBuffer;
|
|
3582
|
+
timeMs?: number;
|
|
3583
|
+
sampleRate?: number;
|
|
3584
|
+
}): GPUMeshBuffers;
|
|
3585
|
+
drawMesh3D(pass: GPURenderPassEncoder, cameraBindGroup: GPUBindGroup, lightsBindGroup: GPUBindGroup, meshOrBuffers: Mesh3DData | GPUMeshBuffers, texture: GPUTexture | undefined, opts?: DrawMesh3DOpts, useMrt?: boolean): void;
|
|
3586
|
+
loadModel(srcOrData: string | ArrayBuffer | Uint8Array, format?: "obj" | "fbx" | "gltf" | "glb" | "stl" | "ply" | "vox" | "3ds" | "off" | "auto", options?: LoadModelOptions): Model3DData;
|
|
3587
|
+
/**
|
|
3588
|
+
* The material's diffuse texture on the GPU, decoded once with a full mip
|
|
3589
|
+
* chain (a character's 2K maps are drawn a few hundred pixels tall).
|
|
3590
|
+
*/
|
|
3591
|
+
materialTexture(material: Material3D): Promise<GPUTexture | undefined>;
|
|
3592
|
+
private uploadMaterialTexture;
|
|
3593
|
+
applyDepthOfField(encoder: GPUCommandEncoder, sourceColorTex: GPUTexture, depthTex: GPUTexture, destView: GPUTextureView, cameraBuffer: GPUBuffer): void;
|
|
3594
|
+
destroy(): void;
|
|
3595
|
+
}
|
|
3596
|
+
declare function loadModel3D(srcOrData: string | ArrayBuffer | Uint8Array, format?: "obj" | "fbx" | "gltf" | "glb" | "stl" | "ply" | "vox" | "3ds" | "off" | "auto", options?: LoadModelOptions): Model3DData;
|
|
3597
|
+
//#endregion
|
|
3598
|
+
//#region src/renderer3d/shadow-pipeline.d.ts
|
|
3599
|
+
|
|
3600
|
+
declare class ShadowPipeline {
|
|
3601
|
+
shadowDepthTexture: GPUTexture;
|
|
3602
|
+
shadowDepthView: GPUTextureView;
|
|
3603
|
+
shadowComparisonSampler: GPUSampler;
|
|
3604
|
+
lightViewProjMatrix: Mat4;
|
|
3605
|
+
constructor(device: GPUDevice, resolution?: number);
|
|
3606
|
+
computeDirectionalLightMatrix(lightPos: Vec3, targetPos: Vec3, orthoSize?: number, near?: number, far?: number): Mat4;
|
|
3607
|
+
destroy(): void;
|
|
3608
|
+
}
|
|
3609
|
+
//#endregion
|
|
3610
|
+
//#region src/renderer3d/ssao-pipeline.d.ts
|
|
3611
|
+
interface SSAOPassOptions {
|
|
3612
|
+
projMatrix: Mat4;
|
|
3613
|
+
invProjMatrix?: Mat4;
|
|
3614
|
+
viewMatrix: Mat4;
|
|
3615
|
+
radius?: number;
|
|
3616
|
+
bias?: number;
|
|
3617
|
+
intensity?: number;
|
|
3618
|
+
kernelSamples?: number;
|
|
3619
|
+
blurRadius?: number;
|
|
3620
|
+
depthThreshold?: number;
|
|
3621
|
+
width: number;
|
|
3622
|
+
height: number;
|
|
3623
|
+
}
|
|
3624
|
+
declare class SSAOPipeline {
|
|
3625
|
+
private device;
|
|
3626
|
+
private ssaoPipeline;
|
|
3627
|
+
private blurPipeline;
|
|
3628
|
+
private ssaoBindGroupLayout;
|
|
3629
|
+
private blurBindGroupLayout;
|
|
3630
|
+
private ssaoUniformBuffer;
|
|
3631
|
+
private blurUniformBuffer;
|
|
3632
|
+
private kernelBuffer;
|
|
3633
|
+
private noiseTexture;
|
|
3634
|
+
private sampler;
|
|
3635
|
+
constructor(device: GPUDevice);
|
|
3636
|
+
render(commandEncoder: GPUCommandEncoder, depthView: GPUTextureView, normalView: GPUTextureView, rawAOView: GPUTextureView, finalAOView: GPUTextureView, options: SSAOPassOptions): void;
|
|
3637
|
+
destroy(): void;
|
|
3638
|
+
}
|
|
3639
|
+
//#endregion
|
|
3640
|
+
//#region src/renderer3d/text-extruder.d.ts
|
|
3641
|
+
//#endregion
|
|
3642
|
+
export { AudioExtractorSignalData as $, TEXT_LAYER_DEFAULTS as $n, isEqual as $r, MediaMetadata as $t, SignalRegistryResource as A, ProgrammaticSignal as An, WritableSignal as Ar, ExportResultSchema as At, loadModel3D as B, SignalDataSchema as Bn, deserializeSignalData as Br, GPUTextureBinding as Bt, Path3D as C, NormalizedLandmarkList as Cn, VideoTimingPropsSchema as Cr, DeflickerOptions as Ct, SSAOPipeline as D, OutputItem as Dn, VisionNodeSpec as Dr, EffectConfig as Dt, Renderer3D as E, Output$1 as En, VisionConfig as Er, Effect as Et, buildWGSLSignalFn as F, SignalBuilderConfig as Fn, computed as Fr, FileAssetSchema as Ft, parseOBJ as G, SignalStats as Gn, generateId as Gr, HandleType as Gt, lutStore as H, SignalGateDataSchema as Hn, findSourceAsset as Hr, GeneratorSignalData as Ht, ensureDevice as I, SignalChannelMeta as In, cosineSignal as Ir, FileData as It, textureCache as J, SineSignalOptions as Jn, getFingerprint as Jr, JsonObject as Jt, shaderStore as K, SignalStatsSchema as Kn, getActiveMediaMetadata as Kr, HandleTypeVal as Kt, initHeadlessWebGPU as L, SignalChannelMetaSchema as Ln, createOutputItemSchema as Lr, FileDataSchema as Lt, SlugFontCache as M, RenderDiagnostic as Mn, appendOperation as Mr, ExtendedLayerSchema as Mt, SlugPipeline as N, SegmentationOptions as Nn, checkNodeResultCache as Nr, FaceLandmarksOptions as Nt, ShadowPipeline as O, OutputItemSchema as On, VisionTask as Or, EffectConfigValue as Ot, WebGPUAudioProcessor as P, Signal as Pn, computeVideoCropRenderProps as Pr, FileAsset as Pt, AnyOutputUnionSchema as Q, StorageService as Qn, hasOnlySingleSource as Qr, MIME_TYPES as Qt, inputStore as R, SignalContext as Rn, createVirtualMedia as Rr, FrameContext as Rt, NodeAnimationTrack3D as S, NormalRelightingOptions as Sn, VideoTextPropsSchema as Sr, DataTypes as St, Renderer2D as T, OpticalFlowOptions as Tn, VirtualMediaDataSchema as Tr, DetectedObject as Tt, parseFBX as U, SignalMathData as Un, frameArraySignal as Ur, GeneratorSignalDataSchema as Ut, loadOBJ as V, SignalGateData as Vn, extractSvgDimensions as Vr, GateSignalOptions as Vt, parseMTL as W, SignalMathDataSchema as Wn, frameSignal as Wr, GlobalCompositeOperation as Wt, AnimationTypeSchema as X, SingleOutputGenericSchema as Xn, getMediaType as Xr, JsonValueSchema as Xt, AnimationType as Y, SingleOutputGeneric as Yn, getLeafMediaType as Yr, JsonValue as Yt, AnyOutputUnion as Z, SourceOperationSchema as Zn, getRenderFingerprint as Zr, Landmark3D as Zt, MasterAudioEntry as _, NodeResultSchema as _n, VideoAnimationSchema as _r, DEFAULT_MEDIA_DIMENSION as _t, AudioMeshDeformPipeline as a, reportRenderDiagnostic as ai, MediaSourceInput as an, TextOperationSchema as ar, CAPTION_LAYER_DEFAULTS as at, Model3DData as b, NodeVisualConfig as bn, VideoSpatialPropsSchema as br, DataTypeEnum as bt, BlendMode as c, signal as ci, ModerationError as cn, TimelineSegmentSchema as cr, CannyOptions as ct, EffectPipeline as d, stampResult as di, MultiOutputGenericSchema as dn, TrackedObject as dr, ConfigSchemaRegistry as dt, isSignal as ei, MediaMetadataSchema as en, TensorData as er, AudioExtractorSignalDataSchema as et, GPULightData as f, takeRenderDiagnostics as fi, NodeMetadata as fn, Transition as fr, ConnectedInput as ft, LoadModelOptions as g, NodeResult as gn, VideoAnimation as gr, DEFAULT_FPS as gt, Light3DOptions as h, NodeProcessorParams as hn, TransitionTypeSchema as hr, DEFAULT_DURATION_MS as ht, AudioLatentTrackCache as i, registerSignalDependency as ii, MediaSourceDescriptor as in, TensorPipelineConfig as ir, BaseVideoLayerPropsSchema as it, Skeleton3D as j, ProgrammaticSignalOptions as jn, XYPosition as jr, ExtendedLayer as jt, SignalRegistry as k, PoseSkeletonOptions as kn, VisionVariant as kr, ExportResult as kt, Bone3D as l, signalBuilder as li, ModerationUnrefundableError as ln, TimelineTransform as lr, ConfigHandle as lt, Light3D as m, updateClockSignals as mi, NodeProcessorContext as mn, TransitionType as mr, DATA_TYPE_EXTENSIONS as mt, AudioLatentData as n, programmaticSignal as ni, MediaOperationSchema as nn, TensorFormat as nr, BaseMediaOperationPropsSchema as nt, AudioSignalComputeConfig as o, resolveMediaMimeType as oi, MediaSourceSchema as on, TextSpan as or, COMPOSITE_OPERATIONS as ot, GlassPipeline as p, timeSignal as pi, NodeMetadataSchema as pn, TransitionSchema as pr, ControlNetConditioningOutputs as pt, signalRegistry as q, SignalValue as qn, getFileDataMetadata as qr, JsonArray as qt, AudioLatentEngine as r, progressSignal as ri, MediaService as rn, TensorNode as rr, BaseVideoLayerProps as rt, AudioSignalComputePipeline as s, serializeSignalData as si, MeshAudioDeformConfig as sn, TextSpanMark as sr, COMPOSITOR_DEFAULTS as st, AnimationClip3D as t, isVirtualMediaData as ti, MediaOperation as tn, TensorDimensions as tr, BaseMediaOperationProps as tt, Camera3D as u, sineSignal as ui, MultiOutputGeneric as un, TimelineTransformSchema as ur, ConfigHandleSchema as ut, Material3D as v, NodeRunFunction as vn, VideoLayerType as vr, DataForType as vt, RenderContextValue as w, ObjectBoundingBox as wn, VirtualMediaData as wr, DepthNormalsOptions as wt, MotionBlurPipeline as x, NodeVisualConfigSchema as xn, VideoStylePropsSchema as xr, DataTypeVal as xt, Mesh3DData as y, NodeValidationFn as yn, VideoLayerTypeSchema as yr, DataType as yt, loadFBX as z, SignalData as zn, dataTypeColors as zr, FrameSignal as zt };
|
|
3643
|
+
//# sourceMappingURL=index-D2jDC7O5.d.mts.map
|