Setting the file. One moment.
Skill 32 · Remotion To Hyperframes
Subchapter 32.35
Scripts
Gitkeepscriptsassets/test-corpus/tier-2-multi-scene/hf-src/compositions/scene-1.html
HTML35 lines1 KB
<template id="scene-1-template">
<div data-composition-id="scene-1" data-width="1280" data-height="720" data-duration="2">
<style>
.scene {
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
}
.title {
font-size: 140px;
font-weight: 800;
color: #ffffff;
letter-spacing: 0.05em;
transform: scale(0);
}
</style>
<div class="scene">
<div class="title">Welcome</div>
</div>
<script>
// Scene 1 (0-2s): spring scale on "Welcome". Remotion:
// spring({frame, fps, config: {damping:12, stiffness:100, mass:1}}) -> back.out(1.4) over ~0.7s.
const tl = gsap.timeline({ paused: true });
const scene = document.querySelector(".scene");
tl.set(scene, { opacity: 1 }, 0);
tl.to(scene.querySelector(".title"), { scale: 1, duration: 0.7, ease: "back.out(1.4)" }, 0);
tl.set(scene, { opacity: 0 }, 2);
window.__timelines = window.__timelines || {};
window.__timelines["scene-1"] = tl;
</script>
</div>
</template>