mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-04 16:42:27 +00:00
1 line
3.4 KiB
JSON
1 line
3.4 KiB
JSON
{"html":"<!doctype html>\n<html lang=\"en\">\n <head>\n <meta charset=\"UTF-8\" />\n <meta name=\"viewport\" content=\"width=1920, height=1080\" />\n <title>Slot Machine Roll - Demo</title>\n <script src=\"https://cdn.jsdelivr.net/npm/gsap@3.14.2/dist/gsap.min.js\"></script>\n <style>\n * {\n box-sizing: border-box;\n }\n html,\n body {\n margin: 0;\n width: 1920px;\n height: 1080px;\n overflow: hidden;\n }\n #demo {\n width: 1920px;\n height: 1080px;\n display: grid;\n place-items: center;\n background: #f7f7f8;\n font-family: Inter, system-ui, sans-serif;\n }\n .demo-frame {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 32px;\n /* ponytail: scale on non-GSAP wrapper — safe, GSAP only animates --hf-slot-y on inner <i> */\n transform: scale(1.85);\n transform-origin: center center;\n }\n .slot-card {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 24px;\n background: #ffffff;\n border: 1px solid #e4e4e7;\n border-radius: 14px;\n padding: 40px 56px;\n box-shadow: 0 24px 70px rgba(0, 0, 0, 0.1);\n }\n .slot-label {\n font-family: Inter, system-ui, sans-serif;\n font-size: 11px;\n font-weight: 500;\n letter-spacing: 0.08em;\n text-transform: uppercase;\n color: #71717a;\n }\n .hf-catalog-slot-machine-roll {\n color: #18181b;\n font-family: Inter, system-ui, sans-serif;\n font-weight: 900;\n letter-spacing: -0.04em;\n }\n .hf-catalog-slot-machine-roll {\n display: inline-flex;\n gap: 6px;\n height: 74px;\n overflow: hidden;\n font:\n 900 74px/1 ui-monospace,\n SFMono-Regular,\n Menlo,\n monospace;\n }\n .hf-catalog-slot-machine-roll span {\n display: block;\n height: 74px;\n overflow: hidden;\n }\n .hf-catalog-slot-machine-roll i {\n display: block;\n font-style: normal;\n transform: translateY(var(--hf-slot-y, 0px));\n }\n </style>\n </head>\n <body>\n <div\n id=\"demo\"\n data-composition-id=\"slot-machine-roll-demo\"\n data-start=\"0\"\n data-width=\"1920\"\n data-height=\"1080\"\n data-duration=\"5\"\n >\n <div class=\"demo-frame\">\n <div class=\"slot-card\">\n <div class=\"slot-label\">Slot Machine Roll</div>\n <div class=\"hf-catalog-slot-machine-roll\">\n <span\n ><i>0<br />A</i></span\n ><span\n ><i>0<br />7</i></span\n ><span\n ><i>0<br />K</i></span\n >\n </div>\n </div>\n </div>\n <script>\n const tl = gsap.timeline({ paused: true });\n const startTime = 0.5;\n tl.fromTo(\n \".hf-catalog-slot-machine-roll i\",\n { \"--hf-slot-y\": \"0px\" },\n { \"--hf-slot-y\": \"-74px\", duration: 0.52, stagger: 0.06, ease: \"power3.inOut\" },\n startTime,\n );\n tl.set({}, {}, 5);\n window.__timelines = window.__timelines || {};\n window.__timelines[\"slot-machine-roll-demo\"] = tl;\n </script>\n </div>\n </body>\n</html>\n"} |