85453da49f
CodeQL / Analyze (javascript-typescript) (push) Waiting to run
Docs / Validate docs (push) Waiting to run
CodeQL / Analyze (actions) (push) Waiting to run
CodeQL / Analyze (python) (push) Waiting to run
Sync skills to ClawHub / Publish changed skills (push) Waiting to run
regression / regression-shards (style-16-prod style-9-prod style-17-prod iframe-render-compat variables-prod mp4-h265-sdr, shard-4) (push) Has been cancelled
regression / regression-shards (style-4-prod style-11-prod style-2-prod animejs-adapter typegpu-adapter parallel-capture-regression, shard-5) (push) Has been cancelled
regression / regression-shards (style-7-prod style-8-prod style-10-prod css-spinner-render-compat webm-transparency mp4-h264-sdr webm-vp9, shard-3) (push) Has been cancelled
regression / regression-shards (sub-composition-video style-18-prod raf-ball-render-compat font-variant-numeric sub-comp-t0 sub-comp-id-selector, shard-7) (push) Has been cancelled
Windows render verification / Detect changes (push) Has been cancelled
Windows render verification / Preflight (lint + format) (push) Has been cancelled
Windows render verification / Render on windows-latest (push) Has been cancelled
Windows render verification / Tests on windows-latest (push) Has been cancelled
CI / Detect changes (push) Has been cancelled
CI / Build (push) Has been cancelled
CI / Lint (push) Has been cancelled
CI / Fallow audit (push) Has been cancelled
CI / Format (push) Has been cancelled
CI / Typecheck (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Producer: integration tests (push) Has been cancelled
CI / Producer: unit tests (push) Has been cancelled
CI / File size check (push) Has been cancelled
CI / Test: skills (push) Has been cancelled
CI / Skills: manifest in sync (push) Has been cancelled
CI / CLI: npx shim (macos-latest) (push) Has been cancelled
CI / CLI: npx shim (ubuntu-latest) (push) Has been cancelled
CI / CLI: npx shim (windows-latest) (push) Has been cancelled
CI / SDK: unit + contract + smoke (push) Has been cancelled
CI / Test: runtime contract (push) Has been cancelled
CI / Studio: load smoke (push) Has been cancelled
CI / Smoke: global install (push) Has been cancelled
CI / CLI smoke (required) (push) Has been cancelled
CI / Semantic PR title (push) Has been cancelled
Player perf / Detect changes (push) Has been cancelled
Player perf / Preflight (lint + format) (push) Has been cancelled
Player perf / player-perf (push) Has been cancelled
Player perf / Perf: drift (push) Has been cancelled
Player perf / Perf: fps (push) Has been cancelled
Player perf / Perf: parity (push) Has been cancelled
Player perf / Perf: scrub (push) Has been cancelled
Player perf / Perf: load (push) Has been cancelled
preview-regression / Detect changes (push) Has been cancelled
preview-regression / Preflight (lint + format) (push) Has been cancelled
preview-regression / Preview parity (push) Has been cancelled
preview-regression / preview-regression (push) Has been cancelled
regression / regression (push) Has been cancelled
regression / Detect changes (push) Has been cancelled
regression / Preflight (lint + format) (push) Has been cancelled
regression / regression-shards (hdr-regression style-5-prod style-3-prod mov-prores, shard-1) (push) Has been cancelled
regression / regression-shards (overlay-montage-prod style-12-prod chat missing-host-comp-id png-sequence portrait-edge-bleed, shard-6) (push) Has been cancelled
regression / regression-shards (style-13-prod style-6-prod vignelli-stacking gsap-letters-render-compat audio-mux-parity, shard-8) (push) Has been cancelled
regression / regression-shards (style-15-prod hdr-hlg-regression style-1-prod many-cuts vfr-screen-recording render-symlinked-assets, shard-2) (push) Has been cancelled
238 lines
7.0 KiB
HTML
Vendored
238 lines
7.0 KiB
HTML
Vendored
<!-- demo.html — used by scripts/generate-catalog-previews.ts to render the
|
|
catalog preview video. Not installed by `hyperframes add morph-text`.
|
|
Keep in sync with morph-text.html. -->
|
|
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=1920, height=1080" />
|
|
<title>Morph Text</title>
|
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
<link
|
|
href="https://fonts.googleapis.com/css2?family=Figtree:wght@900&display=block"
|
|
rel="stylesheet"
|
|
/>
|
|
<script src="https://cdn.jsdelivr.net/npm/gsap@3.14.2/dist/gsap.min.js"></script>
|
|
<style>
|
|
*,
|
|
*::before,
|
|
*::after {
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
html,
|
|
body {
|
|
margin: 0;
|
|
width: 1920px;
|
|
height: 1080px;
|
|
overflow: hidden;
|
|
background: #fff;
|
|
}
|
|
|
|
#morph-text {
|
|
position: relative;
|
|
width: 1920px;
|
|
height: 1080px;
|
|
}
|
|
|
|
/* Word list: hidden source of truth — edit <li> items in Studio. */
|
|
#morph-words {
|
|
display: none;
|
|
list-style: none;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
#morph-filter {
|
|
position: absolute;
|
|
width: 0;
|
|
height: 0;
|
|
overflow: hidden;
|
|
pointer-events: none;
|
|
}
|
|
|
|
#morph-wrapper {
|
|
position: absolute;
|
|
top: 50%;
|
|
left: 0;
|
|
transform: translateY(-50%);
|
|
width: 1920px;
|
|
height: 210px;
|
|
filter: drop-shadow(0 10px 44px rgba(0, 0, 0, 0.5))
|
|
drop-shadow(0 3px 10px rgba(0, 0, 0, 0.25));
|
|
}
|
|
|
|
#morph-display {
|
|
width: 100%;
|
|
height: 100%;
|
|
filter: none;
|
|
}
|
|
|
|
#morph-a,
|
|
#morph-b {
|
|
position: absolute;
|
|
width: 100%;
|
|
display: inline-block;
|
|
text-align: center;
|
|
font-size: 120pt;
|
|
font-weight: 900;
|
|
line-height: 1;
|
|
user-select: none;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div
|
|
id="morph-text"
|
|
data-composition-id="morph-text"
|
|
data-timeline-locked
|
|
data-width="1920"
|
|
data-height="1080"
|
|
data-duration="15"
|
|
data-fps="30"
|
|
data-morph-speed="1"
|
|
data-morph-pause="1.5"
|
|
>
|
|
<!--
|
|
Edit words here — one <li> per word or phrase.
|
|
data-font : CSS font-family (e.g. "'Figtree', sans-serif")
|
|
data-color : text color hex (e.g. "#000000")
|
|
Adjust data-morph-speed (seconds per morph) and data-morph-pause (hold time) above.
|
|
-->
|
|
<ol id="morph-words" aria-hidden="true">
|
|
<li data-font="'Figtree', sans-serif" data-color="#000000">Do more with less.</li>
|
|
<li data-font="'Figtree', sans-serif" data-color="#000000">Built for what's next.</li>
|
|
<li data-font="'Figtree', sans-serif" data-color="#000000">Fast. Focused. Powerful.</li>
|
|
<li data-font="'Figtree', sans-serif" data-color="#000000">Your work, amplified.</li>
|
|
<li data-font="'Figtree', sans-serif" data-color="#000000">Start free today.</li>
|
|
</ol>
|
|
|
|
<svg id="morph-filter" aria-hidden="true" focusable="false">
|
|
<defs>
|
|
<filter id="morph-threshold">
|
|
<feColorMatrix
|
|
in="SourceGraphic"
|
|
type="matrix"
|
|
values="1 0 0 0 0
|
|
0 1 0 0 0
|
|
0 0 1 0 0
|
|
0 0 0 255 -100"
|
|
/>
|
|
</filter>
|
|
</defs>
|
|
</svg>
|
|
|
|
<div id="morph-wrapper">
|
|
<div id="morph-display">
|
|
<span id="morph-a"></span>
|
|
<span id="morph-b"></span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
(function () {
|
|
"use strict";
|
|
|
|
var container = document.getElementById("morph-text");
|
|
var display = document.getElementById("morph-display");
|
|
var elA = document.getElementById("morph-a");
|
|
var elB = document.getElementById("morph-b");
|
|
|
|
var words = Array.from(document.querySelectorAll("#morph-words li"))
|
|
.map(function (el) {
|
|
return {
|
|
text: el.textContent.trim(),
|
|
font: el.dataset.font || "'Figtree', sans-serif",
|
|
color: el.dataset.color || "#111111",
|
|
};
|
|
})
|
|
.filter(function (w) {
|
|
return w.text;
|
|
});
|
|
|
|
if (words.length < 2) {
|
|
words = [
|
|
{ text: "Morph", font: "'Figtree', sans-serif", color: "#111111" },
|
|
{ text: "Text", font: "'Figtree', sans-serif", color: "#111111" },
|
|
];
|
|
}
|
|
|
|
var morphSpeed = parseFloat(container.dataset.morphSpeed || "1");
|
|
var morphPause = parseFloat(container.dataset.morphPause || "1.5");
|
|
var duration = parseFloat(container.dataset.duration || "9");
|
|
var stepDur = morphSpeed + morphPause;
|
|
var totalWordDur = words.length * stepDur;
|
|
|
|
function applyMorph(T) {
|
|
var t = T % totalWordDur;
|
|
var stepIdx = Math.floor(t / stepDur);
|
|
var stepT = t - stepIdx * stepDur;
|
|
var frac = Math.min(stepT / morphSpeed, 1);
|
|
|
|
var wA = words[stepIdx % words.length];
|
|
var wB = words[(stepIdx + 1) % words.length];
|
|
|
|
elA.textContent = wA.text;
|
|
elA.style.fontFamily = wA.font;
|
|
elA.style.color = wA.color;
|
|
|
|
elB.textContent = wB.text;
|
|
elB.style.fontFamily = wB.font;
|
|
elB.style.color = wB.color;
|
|
|
|
if (frac <= 0) {
|
|
display.style.filter = "none";
|
|
elA.style.filter = "";
|
|
elA.style.opacity = "1";
|
|
elB.style.filter = "";
|
|
elB.style.opacity = "0";
|
|
} else if (frac >= 1) {
|
|
display.style.filter = "none";
|
|
elA.style.filter = "";
|
|
elA.style.opacity = "0";
|
|
elB.style.filter = "";
|
|
elB.style.opacity = "1";
|
|
} else {
|
|
display.style.filter = "url(#morph-threshold)";
|
|
var blurB = Math.max(0, Math.min(8 / frac - 8, 100));
|
|
var blurA = Math.max(0, Math.min(8 / (1 - frac) - 8, 100));
|
|
elB.style.filter = "blur(" + blurB + "px)";
|
|
elB.style.opacity = frac;
|
|
elA.style.filter = "blur(" + blurA + "px)";
|
|
elA.style.opacity = 1 - frac;
|
|
}
|
|
}
|
|
|
|
if (matchMedia("(prefers-reduced-motion: reduce)").matches) {
|
|
elA.textContent = words[0].text;
|
|
elA.style.fontFamily = words[0].font;
|
|
elA.style.color = words[0].color;
|
|
elA.style.opacity = "1";
|
|
display.style.filter = "none";
|
|
return;
|
|
}
|
|
|
|
var proxy = { t: 0 };
|
|
var tl = gsap.timeline({ paused: true });
|
|
|
|
tl.to(proxy, {
|
|
t: duration,
|
|
duration: duration,
|
|
ease: "none",
|
|
onUpdate: function () {
|
|
applyMorph(proxy.t);
|
|
},
|
|
});
|
|
|
|
applyMorph(0);
|
|
tl.seek(0);
|
|
|
|
window.__timelines = window.__timelines || {};
|
|
window.__timelines["morph-text"] = tl;
|
|
})();
|
|
</script>
|
|
</body>
|
|
</html>
|