mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-01 19:42:03 +00:00
* feat(registry): say what a promoted template's slots mean, not where they sit
Every declaration described its slot by position — appName was "small credit in the corner
of every banner" — and every editing contract described the supplied brand only by what it
may not touch, chatgpt-exchange going as far as "only the subject discussed inside the
conversation". An agent filling those slots has nothing telling it that the video is an
advertisement for that brand, and remixes shipped with an invented brand instead of the
real one.
Adds `portrays` to the 35 identity-bearing variables across seven templates: what the slot
stands for, as a list, kept orthogonal to `role` (which says which aspect of the
composition a knob affects, not what a value means to a viewer). Rewrites those variables'
descriptions to state meaning, and gives every TEMPLATE.md the affirmative sentence it was
missing. notes-reveal now records honestly that it declares no identity slot at all, which
is why a remix of it cannot carry a brand.
`portrays` is optional metadata: rendering ignores it, the promoted contract still projects
{id, type, role}, and packages that predate it keep working. Variable ids, types, roles,
labels, and defaults are untouched, so installs and renders see the same contract.
* feat(notes-reveal): give the template somewhere to say whose ad it is
This was the one promoted template that declared no identity slot at all, and the
previous commit could only record that honestly. A remix of it could not name the
advertiser, could not carry its domain, and had nowhere to place its mark — so the
ad it produced was unattributable no matter how good the copy was.
The closing card ends at y=1708, leaving 212px of dotted scene. A sign-off strip
lives there: `brandLogo` (portrays subject_logo) above `brandDomain` (portrays
subject_domain), in the card's own plum and Courier Prime. Putting it outside the
card means the hand-lettered headline and the checklist keep the geometry they were
designed with — verified by `hyperframes check`, which reports the same 0 errors and
the same warning counts as origin/main, with one more contrast check (367/367 AA).
No name slot: this template has no text slot that can hold a bare brand name.
`cardTop`'s marker line continues into the fixed words "OF ONE FILE", and a name set
beside a wordmark reads twice — rendering it proved that before this was committed.
The mark plus the domain carry the attribution, which is what the other end-card
templates do.
Rendered to check rather than assumed: the packaged default reads as the HyperFrames
wordmark over hyperframes.heygen.com, and a resolved symbol mark (Notion's cube over
notion.com) sits correctly in the same strip.
* fix(notes-reveal): make the note the ad, and stop the headline leaving the card
Three defects, all visible in the reported gamma remix.
The seven body lines carried their characters as pre-split `<span class="ch">`
elements so the reveal animation could address them by id. That made the note
permanently unwritable: 46% of the 24.9s runtime, and the only place the note
says anything, was fixed copy about making videos with HyperFrames -- shipped
inside an advertisement for a Dutch DIY chain. The spans are now built at
runtime from seven declared variables, keeping the same ids, so the animation
is untouched and the copy is the brand's.
`cardMid` and `cardBottom` ("OF", "ONE FILE") were literals with no variable at
all, so a remix could only ever change the first of the card's three lines.
Every text slot sat at a fixed left edge on one line, guarded only by a
character cap -- the wrong unit. `cardTop` allowed 12 characters; "THE POWER"
(9) fits and "CREATE DECKS" (12) does not, which is why both reported gamma
remixes shipped with the closing headline over the edge of the card. Slots are
now fitted to their box at render time, shrinking type only as far as needed and
never past the designed size. The card headlines also carried
`data-layout-allow-overflow`, switching off the one check that would have caught
it; those waivers are gone. The note's title and body keep theirs, because
`#note-body` is translated across the whole scene and leaves the canvas by
design.
Timing is preserved rather than regenerated: each body line is revealed inside
the frame window the packaged rhythm already used, so `JUMPS` and the hand-tuned
`SCROLLS` curves stay valid and the composition is still 24.867s for any length
of copy. A line whose length matches the packaged copy keeps its rhythm frame
for frame.
Verified: rendered with the packaged defaults, SSIM 1.000000 across all 746
frames against the previous template -- the design is bit-identical. Rendered
with the gamma values that overflowed, and with a stress set of long and
one-word values: both stay inside the card and the note, both still 24.867s.
`hyperframes check` passes, with layout warnings down from 28 to 8 and no new
issue class. Note that `check` takes no variable values, so it guards the
template's defaults and the fit is what guards a remix.
* fix(notes-reveal): make the fit floor and the character caps agree
A cap that admits a string still too wide at the floor font size puts the text
back outside its box -- the exact bug the fit was added for. With the floor at
0.6 and the title cap at 40, a 40-character title still overflowed `#note-body`
by 30px, because "Things nobody told me" is 21 characters and 900px at 88px, so
42.9px per character, and 40 characters need to reach about 0.45 of the design
size to fit.
Floor to 0.45 and the caps in: titles 34, body lines 52, cardTop and cardBottom
16. Every cap is now satisfiable with room to spare, and the common case stays
far from the floor.
Found by probing all eight promoted templates with values about 1.8x the length
of their packaged defaults, which is the length a real remix produces; short
sentinel values only ever prove a slot is wired.
Defaults are unaffected: SSIM 1.000000 across all 746 frames, still 24.867s,
`hyperframes check` still passes.
* fix(exchange): scroll the composer to follow the caret
`prompt` is an editable slot in both templates, but `.comp-text` is a
fixed-width single line with `white-space: pre` inside a composer that clips,
and the packaged prompt already reaches the mic -- it has no headroom at all.
A longer prompt therefore slid under the mic and the send button and lost its
tail, with the caret hidden behind them: the remix read as having typed into
nowhere, cut mid-word.
Both now scroll the typed text left to keep the caret in view, the way a real
single-line input does, on the very per-character times the reveal already uses.
The limit is measured to the opaque round button rather than the mic, because the
packaged prompt's caret already sits 2px past the mic's left edge in
chatgpt-exchange -- measuring to the mic would scroll the packaged composition.
Shrink-to-fit was the other option and it is worse: with no headroom it shrinks
the packaged prompt too, and it still cannot absorb a prompt twice as long
without unreadable type. It was tried, measured, and dropped.
A prompt that fits emits no keyframes and the element is never handed to GSAP at
all -- even a zero translate stamps a transform, which changes how the text
rasterizes.
claude-exchange puts this inside its existing `build()`, which already re-runs on
`document.fonts.ready`, so it measures the final font. chatgpt-exchange builds
once, so its scroll keyframes are kept in a list and rebuilt on the same event.
Verified on the packaged defaults: claude-exchange SSIM 1.000000 across 1284
frames. chatgpt-exchange is not frame-deterministic -- rendering it twice
unchanged gives 0.999959 with 249 frames under 0.9999, and before-vs-after gives
0.999967 with the same 249 -- so the change sits inside its own noise. Durations
unchanged at 14.9s and 21.4s. `hyperframes check` reports byte-identical results
to the unchanged templates.
* fix(notes-reveal): fit the checklist cells instead of counting their characters
The three checklist rows were the only text slots with no width fit, so
their character cap was doing the job a measurement should: it was set to 8
because that was the widest the packaged strings needed, and a gamma.com
remix delivered "DIRECT MEE" and rendered "DIRECT M".
Fit the labels and values like every other text slot -- dividing the
label's scaleX(0.86) back out of its column, since fitWidth measures the
untransformed width -- and return the cap to a backstop at 18.
"DIRECT MEE" needs no shrink at all: it ends at x=694 against a tick at
x=715, so the truncation was never about room. Measured: the packaged
defaults still render at their authored 44px and 50px, and all three values
clear the tick.
* fix(chatgpt-exchange): nest the caret scroll so its rebuild can be undone
`tl.to()` returns the TIMELINE, not the tween it created, so `caretScrollTweens`
held 49 references to the master timeline. The fonts-ready rebuild then called
`.kill()` on the master timeline 49 times and re-added its keyframes on top of
the ones it meant to replace. Measured with an overflowing prompt:
master timeline detached from the global timeline (tl.parent -> null)
scroll tweens on #cge-typed: 49 before the rebuild, 98 after
49 timestamps left with two competing tweens on the same property
GSAP's `Animation.kill()` interrupts and detaches rather than killing children,
so the composition kept rendering under an explicit seek -- which is why the
packaged-defaults SSIM check passed and never saw this. It is still wrong: the
timeline is off the ticker, and the stale keyframes were measured against the
fallback font.
Only an overflowing prompt reaches it, i.e. exactly the remix the scroll exists
for. The packaged prompt emits no steps, so nothing is created and nothing is
killed.
Now one nested child timeline holds the steps: a real object that can be killed
and replaced, and killing it cannot reach `tl`. Children sit at the same absolute
times and the nest is added at 0, so the motion is unchanged.
Verified: overflowing prompt holds at 49 scroll tweens across the rebuild with no
duplicated timestamps and the timeline stays attached. Packaged defaults against
the pre-feature baseline -- SSIM 0.999998 over 894 frames, 13 frames below
0.9999 against a 249-frame noise floor for this template, duration 14.9s
unchanged.
Found by Magi in review of #3562.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* feat(lint): catch a timeline's return value being treated as a tween
Magi asked for a regression that makes the caret-scroll failure unable to return.
A render fixture cannot be that guard, and neither can a unit test. Both were
measured before choosing this:
- The unit-test DOM has no layout. In happy-dom `getBoundingClientRect()` is
{left: 0, width: 0} and offsetWidth/offsetLeft are 0, so the template's own
guard computes limit = -8 and returns before collecting a single keyframe,
whatever the prompt length. `document.fonts` does not exist there either, so
the rebuild never runs. Both preconditions are unreachable -- the test would
pass on the broken code and the fixed code alike. Rames flagged this; verified.
- A render fixture would not fail either. Rendering the long prompt through the
real pipeline on the broken vs fixed template gives SSIM 0.999994 over 894
frames with ZERO frames below 0.999. The renderer drives the composition by
explicit seek, and the duplicated keyframes are added last so they win, which
is exactly why `.kill()` on the master timeline stayed invisible. A golden mp4
would have cost a fixture and a shard and guarded nothing.
What is testable is the root cause, and it is a static property: `tl.to()` returns
the TIMELINE, `gsap.to()` returns a Tween, and the two read identically. So the
guard is a lint rule, which needs no DOM, fires on the source, and covers every
composition in the registry rather than this one template.
The rule keys on the timeline handles `collectTimelineVarNames` already finds,
which is what keeps `gsap.to()` and `Array.from()` out of it. Pushing a timeline
return into an array is flagged outright -- that is the collect-to-discard shape.
A bound return is flagged only once something tween-scoped is aimed at it, so a
pointless-but-harmless capture stays quiet.
Verified against the real files, not just synthetic ones: the pre-fix
chatgpt-exchange raises exactly one error and names the offending line; the fixed
file is clean. Across all 642 HTML files under registry/ and examples/ the rule
finds nothing, and lint output on the eight promoted blocks is identical to
origin/main error-for-error and warning-for-warning, so error severity costs no
existing template. 540 lint tests pass, 6 of them new.
Requested by Magi in review of #3562; unit-test DOM measurement by Rames Jusso.
1135 lines
42 KiB
Plaintext
1135 lines
42 KiB
Plaintext
---
|
||
title: "Notification Cascade"
|
||
description: "Phone notifications land one after another and stack up the screen, each banner pushing the pile down as it arrives, before the whole stack lifts away into a closing card"
|
||
---
|
||
|
||
import { InstallCommand } from "/snippets/install-command.jsx";
|
||
import { VariablesExplorer } from "/snippets/variables-explorer.jsx";
|
||
|
||
<VariablesExplorer
|
||
previewSrc="/public/catalog/blocks/notification-cascade.json"
|
||
compositionId="notification-cascade"
|
||
compositionSrc="compositions/notification-cascade.html"
|
||
variables={[{"id":"notifTitle","type":"string","role":"content","label":"Notification title","description":"Bold first line on every banner.","default":"New render"},{"id":"message1","type":"string","role":"content","label":"Message 1","description":"Subtitle of the first banner to land.","default":"Launch video is ready."},{"id":"message2","type":"string","role":"content","label":"Message 2","description":"Subtitle of the second banner.","default":"All checks passed."},{"id":"message3","type":"string","role":"content","label":"Message 3","description":"Subtitle of the third banner.","default":"4K render done in 92s."},{"id":"message4","type":"string","role":"content","label":"Message 4","description":"Subtitle of the fourth banner.","default":"Published to the catalog."},{"id":"appName","type":"string","role":"content","label":"App name","description":"Name of the brand this video promotes, credited in the corner of every banner. Use the real name of that brand.","portrays":["subject_name"],"default":"HyperFrames"},{"id":"headlineTop","type":"string","role":"content","label":"End-card line 1","description":"First line of the closing card.","default":"SHIP VIDEO"},{"id":"headlineAccent","type":"string","role":"content","label":"End-card line 2","description":"Accented second line of the closing card.","default":"FROM HTML"},{"id":"footerText","type":"string","role":"content","label":"End-card footer","description":"Domain of the brand this video promotes, under the end-card headline. Use the real domain, or a call to action when no domain fits.","portrays":["subject_domain"],"default":"hyperframes.heygen.com"},{"id":"brandLogo","type":"image","role":"content","label":"Brand logo","description":"Transparent mark of the brand this video promotes, centered on the closing card.","portrays":["subject_logo"],"default":"assets/hyperframes-logo-white.svg"}]}
|
||
>
|
||
|
||
```html notification-cascade.html
|
||
<!doctype html>
|
||
<html
|
||
lang="en"
|
||
data-composition-variables='[
|
||
{ "id": "notifTitle", "type": "string", "role": "content", "label": "Notification title", "description": "Bold first line on every banner.", "default": "New render" },
|
||
{ "id": "message1", "type": "string", "role": "content", "label": "Message 1", "description": "Subtitle of the first banner to land.", "default": "Launch video is ready." },
|
||
{ "id": "message2", "type": "string", "role": "content", "label": "Message 2", "description": "Subtitle of the second banner.", "default": "All checks passed." },
|
||
{ "id": "message3", "type": "string", "role": "content", "label": "Message 3", "description": "Subtitle of the third banner.", "default": "4K render done in 92s." },
|
||
{ "id": "message4", "type": "string", "role": "content", "label": "Message 4", "description": "Subtitle of the fourth banner.", "default": "Published to the catalog." },
|
||
{ "id": "appName", "type": "string", "role": "content", "label": "App name", "description": "Name of the brand this video promotes, credited in the corner of every banner. Use the real name of that brand.", "portrays": ["subject_name"], "default": "HyperFrames" },
|
||
{ "id": "headlineTop", "type": "string", "role": "content", "label": "End-card line 1", "description": "First line of the closing card.", "default": "SHIP VIDEO" },
|
||
{ "id": "headlineAccent", "type": "string", "role": "content", "label": "End-card line 2", "description": "Accented second line of the closing card.", "default": "FROM HTML" },
|
||
{ "id": "footerText", "type": "string", "role": "content", "label": "End-card footer", "description": "Domain of the brand this video promotes, under the end-card headline. Use the real domain, or a call to action when no domain fits.", "portrays": ["subject_domain"], "default": "hyperframes.heygen.com" },
|
||
{ "id": "brandLogo", "type": "image", "role": "content", "label": "Brand logo", "description": "Transparent mark of the brand this video promotes, centered on the closing card.", "portrays": ["subject_logo"], "default": "assets/hyperframes-logo-white.svg" }
|
||
]'
|
||
>
|
||
<head>
|
||
<meta charset="UTF-8" />
|
||
<meta name="viewport" content="width=1080, height=1920" />
|
||
<title>Notification Cascade</title>
|
||
<script src="https://cdn.jsdelivr.net/npm/gsap@3.14.2/dist/gsap.min.js"></script>
|
||
<style>
|
||
* {
|
||
margin: 0;
|
||
padding: 0;
|
||
box-sizing: border-box;
|
||
}
|
||
body {
|
||
background: #000;
|
||
}
|
||
#nc-root {
|
||
position: relative;
|
||
width: 1080px;
|
||
height: 1920px;
|
||
overflow: hidden;
|
||
font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
|
||
/* palette: warm glass banners over a bright soft backdrop, dark scrim under the end card */
|
||
--nc-glass: var(--hf-ui-surface-raised, rgba(250, 246, 241, 0.94));
|
||
--nc-ink-strong: var(--hf-ui-text-strong, #1c1c1e);
|
||
--nc-ink: var(--hf-ui-text, #464040);
|
||
--nc-ink-faint: var(--hf-ui-text-faint, #5a5450);
|
||
--nc-accent: var(--hf-ui-accent, #0a9c6b);
|
||
--nc-endcard-ink: #f7ece5;
|
||
--nc-endcard-accent: #3ce6ac;
|
||
}
|
||
#nc-stage-ground {
|
||
position: absolute;
|
||
inset: 0;
|
||
background: #000;
|
||
}
|
||
.clip {
|
||
position: absolute;
|
||
inset: 0;
|
||
}
|
||
|
||
/* ---------------- backdrop plate ---------------- */
|
||
/* a real photograph, like the footage it stands in for, pushed in slowly
|
||
by the timeline */
|
||
#nc-backdrop {
|
||
position: absolute;
|
||
left: 0;
|
||
top: 0;
|
||
width: 1080px;
|
||
height: 1920px;
|
||
object-fit: cover;
|
||
}
|
||
#nc-vignette {
|
||
position: absolute;
|
||
inset: 0;
|
||
background: radial-gradient(
|
||
ellipse 120% 90% at 50% 42%,
|
||
rgba(0, 0, 0, 0) 58%,
|
||
rgba(50, 25, 8, 0.18) 100%
|
||
);
|
||
}
|
||
|
||
/* ---------------- notification stack ---------------- */
|
||
/* geometry measured from the reference: 810px banners on a 214px pitch,
|
||
entries every 2.000s, expo.out restack (spec provenance: measured) */
|
||
#nc-stack-inner {
|
||
position: absolute;
|
||
inset: 0;
|
||
}
|
||
.nc-banner {
|
||
position: absolute;
|
||
left: 135px;
|
||
width: 810px;
|
||
height: 176px;
|
||
border-radius: 26px;
|
||
background: var(--nc-glass);
|
||
box-shadow: 0 10px 26px rgba(50, 25, 8, 0.18);
|
||
}
|
||
.nc-banner .nc-icon {
|
||
position: absolute;
|
||
left: 23px;
|
||
top: 38px;
|
||
width: 100px;
|
||
height: 100px;
|
||
border-radius: 24px;
|
||
background: linear-gradient(180deg, #5ae458 0%, #1fc83f 100%);
|
||
}
|
||
.nc-banner .nc-icon svg {
|
||
position: absolute;
|
||
left: 18px;
|
||
top: 20px;
|
||
}
|
||
.nc-banner .nc-title {
|
||
position: absolute;
|
||
left: 148px;
|
||
top: 37px;
|
||
font-size: 35px;
|
||
font-weight: 700;
|
||
color: var(--nc-ink-strong);
|
||
letter-spacing: 0.25px;
|
||
}
|
||
.nc-banner .nc-subtitle {
|
||
position: absolute;
|
||
left: 148px;
|
||
top: 85px;
|
||
font-size: 33px;
|
||
font-weight: 400;
|
||
color: var(--nc-ink);
|
||
letter-spacing: -0.75px;
|
||
}
|
||
.nc-banner .nc-now {
|
||
position: absolute;
|
||
right: 26px;
|
||
top: 32px;
|
||
font-size: 22px;
|
||
font-weight: 400;
|
||
color: var(--nc-ink-faint);
|
||
letter-spacing: 1px;
|
||
}
|
||
.nc-banner .nc-credit {
|
||
position: absolute;
|
||
right: 26px;
|
||
bottom: 10px;
|
||
font-size: 24px;
|
||
font-style: italic;
|
||
color: var(--nc-ink-faint);
|
||
}
|
||
#nc-pill-row {
|
||
position: absolute;
|
||
left: 0;
|
||
top: 1164px;
|
||
width: 1080px;
|
||
height: 72px;
|
||
}
|
||
#nc-pill {
|
||
position: absolute;
|
||
left: 615px;
|
||
width: 241px;
|
||
height: 72px;
|
||
border-radius: 36px;
|
||
background: rgba(250, 246, 242, 0.85);
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: flex-start;
|
||
padding-left: 20px;
|
||
gap: 9px;
|
||
font-size: 27px;
|
||
font-weight: 500;
|
||
color: #3f3a38;
|
||
box-shadow: 0 8px 20px rgba(50, 25, 8, 0.14);
|
||
}
|
||
#nc-pill-x {
|
||
position: absolute;
|
||
left: 873px;
|
||
width: 73px;
|
||
height: 72px;
|
||
border-radius: 50%;
|
||
background: rgba(250, 246, 242, 0.85);
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
box-shadow: 0 8px 20px rgba(50, 25, 8, 0.14);
|
||
}
|
||
|
||
/* ---------------- end card ---------------- */
|
||
/* the source cut to dark footage under its card; the scrim below is that
|
||
ground, faded in on the same beat */
|
||
#nc-endcard-scrim {
|
||
position: absolute;
|
||
inset: 0;
|
||
background: linear-gradient(180deg, #14110e 0%, #221b13 100%);
|
||
}
|
||
#nc-endcard-inner {
|
||
position: absolute;
|
||
inset: 0;
|
||
text-align: center;
|
||
}
|
||
#nc-ec-top {
|
||
position: absolute;
|
||
left: 0;
|
||
top: 662px;
|
||
width: 1080px;
|
||
font-family: Georgia, "Times New Roman", serif;
|
||
font-weight: 700;
|
||
font-size: 93px;
|
||
letter-spacing: 4px;
|
||
color: var(--nc-endcard-ink);
|
||
text-shadow: 2.5px 3px 1px rgba(0, 0, 0, 0.66);
|
||
}
|
||
#nc-ec-accent {
|
||
position: absolute;
|
||
left: 0;
|
||
top: 784px;
|
||
width: 1080px;
|
||
font-family: Georgia, "Times New Roman", serif;
|
||
font-weight: 700;
|
||
font-size: 67px;
|
||
letter-spacing: 3px;
|
||
color: var(--nc-endcard-accent);
|
||
text-shadow: 2.5px 3px 1px rgba(0, 0, 0, 0.64);
|
||
}
|
||
#nc-ec-mark {
|
||
position: absolute;
|
||
left: 277px;
|
||
top: 990px;
|
||
width: 526px;
|
||
height: 158px;
|
||
}
|
||
#nc-ec-footer {
|
||
position: absolute;
|
||
left: 0;
|
||
top: 1190px;
|
||
width: 1080px;
|
||
font-size: 35px;
|
||
font-weight: 600;
|
||
color: var(--nc-endcard-accent);
|
||
}
|
||
|
||
#nc-black-fade {
|
||
position: absolute;
|
||
inset: 0;
|
||
background: #000;
|
||
}
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<div
|
||
id="nc-root"
|
||
data-composition-id="notification-cascade"
|
||
data-start="0"
|
||
data-width="1080"
|
||
data-height="1920"
|
||
data-duration="14"
|
||
>
|
||
<div id="nc-stage-ground"></div>
|
||
|
||
<!-- backdrop plate: slow push-in added in the timeline -->
|
||
<section id="nc-base" class="clip" data-start="0" data-duration="14" data-track-index="1">
|
||
<img id="nc-backdrop" src="assets/desk-backdrop.jpg" alt="" />
|
||
<div id="nc-vignette"></div>
|
||
</section>
|
||
|
||
<!-- notification stack -->
|
||
<section
|
||
id="nc-stack"
|
||
class="clip"
|
||
data-start="1.59"
|
||
data-duration="8.03"
|
||
data-track-index="2"
|
||
>
|
||
<div id="nc-stack-inner">
|
||
<div id="nc-pill-row">
|
||
<div id="nc-pill">
|
||
<svg width="25" height="25" viewBox="0 0 26 26" fill="none">
|
||
<path
|
||
d="M4 8 L13 18 L22 8"
|
||
stroke="#3f3a38"
|
||
stroke-width="3.4"
|
||
stroke-linecap="round"
|
||
stroke-linejoin="round"
|
||
/>
|
||
</svg>
|
||
<span>Show less</span>
|
||
</div>
|
||
<div id="nc-pill-x">
|
||
<svg width="34" height="34" viewBox="0 0 34 34" fill="none">
|
||
<path
|
||
d="M6 6 L28 28 M28 6 L6 28"
|
||
stroke="#4a4442"
|
||
stroke-width="4.2"
|
||
stroke-linecap="round"
|
||
/>
|
||
</svg>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="nc-banner" id="nc-banner-1" style="top: 1260px">
|
||
<div class="nc-icon">
|
||
<svg width="64" height="60" viewBox="0 0 64 60" fill="none">
|
||
<path
|
||
d="M32 2 C15 2 2 13 2 27 c0 8 4.6 15 12 19.6 -0.7 3.6 -2.9 7.4 -6.4 10.2 5.8 -0.6 10.9 -2.8 14.6 -5.5 3.1 0.8 6.4 1.2 9.8 1.2 17 0 30 -11 30 -25.5 S49 2 32 2 Z"
|
||
fill="#fff"
|
||
/>
|
||
</svg>
|
||
</div>
|
||
<div class="nc-title">New render</div>
|
||
<div class="nc-subtitle">Launch video is ready.</div>
|
||
<div class="nc-now">NOW</div>
|
||
<div class="nc-credit">HyperFrames</div>
|
||
</div>
|
||
<div class="nc-banner" id="nc-banner-2" style="top: 1260px">
|
||
<div class="nc-icon">
|
||
<svg width="64" height="60" viewBox="0 0 64 60" fill="none">
|
||
<path
|
||
d="M32 2 C15 2 2 13 2 27 c0 8 4.6 15 12 19.6 -0.7 3.6 -2.9 7.4 -6.4 10.2 5.8 -0.6 10.9 -2.8 14.6 -5.5 3.1 0.8 6.4 1.2 9.8 1.2 17 0 30 -11 30 -25.5 S49 2 32 2 Z"
|
||
fill="#fff"
|
||
/>
|
||
</svg>
|
||
</div>
|
||
<div class="nc-title">New render</div>
|
||
<div class="nc-subtitle">All checks passed.</div>
|
||
<div class="nc-now">NOW</div>
|
||
<div class="nc-credit">HyperFrames</div>
|
||
</div>
|
||
<div class="nc-banner" id="nc-banner-3" style="top: 1260px">
|
||
<div class="nc-icon">
|
||
<svg width="64" height="60" viewBox="0 0 64 60" fill="none">
|
||
<path
|
||
d="M32 2 C15 2 2 13 2 27 c0 8 4.6 15 12 19.6 -0.7 3.6 -2.9 7.4 -6.4 10.2 5.8 -0.6 10.9 -2.8 14.6 -5.5 3.1 0.8 6.4 1.2 9.8 1.2 17 0 30 -11 30 -25.5 S49 2 32 2 Z"
|
||
fill="#fff"
|
||
/>
|
||
</svg>
|
||
</div>
|
||
<div class="nc-title">New render</div>
|
||
<div class="nc-subtitle">4K render done in 92s.</div>
|
||
<div class="nc-now">NOW</div>
|
||
<div class="nc-credit">HyperFrames</div>
|
||
</div>
|
||
<div class="nc-banner" id="nc-banner-4" style="top: 1260px">
|
||
<div class="nc-icon">
|
||
<svg width="64" height="60" viewBox="0 0 64 60" fill="none">
|
||
<path
|
||
d="M32 2 C15 2 2 13 2 27 c0 8 4.6 15 12 19.6 -0.7 3.6 -2.9 7.4 -6.4 10.2 5.8 -0.6 10.9 -2.8 14.6 -5.5 3.1 0.8 6.4 1.2 9.8 1.2 17 0 30 -11 30 -25.5 S49 2 32 2 Z"
|
||
fill="#fff"
|
||
/>
|
||
</svg>
|
||
</div>
|
||
<div class="nc-title">New render</div>
|
||
<div class="nc-subtitle">Published to the catalog.</div>
|
||
<div class="nc-now">NOW</div>
|
||
<div class="nc-credit">HyperFrames</div>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
|
||
<!-- end card -->
|
||
<section
|
||
id="nc-endcard"
|
||
class="clip"
|
||
data-start="9.89"
|
||
data-duration="4.11"
|
||
data-track-index="3"
|
||
>
|
||
<div id="nc-endcard-scrim"></div>
|
||
<div id="nc-endcard-inner">
|
||
<div id="nc-ec-top">SHIP VIDEO</div>
|
||
<div id="nc-ec-accent">FROM HTML</div>
|
||
<img
|
||
id="nc-ec-mark"
|
||
data-var-src="brandLogo"
|
||
src="assets/hyperframes-logo-white.svg"
|
||
alt="Brand logo"
|
||
/>
|
||
<div id="nc-ec-footer">hyperframes.heygen.com</div>
|
||
</div>
|
||
</section>
|
||
|
||
<!-- opening fade from black -->
|
||
<section id="nc-fade" class="clip" data-start="0" data-duration="0.7" data-track-index="4">
|
||
<div id="nc-black-fade"></div>
|
||
</section>
|
||
</div>
|
||
|
||
<script>
|
||
(function () {
|
||
"use strict";
|
||
|
||
/* -------- variables: every override falls back to its declared default -------- */
|
||
var vars =
|
||
window.__hyperframes && typeof window.__hyperframes.getVariables === "function"
|
||
? window.__hyperframes.getVariables()
|
||
: {};
|
||
|
||
function text(value, fallback) {
|
||
if (typeof value !== "string") return fallback;
|
||
var t = value.trim();
|
||
if (!t) return fallback;
|
||
return t.length > 80 ? t.slice(0, 80) : t;
|
||
}
|
||
|
||
function setAll(selector, value) {
|
||
document.querySelectorAll(selector).forEach(function (el) {
|
||
el.textContent = value;
|
||
});
|
||
}
|
||
|
||
setAll(".nc-title", text(vars.notifTitle, "New render"));
|
||
setAll(".nc-credit", text(vars.appName, "HyperFrames"));
|
||
var messages = [
|
||
text(vars.message1, "Launch video is ready."),
|
||
text(vars.message2, "All checks passed."),
|
||
text(vars.message3, "4K render done in 92s."),
|
||
text(vars.message4, "Published to the catalog."),
|
||
];
|
||
document.querySelectorAll(".nc-subtitle").forEach(function (el, i) {
|
||
el.textContent = messages[i] || messages[messages.length - 1];
|
||
});
|
||
document.getElementById("nc-ec-top").textContent = text(vars.headlineTop, "SHIP VIDEO");
|
||
document.getElementById("nc-ec-accent").textContent = text(
|
||
vars.headlineAccent,
|
||
"FROM HTML",
|
||
);
|
||
document.getElementById("nc-ec-footer").textContent = text(
|
||
vars.footerText,
|
||
"hyperframes.heygen.com",
|
||
);
|
||
|
||
/* -------- timeline: every decisive number is measured from the reference -------- */
|
||
window.__timelines = window.__timelines || {};
|
||
var tl = gsap.timeline({ paused: true });
|
||
|
||
var PITCH = 214; /* banner-to-banner spacing, px */
|
||
var ENTRY = [1.6033, 3.6033, 5.6033, 7.6033]; /* one arrival every 2.000s */
|
||
var FADE_D = 0.3333; /* linear alpha ramp */
|
||
var RISE = 22; /* entry micro-rise, px */
|
||
var RESTACK_D = 1.0; /* expo.out slide when the stack makes room */
|
||
var EXIT_T = 9.2033; /* group exit */
|
||
var ENDCARD_T = 9.9033;
|
||
var ENDCARD_D = 0.5667;
|
||
|
||
/* baselines at t=0.001 so every span is covered at any seek */
|
||
tl.set(
|
||
["#nc-banner-1", "#nc-banner-2", "#nc-banner-3", "#nc-banner-4", "#nc-pill-row"],
|
||
{ autoAlpha: 0 },
|
||
0.001,
|
||
);
|
||
tl.set(["#nc-endcard-inner", "#nc-endcard-scrim"], { autoAlpha: 0 }, 0.001);
|
||
|
||
/* opening fade from black */
|
||
tl.fromTo(
|
||
"#nc-black-fade",
|
||
{ autoAlpha: 1 },
|
||
{ autoAlpha: 0, duration: 0.5, ease: "none" },
|
||
0,
|
||
);
|
||
|
||
/* backdrop push-in: linear, scale 1 -> 1.105 across the piece */
|
||
tl.fromTo(
|
||
"#nc-backdrop",
|
||
{ scale: 1.0, transformOrigin: "525px 950px" },
|
||
{ scale: 1.105, duration: 13.4667, ease: "none" },
|
||
0.5333,
|
||
);
|
||
|
||
/* banner entries: linear fade + expo micro-rise */
|
||
var banners = ["#nc-banner-1", "#nc-banner-2", "#nc-banner-3", "#nc-banner-4"];
|
||
banners.forEach(function (sel, i) {
|
||
tl.fromTo(
|
||
sel,
|
||
{ autoAlpha: 0 },
|
||
{ autoAlpha: 1, duration: FADE_D, ease: "none" },
|
||
ENTRY[i],
|
||
);
|
||
tl.fromTo(sel, { y: RISE }, { y: 0, duration: 0.9, ease: "expo.out" }, ENTRY[i]);
|
||
});
|
||
/* pill + X appear with banner 1 */
|
||
tl.fromTo(
|
||
"#nc-pill-row",
|
||
{ autoAlpha: 0 },
|
||
{ autoAlpha: 1, duration: FADE_D, ease: "none" },
|
||
ENTRY[0],
|
||
);
|
||
|
||
/* restacks: existing banners + pill slide up one pitch in lockstep */
|
||
tl.to(
|
||
["#nc-banner-1", "#nc-pill-row"],
|
||
{ y: -PITCH, duration: RESTACK_D, ease: "expo.out" },
|
||
ENTRY[1],
|
||
);
|
||
tl.to(
|
||
["#nc-banner-1", "#nc-pill-row"],
|
||
{ y: -2 * PITCH, duration: RESTACK_D, ease: "expo.out" },
|
||
ENTRY[2],
|
||
);
|
||
tl.to("#nc-banner-2", { y: -PITCH, duration: RESTACK_D, ease: "expo.out" }, ENTRY[2]);
|
||
tl.to(
|
||
["#nc-banner-1", "#nc-pill-row"],
|
||
{ y: -3 * PITCH, duration: RESTACK_D, ease: "expo.out" },
|
||
ENTRY[3],
|
||
);
|
||
tl.to("#nc-banner-2", { y: -2 * PITCH, duration: RESTACK_D, ease: "expo.out" }, ENTRY[3]);
|
||
tl.to("#nc-banner-3", { y: -PITCH, duration: RESTACK_D, ease: "expo.out" }, ENTRY[3]);
|
||
|
||
/* group exit: rise + fade */
|
||
tl.to("#nc-stack-inner", { y: -560, duration: 0.5, ease: "expo.out" }, EXIT_T);
|
||
tl.to("#nc-stack-inner", { autoAlpha: 0, duration: 0.37, ease: "none" }, EXIT_T);
|
||
|
||
/* end card: dark scrim and card fade in together, then hold */
|
||
tl.fromTo(
|
||
"#nc-endcard-scrim",
|
||
{ autoAlpha: 0 },
|
||
{ autoAlpha: 1, duration: 0.2, ease: "none" },
|
||
ENDCARD_T,
|
||
);
|
||
tl.fromTo(
|
||
"#nc-endcard-inner",
|
||
{ autoAlpha: 0 },
|
||
{ autoAlpha: 1, duration: ENDCARD_D, ease: "none" },
|
||
ENDCARD_T,
|
||
);
|
||
|
||
window.__timelines["notification-cascade"] = tl;
|
||
})();
|
||
</script>
|
||
</body>
|
||
</html>
|
||
```
|
||
|
||
</VariablesExplorer>
|
||
|
||
## Install
|
||
|
||
<InstallCommand command="npx hyperframes add notification-cascade" item="notification-cascade" />
|
||
|
||
That writes `compositions/notification-cascade.html`, plus 3 supporting files under `assets/`.
|
||
|
||
## Add it to your video
|
||
|
||
It runs for 14 seconds at 1080×1920. Paste this into your composition:
|
||
|
||
```html index.html
|
||
<div
|
||
data-composition-id="notification-cascade"
|
||
data-composition-src="compositions/notification-cascade.html"
|
||
data-start="0"
|
||
data-duration="14"
|
||
data-track-index="1"
|
||
data-width="1080"
|
||
data-height="1920"
|
||
></div>
|
||
```
|
||
|
||
Move it in time with `data-start`. Put it on a different timeline row with
|
||
`data-track-index`. See [data attributes](/concepts/data-attributes) for the rest.
|
||
|
||
## Variables
|
||
|
||
Every one of these has a default, so the piece works untouched. Set the ones you
|
||
want to change on the element:
|
||
|
||
| Variable | Default | Accepts | What it does |
|
||
| --- | --- | --- | --- |
|
||
| `notifTitle` | `New render` | string | Bold first line on every banner. |
|
||
| `message1` | `Launch video is ready.` | string | Subtitle of the first banner to land. |
|
||
| `message2` | `All checks passed.` | string | Subtitle of the second banner. |
|
||
| `message3` | `4K render done in 92s.` | string | Subtitle of the third banner. |
|
||
| `message4` | `Published to the catalog.` | string | Subtitle of the fourth banner. |
|
||
| `appName` | `HyperFrames` | string | Name of the brand this video promotes, credited in the corner of every banner. Use the real name of that brand. |
|
||
| `headlineTop` | `SHIP VIDEO` | string | First line of the closing card. |
|
||
| `headlineAccent` | `FROM HTML` | string | Accented second line of the closing card. |
|
||
| `footerText` | `hyperframes.heygen.com` | string | Domain of the brand this video promotes, under the end-card headline. Use the real domain, or a call to action when no domain fits. |
|
||
| `brandLogo` | `assets/hyperframes-logo-white.svg` | image | Transparent mark of the brand this video promotes, centered on the closing card. |
|
||
|
||
Set them with `data-variable-values` on the element that mounts it. These are the
|
||
defaults, so this behaves exactly like the preview above until you change one:
|
||
|
||
```html wrap
|
||
<div
|
||
data-composition-id="notification-cascade"
|
||
data-composition-src="compositions/notification-cascade.html"
|
||
data-variable-values='{"notifTitle":"New render","message1":"Launch video is ready.","message2":"All checks passed.","message3":"4K render done in 92s.","message4":"Published to the catalog.","appName":"HyperFrames","headlineTop":"SHIP VIDEO","headlineAccent":"FROM HTML","footerText":"hyperframes.heygen.com","brandLogo":"assets/hyperframes-logo-white.svg"}'
|
||
></div>
|
||
```
|
||
|
||
## Source
|
||
|
||
<Accordion title={`notification-cascade.html`}>
|
||
|
||
```html
|
||
<!doctype html>
|
||
<html
|
||
lang="en"
|
||
data-composition-variables='[
|
||
{ "id": "notifTitle", "type": "string", "role": "content", "label": "Notification title", "description": "Bold first line on every banner.", "default": "New render" },
|
||
{ "id": "message1", "type": "string", "role": "content", "label": "Message 1", "description": "Subtitle of the first banner to land.", "default": "Launch video is ready." },
|
||
{ "id": "message2", "type": "string", "role": "content", "label": "Message 2", "description": "Subtitle of the second banner.", "default": "All checks passed." },
|
||
{ "id": "message3", "type": "string", "role": "content", "label": "Message 3", "description": "Subtitle of the third banner.", "default": "4K render done in 92s." },
|
||
{ "id": "message4", "type": "string", "role": "content", "label": "Message 4", "description": "Subtitle of the fourth banner.", "default": "Published to the catalog." },
|
||
{ "id": "appName", "type": "string", "role": "content", "label": "App name", "description": "Name of the brand this video promotes, credited in the corner of every banner. Use the real name of that brand.", "portrays": ["subject_name"], "default": "HyperFrames" },
|
||
{ "id": "headlineTop", "type": "string", "role": "content", "label": "End-card line 1", "description": "First line of the closing card.", "default": "SHIP VIDEO" },
|
||
{ "id": "headlineAccent", "type": "string", "role": "content", "label": "End-card line 2", "description": "Accented second line of the closing card.", "default": "FROM HTML" },
|
||
{ "id": "footerText", "type": "string", "role": "content", "label": "End-card footer", "description": "Domain of the brand this video promotes, under the end-card headline. Use the real domain, or a call to action when no domain fits.", "portrays": ["subject_domain"], "default": "hyperframes.heygen.com" },
|
||
{ "id": "brandLogo", "type": "image", "role": "content", "label": "Brand logo", "description": "Transparent mark of the brand this video promotes, centered on the closing card.", "portrays": ["subject_logo"], "default": "assets/hyperframes-logo-white.svg" }
|
||
]'
|
||
>
|
||
<head>
|
||
<meta charset="UTF-8" />
|
||
<meta name="viewport" content="width=1080, height=1920" />
|
||
<title>Notification Cascade</title>
|
||
<script src="https://cdn.jsdelivr.net/npm/gsap@3.14.2/dist/gsap.min.js"></script>
|
||
<style>
|
||
* {
|
||
margin: 0;
|
||
padding: 0;
|
||
box-sizing: border-box;
|
||
}
|
||
body {
|
||
background: #000;
|
||
}
|
||
#nc-root {
|
||
position: relative;
|
||
width: 1080px;
|
||
height: 1920px;
|
||
overflow: hidden;
|
||
font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
|
||
/* palette: warm glass banners over a bright soft backdrop, dark scrim under the end card */
|
||
--nc-glass: var(--hf-ui-surface-raised, rgba(250, 246, 241, 0.94));
|
||
--nc-ink-strong: var(--hf-ui-text-strong, #1c1c1e);
|
||
--nc-ink: var(--hf-ui-text, #464040);
|
||
--nc-ink-faint: var(--hf-ui-text-faint, #5a5450);
|
||
--nc-accent: var(--hf-ui-accent, #0a9c6b);
|
||
--nc-endcard-ink: #f7ece5;
|
||
--nc-endcard-accent: #3ce6ac;
|
||
}
|
||
#nc-stage-ground {
|
||
position: absolute;
|
||
inset: 0;
|
||
background: #000;
|
||
}
|
||
.clip {
|
||
position: absolute;
|
||
inset: 0;
|
||
}
|
||
|
||
/* ---------------- backdrop plate ---------------- */
|
||
/* a real photograph, like the footage it stands in for, pushed in slowly
|
||
by the timeline */
|
||
#nc-backdrop {
|
||
position: absolute;
|
||
left: 0;
|
||
top: 0;
|
||
width: 1080px;
|
||
height: 1920px;
|
||
object-fit: cover;
|
||
}
|
||
#nc-vignette {
|
||
position: absolute;
|
||
inset: 0;
|
||
background: radial-gradient(
|
||
ellipse 120% 90% at 50% 42%,
|
||
rgba(0, 0, 0, 0) 58%,
|
||
rgba(50, 25, 8, 0.18) 100%
|
||
);
|
||
}
|
||
|
||
/* ---------------- notification stack ---------------- */
|
||
/* geometry measured from the reference: 810px banners on a 214px pitch,
|
||
entries every 2.000s, expo.out restack (spec provenance: measured) */
|
||
#nc-stack-inner {
|
||
position: absolute;
|
||
inset: 0;
|
||
}
|
||
.nc-banner {
|
||
position: absolute;
|
||
left: 135px;
|
||
width: 810px;
|
||
height: 176px;
|
||
border-radius: 26px;
|
||
background: var(--nc-glass);
|
||
box-shadow: 0 10px 26px rgba(50, 25, 8, 0.18);
|
||
}
|
||
.nc-banner .nc-icon {
|
||
position: absolute;
|
||
left: 23px;
|
||
top: 38px;
|
||
width: 100px;
|
||
height: 100px;
|
||
border-radius: 24px;
|
||
background: linear-gradient(180deg, #5ae458 0%, #1fc83f 100%);
|
||
}
|
||
.nc-banner .nc-icon svg {
|
||
position: absolute;
|
||
left: 18px;
|
||
top: 20px;
|
||
}
|
||
.nc-banner .nc-title {
|
||
position: absolute;
|
||
left: 148px;
|
||
top: 37px;
|
||
font-size: 35px;
|
||
font-weight: 700;
|
||
color: var(--nc-ink-strong);
|
||
letter-spacing: 0.25px;
|
||
}
|
||
.nc-banner .nc-subtitle {
|
||
position: absolute;
|
||
left: 148px;
|
||
top: 85px;
|
||
font-size: 33px;
|
||
font-weight: 400;
|
||
color: var(--nc-ink);
|
||
letter-spacing: -0.75px;
|
||
}
|
||
.nc-banner .nc-now {
|
||
position: absolute;
|
||
right: 26px;
|
||
top: 32px;
|
||
font-size: 22px;
|
||
font-weight: 400;
|
||
color: var(--nc-ink-faint);
|
||
letter-spacing: 1px;
|
||
}
|
||
.nc-banner .nc-credit {
|
||
position: absolute;
|
||
right: 26px;
|
||
bottom: 10px;
|
||
font-size: 24px;
|
||
font-style: italic;
|
||
color: var(--nc-ink-faint);
|
||
}
|
||
#nc-pill-row {
|
||
position: absolute;
|
||
left: 0;
|
||
top: 1164px;
|
||
width: 1080px;
|
||
height: 72px;
|
||
}
|
||
#nc-pill {
|
||
position: absolute;
|
||
left: 615px;
|
||
width: 241px;
|
||
height: 72px;
|
||
border-radius: 36px;
|
||
background: rgba(250, 246, 242, 0.85);
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: flex-start;
|
||
padding-left: 20px;
|
||
gap: 9px;
|
||
font-size: 27px;
|
||
font-weight: 500;
|
||
color: #3f3a38;
|
||
box-shadow: 0 8px 20px rgba(50, 25, 8, 0.14);
|
||
}
|
||
#nc-pill-x {
|
||
position: absolute;
|
||
left: 873px;
|
||
width: 73px;
|
||
height: 72px;
|
||
border-radius: 50%;
|
||
background: rgba(250, 246, 242, 0.85);
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
box-shadow: 0 8px 20px rgba(50, 25, 8, 0.14);
|
||
}
|
||
|
||
/* ---------------- end card ---------------- */
|
||
/* the source cut to dark footage under its card; the scrim below is that
|
||
ground, faded in on the same beat */
|
||
#nc-endcard-scrim {
|
||
position: absolute;
|
||
inset: 0;
|
||
background: linear-gradient(180deg, #14110e 0%, #221b13 100%);
|
||
}
|
||
#nc-endcard-inner {
|
||
position: absolute;
|
||
inset: 0;
|
||
text-align: center;
|
||
}
|
||
#nc-ec-top {
|
||
position: absolute;
|
||
left: 0;
|
||
top: 662px;
|
||
width: 1080px;
|
||
font-family: Georgia, "Times New Roman", serif;
|
||
font-weight: 700;
|
||
font-size: 93px;
|
||
letter-spacing: 4px;
|
||
color: var(--nc-endcard-ink);
|
||
text-shadow: 2.5px 3px 1px rgba(0, 0, 0, 0.66);
|
||
}
|
||
#nc-ec-accent {
|
||
position: absolute;
|
||
left: 0;
|
||
top: 784px;
|
||
width: 1080px;
|
||
font-family: Georgia, "Times New Roman", serif;
|
||
font-weight: 700;
|
||
font-size: 67px;
|
||
letter-spacing: 3px;
|
||
color: var(--nc-endcard-accent);
|
||
text-shadow: 2.5px 3px 1px rgba(0, 0, 0, 0.64);
|
||
}
|
||
#nc-ec-mark {
|
||
position: absolute;
|
||
left: 277px;
|
||
top: 990px;
|
||
width: 526px;
|
||
height: 158px;
|
||
}
|
||
#nc-ec-footer {
|
||
position: absolute;
|
||
left: 0;
|
||
top: 1190px;
|
||
width: 1080px;
|
||
font-size: 35px;
|
||
font-weight: 600;
|
||
color: var(--nc-endcard-accent);
|
||
}
|
||
|
||
#nc-black-fade {
|
||
position: absolute;
|
||
inset: 0;
|
||
background: #000;
|
||
}
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<div
|
||
id="nc-root"
|
||
data-composition-id="notification-cascade"
|
||
data-start="0"
|
||
data-width="1080"
|
||
data-height="1920"
|
||
data-duration="14"
|
||
>
|
||
<div id="nc-stage-ground"></div>
|
||
|
||
<!-- backdrop plate: slow push-in added in the timeline -->
|
||
<section id="nc-base" class="clip" data-start="0" data-duration="14" data-track-index="1">
|
||
<img id="nc-backdrop" src="assets/desk-backdrop.jpg" alt="" />
|
||
<div id="nc-vignette"></div>
|
||
</section>
|
||
|
||
<!-- notification stack -->
|
||
<section
|
||
id="nc-stack"
|
||
class="clip"
|
||
data-start="1.59"
|
||
data-duration="8.03"
|
||
data-track-index="2"
|
||
>
|
||
<div id="nc-stack-inner">
|
||
<div id="nc-pill-row">
|
||
<div id="nc-pill">
|
||
<svg width="25" height="25" viewBox="0 0 26 26" fill="none">
|
||
<path
|
||
d="M4 8 L13 18 L22 8"
|
||
stroke="#3f3a38"
|
||
stroke-width="3.4"
|
||
stroke-linecap="round"
|
||
stroke-linejoin="round"
|
||
/>
|
||
</svg>
|
||
<span>Show less</span>
|
||
</div>
|
||
<div id="nc-pill-x">
|
||
<svg width="34" height="34" viewBox="0 0 34 34" fill="none">
|
||
<path
|
||
d="M6 6 L28 28 M28 6 L6 28"
|
||
stroke="#4a4442"
|
||
stroke-width="4.2"
|
||
stroke-linecap="round"
|
||
/>
|
||
</svg>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="nc-banner" id="nc-banner-1" style="top: 1260px">
|
||
<div class="nc-icon">
|
||
<svg width="64" height="60" viewBox="0 0 64 60" fill="none">
|
||
<path
|
||
d="M32 2 C15 2 2 13 2 27 c0 8 4.6 15 12 19.6 -0.7 3.6 -2.9 7.4 -6.4 10.2 5.8 -0.6 10.9 -2.8 14.6 -5.5 3.1 0.8 6.4 1.2 9.8 1.2 17 0 30 -11 30 -25.5 S49 2 32 2 Z"
|
||
fill="#fff"
|
||
/>
|
||
</svg>
|
||
</div>
|
||
<div class="nc-title">New render</div>
|
||
<div class="nc-subtitle">Launch video is ready.</div>
|
||
<div class="nc-now">NOW</div>
|
||
<div class="nc-credit">HyperFrames</div>
|
||
</div>
|
||
<div class="nc-banner" id="nc-banner-2" style="top: 1260px">
|
||
<div class="nc-icon">
|
||
<svg width="64" height="60" viewBox="0 0 64 60" fill="none">
|
||
<path
|
||
d="M32 2 C15 2 2 13 2 27 c0 8 4.6 15 12 19.6 -0.7 3.6 -2.9 7.4 -6.4 10.2 5.8 -0.6 10.9 -2.8 14.6 -5.5 3.1 0.8 6.4 1.2 9.8 1.2 17 0 30 -11 30 -25.5 S49 2 32 2 Z"
|
||
fill="#fff"
|
||
/>
|
||
</svg>
|
||
</div>
|
||
<div class="nc-title">New render</div>
|
||
<div class="nc-subtitle">All checks passed.</div>
|
||
<div class="nc-now">NOW</div>
|
||
<div class="nc-credit">HyperFrames</div>
|
||
</div>
|
||
<div class="nc-banner" id="nc-banner-3" style="top: 1260px">
|
||
<div class="nc-icon">
|
||
<svg width="64" height="60" viewBox="0 0 64 60" fill="none">
|
||
<path
|
||
d="M32 2 C15 2 2 13 2 27 c0 8 4.6 15 12 19.6 -0.7 3.6 -2.9 7.4 -6.4 10.2 5.8 -0.6 10.9 -2.8 14.6 -5.5 3.1 0.8 6.4 1.2 9.8 1.2 17 0 30 -11 30 -25.5 S49 2 32 2 Z"
|
||
fill="#fff"
|
||
/>
|
||
</svg>
|
||
</div>
|
||
<div class="nc-title">New render</div>
|
||
<div class="nc-subtitle">4K render done in 92s.</div>
|
||
<div class="nc-now">NOW</div>
|
||
<div class="nc-credit">HyperFrames</div>
|
||
</div>
|
||
<div class="nc-banner" id="nc-banner-4" style="top: 1260px">
|
||
<div class="nc-icon">
|
||
<svg width="64" height="60" viewBox="0 0 64 60" fill="none">
|
||
<path
|
||
d="M32 2 C15 2 2 13 2 27 c0 8 4.6 15 12 19.6 -0.7 3.6 -2.9 7.4 -6.4 10.2 5.8 -0.6 10.9 -2.8 14.6 -5.5 3.1 0.8 6.4 1.2 9.8 1.2 17 0 30 -11 30 -25.5 S49 2 32 2 Z"
|
||
fill="#fff"
|
||
/>
|
||
</svg>
|
||
</div>
|
||
<div class="nc-title">New render</div>
|
||
<div class="nc-subtitle">Published to the catalog.</div>
|
||
<div class="nc-now">NOW</div>
|
||
<div class="nc-credit">HyperFrames</div>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
|
||
<!-- end card -->
|
||
<section
|
||
id="nc-endcard"
|
||
class="clip"
|
||
data-start="9.89"
|
||
data-duration="4.11"
|
||
data-track-index="3"
|
||
>
|
||
<div id="nc-endcard-scrim"></div>
|
||
<div id="nc-endcard-inner">
|
||
<div id="nc-ec-top">SHIP VIDEO</div>
|
||
<div id="nc-ec-accent">FROM HTML</div>
|
||
<img
|
||
id="nc-ec-mark"
|
||
data-var-src="brandLogo"
|
||
src="assets/hyperframes-logo-white.svg"
|
||
alt="Brand logo"
|
||
/>
|
||
<div id="nc-ec-footer">hyperframes.heygen.com</div>
|
||
</div>
|
||
</section>
|
||
|
||
<!-- opening fade from black -->
|
||
<section id="nc-fade" class="clip" data-start="0" data-duration="0.7" data-track-index="4">
|
||
<div id="nc-black-fade"></div>
|
||
</section>
|
||
</div>
|
||
|
||
<script>
|
||
(function () {
|
||
"use strict";
|
||
|
||
/* -------- variables: every override falls back to its declared default -------- */
|
||
var vars =
|
||
window.__hyperframes && typeof window.__hyperframes.getVariables === "function"
|
||
? window.__hyperframes.getVariables()
|
||
: {};
|
||
|
||
function text(value, fallback) {
|
||
if (typeof value !== "string") return fallback;
|
||
var t = value.trim();
|
||
if (!t) return fallback;
|
||
return t.length > 80 ? t.slice(0, 80) : t;
|
||
}
|
||
|
||
function setAll(selector, value) {
|
||
document.querySelectorAll(selector).forEach(function (el) {
|
||
el.textContent = value;
|
||
});
|
||
}
|
||
|
||
setAll(".nc-title", text(vars.notifTitle, "New render"));
|
||
setAll(".nc-credit", text(vars.appName, "HyperFrames"));
|
||
var messages = [
|
||
text(vars.message1, "Launch video is ready."),
|
||
text(vars.message2, "All checks passed."),
|
||
text(vars.message3, "4K render done in 92s."),
|
||
text(vars.message4, "Published to the catalog."),
|
||
];
|
||
document.querySelectorAll(".nc-subtitle").forEach(function (el, i) {
|
||
el.textContent = messages[i] || messages[messages.length - 1];
|
||
});
|
||
document.getElementById("nc-ec-top").textContent = text(vars.headlineTop, "SHIP VIDEO");
|
||
document.getElementById("nc-ec-accent").textContent = text(
|
||
vars.headlineAccent,
|
||
"FROM HTML",
|
||
);
|
||
document.getElementById("nc-ec-footer").textContent = text(
|
||
vars.footerText,
|
||
"hyperframes.heygen.com",
|
||
);
|
||
|
||
/* -------- timeline: every decisive number is measured from the reference -------- */
|
||
window.__timelines = window.__timelines || {};
|
||
var tl = gsap.timeline({ paused: true });
|
||
|
||
var PITCH = 214; /* banner-to-banner spacing, px */
|
||
var ENTRY = [1.6033, 3.6033, 5.6033, 7.6033]; /* one arrival every 2.000s */
|
||
var FADE_D = 0.3333; /* linear alpha ramp */
|
||
var RISE = 22; /* entry micro-rise, px */
|
||
var RESTACK_D = 1.0; /* expo.out slide when the stack makes room */
|
||
var EXIT_T = 9.2033; /* group exit */
|
||
var ENDCARD_T = 9.9033;
|
||
var ENDCARD_D = 0.5667;
|
||
|
||
/* baselines at t=0.001 so every span is covered at any seek */
|
||
tl.set(
|
||
["#nc-banner-1", "#nc-banner-2", "#nc-banner-3", "#nc-banner-4", "#nc-pill-row"],
|
||
{ autoAlpha: 0 },
|
||
0.001,
|
||
);
|
||
tl.set(["#nc-endcard-inner", "#nc-endcard-scrim"], { autoAlpha: 0 }, 0.001);
|
||
|
||
/* opening fade from black */
|
||
tl.fromTo(
|
||
"#nc-black-fade",
|
||
{ autoAlpha: 1 },
|
||
{ autoAlpha: 0, duration: 0.5, ease: "none" },
|
||
0,
|
||
);
|
||
|
||
/* backdrop push-in: linear, scale 1 -> 1.105 across the piece */
|
||
tl.fromTo(
|
||
"#nc-backdrop",
|
||
{ scale: 1.0, transformOrigin: "525px 950px" },
|
||
{ scale: 1.105, duration: 13.4667, ease: "none" },
|
||
0.5333,
|
||
);
|
||
|
||
/* banner entries: linear fade + expo micro-rise */
|
||
var banners = ["#nc-banner-1", "#nc-banner-2", "#nc-banner-3", "#nc-banner-4"];
|
||
banners.forEach(function (sel, i) {
|
||
tl.fromTo(
|
||
sel,
|
||
{ autoAlpha: 0 },
|
||
{ autoAlpha: 1, duration: FADE_D, ease: "none" },
|
||
ENTRY[i],
|
||
);
|
||
tl.fromTo(sel, { y: RISE }, { y: 0, duration: 0.9, ease: "expo.out" }, ENTRY[i]);
|
||
});
|
||
/* pill + X appear with banner 1 */
|
||
tl.fromTo(
|
||
"#nc-pill-row",
|
||
{ autoAlpha: 0 },
|
||
{ autoAlpha: 1, duration: FADE_D, ease: "none" },
|
||
ENTRY[0],
|
||
);
|
||
|
||
/* restacks: existing banners + pill slide up one pitch in lockstep */
|
||
tl.to(
|
||
["#nc-banner-1", "#nc-pill-row"],
|
||
{ y: -PITCH, duration: RESTACK_D, ease: "expo.out" },
|
||
ENTRY[1],
|
||
);
|
||
tl.to(
|
||
["#nc-banner-1", "#nc-pill-row"],
|
||
{ y: -2 * PITCH, duration: RESTACK_D, ease: "expo.out" },
|
||
ENTRY[2],
|
||
);
|
||
tl.to("#nc-banner-2", { y: -PITCH, duration: RESTACK_D, ease: "expo.out" }, ENTRY[2]);
|
||
tl.to(
|
||
["#nc-banner-1", "#nc-pill-row"],
|
||
{ y: -3 * PITCH, duration: RESTACK_D, ease: "expo.out" },
|
||
ENTRY[3],
|
||
);
|
||
tl.to("#nc-banner-2", { y: -2 * PITCH, duration: RESTACK_D, ease: "expo.out" }, ENTRY[3]);
|
||
tl.to("#nc-banner-3", { y: -PITCH, duration: RESTACK_D, ease: "expo.out" }, ENTRY[3]);
|
||
|
||
/* group exit: rise + fade */
|
||
tl.to("#nc-stack-inner", { y: -560, duration: 0.5, ease: "expo.out" }, EXIT_T);
|
||
tl.to("#nc-stack-inner", { autoAlpha: 0, duration: 0.37, ease: "none" }, EXIT_T);
|
||
|
||
/* end card: dark scrim and card fade in together, then hold */
|
||
tl.fromTo(
|
||
"#nc-endcard-scrim",
|
||
{ autoAlpha: 0 },
|
||
{ autoAlpha: 1, duration: 0.2, ease: "none" },
|
||
ENDCARD_T,
|
||
);
|
||
tl.fromTo(
|
||
"#nc-endcard-inner",
|
||
{ autoAlpha: 0 },
|
||
{ autoAlpha: 1, duration: ENDCARD_D, ease: "none" },
|
||
ENDCARD_T,
|
||
);
|
||
|
||
window.__timelines["notification-cascade"] = tl;
|
||
})();
|
||
</script>
|
||
</body>
|
||
</html>
|
||
```
|
||
|
||
</Accordion>
|
||
|
||
{/* hf:generated-footer */}
|
||
|
||
Tagged `showcase` `mock-ui` `notification` `vertical` `ad-template`.
|
||
|
||
Created by Miao Yang.
|
||
|
||
## Related topics
|
||
|
||
- [Browse the complete Catalog](/catalog)
|
||
- [Add assets and Catalog items in Studio](/studio/assets-and-blocks)
|
||
- [Build a richer composition](/go-further)
|