let the rocket fly
This commit is contained in:
parent
764d808b20
commit
6ffd341e66
2 changed files with 59 additions and 27 deletions
|
@ -12,8 +12,7 @@ def introFrames(parameters):
|
||||||
title = titlemap[id] if id in titlemap else parameters['$title'].strip()
|
title = titlemap[id] if id in titlemap else parameters['$title'].strip()
|
||||||
|
|
||||||
rnd = random.Random()
|
rnd = random.Random()
|
||||||
#rnd.seed(title)
|
rnd.seed(id)
|
||||||
rnd.seed("blafoo23")
|
|
||||||
|
|
||||||
tiles = range(1, 28)
|
tiles = range(1, 28)
|
||||||
targets = {}
|
targets = {}
|
||||||
|
@ -26,7 +25,7 @@ def introFrames(parameters):
|
||||||
maxdelay = max(maxdelay, delay)
|
maxdelay = max(maxdelay, delay)
|
||||||
targets[tile] = (
|
targets[tile] = (
|
||||||
# x/y
|
# x/y
|
||||||
rnd.randint(-1200, -820),
|
rnd.randint(-1200, -900),
|
||||||
rnd.randint(-600, 600),
|
rnd.randint(-600, 600),
|
||||||
|
|
||||||
# delay
|
# delay
|
||||||
|
@ -54,7 +53,8 @@ def introFrames(parameters):
|
||||||
|
|
||||||
placements.extend([
|
placements.extend([
|
||||||
('text', 'style', 'opacity', '%.4f' % opacity),
|
('text', 'style', 'opacity', '%.4f' % opacity),
|
||||||
('text', 'attr', 'transform', 'translate(%.4f, 0)' % x)
|
('text', 'attr', 'transform', 'translate(%.4f, 0)' % x),
|
||||||
|
('rocket', 'style', 'opacity', '0'),
|
||||||
])
|
])
|
||||||
|
|
||||||
yield placements
|
yield placements
|
||||||
|
@ -75,24 +75,39 @@ def introFrames(parameters):
|
||||||
# final frame
|
# final frame
|
||||||
yield placements
|
yield placements
|
||||||
|
|
||||||
return
|
# start rotation
|
||||||
|
dr = 30
|
||||||
|
|
||||||
|
# start point
|
||||||
|
dx = -890
|
||||||
|
dy = 660
|
||||||
|
|
||||||
|
# distance from origin
|
||||||
|
ox = 830
|
||||||
|
oy = 576
|
||||||
|
|
||||||
|
# landing height
|
||||||
|
lh = 15
|
||||||
|
|
||||||
# fly the rocket
|
# fly the rocket
|
||||||
dr = 20.000
|
|
||||||
dx = 1648.5714
|
|
||||||
dy = -1562.8571
|
|
||||||
|
|
||||||
ox = -111.42858
|
|
||||||
oy = 1265.7144
|
|
||||||
|
|
||||||
frames = 3*fps
|
frames = 3*fps
|
||||||
for i in range(0, frames):
|
for i in range(0, frames):
|
||||||
r = easeLinear(i, 0, dr, frames)
|
r = easeOutQuad(i, dr, -dr, frames)
|
||||||
x = easeLinear(i, 0, dx, frames)
|
x = easeOutQuad(i, dx, -dx, frames)
|
||||||
y = easeLinear(i, 0, dy, frames)
|
y = easeOutQuad(i, dy, -dy - lh, frames)
|
||||||
|
|
||||||
yield (
|
yield (
|
||||||
('rocket', 'attr', 'transform', 'rotate(%.4f, %.4f, %.4f) translate(%.4f, %.4f)' % (r, ox+x, oy+y, x, y)),
|
('rocket', 'style', 'opacity', '1'),
|
||||||
|
('rocket', 'attr', 'transform', 'translate(%.4f, %.4f) rotate(%.4f, %.4f, %.4f)' % (x, y, r, ox, oy)),
|
||||||
|
)
|
||||||
|
|
||||||
|
# land the rocket
|
||||||
|
frames = 1*fps
|
||||||
|
for i in range(0, frames):
|
||||||
|
y = easeLinear(i, -lh, lh, frames)
|
||||||
|
|
||||||
|
yield (
|
||||||
|
('rocket', 'attr', 'transform', 'translate(0, %.4f)' % y),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -122,4 +137,22 @@ def debug():
|
||||||
# )
|
# )
|
||||||
|
|
||||||
def tasks(queue, args):
|
def tasks(queue, args):
|
||||||
raise NotImplementedError('call with --debug to render your intro/outro')
|
# iterate over all events extracted from the schedule xml-export
|
||||||
|
for event in events(scheduleUrl):
|
||||||
|
|
||||||
|
# HACK: only render event 49
|
||||||
|
#if event['id'] != 49:
|
||||||
|
# continue
|
||||||
|
|
||||||
|
queue.put(Rendertask(
|
||||||
|
infile = 'intro.svg',
|
||||||
|
outfile = str(event['id'])+".ts",
|
||||||
|
sequence = introFrames,
|
||||||
|
parameters = {
|
||||||
|
'$id': event['id'],
|
||||||
|
'$title': event['title'],
|
||||||
|
'$subtitle': event['subtitle'],
|
||||||
|
'$personnames': event['personnames']
|
||||||
|
}
|
||||||
|
))
|
||||||
|
|
||||||
|
|
|
@ -27,10 +27,10 @@
|
||||||
inkscape:pageopacity="0.0"
|
inkscape:pageopacity="0.0"
|
||||||
inkscape:pageshadow="2"
|
inkscape:pageshadow="2"
|
||||||
inkscape:zoom="0.49497475"
|
inkscape:zoom="0.49497475"
|
||||||
inkscape:cx="640.65224"
|
inkscape:cx="771.01569"
|
||||||
inkscape:cy="633.69474"
|
inkscape:cy="614.78598"
|
||||||
inkscape:document-units="px"
|
inkscape:document-units="px"
|
||||||
inkscape:current-layer="g4867"
|
inkscape:current-layer="layer1"
|
||||||
showgrid="false"
|
showgrid="false"
|
||||||
inkscape:window-width="1920"
|
inkscape:window-width="1920"
|
||||||
inkscape:window-height="1014"
|
inkscape:window-height="1014"
|
||||||
|
@ -53,7 +53,7 @@
|
||||||
inkscape:label=""
|
inkscape:label=""
|
||||||
inkscape:color="rgb(0,0,255)" />
|
inkscape:color="rgb(0,0,255)" />
|
||||||
<sodipodi:guide
|
<sodipodi:guide
|
||||||
position="1041.4286,879.99999"
|
position="872.77184,1028.3353"
|
||||||
orientation="0,1"
|
orientation="0,1"
|
||||||
id="guide4485" />
|
id="guide4485" />
|
||||||
<sodipodi:guide
|
<sodipodi:guide
|
||||||
|
@ -550,10 +550,10 @@
|
||||||
inkscape:label="#flowRoot3553"><flowRegion
|
inkscape:label="#flowRoot3553"><flowRegion
|
||||||
id="flowRegion3555"><rect
|
id="flowRegion3555"><rect
|
||||||
id="rect3557"
|
id="rect3557"
|
||||||
width="854.14764"
|
width="856.16803"
|
||||||
height="577.59332"
|
height="729.11627"
|
||||||
x="947.17649"
|
x="947.17651"
|
||||||
y="163.074498"
|
y="15.07449"
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.50000381px;line-height:100%;font-family:Neris;-inkscape-font-specification:Neris;text-align:center;text-anchor:middle" /></flowRegion><flowPara
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.50000381px;line-height:100%;font-family:Neris;-inkscape-font-specification:Neris;text-align:center;text-anchor:middle" /></flowRegion><flowPara
|
||||||
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:80.00000763px;line-height:100%;font-family:Neris;-inkscape-font-specification:'Neris Light';text-align:start;letter-spacing:-3.00000024px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1"
|
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:80.00000763px;line-height:100%;font-family:Neris;-inkscape-font-specification:'Neris Light';text-align:start;letter-spacing:-3.00000024px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1"
|
||||||
id="flowPara3567">#2342</flowPara><flowPara
|
id="flowPara3567">#2342</flowPara><flowPara
|
||||||
|
@ -1034,8 +1034,7 @@
|
||||||
inkscape:connector-curvature="0"
|
inkscape:connector-curvature="0"
|
||||||
inkscape:label="#path344" />
|
inkscape:label="#path344" />
|
||||||
<g
|
<g
|
||||||
id="rocket"
|
id="rocket">
|
||||||
inkscape:label="#g6441">
|
|
||||||
<path
|
<path
|
||||||
inkscape:connector-curvature="0"
|
inkscape:connector-curvature="0"
|
||||||
id="path364"
|
id="path364"
|
||||||
|
|
Before Width: | Height: | Size: 175 KiB After Width: | Height: | Size: 175 KiB |
Loading…
Add table
Reference in a new issue