mooncats 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Manifest.txt +12 -0
- data/config/cryptocats/000.txt +44 -0
- data/config/cryptocats/001.txt +44 -0
- data/config/cryptocats/002.txt +43 -0
- data/config/cryptocats/003.txt +43 -0
- data/config/v2/008.txt +23 -0
- data/config/v2/009.txt +20 -0
- data/config/v2/010.txt +29 -0
- data/config/v2/011.txt +26 -0
- data/config/v2/012.txt +22 -0
- data/config/v2/013.txt +20 -0
- data/config/v2/014.txt +27 -0
- data/config/v2/015.txt +29 -0
- data/lib/mooncats.rb +7 -1
- data/lib/mooncats/design.rb +36 -1
- data/lib/mooncats/image.rb +51 -30
- data/lib/mooncats/version.rb +1 -1
- metadata +26 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '028b0978993c5b90f6a80cc6690b5924e966a51dfb00115b3d95539974009a79'
|
4
|
+
data.tar.gz: 0ef924d234feef5fa9128b15a2dd2ac9525f489c2d97b218a8c78de202591942
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f401b3e4e96581410c23df4a714799f361bd897c2681c5d696c3321bc86d80eb76c945a9914642c2e1f7352fc5bdbd847d964680b6866d5b130b8607d54cc3e
|
7
|
+
data.tar.gz: 950bfa3ef98f2e8f9dbb0e9d5de935ff00becd7d30bf0771903c9c300f58b438c040e559e07443635218f65e6e6c12bbf3a1629cf96d92ec5de23f0bf3717e73
|
data/Manifest.txt
CHANGED
@@ -3,6 +3,18 @@ Manifest.txt
|
|
3
3
|
README.md
|
4
4
|
Rakefile
|
5
5
|
bin/mooncat
|
6
|
+
config/cryptocats/000.txt
|
7
|
+
config/cryptocats/001.txt
|
8
|
+
config/cryptocats/002.txt
|
9
|
+
config/cryptocats/003.txt
|
10
|
+
config/v2/008.txt
|
11
|
+
config/v2/009.txt
|
12
|
+
config/v2/010.txt
|
13
|
+
config/v2/011.txt
|
14
|
+
config/v2/012.txt
|
15
|
+
config/v2/013.txt
|
16
|
+
config/v2/014.txt
|
17
|
+
config/v2/015.txt
|
6
18
|
lib/mooncats.rb
|
7
19
|
lib/mooncats/composite.rb
|
8
20
|
lib/mooncats/dataset.rb
|
@@ -0,0 +1,44 @@
|
|
1
|
+
# notes on colors
|
2
|
+
# - color 0 => TRANSPARENT
|
3
|
+
# - color 1 => outline color
|
4
|
+
# - color 2 => pattern 2 or base color (darker+2)
|
5
|
+
# - color 3 => pattern 1 or base color (darker+1)
|
6
|
+
# - color 4 => base color
|
7
|
+
# - color 5 => eye color
|
8
|
+
# - color 6 => BLACK
|
9
|
+
#
|
10
|
+
# size: 32x32
|
11
|
+
|
12
|
+
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
13
|
+
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
14
|
+
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
15
|
+
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
16
|
+
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
17
|
+
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
18
|
+
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
19
|
+
0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0
|
20
|
+
0 0 1 1 1 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4 4 4 1 1 1 1 1 1 1 4 4 4 4 1 0 0 0 0
|
35
|
+
0 0 0 0 0 0 1 3 4 1 4 4 4 4 4 4 4 4 3 3 3 4 4 4 4 4 3 1 0 0 0 0
|
36
|
+
0 0 0 0 0 0 1 3 4 1 3 4 4 4 4 4 4 4 4 3 4 4 4 4 4 4 3 1 0 0 0 0
|
37
|
+
0 0 0 0 0 0 1 3 3 1 3 3 3 4 4 4 4 4 4 4 4 4 4 4 4 4 3 1 0 0 0 0
|
38
|
+
0 0 0 0 0 0 1 2 2 1 1 1 3 4 4 4 4 4 4 4 4 4 4 4 4 3 3 1 0 0 0 0
|
39
|
+
0 0 0 0 0 0 0 1 1 0 0 1 3 3 4 1 1 1 1 1 1 1 1 4 3 3 1 0 0 0 0 0
|
40
|
+
0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0
|
41
|
+
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
42
|
+
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
43
|
+
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
44
|
+
|
@@ -0,0 +1,44 @@
|
|
1
|
+
# notes on colors
|
2
|
+
# - color 0 => TRANSPARENT
|
3
|
+
# - color 1 => outline color
|
4
|
+
# - color 2 => pattern 2 or base color (darker+2)
|
5
|
+
# - color 3 => pattern 1 or base color (darker+1)
|
6
|
+
# - color 4 => base color
|
7
|
+
# - color 5 => eye color
|
8
|
+
# - color 6 => BLACK
|
9
|
+
# - color 7 => WHITE
|
10
|
+
#
|
11
|
+
# size: 32x32
|
12
|
+
|
13
|
+
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
14
|
+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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
43
|
+
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
44
|
+
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# notes on colors
|
2
|
+
# - color 0 => TRANSPARENT
|
3
|
+
# - color 1 => outline color
|
4
|
+
# - color 2 => pattern 2 or base color (darker+2)
|
5
|
+
# - color 3 => pattern 1 or base color (darker+1)
|
6
|
+
# - color 4 => base color
|
7
|
+
# - color 5 XXX eye color (not in use)
|
8
|
+
# - color 6 => BLACK
|
9
|
+
#
|
10
|
+
# size: 32x32
|
11
|
+
|
12
|
+
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
13
|
+
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
14
|
+
0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
15
|
+
0 0 0 0 0 0 0 0 0 1 1 1 1 4 3 3 4 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0
|
16
|
+
0 0 0 0 0 1 1 1 1 1 4 4 4 4 4 3 4 4 4 1 1 1 1 1 1 0 0 0 0 0 0 0
|
17
|
+
0 0 0 0 0 0 1 2 2 3 4 4 4 4 3 4 4 4 4 4 3 2 2 1 0 0 0 0 0 0 0 0
|
18
|
+
0 0 0 0 0 0 1 1 3 4 4 4 4 4 4 3 4 4 4 4 4 3 1 1 0 0 0 0 0 0 0 0
|
19
|
+
0 0 0 0 0 0 0 1 4 4 4 4 4 4 3 4 4 4 4 4 4 4 1 0 0 0 0 0 0 0 0 0
|
20
|
+
0 0 0 0 0 0 1 3 4 4 4 4 4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 4 4 3 1 0 1 1 4 1 0 0
|
35
|
+
0 0 0 0 0 0 0 0 0 0 1 1 3 4 1 4 4 1 4 4 4 3 3 4 1 0 1 4 4 1 0 0
|
36
|
+
0 0 0 0 0 0 0 0 0 0 0 1 3 4 1 4 4 1 4 4 4 4 4 4 1 1 1 4 1 1 0 0
|
37
|
+
0 0 0 0 0 0 0 0 0 0 0 1 3 4 1 4 4 1 3 4 4 4 4 3 1 4 4 4 1 0 0 0
|
38
|
+
0 0 0 0 0 0 0 0 0 0 0 1 3 4 1 4 4 1 3 3 3 3 3 4 1 1 1 1 1 0 0 0
|
39
|
+
0 0 0 0 0 0 0 0 0 0 0 1 1 4 1 4 1 3 1 1 1 1 1 4 1 0 0 0 0 0 0 0
|
40
|
+
0 0 0 0 0 0 0 0 0 0 0 0 1 3 1 3 1 1 3 4 4 4 4 4 1 0 0 0 0 0 0 0
|
41
|
+
0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 1 0 1 1 1 1 1 1 1 0 0 0 0 0 0 0
|
42
|
+
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
43
|
+
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# notes on colors
|
2
|
+
# - color 0 => TRANSPARENT
|
3
|
+
# - color 1 => outline color
|
4
|
+
# - color 2 => pattern 2 or base color (darker+2)
|
5
|
+
# - color 3 => pattern 1 or base color (darker+1)
|
6
|
+
# - color 4 => base color
|
7
|
+
# - color 5 XXX eye color (not in use)
|
8
|
+
# - color 6 => BLACK
|
9
|
+
#
|
10
|
+
# size: 32x32
|
11
|
+
|
12
|
+
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
13
|
+
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0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
|
+
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
43
|
+
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
data/config/v2/008.txt
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
##############################
|
2
|
+
# design: 8 - Standing Smiling Spotted Left
|
3
|
+
# size: 21x17
|
4
|
+
###########################
|
5
|
+
|
6
|
+
0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0
|
7
|
+
0 1 3 1 0 0 0 1 2 1 0 0 0 0 0 0 0 0 0 0 0
|
8
|
+
0 1 4 3 1 1 1 2 4 1 0 0 0 0 0 0 0 0 0 0 0
|
9
|
+
1 1 3 3 3 3 3 3 3 1 1 0 0 0 0 0 0 1 1 1 0
|
10
|
+
1 3 2 2 3 3 3 3 3 3 1 0 0 0 0 0 0 1 2 1 0
|
11
|
+
1 3 5 1 3 3 5 1 3 3 1 1 1 1 1 1 0 1 1 2 1
|
12
|
+
1 3 3 3 3 3 3 3 3 2 1 3 2 2 2 1 1 0 1 2 1
|
13
|
+
1 3 3 1 3 1 3 1 3 2 1 3 3 2 2 2 1 0 1 3 1
|
14
|
+
1 2 3 3 1 3 1 3 3 3 1 3 3 3 2 3 1 1 1 3 1
|
15
|
+
0 1 3 3 3 3 3 3 3 1 2 3 3 3 3 3 3 3 3 1 1
|
16
|
+
0 0 1 1 1 1 1 1 1 3 2 2 3 3 3 3 3 1 1 1 0
|
17
|
+
0 0 1 3 2 2 2 3 3 2 2 2 3 2 2 3 3 1 0 0 0
|
18
|
+
0 0 1 3 3 2 3 3 1 4 4 4 1 2 2 2 1 1 0 0 0
|
19
|
+
0 0 0 1 3 3 1 3 3 1 4 1 3 3 2 1 1 0 0 0 0
|
20
|
+
0 0 0 0 1 3 1 1 3 1 4 1 3 3 1 1 0 0 0 0 0
|
21
|
+
0 0 0 0 1 4 1 1 4 1 1 4 3 1 1 0 0 0 0 0 0
|
22
|
+
0 0 0 0 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0
|
23
|
+
|
data/config/v2/009.txt
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
##############################
|
2
|
+
# design: 9 - Sleeping Smiling Spotted Left
|
3
|
+
# size: 20x14
|
4
|
+
###########################
|
5
|
+
|
6
|
+
0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0
|
7
|
+
0 0 1 3 1 0 0 0 1 2 1 0 0 0 0 0 0 0 0 0
|
8
|
+
0 0 1 4 3 1 1 1 2 4 1 0 0 0 0 0 0 0 0 0
|
9
|
+
0 1 1 3 3 3 3 3 3 3 1 1 1 1 1 1 0 0 0 0
|
10
|
+
0 1 3 2 2 3 3 3 3 3 3 1 1 3 3 1 1 1 1 0
|
11
|
+
0 1 3 5 1 3 3 5 1 3 3 1 3 3 3 2 2 2 1 0
|
12
|
+
0 1 3 3 3 3 3 3 3 3 2 1 3 3 3 3 2 2 1 1
|
13
|
+
0 1 3 3 1 3 1 3 1 3 2 1 3 3 3 3 3 3 3 1
|
14
|
+
1 1 2 3 3 1 3 1 3 3 3 1 3 2 1 3 3 3 3 1
|
15
|
+
1 1 1 3 3 3 3 3 3 3 1 3 3 2 2 1 1 3 3 1
|
16
|
+
1 2 2 1 1 1 1 1 1 1 1 1 4 4 3 1 3 3 1 1
|
17
|
+
1 1 2 2 4 1 4 3 3 1 2 1 1 1 1 3 3 1 1 0
|
18
|
+
0 1 1 1 1 1 1 1 1 1 2 2 2 2 3 3 1 1 0 0
|
19
|
+
0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0
|
20
|
+
|
data/config/v2/010.txt
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
##############################
|
2
|
+
# design: 10 - Pouncing Smiling Spotted Left
|
3
|
+
# size: 17x22
|
4
|
+
###########################
|
5
|
+
|
6
|
+
0 0 0 1 0 0 0 0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1 0 0 0 0 0 0 1 1 1 1 0 0
|
data/config/v2/012.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
##############################
|
2
|
+
# design: 12 - Standing Smiling Tortie Left
|
3
|
+
# size: 21x17
|
4
|
+
###########################
|
5
|
+
|
6
|
+
0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0
|
7
|
+
0 1 2 1 0 0 0 1 3 1 0 0 0 0 0 0 0 0 0 0 0
|
8
|
+
0 1 4 2 1 1 1 3 4 1 0 0 0 0 0 0 0 0 0 0 0
|
9
|
+
1 1 2 2 2 3 3 3 3 1 1 0 0 0 0 0 0 1 1 1 0
|
10
|
+
1 2 2 2 2 2 3 3 3 3 1 0 0 0 0 0 0 1 3 1 0
|
11
|
+
1 2 5 1 2 2 5 1 3 3 1 1 1 1 1 1 0 1 1 3 1
|
12
|
+
1 2 2 2 2 2 2 3 3 3 1 3 3 3 2 1 1 0 1 3 1
|
13
|
+
1 2 2 1 2 1 2 1 3 3 1 3 3 3 2 2 1 0 1 3 1
|
14
|
+
1 2 2 2 1 2 1 3 3 3 1 3 3 3 2 2 1 1 1 3 1
|
15
|
+
0 1 2 2 2 2 2 3 3 1 3 3 3 2 2 2 2 2 2 1 1
|
16
|
+
0 0 1 1 1 1 1 1 1 2 2 3 3 3 2 2 3 1 1 1 0
|
17
|
+
0 0 1 3 3 3 3 2 2 2 2 2 3 3 3 3 3 1 0 0 0
|
18
|
+
0 0 1 3 3 3 2 2 1 4 4 4 1 3 3 3 1 1 0 0 0
|
19
|
+
0 0 0 1 3 3 1 2 2 1 4 1 3 3 3 1 1 0 0 0 0
|
20
|
+
0 0 0 0 1 3 1 1 2 1 4 1 3 3 1 1 0 0 0 0 0
|
21
|
+
0 0 0 0 1 4 1 1 4 1 1 2 3 1 1 0 0 0 0 0 0
|
22
|
+
0 0 0 0 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0
|
data/config/v2/013.txt
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
##############################
|
2
|
+
# design: 13 - Sleeping Smiling Tortie Left
|
3
|
+
# size: 20x14
|
4
|
+
###########################
|
5
|
+
|
6
|
+
0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0
|
7
|
+
0 0 1 2 1 0 0 0 1 3 1 0 0 0 0 0 0 0 0 0
|
8
|
+
0 0 1 4 2 1 1 1 3 4 1 0 0 0 0 0 0 0 0 0
|
9
|
+
0 1 1 2 2 2 3 3 3 3 1 1 1 1 1 1 0 0 0 0
|
10
|
+
0 1 2 2 2 2 2 3 3 3 3 1 1 3 3 1 1 1 1 0
|
11
|
+
0 1 2 5 1 2 2 5 1 3 3 1 3 3 3 3 3 3 1 0
|
12
|
+
0 1 2 2 2 2 2 2 3 3 3 1 3 3 3 3 2 2 1 1
|
13
|
+
0 1 2 2 1 2 1 2 1 3 3 1 3 3 3 3 2 2 2 1
|
14
|
+
1 1 2 2 2 1 2 1 3 3 3 1 3 3 1 2 2 2 2 1
|
15
|
+
1 1 1 2 2 2 2 2 3 3 1 3 3 3 3 1 1 2 2 1
|
16
|
+
1 3 3 1 1 1 1 1 1 1 1 1 4 4 3 1 2 2 1 1
|
17
|
+
1 1 3 3 4 1 2 2 2 1 3 1 1 1 1 3 2 1 1 0
|
18
|
+
0 1 1 1 1 1 1 1 1 1 3 3 3 3 3 3 1 1 0 0
|
19
|
+
0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0
|
20
|
+
|
data/config/v2/014.txt
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
##############################
|
2
|
+
# design: 14 - Pouncing Smiling Tortie Left
|
3
|
+
# size: 17x22
|
4
|
+
###########################
|
5
|
+
|
6
|
+
0 0 0 1 0 0 0 0 0 1 1 0 0 0 0 0 0
|
7
|
+
0 0 1 2 1 0 0 0 1 3 1 0 0 0 0 0 0
|
8
|
+
0 0 1 4 2 1 1 1 3 4 1 0 0 0 0 0 0
|
9
|
+
0 1 1 2 2 2 3 3 3 3 1 1 0 0 0 0 0
|
10
|
+
0 1 2 2 2 2 2 3 3 3 3 1 0 0 0 0 0
|
11
|
+
0 1 2 5 1 2 2 5 1 3 3 1 0 0 0 0 0
|
12
|
+
0 1 2 2 2 2 2 2 3 3 3 1 0 0 0 0 0
|
13
|
+
0 1 2 2 1 2 1 2 1 3 3 1 0 0 0 0 0
|
14
|
+
0 1 2 2 2 1 2 1 3 3 3 1 0 0 0 0 0
|
15
|
+
0 0 1 2 2 2 2 2 3 3 1 1 0 0 0 0 0
|
16
|
+
1 1 3 1 1 1 1 1 1 1 3 1 1 1 0 0 0
|
17
|
+
1 4 3 3 3 3 3 3 3 3 3 3 1 3 1 1 0
|
18
|
+
1 1 1 3 3 1 1 1 2 3 3 3 1 1 3 1 0
|
19
|
+
0 0 1 1 3 1 4 2 2 2 3 3 3 1 3 1 1
|
20
|
+
0 0 0 1 3 3 1 1 2 2 3 3 3 1 1 3 1
|
21
|
+
0 0 0 1 3 4 4 4 3 3 3 3 3 1 1 3 1
|
22
|
+
0 0 0 1 1 4 4 4 3 1 1 1 2 1 2 2 1
|
23
|
+
0 0 0 0 1 4 4 4 3 1 3 2 2 1 2 1 1
|
24
|
+
0 0 0 0 1 2 4 4 3 3 3 2 2 2 1 1 0
|
25
|
+
0 0 0 0 1 2 2 1 1 3 3 2 1 1 1 0 0
|
26
|
+
0 0 0 0 1 1 4 1 1 1 1 2 1 0 0 0 0
|
27
|
+
0 0 0 0 0 1 1 0 0 0 1 1 1 0 0 0 0
|
data/config/v2/015.txt
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
##############################
|
2
|
+
# design: 15 - Stalking Smiling Tortie Left
|
3
|
+
# size: 20x21
|
4
|
+
###########################
|
5
|
+
|
6
|
+
0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0
|
7
|
+
0 0 0 0 0 0 0 0 0 0 1 3 3 3 3 1 1 1 0 0
|
8
|
+
0 0 0 0 0 0 0 0 0 0 1 3 1 1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
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
### add more built-in (load on demand) design series / collections
|
95
|
+
DESIGNS_V2 = Mooncats::DesignSeries.new( "#{Mooncats.root}/config/v2" )
|
96
|
+
DESIGNS_CRYPTOCATS = Mooncats::DesignSeries.new( "#{Mooncats.root}/config/cryptocats" )
|
91
97
|
|
92
98
|
|
93
99
|
### add some convenience shortcuts
|
data/lib/mooncats/design.rb
CHANGED
@@ -15,6 +15,10 @@ def self.find( num ) ## pass in design index number (0 to 127)
|
|
15
15
|
end
|
16
16
|
|
17
17
|
|
18
|
+
def self.read( path )
|
19
|
+
text = File.open( path, 'r:utf-8') { |f| f.read }
|
20
|
+
parse( text )
|
21
|
+
end
|
18
22
|
|
19
23
|
def self.parse( str )
|
20
24
|
## support original "classic" compact single-line format
|
@@ -86,7 +90,38 @@ def to_txt
|
|
86
90
|
end
|
87
91
|
buf
|
88
92
|
end
|
93
|
+
end # class Design
|
89
94
|
|
90
95
|
|
91
|
-
|
96
|
+
|
97
|
+
###############
|
98
|
+
## todo/check:
|
99
|
+
## find a better way to (auto?) include more designs?
|
100
|
+
class DesignSeries ## find a better name for class - why? why not?
|
101
|
+
def self.build( dir )
|
102
|
+
data = {}
|
103
|
+
paths = Dir.glob( "#{dir}/**.txt" )
|
104
|
+
paths.each do |path|
|
105
|
+
basename = File.basename( path, File.extname( path ) )
|
106
|
+
num = basename.to_i( 10 ) ## use base 10 (e.g. 001 => 1, 002 => 2, etc.)
|
107
|
+
text = File.open( path, 'r:utf-8' ) { |f| f.read }
|
108
|
+
## todo/check: auto-parse "ahead of time" here
|
109
|
+
## or keep "raw" text - why? why not?
|
110
|
+
data[ num ] = text
|
111
|
+
end
|
112
|
+
data
|
113
|
+
end
|
114
|
+
|
115
|
+
def initialize( dir )
|
116
|
+
@dir = dir # e.g. "#{Mooncats.root}/config/v2"
|
117
|
+
end
|
118
|
+
|
119
|
+
def data
|
120
|
+
## note: lazy load / build on first demand only
|
121
|
+
@data ||= self.class.build( @dir )
|
122
|
+
end
|
123
|
+
|
124
|
+
def [](index) data[ index ]; end
|
125
|
+
def size() data.size; end
|
126
|
+
end # class DesignSeries
|
92
127
|
end # module Mooncats
|
data/lib/mooncats/image.rb
CHANGED
@@ -38,39 +38,60 @@ class << self
|
|
38
38
|
end
|
39
39
|
|
40
40
|
|
41
|
+
def self.read( path ) ## convenience helper
|
42
|
+
img = ChunkyPNG::Image.from_file( path )
|
43
|
+
new( img )
|
44
|
+
end
|
41
45
|
|
42
|
-
def initialize( design: 0,
|
43
|
-
colors: COLORS_GENESIS_WHITE )
|
44
|
-
|
45
|
-
design = if design.is_a?( String )
|
46
|
-
Design.parse( design )
|
47
|
-
elsif design.is_a?( Array )
|
48
|
-
Design.new( design )
|
49
|
-
elsif design.is_a?( Design )
|
50
|
-
design ## pass through as is 1:1
|
51
|
-
else ## assume integer nuber
|
52
|
-
design_num = design ## note: for convenience "porcelain" param is named design (NOT design_num)
|
53
|
-
Design.find( design_num )
|
54
|
-
end
|
55
|
-
|
56
|
-
## note: first color (index 0) is always nil (default/white or transparent)
|
57
|
-
colors = [ nil ] + colors.map { |color| Pixelart::Color.parse( color ) }
|
58
|
-
|
59
|
-
## puts " colors:"
|
60
|
-
## pp colors
|
61
46
|
|
62
|
-
img = ChunkyPNG::Image.new( design.width,
|
63
|
-
design.height,
|
64
|
-
ChunkyPNG::Color::TRANSPARENT ) # why? why not?
|
65
47
|
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
48
|
+
def initialize( initial=nil, design: nil,
|
49
|
+
colors: nil )
|
50
|
+
if initial
|
51
|
+
## pass image through as-is
|
52
|
+
img = inital
|
53
|
+
else
|
54
|
+
design ||= 0
|
55
|
+
colors ||= COLORS_GENESIS_WHITE
|
56
|
+
|
57
|
+
design = if design.is_a?( String )
|
58
|
+
Design.parse( design )
|
59
|
+
elsif design.is_a?( Array )
|
60
|
+
Design.new( design )
|
61
|
+
elsif design.is_a?( Design )
|
62
|
+
design ## pass through as is 1:1
|
63
|
+
else ## assume integer nuber
|
64
|
+
design_num = design ## note: for convenience "porcelain" param is named design (NOT design_num)
|
65
|
+
Design.find( design_num )
|
66
|
+
end
|
67
|
+
|
68
|
+
## note: first color (index 0) is always nil (default/white or transparent)
|
69
|
+
colors = [ nil ] + colors.map { |color| Pixelart::Color.parse( color ) }
|
70
|
+
|
71
|
+
## puts " colors:"
|
72
|
+
## pp colors
|
73
|
+
|
74
|
+
img = ChunkyPNG::Image.new( design.width,
|
75
|
+
design.height,
|
76
|
+
ChunkyPNG::Color::TRANSPARENT ) # why? why not?
|
77
|
+
|
78
|
+
design.each_with_index do |row, y|
|
79
|
+
row.each_with_index do |color, x|
|
80
|
+
if color > 0
|
81
|
+
pixel = colors[ color ]
|
82
|
+
|
83
|
+
## note: special built-in color palette black & white "hack"
|
84
|
+
## only active if colors 6 & 7 NOT defined
|
85
|
+
## color 6 => black (000000 / ff) rgb / a(lpha)
|
86
|
+
## color 7 => white (ffffff / ff) rgb / a(lpha)
|
87
|
+
pixel = 0xff if pixel.nil? && color == 6
|
88
|
+
pixel = 0xffffffff if pixel.nil? && color == 7
|
89
|
+
|
90
|
+
img[x,y] = pixel
|
91
|
+
end # has color?
|
92
|
+
end # each row
|
93
|
+
end # each data
|
94
|
+
end
|
74
95
|
|
75
96
|
super( img.width, img.height, img )
|
76
97
|
end
|
data/lib/mooncats/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mooncats
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gerald Bauer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-04-
|
11
|
+
date: 2021-04-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pixelart
|
@@ -83,12 +83,36 @@ extra_rdoc_files:
|
|
83
83
|
- CHANGELOG.md
|
84
84
|
- Manifest.txt
|
85
85
|
- README.md
|
86
|
+
- config/cryptocats/000.txt
|
87
|
+
- config/cryptocats/001.txt
|
88
|
+
- config/cryptocats/002.txt
|
89
|
+
- config/cryptocats/003.txt
|
90
|
+
- config/v2/008.txt
|
91
|
+
- config/v2/009.txt
|
92
|
+
- config/v2/010.txt
|
93
|
+
- config/v2/011.txt
|
94
|
+
- config/v2/012.txt
|
95
|
+
- config/v2/013.txt
|
96
|
+
- config/v2/014.txt
|
97
|
+
- config/v2/015.txt
|
86
98
|
files:
|
87
99
|
- CHANGELOG.md
|
88
100
|
- Manifest.txt
|
89
101
|
- README.md
|
90
102
|
- Rakefile
|
91
103
|
- bin/mooncat
|
104
|
+
- config/cryptocats/000.txt
|
105
|
+
- config/cryptocats/001.txt
|
106
|
+
- config/cryptocats/002.txt
|
107
|
+
- config/cryptocats/003.txt
|
108
|
+
- config/v2/008.txt
|
109
|
+
- config/v2/009.txt
|
110
|
+
- config/v2/010.txt
|
111
|
+
- config/v2/011.txt
|
112
|
+
- config/v2/012.txt
|
113
|
+
- config/v2/013.txt
|
114
|
+
- config/v2/014.txt
|
115
|
+
- config/v2/015.txt
|
92
116
|
- lib/mooncats.rb
|
93
117
|
- lib/mooncats/composite.rb
|
94
118
|
- lib/mooncats/dataset.rb
|