diff --git a/docs/effects/analog_clock.gif b/docs/effects/analog_clock.gif index 83daf48..1f5c5f4 100644 Binary files a/docs/effects/analog_clock.gif and b/docs/effects/analog_clock.gif differ diff --git a/docs/effects/bell.gif b/docs/effects/bell.gif index 4880d9c..c969d16 100644 Binary files a/docs/effects/bell.gif and b/docs/effects/bell.gif differ diff --git a/docs/effects/big_clock.gif b/docs/effects/big_clock.gif index 43658ef..a8dffee 100644 Binary files a/docs/effects/big_clock.gif and b/docs/effects/big_clock.gif differ diff --git a/docs/effects/big_dynamic.gif b/docs/effects/big_dynamic.gif index b201691..1339ccf 100644 Binary files a/docs/effects/big_dynamic.gif and b/docs/effects/big_dynamic.gif differ diff --git a/docs/effects/clock.gif b/docs/effects/clock.gif index 8fe7e02..60bbb2e 100644 Binary files a/docs/effects/clock.gif and b/docs/effects/clock.gif differ diff --git a/docs/effects/confetti.gif b/docs/effects/confetti.gif index 51811f4..6875444 100644 Binary files a/docs/effects/confetti.gif and b/docs/effects/confetti.gif differ diff --git a/docs/effects/dvd.gif b/docs/effects/dvd.gif index 5ca4105..6b5246f 100644 Binary files a/docs/effects/dvd.gif and b/docs/effects/dvd.gif differ diff --git a/docs/effects/fire.gif b/docs/effects/fire.gif index 345fea2..ccf86aa 100644 Binary files a/docs/effects/fire.gif and b/docs/effects/fire.gif differ diff --git a/docs/effects/firework.gif b/docs/effects/firework.gif index 2964f0c..5363b0b 100644 Binary files a/docs/effects/firework.gif and b/docs/effects/firework.gif differ diff --git a/docs/effects/gol.gif b/docs/effects/gol.gif index 586941d..e92847e 100644 Binary files a/docs/effects/gol.gif and b/docs/effects/gol.gif differ diff --git a/docs/effects/heart.gif b/docs/effects/heart.gif index b6fd99d..4101140 100644 Binary files a/docs/effects/heart.gif and b/docs/effects/heart.gif differ diff --git a/docs/effects/matrix.gif b/docs/effects/matrix.gif index 4e0a8bc..420a2f7 100644 Binary files a/docs/effects/matrix.gif and b/docs/effects/matrix.gif differ diff --git a/docs/effects/multi_dynamic.gif b/docs/effects/multi_dynamic.gif index 321824f..13b1dd2 100644 Binary files a/docs/effects/multi_dynamic.gif and b/docs/effects/multi_dynamic.gif differ diff --git a/docs/effects/pixel_clock.gif b/docs/effects/pixel_clock.gif index 024c253..9b2a24a 100644 Binary files a/docs/effects/pixel_clock.gif and b/docs/effects/pixel_clock.gif differ diff --git a/docs/effects/rainbow_matrix.gif b/docs/effects/rainbow_matrix.gif index d59d249..4e495bd 100644 Binary files a/docs/effects/rainbow_matrix.gif and b/docs/effects/rainbow_matrix.gif differ diff --git a/docs/effects/random_confetti.gif b/docs/effects/random_confetti.gif index dc244de..a8f63ae 100644 Binary files a/docs/effects/random_confetti.gif and b/docs/effects/random_confetti.gif differ diff --git a/docs/effects/random_matrix.gif b/docs/effects/random_matrix.gif index 7ff65f3..5e370a4 100644 Binary files a/docs/effects/random_matrix.gif and b/docs/effects/random_matrix.gif differ diff --git a/docs/effects/sinematrix3.gif b/docs/effects/sinematrix3.gif index 9467b02..e204682 100644 Binary files a/docs/effects/sinematrix3.gif and b/docs/effects/sinematrix3.gif differ diff --git a/docs/effects/single_dynamic.gif b/docs/effects/single_dynamic.gif index c323dc3..10e07c6 100644 Binary files a/docs/effects/single_dynamic.gif and b/docs/effects/single_dynamic.gif differ diff --git a/docs/effects/snake.gif b/docs/effects/snake.gif index 26d019f..6f5e91f 100644 Binary files a/docs/effects/snake.gif and b/docs/effects/snake.gif differ diff --git a/docs/effects/twirl.gif b/docs/effects/twirl.gif index 266b202..e4f651b 100644 Binary files a/docs/effects/twirl.gif and b/docs/effects/twirl.gif differ diff --git a/src/tools/generate_gifs.sh b/src/tools/generate_gifs.sh index 263a881..f59b603 100755 --- a/src/tools/generate_gifs.sh +++ b/src/tools/generate_gifs.sh @@ -15,6 +15,7 @@ for effect in $EFFECTS; do echo " + ./recorder.rb $IP /tmp/effect.gif $effect" ./recorder.rb $IP /tmp/effect.gif $effect echo - echo " + gifsicle /tmp/effect.gif -o effects/$effect.gif" - gifsicle /tmp/effect.gif -o effects/$effect.gif + #echo " + gifsicle /tmp/effect.gif -o ../../docs/effects/$effect.gif" + #gifsicle /tmp/effect.gif -o ../../docs/effects/$effect.gif + mv /tmp/effect.gif ../../docs/effects/$effect.gif done diff --git a/src/tools/recorder.rb b/src/tools/recorder.rb index f0b1837..b244a72 100755 --- a/src/tools/recorder.rb +++ b/src/tools/recorder.rb @@ -9,7 +9,7 @@ IP = ARGV[0] PORT = 2122 FILE = ARGV[1] or raise "No filename given" EFFECT = ARGV[2] -FRAMES = 250 +FRAMES = 125 FACTOR = 1 delay = 50 @@ -53,20 +53,13 @@ while gif.length < FRAMES do id = data.shift << 8 | data.shift if last_id != id-1 && last_id != id-2 - puts + puts "Skipped from #{last_id} to #{id}." gif = ImageList.new end last_id = id - if img && last_frame_time - last_diff = diff = Time.now.to_f * 100 - last_frame_time.to_f * 100 - img.delay = diff - end - - last_frame_time = Time.now - img = Image.new(dim_x, dim_y) - img.delay = 5 + img.delay = 1 gc = Draw.new #next @@ -84,10 +77,10 @@ while gif.length < FRAMES do img.sample!(FACTOR) gif << img end -img.delay = last_diff s.close puts puts "Generating gif..." +gif.ticks_per_second = 100 gif.write(FILE) puts puts