-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
98 changed files
with
247 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,152 @@ | ||
|
||
|
||
ATTRIBUTES = { | ||
backgrounds: [ | ||
# solid colors | ||
'aqua', | ||
'blue', | ||
'green', | ||
'red', | ||
'yellow', | ||
'bitcoin-orange', | ||
'classic', | ||
'default', | ||
# currency patterns | ||
'bitcoin-pattern', | ||
'dollar-pattern', | ||
'euro-pattern', | ||
# flags and more | ||
'rainbow', | ||
'ukraine', | ||
'usa', | ||
'austria', | ||
'great-britain', | ||
'china', | ||
'europe', | ||
], | ||
base: [ | ||
'maxibiz', | ||
'black', | ||
'default', | ||
'albino', | ||
'brown', | ||
'dark', | ||
'demon', | ||
'golden', | ||
'golden-block', | ||
'gray', | ||
'gray-block', | ||
'green', | ||
'memepool', | ||
'pepe', | ||
'alien', | ||
'deathbot', | ||
'safemode', | ||
'pink', | ||
'zombie', | ||
], | ||
eyes: [ | ||
'3dglasses', | ||
'eyes-alien', | ||
'eyes-big', | ||
'eyes-blend', | ||
'eyes-blue', | ||
'eyes-bored', | ||
'eyes-cool', | ||
'eyes-demon', | ||
'eyes-green', | ||
'eyes-left', | ||
'eyes-monobrow', | ||
'eyes-pepe', | ||
'eyes-polarized', | ||
'eyes-rainbow', | ||
'eyes-red', | ||
'eyes-zombie', | ||
'lasereyes-blue', | ||
'lasereyes-gold', | ||
'lasereyes-green', | ||
'lasereyes-red', | ||
'vr', | ||
'eyes-left-blue', | ||
'eyes-big-blue', | ||
'maxibiz-lasereyes-red', | ||
'maxibiz-lasereyes-green', | ||
'maxibiz-lasereyes-blue', | ||
], | ||
accessories: [ | ||
'bandana', | ||
'bandana2', | ||
'cowboyhat', | ||
'headband', | ||
'knittedcap', | ||
'knittedcap2', | ||
'tophat', | ||
'cap', | ||
'cap-mcb', | ||
'cap-mcd-red', | ||
'cap-mcd-white', | ||
'cap-mcd-black', | ||
'cap-burgerking', | ||
'cap-subway', | ||
'crown', | ||
'halo', | ||
], | ||
hair: [ | ||
'mohawk', | ||
'mohawk-blonde', | ||
'mohawk-purple', | ||
'mohawk-red', | ||
'mohawk2', | ||
'mohawk2-green', | ||
'mohawk2-pink', | ||
'mohawk2-red', | ||
'peakspike', | ||
'peakspike-blonde', | ||
'peakspike-purple', | ||
'peakspike-red', | ||
'wildhair', | ||
'wildhair-blonde', | ||
'wildhair-red', | ||
'wildhair-white', | ||
'bob-blonde', | ||
], | ||
}.reduce( {} ) do |h,(category, names)| | ||
names.each do |name| | ||
key = File.basename( name ).downcase.gsub( /[^a-z0-9]/, '' ) | ||
|
||
## fix-up names by category | ||
key = "bg#{key}" if category == :backgrounds | ||
|
||
## fix-up file path by category | ||
path = category == :base ? name : "#{category}/#{name}" | ||
|
||
puts " #{key} / #{category}" | ||
if h.has_key?( key ) | ||
puts "!! ERROR - duplicate key >#{key}<; already in use; sorry" | ||
exit 1 | ||
end | ||
|
||
h[ key ] = Image.read( "./attributes/#{path}.png" ) | ||
end | ||
h | ||
end | ||
|
||
|
||
|
||
|
||
def generate( *attributes ) | ||
base = Image.new( 28,28 ) | ||
attributes.each do |attrib| | ||
key = attrib.downcase.gsub( /[^a-z0-9]/, '' ) | ||
img = ATTRIBUTES[ key ] | ||
if img.nil? | ||
puts "!! #{attrib} with key #{key} not found; sorry" | ||
exit 1 | ||
end | ||
base.compose!( img ) | ||
end | ||
base | ||
end | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
require 'pixelart' | ||
|
||
|
||
require_relative 'base' | ||
|
||
|
||
|
||
specs = parse_data( <<DATA ) | ||
## archetypes | ||
maxibiz | ||
black | ||
default | ||
albino | ||
brown | ||
dark | ||
demon | ||
golden-block | ||
golden | ||
pink | ||
gray-block | ||
gray | ||
green | ||
memepool | ||
pepe | ||
alien | ||
deathbot | ||
safemode | ||
zombie | ||
maxibiz, vr, mohawk | ||
black, vr, mohawk-purple | ||
default, vr, mohawk-blonde | ||
albino, vr, mohawk-red | ||
brown, vr, mohawk2 | ||
dark, vr, mohawk2-green | ||
demon, vr, halo | ||
golden-block, vr | ||
golden, vr, crown | ||
pink, bob-blonde, vr | ||
pink, bob-blonde | ||
pink, bob-blonde, eyes-left-blue | ||
gray-block, vr | ||
gray, vr, mohawk2-pink | ||
green, vr, mohawk2-red | ||
memepool, vr, peakspike | ||
pepe, vr, peakspike-blonde | ||
alien, vr, peakspike-purple | ||
deathbot, vr, wildhair-red | ||
safemode, vr, wildhair | ||
zombie, vr, mohawk-red | ||
maxibiz, lasereyes red, tophat | ||
black, 3dglasses, knittedcap | ||
default, eyes-big, headband | ||
albino, eyes-blend, cap | ||
brown, eyes-blue, bandana | ||
dark, eyes-zombie, cap mcd red | ||
demon, eyes-cool, cap mcd black | ||
golden-block, eyes-rainbow | ||
golden, eyes-rainbow, crown | ||
pink, wildhair-blonde, eyes-cool | ||
gray-block, eyes-pepe | ||
gray, eyes-polarized, cap subway | ||
green, lasereyes gold, cap burgerking | ||
memepool, eyes-big, knittedcap2 | ||
pepe, eyes-red, cap mcb | ||
alien, eyes-blue, cap mcd white | ||
deathbot, 3dglasses, cowboyhat | ||
safemode, eyes-bored, bandana2 | ||
zombie, eyes-red, bandana | ||
DATA | ||
|
||
|
||
|
||
cols = 10 | ||
rows = specs.size / cols | ||
rows += 1 if specs.size % cols != 0 | ||
|
||
composite = ImageComposite.new( cols, rows, | ||
width: 28, height: 28 ) | ||
|
||
specs.each_with_index do |spec, i| | ||
img = generate( *spec) | ||
img.save( "./tmp/rock#{i}.png" ) | ||
img.zoom(10).save( "./tmp/rock#{i}@10x.png" ) | ||
composite << img | ||
end | ||
|
||
|
||
composite.save( "./tmp/rocks.png" ) | ||
composite.zoom(4).save( "./tmp/[email protected]" ) | ||
|
||
puts "bye" |