somewhat finished version

This commit is contained in:
kleines Filmröllchen 2025-04-15 23:11:19 +02:00
parent a47785d6d9
commit 47fe8657dd
Signed by: filmroellchen
SSH key fingerprint: SHA256:NarU6J/XgCfEae4rbei0YIdN2pYaYDccarK6R53dnc8
2 changed files with 54 additions and 41 deletions

View file

@ -19,34 +19,34 @@ def introFrames(args):
)
# fade in logo
# frames = 1 * fps
# for i in range(0, frames):
# # source: matrix(0.66093871,0,0,0.66093871,325.49887,111.96043)
# # target: matrix(1, 0, 0, 1, 0, 0)
# size = 0.66 + easeInOutSine(i, 0.0, 1.0 - 0.66, frames)
# posx = easeInOutSine(frames - i, 0.0, 325.49887, frames)
# posy = easeInOutSine(frames - i, 0.0, 111.96043, frames)
# yield (
# (
# "glogo",
# "attr",
# "transform",
# # the easing function cant handle easing from larger to smaller, so use this hacky workaround
# f"translate(0,{easeInQuad(frames - i, 0.0, 200.0, frames)})",
# ),
# ("glogo", "style", "opacity", easeOutSine(i, 0, 1, frames)),
# # scale in the fsck text banner behind the foreground elements
# # target size is 5.414656 in both x and y
# (
# "fsck-banner",
# "attr",
# "transform",
# f"matrix({size:.4f},0,0,{size:.4f},{posx:.4f},{posy:.4f})",
# ),
# ("title", "style", "opacity", 0),
# ("persons", "style", "opacity", 0),
# ("sparkle", "style", "opacity", 0),
# )
frames = 1 * fps
for i in range(0, frames):
# source: matrix(0.66093871,0,0,0.66093871,325.49887,111.96043)
# target: matrix(1, 0, 0, 1, 0, 0)
size = 0.66 + easeInOutSine(i, 0.0, 1.0 - 0.66, frames)
posx = easeInOutSine(frames - i, 0.0, 325.49887, frames)
posy = easeInOutSine(frames - i, 0.0, 111.96043, frames)
yield (
(
"glogo",
"attr",
"transform",
# the easing function cant handle easing from larger to smaller, so use this hacky workaround
f"translate(0,{easeInQuad(frames - i, 0.0, 200.0, frames)})",
),
("glogo", "style", "opacity", easeOutSine(i, 0, 1, frames)),
# scale in the fsck text banner behind the foreground elements
# target size is 5.414656 in both x and y
(
"fsck-banner",
"attr",
"transform",
f"matrix({size:.4f},0,0,{size:.4f},{posx:.4f},{posy:.4f})",
),
("title", "style", "opacity", 0),
("persons", "style", "opacity", 0),
("sparkle", "style", "opacity", 0),
)
frames = 1 * fps
for i in range(0, frames):
@ -71,6 +71,12 @@ def introFrames(args):
"opacity",
easeOutSine(min(i * 2, intermediate), 0, 1, intermediate),
),
(
"sparkle",
"attr",
"transform",
f"translate({-463.66869 + easeLinear(i, 0.0, 378.32308 + 463.66869, frames)}, 0)",
),
)
for i in range(intermediate, frames):
yield (
@ -87,12 +93,18 @@ def introFrames(args):
"style",
"opacity",
easeInSine(
i-intermediate,
i - intermediate,
1,
-1,
frames - intermediate,
),
),
(
"sparkle",
"attr",
"transform",
f"translate({-463.66869 + easeLinear(i, 0.0, 378.32308 + 463.66869, frames)}, 0)",
),
)
# show whole image for 5 seconds