From e0fde53461d9053ff806cfeb9b491c56083521d6 Mon Sep 17 00:00:00 2001 From: MaZderMind Date: Fri, 29 May 2015 12:54:43 +0200 Subject: [PATCH] pydata pause loop --- pydata15/__init__.py | 31 +++++++++++ pydata15/artwork/pause.svg | 104 +++++++++++++++++++++++++++++++++++++ 2 files changed, 135 insertions(+) create mode 100644 pydata15/artwork/pause.svg diff --git a/pydata15/__init__.py b/pydata15/__init__.py index b9ed684..ad40689 100644 --- a/pydata15/__init__.py +++ b/pydata15/__init__.py @@ -91,7 +91,31 @@ def outroFrames(parameters): ('text', 'style', 'opacity', easeLinear(i, 1, -1, frames)), ) + +def pauseFrames(parameters): + frames = 10*fps + for i in range(0, frames): + yield ( + ('pause1', 'attr', 'x', '%.4f' % easeLinear(i, -268, 1295, frames)), + ('pause1', 'style', 'opacity', 1), + ('pause2', 'style', 'opacity', 0), + ) + + frames = 10*fps + for i in range(0, frames): + yield ( + ('pause2', 'attr', 'x', '%.4f' % easeLinear(i, -268, 1295, frames)), + ('pause2', 'style', 'opacity', 1), + ('pause1', 'style', 'opacity', 0), + ) + def debug(): + render( + 'pause.svg', + '../pause.dv', + pauseFrames + ) + render( 'outro.svg', '../outro.dv', @@ -133,3 +157,10 @@ def tasks(queue, parameters): outfile = 'outro.dv', sequence = outroFrames )) + + # generate a task description and put it into the queue + queue.put(Rendertask( + infile = 'pause.svg', + outfile = 'pause.dv', + sequence = pauseFrames + )) diff --git a/pydata15/artwork/pause.svg b/pydata15/artwork/pause.svg new file mode 100644 index 0000000..df51224 --- /dev/null +++ b/pydata15/artwork/pause.svg @@ -0,0 +1,104 @@ + + + + + + + + + + + + + + image/svg+xml + + + + + + + + Pause + Pause + +