pixelart 1.3.7 → 1.3.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Manifest.txt +0 -1
- data/lib/pixelart/base.rb +0 -4
- data/lib/pixelart/version.rb +1 -1
- metadata +2 -3
- data/lib/pixelart/orc721/generator.rb +0 -51
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a7ef9b53c8d7eddc68fd7bcc85283b85e041ade464d15408296f76ec7e79cc94
|
4
|
+
data.tar.gz: 87c43c6be85a868c83839ba75a4d569b1d655ccbdbf7382fe150cddeff63fc57
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 45b4afb06f3744d61677bbbf88f835dad19098ca128c9b0982bfa179677c44a7895d457b43e708da818666f14d58c2d029cd88e36224202d70de50a85c8632f2
|
7
|
+
data.tar.gz: 186929d319a497d1c93962f97722888f3b173318bfca0c12397eef0a988178ce2dde11d9b4da80ad4a7dede5344831fdab8fda61ac87f04a02919964edfdf14f
|
data/Manifest.txt
CHANGED
data/lib/pixelart/base.rb
CHANGED
data/lib/pixelart/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pixelart
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gerald Bauer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-06-
|
11
|
+
date: 2023-06-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cocos
|
@@ -125,7 +125,6 @@ files:
|
|
125
125
|
- lib/pixelart/invert.rb
|
126
126
|
- lib/pixelart/led.rb
|
127
127
|
- lib/pixelart/misc.rb
|
128
|
-
- lib/pixelart/orc721/generator.rb
|
129
128
|
- lib/pixelart/pixelator.rb
|
130
129
|
- lib/pixelart/sample.rb
|
131
130
|
- lib/pixelart/silhouette.rb
|
@@ -1,51 +0,0 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
module Orc721
|
4
|
-
class Generator
|
5
|
-
###################
|
6
|
-
## convenience setup helper(s)
|
7
|
-
def self.read( path, width: 24, height: 24 )
|
8
|
-
new( Pixelart::ImageComposite.read( path,
|
9
|
-
width: width,
|
10
|
-
height: height ))
|
11
|
-
end
|
12
|
-
|
13
|
-
|
14
|
-
def initialize( spritesheet )
|
15
|
-
### todo: check for composite image type? - why? why not?
|
16
|
-
@spritesheet = spritesheet
|
17
|
-
end
|
18
|
-
|
19
|
-
def _parse( spec )
|
20
|
-
## for delimiter allow for now: - why? why not?
|
21
|
-
## (multiple) space ( )
|
22
|
-
## command or semicolon
|
23
|
-
spec.strip.split( %r{[ ,;/_-]+} ).map {|v| v.to_i(10) }
|
24
|
-
end
|
25
|
-
|
26
|
-
def parse( spec )
|
27
|
-
## convenience helper
|
28
|
-
## parses g spec in various (delimited) formats
|
29
|
-
g = _parse( spec )
|
30
|
-
generate( *g )
|
31
|
-
end
|
32
|
-
|
33
|
-
def generate( *attributes )
|
34
|
-
img = Pixelart::Image.new( width, height )
|
35
|
-
attributes.each do |num|
|
36
|
-
img.compose!( @spritesheet[ num ] )
|
37
|
-
end
|
38
|
-
img
|
39
|
-
end
|
40
|
-
alias_method :g, :generate
|
41
|
-
|
42
|
-
def width() @spritesheet.tile_width; end
|
43
|
-
def height() @spritesheet.tile_height; end
|
44
|
-
def count() @spritesheet.count; end
|
45
|
-
end # class Generator
|
46
|
-
end # module Orc721
|
47
|
-
|
48
|
-
|
49
|
-
######
|
50
|
-
## add convenience aliases - why? why not?
|
51
|
-
ORC721 = Orc721
|