1C2: Fix dot movement timings
This commit is contained in:
parent
0e586d91c7
commit
388de5530d
1 changed files with 34 additions and 22 deletions
|
@ -36,32 +36,39 @@ def introFramesLight(p):
|
||||||
]
|
]
|
||||||
|
|
||||||
def introFramesDot(p):
|
def introFramesDot(p):
|
||||||
frames = 10*fps
|
frames = int(9.5 * fps)
|
||||||
steps = [
|
steps = [
|
||||||
(5, 0, 159),
|
(0, 0),
|
||||||
(33, -848, 159),
|
(0, 159),
|
||||||
(37, -848, 53),
|
(-848, 159),
|
||||||
(40, -742, 53),
|
(-848, 53),
|
||||||
(43, -742, -106),
|
(-742, 53),
|
||||||
(45, -795, -106),
|
(-742, -106),
|
||||||
(47, -795, -212),
|
(-795, -106),
|
||||||
(49, -742, -212),
|
(-795, -212),
|
||||||
(51, -742, -265),
|
(-742, -212),
|
||||||
(56, -583, -265),
|
(-742, -265),
|
||||||
(58, -583, -212),
|
(-583, -265),
|
||||||
(63, -424, -212),
|
(-583, -212),
|
||||||
(65, -424, -265),
|
(-424, -212),
|
||||||
(75, -106, -265),
|
(-424, -265),
|
||||||
(77, -106, -212),
|
(-106, -265),
|
||||||
(81, 0, -212),
|
(-106, -212),
|
||||||
(86, 0, -53),
|
(0, -212),
|
||||||
(93, 0, 0),
|
(0, -53),
|
||||||
(100, 0, 0)
|
(0, 0)
|
||||||
]
|
]
|
||||||
|
|
||||||
|
steps_with_shift = [(0,0,0)]
|
||||||
|
total_shift = 0
|
||||||
|
for (oldx, oldy), (x, y) in zip(steps, steps[1:]):
|
||||||
|
duration = abs(x - oldx) + abs(y - oldy)
|
||||||
|
total_shift += duration
|
||||||
|
steps_with_shift.append((duration, x, y))
|
||||||
|
|
||||||
prev = (0, 0, 0)
|
prev = (0, 0, 0)
|
||||||
for step in steps:
|
for step in steps_with_shift:
|
||||||
dur = int((step[0] - prev[0]) * frames / 100)
|
dur = int(frames * step[0] / total_shift)
|
||||||
for i in range(0, dur):
|
for i in range(0, dur):
|
||||||
yield [
|
yield [
|
||||||
('dot1', 'attr', 'transform', 'translate({:.4f}, {:.4f})'.format(easeLinear(i, prev[1], step[1]-prev[1], dur),
|
('dot1', 'attr', 'transform', 'translate({:.4f}, {:.4f})'.format(easeLinear(i, prev[1], step[1]-prev[1], dur),
|
||||||
|
@ -69,6 +76,11 @@ def introFramesDot(p):
|
||||||
]
|
]
|
||||||
prev = step
|
prev = step
|
||||||
|
|
||||||
|
for _ in range(int(0.5 * fps)):
|
||||||
|
yield [
|
||||||
|
('dot1', 'attr', 'transform', 'translate(0, 0)')
|
||||||
|
]
|
||||||
|
|
||||||
def introFrameText(p):
|
def introFrameText(p):
|
||||||
frames = 2*fps
|
frames = 2*fps
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue