-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathgenerate_fifteen.rb
222 lines (166 loc) · 5.92 KB
/
generate_fifteen.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
#####
# to run use:
# $ ruby moonbirds/generate_fifteen.rb
#
#
# generate fifteen new never-before-seen variants
# for the top seller #7963
# - background: Jade Green
# - feathers (color): Jade
# - body (type): Legendary Emperor
#
require 'pixelart'
base = Image.read( './moonbirds/42x42/7963.png' )
moonbirds = ImageComposite.new( 5, 3, width: 42, height: 42 )
['eyewear/3d_glasses',
'eyewear/eyepatch',
'eyewear/gazelles',
'eyewear/jobs_glasses',
'eyewear/rose-colored_glasses',
'eyewear/sunglasses',
'eyewear/visor',
'headwear/bow',
'headwear/cowboy_hat',
'headwear/flowers',
'headwear/lincoln',
'headwear/moon_hat',
'outerwear/hoodie',
'outerwear/hoodie_down',
'outerwear/punk_jacket',
].each do |attribute|
moonbird = Image.new( 42, 42 )
moonbird.compose!( base )
moonbird.compose!( Image.read( "./moonbirds/attributes/#{attribute}.png" ))
moonbirds << moonbird
end
moonbirds.save( "./tmp/moonbirds-jade_green.png" )
moonbirds.zoom(4).save( "./tmp/[email protected]" )
#####
# try new #1 top seller with more "starbirds" attributes
# Moonbirds #2642 – 350 ETH (~$1,030,000)
# - background: Jade Green
# - feathers (color) Jade
# - body (type): Legendary Sage
base = Image.read( './moonbirds/42x42/2642.png' )
moonbirds = ImageComposite.new( 5, 3, width: 42, height: 42 )
[
['eyes/round_glasses', [1,0]],
['eyes/red_shades', [1,1]],
['eyes/rainbow_shades', [1,0]],
['eyes/green_shades', [0,2] ],
['eyes/aviators', [0,1]],
['eyes/neon_shades', [1,1]],
['eyes/vipers', [1,1]],
['head/gold', [1,0]],
['head/crown', [1,0]],
['head/red_bucket', [1,0]],
['head/cowboy', [1,1]],
['head/black_red'],
['clothes/blue_hoodie'],
['clothes/blue_scarf'],
['clothes/blue_shirt'],
].each do |rec|
attribute_name = rec[0]
attribute_offset = rec[1]
moonbird = Image.new( 42, 42 )
moonbird.compose!( base )
attribute = Image.read( "./starbirds/attributes/#{attribute_name}.png" )
## quick & dirty hack:
## cut-off px on left for now
## add px on top for now by cut-off px from bottom for now
if attribute_offset
attribute = attribute.crop( attribute_offset[0], 0,
42-attribute_offset[0],
42-attribute_offset[1] )
moonbird.compose!( attribute, 0, attribute_offset[1] )
else
moonbird.compose!( attribute )
end
moonbirds << moonbird
end
moonbirds.save( "./tmp/moonbirds-jade_green-ii.png" )
moonbirds.zoom(4).save( "./tmp/[email protected]" )
#####
# try new #2 top seller with fastfood attributes
# Moonbirds #3904
# - background: Enlightened Purple
# - feathers (color) Enlightened
# - body (type): Legendary Crescent
base = Image.read( './moonbirds/42x42/3904.png' )
moonbirds = ImageComposite.new( 5, 3, width: 42, height: 42 )
[
'headwear/macdonalds-red',
'headwear/macdonalds-black',
'headwear/macdonalds-white',
'headwear/wendys',
'headwear/burger_king',
'headwear/chef-white',
'headwear/chef-red',
'headwear/dunkin_donuts',
'headwear/white_castle',
'headwear/pizzahut',
'headwear/dominos_pizza',
'headwear/subway',
'headwear/burger',
'headwear/fries',
'headwear/cola',
].each do |attribute|
moonbird = Image.new( 42, 42 )
moonbird.compose!( base )
moonbird.compose!( Image.read( "./fastfoodmoonbirds-ii/attributes/#{attribute}.png" ))
moonbirds << moonbird
end
moonbirds.save( "./tmp/moonbirds-enlightened_purple.png" )
moonbirds.zoom(4).save( "./tmp/[email protected]" )
### try some more fast food attributes
moonbirds = ImageComposite.new( 5, 3, width: 42, height: 42 )
[
'headwear/mcdonalds_hat',
'headwear/mcdonalds_visor',
'headwear/mcdonalds_bucket_hat',
'headwear/in-n-out_burger_hat',
'headwear/dominos_hat',
'headwear/dunkin_donuts_hat',
'headwear/hooters_hat',
'headwear/ice_cream_cone',
'headwear/kfc_bucket_hat',
'headwear/popcorn',
'headwear/subway_visor_2',
'headwear/taco_bell_hat',
'headwear/walmart_hat',
'headwear/walmart_hat_2',
'headwear/ben-n-jerrys_bucket_hat',
].each do |attribute|
moonbird = Image.new( 42, 42 )
moonbird.compose!( base )
moonbird.compose!( Image.read( "./fastfoodmoonbirds/attributes/#{attribute}.png" ))
moonbirds << moonbird
end
moonbirds.save( "./tmp/moonbirds-enlightened_purple-ii.png" )
moonbirds.zoom(4).save( "./tmp/[email protected]" )
### try some more fast food attributes
moonbirds = ImageComposite.new( 5, 3, width: 42, height: 42 )
[ 'fastfoodmoonbirds/attributes/outfit/el_pollo_loco_mascot',
'fastfoodmoonbirds-ii/attributes/headwear/chicken',
'fastfoodmoonbirds-iii/attributes/headwear/kfc_family_bucket',
'fastfoodmoonbirds-iii/attributes/headwear/mcdonalds-red',
'fastfoodmoonbirds-iii/attributes/headwear/in-n-out',
'fastfoodmoonbirds-iii/attributes/headwear/burger_kings_crown',
'fastfoodmoonbirds/attributes/headwear/pizza_hut_hat',
'fastfoodmoonbirds-iii/attributes/headwear/grill_cook',
'fastfoodmoonbirds-iii/attributes/outerwear/hibachi',
'fastfoodmoonbirds-iii/attributes/outerwear/kfc_shirt',
'fastfoodmoonbirds-iii/attributes/outerwear/manager',
'fastfoodmoonbirds-iii/attributes/outerwear/mcdonalds',
'fastfoodmoonbirds-iii/attributes/outerwear/mcdonalds_classic',
'fastfoodmoonbirds-iii/attributes/outerwear/mcdonalds_old_skool',
'fastfoodmoonbirds-iii/attributes/accessory/drive-thru-on-duty',
].each do |attribute|
moonbird = Image.new( 42, 42 )
moonbird.compose!( base )
moonbird.compose!( Image.read( "./#{attribute}.png" ))
moonbirds << moonbird
end
moonbirds.save( "./tmp/moonbirds-enlightened_purple-iii.png" )
moonbirds.zoom(4).save( "./tmp/[email protected]" )
puts "bye"