pixelflow_canvas 0.6.0 → 0.7.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/README.md +27 -21
- data/lib/pixelflow_canvas/palettes.yaml +2527 -0
- data/lib/pixelflow_canvas/version.rb +1 -1
- data/lib/pixelflow_canvas.rb +25 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c090cdc8db292f899c236139eec7643f7511a3ef0d578a5175fd4ca3a6e77edc
|
4
|
+
data.tar.gz: 0ec735b7b0c0f63b8174e712d82364b01fc7a1c730d74d49be5f8cd2b9701884
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc6baa7cb65f20eb65966c99e248854e0550a16749d77a5544e5219a9a305b8f5a6e1d6fe026ff98995e14550f54b9b85a40f1d443e171bcd40550d080314e79
|
7
|
+
data.tar.gz: f52a914851f557ee3d5b2cf99726dd70f2c33e439c141ca039bc671f945316dfdf57e14c906ed358a8c8131eb959d4ddd48acf76f5f99d5a823a985ff6e432d6
|
data/README.md
CHANGED
@@ -1,39 +1,45 @@
|
|
1
|
-
#
|
1
|
+
# Pixelflow Canvas Ruby Driver
|
2
2
|
|
3
|
-
|
3
|
+
This is a Ruby driver for the Pixelflow Canvas API.
|
4
4
|
|
5
|
-
|
5
|
+
## Prerequisites
|
6
6
|
|
7
|
-
|
7
|
+
This driver requires the Pixelflow Canvas extension for Visual Studio Code. You can install it from the [Visual Studio Code Marketplace](https://marketplace.visualstudio.com/items?itemName=gymnasiumsteglitz.pixelflow-canvas).
|
8
8
|
|
9
|
-
|
9
|
+
## Installation
|
10
10
|
|
11
|
-
|
11
|
+
Add this line to your application's Gemfile:
|
12
12
|
|
13
|
-
```
|
14
|
-
|
13
|
+
```ruby
|
14
|
+
gem 'pixelflow_canvas'
|
15
15
|
```
|
16
16
|
|
17
|
-
|
17
|
+
And then execute:
|
18
18
|
|
19
|
-
```
|
20
|
-
|
19
|
+
```
|
20
|
+
$ bundle install
|
21
21
|
```
|
22
22
|
|
23
|
-
|
24
|
-
|
25
|
-
TODO: Write usage instructions here
|
23
|
+
Or install it yourself as:
|
26
24
|
|
27
|
-
|
25
|
+
```
|
26
|
+
$ gem install pixelflow_canvas
|
27
|
+
```
|
28
28
|
|
29
|
-
|
29
|
+
## Usage
|
30
30
|
|
31
|
-
|
31
|
+
Open the Pixelflow Canvas in VS Code via `Ctrl+Shift+P` or `F1` and `Show Pixelflow Canvas`.
|
32
32
|
|
33
|
-
|
33
|
+
Then you can use the following Ruby code to draw on the canvas:
|
34
34
|
|
35
|
-
|
35
|
+
```ruby
|
36
|
+
require 'pixelflow_canvas'
|
36
37
|
|
37
|
-
|
38
|
+
canvas = Pixelflow::Canvas.new(16, 16, :palette)
|
39
|
+
(0...16).each do |y|
|
40
|
+
(0...16).each do |x|
|
41
|
+
canvas.set_pixel(x, y, x + y * 16)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
```
|
38
45
|
|
39
|
-
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|