first go at cccamp15 intros
This commit is contained in:
parent
0096f61760
commit
ac468adfaa
3 changed files with 2150 additions and 0 deletions
77
cccamp15/__init__.py
Normal file
77
cccamp15/__init__.py
Normal file
|
@ -0,0 +1,77 @@
|
|||
#!/usr/bin/python3
|
||||
|
||||
import random
|
||||
from renderlib import *
|
||||
|
||||
scheduleUrl = 'https://events.ccc.de/camp/2015/Fahrplan/schedule.xml'
|
||||
titlemap = {}
|
||||
|
||||
def introFrames(parameters):
|
||||
id = parameters['$id']
|
||||
title = titlemap[id] if id in titlemap else parameters['$title'].strip()
|
||||
|
||||
rnd = random.Random()
|
||||
#rnd.seed(title)
|
||||
rnd.seed("blafoo23")
|
||||
|
||||
tiles = range(1, 27)
|
||||
targets = {}
|
||||
|
||||
frames = 5*fps
|
||||
maxdelay = int(frames/4)
|
||||
|
||||
for tile in tiles:
|
||||
targets[tile] = (
|
||||
# x/y
|
||||
rnd.randint(-1200, -800),
|
||||
rnd.randint(-600, 600),
|
||||
|
||||
# delay
|
||||
rnd.randint(0, maxdelay)
|
||||
)
|
||||
|
||||
# 5 Sekunde Kacheln zusammenbauen
|
||||
for i in range(0, frames):
|
||||
placements = []
|
||||
for tile in tiles:
|
||||
delay = targets[tile][2]
|
||||
|
||||
tx = targets[tile][0]
|
||||
ty = targets[tile][1]
|
||||
|
||||
x = easeDelay(easeInOutQuad, delay, i, tx, -tx, frames-maxdelay)
|
||||
y = easeDelay(easeInOutQuad, delay, i, ty, -ty, frames-maxdelay)
|
||||
|
||||
placements.append(
|
||||
('g%u' % tile, 'attr', 'transform', 'translate(%.4f, %.4f)' % (x, y))
|
||||
)
|
||||
|
||||
yield placements
|
||||
|
||||
def outroFrames(p):
|
||||
# 5 Sekunden stehen bleiben
|
||||
frames = 5*fps
|
||||
for i in range(0, frames):
|
||||
yield []
|
||||
|
||||
def debug():
|
||||
render(
|
||||
'intro.svg',
|
||||
'../intro.ts',
|
||||
introFrames,
|
||||
parameters={
|
||||
'$id': 6543,
|
||||
'$title': 'NSA-Untersuchungsausschuss - Wer kontrolliert wen?',
|
||||
'$subtitle': 'A Practical Introduction to Acoustic Cryptanalysis',
|
||||
'$person': 'Frantisek Algoldor Apfelbeck'
|
||||
}
|
||||
)
|
||||
|
||||
# render(
|
||||
# 'outro.svg',
|
||||
# '../outro.ts',
|
||||
# outroFrames
|
||||
# )
|
||||
|
||||
def tasks(queue, args):
|
||||
raise NotImplementedError('call with --debug to render your intro/outro')
|
1045
cccamp15/artwork/intro.svg
Normal file
1045
cccamp15/artwork/intro.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 164 KiB |
1028
cccamp15/artwork/pieces-grouped.svg
Normal file
1028
cccamp15/artwork/pieces-grouped.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 155 KiB |
Loading…
Add table
Reference in a new issue