@fxshelf/word-tunnel
Version:
3D keyword tunnel word-cloud for React and Vue — perspective fly-through text. Zero animation-lib deps. Copy-as-source friendly.
1 lines • 2.25 kB
Source Map (JSON)
{"version":3,"sources":["../src/core/styles.css"],"sourcesContent":[".fx-wt {\n position: relative;\n overflow: hidden;\n isolation: isolate;\n}\n\n.fx-wt__stage {\n position: absolute;\n inset: 0;\n pointer-events: none;\n user-select: none;\n perspective: var(--fx-wt-perspective, 900px);\n perspective-origin: 50% 50%;\n}\n\n.fx-wt__space {\n position: absolute;\n inset: 0;\n transform-style: preserve-3d;\n}\n\n.fx-wt__word {\n position: absolute;\n top: 50%;\n left: 50%;\n color: var(--fx-wt-color, #fff);\n font-size: var(--fx-wt-font-size, 24px);\n line-height: 1;\n white-space: nowrap;\n transform-style: preserve-3d;\n backface-visibility: hidden;\n will-change: transform, opacity;\n animation-name: var(--fx-wt-anim, fx-wt-converge);\n animation-timing-function: linear;\n animation-iteration-count: infinite;\n}\n\n.fx-wt__content {\n position: relative;\n z-index: 1;\n height: 100%;\n}\n\n/* 默认 keyframes;自定义 fadeIn/fadeOut 时由组件注入覆盖名 */\n@keyframes fx-wt-converge {\n 0% {\n opacity: 0;\n transform: translate3d(\n calc(-50% + var(--fx-wt-x)),\n calc(-50% + var(--fx-wt-y)),\n var(--fx-wt-z0)\n );\n }\n\n 10% {\n opacity: var(--fx-wt-op);\n }\n\n 88% {\n opacity: calc(var(--fx-wt-op) * 0.7);\n }\n\n 100% {\n opacity: 0;\n transform: translate3d(\n calc(-50% + var(--fx-wt-x)),\n calc(-50% + var(--fx-wt-y)),\n var(--fx-wt-z1)\n );\n }\n}\n"],"mappings":";AAAA,CAAC;AACC,YAAU;AACV,YAAU;AACV,aAAW;AACb;AAEA,CAAC;AACC,YAAU;AACV,SAAO;AACP,kBAAgB;AAChB,eAAa;AACb,eAAa,IAAI,mBAAmB,EAAE;AACtC,sBAAoB,IAAI;AAC1B;AAEA,CAAC;AACC,YAAU;AACV,SAAO;AACP,mBAAiB;AACnB;AAEA,CAAC;AACC,YAAU;AACV,OAAK;AACL,QAAM;AACN,SAAO,IAAI,aAAa,EAAE;AAC1B,aAAW,IAAI,iBAAiB,EAAE;AAClC,eAAa;AACb,eAAa;AACb,mBAAiB;AACjB,uBAAqB;AACrB,eAAa,SAAS,EAAE;AACxB,kBAAgB,IAAI,YAAY,EAAE;AAClC,6BAA2B;AAC3B,6BAA2B;AAC7B;AAEA,CAAC;AACC,YAAU;AACV,WAAS;AACT,UAAQ;AACV;AAGA,WAAW;AACT;AACE,aAAS;AACT,eAAW,YACT,KAAK,KAAK,EAAE,IAAI,WAAW,EAC3B,KAAK,KAAK,EAAE,IAAI,WAAW,EAC3B,IAAI;AAER;AAEA;AACE,aAAS,IAAI;AACf;AAEA;AACE,aAAS,KAAK,IAAI,YAAY,EAAE;AAClC;AAEA;AACE,aAAS;AACT,eAAW,YACT,KAAK,KAAK,EAAE,IAAI,WAAW,EAC3B,KAAK,KAAK,EAAE,IAAI,WAAW,EAC3B,IAAI;AAER;AACF;","names":[]}