drawille 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/drawille/flipbook.rb +17 -5
- data/lib/drawille/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c3a60513c65dfe590e9d25f8b6929b8fb432d27f
|
4
|
+
data.tar.gz: 96efb58c4b3f7065034eb85896b6d65112d0093d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 122d8f9f4acf3098296f3750fadc27ec21531b9fa8045ec109791cf3ac4ceff91321f512ef34dee6567dbaa1680d347bd41bb70b52a534df54fd2ba844de9e9c
|
7
|
+
data.tar.gz: 5f8f46911c99626d64c1ed150714031c98fb7acf7ab000b43aed174c92e87ffc2855fd023a3d5dde7945c7b491f4b5f03961a92b130711b7259bf2eebff2b886
|
data/lib/drawille/flipbook.rb
CHANGED
@@ -38,11 +38,17 @@ module Drawille
|
|
38
38
|
Curses::crmode
|
39
39
|
Curses::curs_set 0
|
40
40
|
repeat options do
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
41
|
+
if block_given?
|
42
|
+
loop {
|
43
|
+
canvas = yield
|
44
|
+
raise StopIteration if canvas == nil
|
45
|
+
draw canvas.frame
|
46
|
+
}
|
47
|
+
else
|
48
|
+
each_frame options do |frame|
|
49
|
+
draw frame
|
50
|
+
sleep(1.0/options[:fps])
|
51
|
+
end
|
46
52
|
end
|
47
53
|
end
|
48
54
|
ensure
|
@@ -56,6 +62,12 @@ module Drawille
|
|
56
62
|
|
57
63
|
private
|
58
64
|
|
65
|
+
def draw frame
|
66
|
+
Curses::setpos(0, 0)
|
67
|
+
Curses::addstr(frame)
|
68
|
+
Curses::refresh
|
69
|
+
end
|
70
|
+
|
59
71
|
def clear_screen options
|
60
72
|
Curses::clear
|
61
73
|
Curses::refresh
|
data/lib/drawille/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: drawille
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marcin Skirzynski
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-09-
|
11
|
+
date: 2014-09-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: curses
|