p5rb 0.0.0 → 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/p5rb.rb +11 -5
- data/p5rb.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2aeb9b49c2eeadc91b80d5c207e65e71d510ec41
|
4
|
+
data.tar.gz: cb3054c7c311fa1862f9395b5ff1762e055421e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '074992392feb37241a790014a43b600f30f513c4307fcfddd24c0db3820eb7d69c97088fd9e44ec65ca18315133b076897ceae2487af321e38f8e2417bbff3cb'
|
7
|
+
data.tar.gz: 9f1a3b74222b8d23a38cedaae63ad2d078f1e402039cbe5f767d368081a386d5dbbbeeb1a28b0db65041b5ccec5d1b2aa6b68ecfe087be9e4c41c35ec788df09
|
data/lib/p5rb.rb
CHANGED
@@ -8,8 +8,14 @@ module P5
|
|
8
8
|
|
9
9
|
@buffer = []
|
10
10
|
class << self
|
11
|
-
def background
|
12
|
-
@buffer.push "background(#{
|
11
|
+
def background color
|
12
|
+
@buffer.push "background(#{color})"
|
13
|
+
end
|
14
|
+
def noStroke
|
15
|
+
@buffer.push "noStroke()"
|
16
|
+
end
|
17
|
+
def stroke color
|
18
|
+
@buffer.push "stroke(#{color})"
|
13
19
|
end
|
14
20
|
def translate x, y
|
15
21
|
@buffer.push "translate(#{x}, #{y})"
|
@@ -20,9 +26,6 @@ module P5
|
|
20
26
|
def ellipse *args
|
21
27
|
@buffer.push "ellipse(#{args.join ?,})"
|
22
28
|
end
|
23
|
-
def noStroke
|
24
|
-
@buffer.push "noStroke()"
|
25
|
-
end
|
26
29
|
def fill color, alpha = nil
|
27
30
|
@buffer.push "fill(#{color}#{", #{alpha}" if alpha})"
|
28
31
|
end
|
@@ -31,6 +34,9 @@ module P5
|
|
31
34
|
@buffer.push "rect(#{x}, #{y}, #{w}, #{h})"
|
32
35
|
@buffer.push "pop()" if fill
|
33
36
|
end
|
37
|
+
def point x, y
|
38
|
+
@buffer.push "point(#{x}, #{y})"
|
39
|
+
end
|
34
40
|
def textSize size
|
35
41
|
@buffer.push "textSize(#{size})"
|
36
42
|
end
|
data/p5rb.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: p5rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Victor Maslov aka Nakilon
|
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
|
description:
|
14
14
|
email: nakilon@gmail.com
|