readymades 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -2
- data/Rakefile +1 -0
- data/lib/readymades/version.rb +1 -1
- data/lib/readymades.rb +13 -28
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: faefa9bfece1f4a65b1600c60697c5215455fb203a7c5933dc8b3e7c120455ce
|
4
|
+
data.tar.gz: 19817ff1b6c832c09ada747bdfae9a6fa209a7e83564b551b65e33f0870b27e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 93d733fbb4756d1a5fea6226a235efce817be73f376ad2d6d72894e2296234dfcdc1e9663651a917a422a5bf388c9ab419d8b0dfddd21f7e1e095bb7e8c27f86
|
7
|
+
data.tar.gz: 6dd2623112f5d16b4b972622c899a1ccf35e29debf8e40be50eb2b3193355a1fd410cbae48a8cd99719c747d26437be46c2b64878ff43b26dc2d2d1f00ad172f
|
data/README.md
CHANGED
@@ -1,6 +1,8 @@
|
|
1
|
+
The Do-It-Yourself (DIY) [Factory of Modern Originals (FoMO)](https://github.com/pixelartexchange/originals) Presents
|
2
|
+
|
1
3
|
# Readymades (1/1 Original Pixel Punks)
|
2
4
|
|
3
|
-
|
5
|
+
Yes, you can! Generate your own 24×24 pixel punk images (off chain) from 1/1 originals incl. William Shakespare, Galileo Galilei, Mao Zedong, The Mask, The Joker, Bard Simpson, and many other readymade public world figures or cinema (fictional or cartoon) characters and add attributes / accessories with text (via built-in spritesheet); incl. 2x/4x/8x zoom for bigger sizes and more
|
4
6
|
|
5
7
|
|
6
8
|
|
@@ -27,4 +29,5 @@ readymade 1/1 pixel punks:
|
|
27
29
|
|
28
30
|
## Questions? Comments?
|
29
31
|
|
30
|
-
Post them on the [
|
32
|
+
Post them on the [D.I.Y. Punk (Pixel) Art reddit](https://old.reddit.com/r/DIYPunkArt). Thanks.
|
33
|
+
|
data/Rakefile
CHANGED
data/lib/readymades/version.rb
CHANGED
data/lib/readymades.rb
CHANGED
@@ -1,44 +1,30 @@
|
|
1
1
|
## 3rd party
|
2
2
|
require 'cryptopunks' ### todo - add/change to cryptopunks/base !!!
|
3
|
-
|
3
|
+
require 'backgrounds' ## note: incl. backgrounds for now
|
4
|
+
## (may get pulled in by cryptopunks later with update)
|
4
5
|
|
5
6
|
|
6
7
|
## our own code
|
7
8
|
require 'readymades/version' # note: let version always go first
|
8
9
|
|
9
10
|
|
10
|
-
## forward define superclass for image
|
11
|
-
module Readymades
|
12
|
-
class Image < Pixelart::Image; end
|
13
|
-
end
|
14
|
-
|
15
|
-
|
16
11
|
|
17
|
-
###
|
18
|
-
## todo/fix:
|
19
|
-
## use only a spritesheet class
|
20
|
-
## not generator for sprite lookup - why? why not?
|
21
|
-
## rework generator and break up in
|
22
|
-
## two classes (generator + spritesheet) - why? why not?
|
23
12
|
|
24
13
|
###
|
25
14
|
## add convenience pre-configurated generatored with build-in spritesheet (see config)
|
26
15
|
|
27
16
|
module Readymades
|
28
17
|
|
29
|
-
|
30
|
-
|
31
|
-
|
18
|
+
class Spritesheet ## note: for now class used for "namespace" only
|
19
|
+
def self.builtin ### check: use a different name e.g. default,standard,base or such - why? why not?
|
20
|
+
@sheet ||= Pixelart::Spritesheet.read( "#{Readymades.root}/config/spritesheet.png",
|
21
|
+
"#{Readymades.root}/config/spritesheet.csv",
|
32
22
|
width: 24,
|
33
23
|
height: 24 )
|
34
|
-
|
35
|
-
|
24
|
+
end
|
36
25
|
|
37
|
-
class Spritesheet
|
38
|
-
## note: for now class used for "namespace" only
|
39
26
|
def self.find_by( name: ) ## return archetype/attribute image by name
|
40
|
-
|
41
|
-
Readymades.generator.find( name )
|
27
|
+
builtin.find_by( name: name )
|
42
28
|
end
|
43
29
|
end # class Spritesheet
|
44
30
|
## add convenience (alternate spelling) alias - why? why not?
|
@@ -48,7 +34,8 @@ module Readymades
|
|
48
34
|
|
49
35
|
|
50
36
|
|
51
|
-
|
37
|
+
|
38
|
+
class Image < Pixelart::Image
|
52
39
|
def self.generate( *values, background: nil )
|
53
40
|
|
54
41
|
name = values[0]
|
@@ -66,12 +53,10 @@ module Readymades
|
|
66
53
|
end
|
67
54
|
|
68
55
|
if background
|
69
|
-
img = if background.is_a?(
|
70
|
-
|
56
|
+
img = if background.is_a?( Array ) ## support multiple background
|
57
|
+
img.background( *background )
|
71
58
|
else
|
72
|
-
|
73
|
-
img2.compose!( img )
|
74
|
-
img2
|
59
|
+
img.background( background )
|
75
60
|
end
|
76
61
|
end
|
77
62
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: readymades
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.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: 2022-06-
|
11
|
+
date: 2022-06-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cryptopunks
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: backgrounds
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: rdoc
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|