mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-11 06:30:03 +00:00
fix: add regression fixtures with golden baselines + address review
- Create sub-comp-t0 and sub-comp-id-selector as proper regression tests under packages/producer/tests/ with golden MP4 baselines - Add both to shard-7 in regression.yml - Add clarifying comment on activateNestedChildTimelines scope - Confirm test fixture network safety in comment
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
<template id="hook-template">
|
||||
<div id="hook" data-composition-id="hook" data-width="1920" data-height="1080">
|
||||
<div class="hook-title">BREAKING</div>
|
||||
<div class="hook-subtitle">Transfer confirmed</div>
|
||||
|
||||
<style>
|
||||
#hook {
|
||||
position: relative;
|
||||
width: 1920px;
|
||||
height: 1080px;
|
||||
overflow: hidden;
|
||||
background: #07110d;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
gap: 20px;
|
||||
}
|
||||
#hook .hook-title {
|
||||
font-family: Impact, system-ui, sans-serif;
|
||||
font-size: 200px;
|
||||
font-weight: 900;
|
||||
color: #ff3b30;
|
||||
opacity: 0;
|
||||
}
|
||||
#hook .hook-subtitle {
|
||||
font-family: Arial, system-ui, sans-serif;
|
||||
font-size: 60px;
|
||||
color: #f7f3e8;
|
||||
opacity: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/gsap@3.14.2/dist/gsap.min.js"></script>
|
||||
<script>
|
||||
(function () {
|
||||
window.__timelines = window.__timelines || {};
|
||||
var tl = gsap.timeline({ paused: true });
|
||||
var scope = "#hook";
|
||||
|
||||
// Title slams in at 0.1s
|
||||
tl.fromTo(
|
||||
scope + " .hook-title",
|
||||
{ scale: 3.5, opacity: 0 },
|
||||
{ scale: 1, opacity: 1, duration: 0.25, ease: "expo.out" },
|
||||
0.1,
|
||||
);
|
||||
|
||||
// Subtitle fades in at 0.5s
|
||||
tl.fromTo(
|
||||
scope + " .hook-subtitle",
|
||||
{ y: 30, opacity: 0 },
|
||||
{ y: 0, opacity: 1, duration: 0.4, ease: "power3.out" },
|
||||
0.5,
|
||||
);
|
||||
|
||||
window.__timelines["hook"] = tl;
|
||||
})();
|
||||
</script>
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,43 @@
|
||||
<template id="later-template">
|
||||
<div id="later" data-composition-id="later" data-width="1920" data-height="1080">
|
||||
<div class="later-heading">Second Scene</div>
|
||||
|
||||
<style>
|
||||
#later {
|
||||
position: relative;
|
||||
width: 1920px;
|
||||
height: 1080px;
|
||||
overflow: hidden;
|
||||
background: #0e2c1e;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
#later .later-heading {
|
||||
font-family: Arial, system-ui, sans-serif;
|
||||
font-size: 120px;
|
||||
font-weight: 700;
|
||||
color: #f7f3e8;
|
||||
opacity: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/gsap@3.14.2/dist/gsap.min.js"></script>
|
||||
<script>
|
||||
(function () {
|
||||
window.__timelines = window.__timelines || {};
|
||||
var tl = gsap.timeline({ paused: true });
|
||||
var scope = "#later";
|
||||
|
||||
tl.fromTo(
|
||||
scope + " .later-heading",
|
||||
{ y: 50, opacity: 0 },
|
||||
{ y: 0, opacity: 1, duration: 0.5, ease: "power3.out" },
|
||||
0.2,
|
||||
);
|
||||
|
||||
window.__timelines["later"] = tl;
|
||||
})();
|
||||
</script>
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,88 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=1920, height=1080" />
|
||||
<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;
|
||||
}
|
||||
html,
|
||||
body {
|
||||
width: 1920px;
|
||||
height: 1080px;
|
||||
overflow: hidden;
|
||||
background: #07110d;
|
||||
}
|
||||
#root {
|
||||
position: relative;
|
||||
width: 1920px;
|
||||
height: 1080px;
|
||||
overflow: hidden;
|
||||
background: #07110d;
|
||||
}
|
||||
.scene {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
overflow: hidden;
|
||||
opacity: 0;
|
||||
}
|
||||
#scene-hook {
|
||||
opacity: 1;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div
|
||||
id="root"
|
||||
data-composition-id="main"
|
||||
data-start="0"
|
||||
data-duration="6"
|
||||
data-width="1920"
|
||||
data-height="1080"
|
||||
>
|
||||
<!-- First sub-comp at near-zero start: the bug trigger -->
|
||||
<div
|
||||
id="scene-hook"
|
||||
class="scene"
|
||||
data-layout-allow-overflow
|
||||
data-composition-id="hook"
|
||||
data-composition-src="compositions/hook.html"
|
||||
data-start="0.001"
|
||||
data-duration="2.0"
|
||||
data-track-index="0"
|
||||
></div>
|
||||
|
||||
<!-- Second sub-comp at a later start: works correctly -->
|
||||
<div
|
||||
id="scene-later"
|
||||
class="scene"
|
||||
data-layout-allow-overflow
|
||||
data-composition-id="later"
|
||||
data-composition-src="compositions/later.html"
|
||||
data-start="2.5"
|
||||
data-duration="3.5"
|
||||
data-track-index="1"
|
||||
></div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
window.__timelines = window.__timelines || {};
|
||||
var tl = gsap.timeline({ paused: true });
|
||||
|
||||
// Transition: hook zooms out at 2.5s
|
||||
tl.to("#scene-hook", { scale: 2.5, opacity: 0, duration: 0.4, ease: "power3.in" }, 2.5);
|
||||
tl.fromTo(
|
||||
"#scene-later",
|
||||
{ scale: 0.5, opacity: 0 },
|
||||
{ scale: 1, opacity: 1, duration: 0.4, ease: "power3.out" },
|
||||
2.65,
|
||||
);
|
||||
|
||||
window.__timelines["main"] = tl;
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user