goblins 0.1.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +49 -19
- data/Rakefile +4 -4
- data/lib/goblins/version.rb +6 -4
- data/lib/goblins.rb +54 -67
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc5f809aece1ae4f64d98c4a4ccce5375107ca8729b9f2d294da5d83a1e3f028
|
4
|
+
data.tar.gz: d66b90e96129a852751544cdc7d3b2c0dfc94916eaff501cf7f925c8428619f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eecd66a046b4ef91f2eaaa92a80f4e78974a266123e9ece164cd3cf5a71d8f575b609ed405fbb11675e83c2f6f8fc4144a81ba559df83561dc764dce6ab30e5b
|
7
|
+
data.tar.gz: 457b7b2c1845eff2a7b30dc09ac5ad05cf845e54e9308c764f3d5babc30bad0101cfded8b2172bdbbe204de77f9b4df5f2e88b92bb771964747200aa17263bf2
|
data/README.md
CHANGED
@@ -1,11 +1,14 @@
|
|
1
|
-
|
1
|
+
The Do-It-Yourself (DIY) [Factory of Modern Originals (FoMO)](https://github.com/profilepic/originals) Presents
|
2
2
|
|
3
|
-
goblins - generate your own 24×24 goblins or 20×20 lil'goblins (pixel) monster avatars images (off chain) from text attributes (via built-in spritesheets); incl. 2x/4x/8x zoom for bigger sizes and more
|
4
3
|
|
4
|
+
# Goblins & Lil' Goblins (Pixel Monster Avatars)
|
5
5
|
|
6
|
+
Yes, you can! Generate your own 24×24 goblins or 20×20 lil' goblins (pixel) monster avatars images (off-blockchain) from text attributes (via built-in spritesheets); incl. 2x/4x/8x zoom for bigger sizes and more
|
6
7
|
|
7
|
-
|
8
|
-
|
8
|
+
|
9
|
+
|
10
|
+
* home :: [github.com/profilepic/text-to-image](https://github.com/profilepic/text-to-image)
|
11
|
+
* bugs :: [github.com/profilepic/text-to-image/issues](https://github.com/profilepic/text-to-image/issues)
|
9
12
|
* gem :: [rubygems.org/gems/goblins](https://rubygems.org/gems/goblins)
|
10
13
|
* rdoc :: [rubydoc.info/gems/goblins](http://rubydoc.info/gems/goblins)
|
11
14
|
|
@@ -41,15 +44,15 @@ goblin.zoom(4).save( "goblin3@4x.png" )
|
|
41
44
|
|
42
45
|
Voila!
|
43
46
|
|
44
|
-
![](https://github.com/
|
45
|
-
![](https://github.com/
|
46
|
-
![](https://github.com/
|
47
|
+
![](https://github.com/profilepic/text-to-image/raw/master/goblins/i/goblin1.png)
|
48
|
+
![](https://github.com/profilepic/text-to-image/raw/master/goblins/i/goblin2.png)
|
49
|
+
![](https://github.com/profilepic/text-to-image/raw/master/goblins/i/goblin3.png)
|
47
50
|
|
48
51
|
In 4x:
|
49
52
|
|
50
|
-
![](https://github.com/
|
51
|
-
![](https://github.com/
|
52
|
-
![](https://github.com/
|
53
|
+
![](https://github.com/profilepic/text-to-image/raw/master/goblins/i/goblin1@4x.png)
|
54
|
+
![](https://github.com/profilepic/text-to-image/raw/master/goblins/i/goblin2@4x.png)
|
55
|
+
![](https://github.com/profilepic/text-to-image/raw/master/goblins/i/goblin3@4x.png)
|
53
56
|
|
54
57
|
|
55
58
|
|
@@ -77,15 +80,15 @@ lilgoblin.zoom(4).save( "lilgoblin3@4x.png" )
|
|
77
80
|
|
78
81
|
Voila!
|
79
82
|
|
80
|
-
![](https://github.com/
|
81
|
-
![](https://github.com/
|
82
|
-
![](https://github.com/
|
83
|
+
![](https://github.com/profilepic/text-to-image/raw/master/goblins/i/lilgoblin1.png)
|
84
|
+
![](https://github.com/profilepic/text-to-image/raw/master/goblins/i/lilgoblin2.png)
|
85
|
+
![](https://github.com/profilepic/text-to-image/raw/master/goblins/i/lilgoblin3.png)
|
83
86
|
|
84
87
|
In 4x:
|
85
88
|
|
86
|
-
![](https://github.com/
|
87
|
-
![](https://github.com/
|
88
|
-
![](https://github.com/
|
89
|
+
![](https://github.com/profilepic/text-to-image/raw/master/goblins/i/lilgoblin1@4x.png)
|
90
|
+
![](https://github.com/profilepic/text-to-image/raw/master/goblins/i/lilgoblin2@4x.png)
|
91
|
+
![](https://github.com/profilepic/text-to-image/raw/master/goblins/i/lilgoblin3@4x.png)
|
89
92
|
|
90
93
|
|
91
94
|
|
@@ -94,12 +97,39 @@ In 4x:
|
|
94
97
|
Is ugly the new beau / belle? Yes, you can. Design your own goblin (pixel) monsters.
|
95
98
|
|
96
99
|
|
97
|
-
![](https://github.com/
|
100
|
+
![](https://github.com/profilepic/text-to-image/raw/master/goblins/i/goblins_originals-24x24@4x.png)
|
101
|
+
|
102
|
+
To get you started find a series of original 1/1 goblin monsters (see above in 4x zoom) and a script to (auto-)generate some variants (with horns, cap forward, hoodies, golden earrings, & more) in the [goblins/sandbox »](https://github.com/profilepic/text-to-image/tree/master/goblins/sandbox)
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
## Appendix - All Built-In Spritesheet Attributes
|
110
|
+
|
111
|
+
**Goblins (24x24px)**
|
112
|
+
|
113
|
+
See the [spritesheet-24x24.csv](https://github.com/profilepic/text-to-image/blob/master/goblins/config/spritesheet-24x24.csv) dataset for all attribute names (w/ categories).
|
114
|
+
|
115
|
+
![](https://github.com/profilepic/text-to-image/raw/master/goblins/config/spritesheet-24x24.png)
|
116
|
+
|
117
|
+
(Source: [goblins/spritesheet-24x24.png](https://github.com/profilepic/text-to-image/blob/master/goblins/config/spritesheet-24x24.png))
|
118
|
+
|
119
|
+
|
120
|
+
**Lil' Goblins (20x20px)**
|
121
|
+
|
122
|
+
|
123
|
+
See the [spritesheet-20x20.csv](https://github.com/profilepic/text-to-image/blob/master/goblins/config/spritesheet-20x20.csv) dataset for all attribute names (w/ categories).
|
124
|
+
|
125
|
+
![](https://github.com/profilepic/text-to-image/raw/master/goblins/config/spritesheet-20x20.png)
|
126
|
+
|
127
|
+
(Source: [goblins/spritesheet-20x20.png](https://github.com/profilepic/text-to-image/blob/master/goblins/config/spritesheet-20x20.png))
|
98
128
|
|
99
|
-
To get you started find a series of original 1/1 goblin monsters (see above in 4x zoom) and a script to (auto-)generate some variants (with horns, cap forward, hoodies, golden earrings, & more) in the [**goblins/sandbox »**](https://github.com/pixelartexchange/pixelart/tree/master/goblins/sandbox)
|
100
129
|
|
101
130
|
|
102
131
|
|
103
132
|
## Questions? Comments?
|
104
133
|
|
105
|
-
Post them on the [
|
134
|
+
Post them on the [D.I.Y. Punk (Pixel) Art reddit](https://old.reddit.com/r/DIYPunkArt). Thanks.
|
135
|
+
|
data/Rakefile
CHANGED
@@ -11,12 +11,12 @@ end
|
|
11
11
|
|
12
12
|
Hoe.spec 'goblins' do
|
13
13
|
|
14
|
-
self.version = Goblins::VERSION
|
14
|
+
self.version = Pixelart::Module::Goblins::VERSION
|
15
15
|
|
16
|
-
self.summary = "goblins - generate your own 24×24 goblins or 20×20 lil'goblins (pixel) monster avatar images (off
|
16
|
+
self.summary = "goblins - generate your own 24×24 goblins or 20×20 lil'goblins (pixel) monster avatar images (off-blockchain) from text attributes (via built-in spritesheets); incl. 2x/4x/8x zoom for bigger sizes and more"
|
17
17
|
self.description = summary
|
18
18
|
|
19
|
-
self.urls = { home: 'https://github.com/
|
19
|
+
self.urls = { home: 'https://github.com/profilepic/text-to-image' }
|
20
20
|
|
21
21
|
self.author = 'Gerald Bauer'
|
22
22
|
self.email = 'wwwmake@googlegroups.com'
|
@@ -26,7 +26,7 @@ Hoe.spec 'goblins' do
|
|
26
26
|
self.history_file = 'CHANGELOG.md'
|
27
27
|
|
28
28
|
self.extra_deps = [
|
29
|
-
['
|
29
|
+
['artfactory', '>= 0.2.0'],
|
30
30
|
]
|
31
31
|
|
32
32
|
self.licenses = ['Public Domain']
|
data/lib/goblins/version.rb
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
|
2
|
-
|
2
|
+
module Pixelart
|
3
|
+
module Module
|
3
4
|
module Goblins
|
4
5
|
|
5
|
-
MAJOR =
|
6
|
-
MINOR =
|
6
|
+
MAJOR = 1
|
7
|
+
MINOR = 0
|
7
8
|
PATCH = 0
|
8
9
|
VERSION = [MAJOR,MINOR,PATCH].join('.')
|
9
10
|
|
@@ -19,5 +20,6 @@ module Goblins
|
|
19
20
|
File.expand_path( File.dirname(File.dirname(File.dirname(__FILE__))) )
|
20
21
|
end
|
21
22
|
|
23
|
+
end # module Pixelart
|
24
|
+
end # module Module
|
22
25
|
end # module Goblins
|
23
|
-
|
data/lib/goblins.rb
CHANGED
@@ -1,109 +1,96 @@
|
|
1
|
-
## 3rd party
|
2
|
-
require '
|
1
|
+
## our own "3rd" party gems
|
2
|
+
require 'artfactory/base'
|
3
3
|
|
4
4
|
|
5
5
|
|
6
6
|
## our own code
|
7
|
-
|
7
|
+
require_relative 'goblins/version' # note: let version always go first
|
8
8
|
|
9
9
|
|
10
|
-
## forward define superclass for image
|
11
|
-
module Goblins
|
12
|
-
class Image < Pixelart::Image; end
|
13
|
-
end
|
14
|
-
|
15
|
-
|
16
|
-
###
|
17
|
-
## add convenience pre-configurated generatored with build-in spritesheet (see config)
|
18
|
-
module Goblins
|
19
|
-
|
20
|
-
def self.generator
|
21
|
-
@generator ||= Pixelart::Generator.new( "#{root}/config/spritesheet-24x24.png",
|
22
|
-
"#{root}/config/spritesheet-24x24.csv",
|
23
|
-
width: 24,
|
24
|
-
height: 24 )
|
25
|
-
end
|
26
|
-
|
27
|
-
class Image
|
28
|
-
def self.generate( *values, background: nil )
|
29
|
-
img = Goblins.generator.generate( *values, background: background )
|
30
|
-
## note: unwrap inner image before passing on to c'tor (requires ChunkyPNG image for now)
|
31
|
-
new( 24, 24, img.image )
|
32
|
-
end # method Image.generate
|
33
|
-
end # class Image
|
34
10
|
|
11
|
+
module Goblin
|
35
12
|
|
36
13
|
class Spritesheet
|
14
|
+
def self.builtin
|
15
|
+
@builtin ||= Pixelart::Spritesheet.read( "#{Pixelart::Module::Goblins.root}/config/spritesheet-24x24.png",
|
16
|
+
"#{Pixelart::Module::Goblins.root}/config/spritesheet-24x24.csv",
|
17
|
+
width: 24,
|
18
|
+
height: 24 )
|
19
|
+
end
|
37
20
|
## note: for now class used for "namespace" only
|
38
21
|
def self.find_by( name: ) ## return archetype/attribute image by name
|
39
|
-
|
40
|
-
Goblins.generator.find( name )
|
22
|
+
builtin.find_by( name: name )
|
41
23
|
end
|
42
24
|
end # class Spritesheet
|
43
25
|
## add convenience (alternate spelling) alias - why? why not?
|
44
26
|
SpriteSheet = Spritesheet
|
45
27
|
Sheet = Spritesheet
|
46
28
|
Sprite = Spritesheet
|
47
|
-
end # module Goblins
|
48
29
|
|
49
30
|
|
50
|
-
|
51
|
-
Goblinz = Goblins
|
52
|
-
## add singular too -why? why not?
|
53
|
-
Goblin = Goblins
|
31
|
+
class Image < Pixelart::Image
|
54
32
|
|
33
|
+
def self.generator
|
34
|
+
@generator ||= Artfactory.use( Goblin::Sheet.builtin,
|
35
|
+
image_class: Image )
|
36
|
+
end
|
55
37
|
|
38
|
+
NAMES = ['goblin', 'goblins', 'goblinz']
|
56
39
|
|
40
|
+
DEFAULT_ATTRIBUTES = ['Green', 'Teeth',
|
41
|
+
'3D Glasses', 'Blue Sweater']
|
57
42
|
|
43
|
+
def self.generate( *names )
|
44
|
+
generator.generate( *names )
|
45
|
+
end # method Image.generate
|
46
|
+
end # class Image
|
47
|
+
end # module Goblin
|
58
48
|
|
59
|
-
## forward define superclass for image
|
60
|
-
module Lilgoblins
|
61
|
-
class Image < Pixelart::Image; end
|
62
|
-
end
|
63
49
|
|
64
50
|
|
65
51
|
|
66
|
-
|
67
|
-
## add convenience pre-configurated generatored with build-in spritesheet (see config)
|
68
|
-
module Lilgoblins
|
69
|
-
|
70
|
-
def self.generator
|
71
|
-
@generator ||= Pixelart::Generator.new( "#{Goblins.root}/config/spritesheet-20x20.png",
|
72
|
-
"#{Goblins.root}/config/spritesheet-20x20.csv",
|
73
|
-
width: 20,
|
74
|
-
height: 20 )
|
75
|
-
end
|
76
|
-
|
77
|
-
class Image
|
78
|
-
def self.generate( *values, background: nil )
|
79
|
-
img = Lilgoblins.generator.generate( *values, background: background )
|
80
|
-
## note: unwrap inner image before passing on to c'tor (requires ChunkyPNG image for now)
|
81
|
-
new( 20, 20, img.image )
|
82
|
-
end # method Image.generate
|
83
|
-
end # class Image
|
84
|
-
|
52
|
+
module Lilgoblin
|
85
53
|
|
86
54
|
class Spritesheet
|
55
|
+
def self.builtin
|
56
|
+
@builtin ||= Pixelart::Spritesheet.read( "#{Pixelart::Module::Goblins.root}/config/spritesheet-20x20.png",
|
57
|
+
"#{Pixelart::Module::Goblins.root}/config/spritesheet-20x20.csv",
|
58
|
+
width: 20,
|
59
|
+
height: 20 )
|
60
|
+
end
|
87
61
|
## note: for now class used for "namespace" only
|
88
62
|
def self.find_by( name: ) ## return archetype/attribute image by name
|
89
|
-
|
90
|
-
Lilgoblins.generator.find( name )
|
63
|
+
builtin.find_by( name: name )
|
91
64
|
end
|
92
65
|
end # class Spritesheet
|
93
66
|
## add convenience (alternate spelling) alias - why? why not?
|
94
67
|
SpriteSheet = Spritesheet
|
95
68
|
Sheet = Spritesheet
|
96
69
|
Sprite = Spritesheet
|
97
|
-
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
class Image < Pixelart::Image
|
74
|
+
def self.generator
|
75
|
+
@generator ||= Artfactory.use( Lilgoblin::Sheet.builtin,
|
76
|
+
image_class: Image )
|
77
|
+
end
|
78
|
+
|
79
|
+
|
80
|
+
NAMES = ['lilgoblin', 'lilgoblins', 'lilgoblinz']
|
81
|
+
|
82
|
+
DEFAULT_ATTRIBUTES = ['Green', 'Orange Beanie',
|
83
|
+
'Earring Silver', 'Blue Sweater']
|
84
|
+
|
85
|
+
def self.generate( *names )
|
86
|
+
generator.generate( *names )
|
87
|
+
end # method Image.generate
|
88
|
+
end # class Image
|
89
|
+
end # module Lilgoblin
|
98
90
|
|
99
91
|
|
100
92
|
### add some convenience shortcuts
|
101
|
-
|
102
|
-
LilGoblinz = Lilgoblins
|
103
|
-
Lilgoblinz = Lilgoblins
|
104
|
-
## add singular too -why? why not?
|
105
|
-
LilGoblin = Lilgoblins
|
106
|
-
Lilgoblin = Lilgoblins
|
93
|
+
LilGoblin = Lilgoblin
|
107
94
|
|
108
95
|
|
109
96
|
|
@@ -114,4 +101,4 @@ include Pixelart
|
|
114
101
|
|
115
102
|
|
116
103
|
|
117
|
-
puts Goblins.banner # say hello
|
104
|
+
puts Pixelart::Module::Goblins.banner # say hello
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: goblins
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gerald Bauer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-10-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: artfactory
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 0.2.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 0.2.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rdoc
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -59,7 +59,7 @@ dependencies:
|
|
59
59
|
- !ruby/object:Gem::Version
|
60
60
|
version: '3.23'
|
61
61
|
description: goblins - generate your own 24×24 goblins or 20×20 lil'goblins (pixel)
|
62
|
-
monster avatar images (off
|
62
|
+
monster avatar images (off-blockchain) from text attributes (via built-in spritesheets);
|
63
63
|
incl. 2x/4x/8x zoom for bigger sizes and more
|
64
64
|
email: wwwmake@googlegroups.com
|
65
65
|
executables: []
|
@@ -79,7 +79,7 @@ files:
|
|
79
79
|
- config/spritesheet-24x24.png
|
80
80
|
- lib/goblins.rb
|
81
81
|
- lib/goblins/version.rb
|
82
|
-
homepage: https://github.com/
|
82
|
+
homepage: https://github.com/profilepic/text-to-image
|
83
83
|
licenses:
|
84
84
|
- Public Domain
|
85
85
|
metadata: {}
|
@@ -104,6 +104,6 @@ rubygems_version: 3.3.7
|
|
104
104
|
signing_key:
|
105
105
|
specification_version: 4
|
106
106
|
summary: goblins - generate your own 24×24 goblins or 20×20 lil'goblins (pixel) monster
|
107
|
-
avatar images (off
|
108
|
-
2x/4x/8x zoom for bigger sizes and more
|
107
|
+
avatar images (off-blockchain) from text attributes (via built-in spritesheets);
|
108
|
+
incl. 2x/4x/8x zoom for bigger sizes and more
|
109
109
|
test_files: []
|