voxelamming 0.3.1 → 0.3.2
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 +2 -2
- data/index.html +33 -17
- data/lib/voxelamming/version.rb +1 -1
- data/voxelamming-0.3.1.gem +0 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 653a6e648abd3cae2bb721b8e39c0ff46f96f9c605d9724463294c0e5c174540
|
4
|
+
data.tar.gz: 440c68675c73e5a6e4a957c19322653fcd7be6431c1ca8dcafcf11d6723c23e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 637d500db8f2847b4c91b0ee1c6c0fe9f363f20ab562afcc9f18566bf5968c55b6d4838734895ce8ce728756d8451ffe79e95c622c639496d83d35626f7f43d6
|
7
|
+
data.tar.gz: 60c6b83b10b434266e854999a2bb276f7a27b669536af70a48333a43ac2db7e4dceeb3fd750cbdbeeae78c58d0651d1134409ac1857b815c5c68fbe91f3397a1
|
data/README.md
CHANGED
@@ -90,7 +90,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
90
90
|
|
91
91
|
## Contributing
|
92
92
|
|
93
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/creativival/
|
93
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/creativival/voxelamming_ruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/voxelamming_ruby/blob/master/CODE_OF_CONDUCT.md).
|
94
94
|
|
95
95
|
## License
|
96
96
|
|
@@ -98,4 +98,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
98
98
|
|
99
99
|
## Code of Conduct
|
100
100
|
|
101
|
-
Everyone interacting in the Voxelamming project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/
|
101
|
+
Everyone interacting in the Voxelamming project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/voxelamming_ruby/blob/master/CODE_OF_CONDUCT.md).
|
data/index.html
CHANGED
@@ -58,20 +58,24 @@
|
|
58
58
|
</style>
|
59
59
|
</head>
|
60
60
|
<body>
|
61
|
-
|
61
|
+
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
<h1>Voxelamming</h1>
|
62
66
|
<p>This Ruby package converts Python code into JSON format and sends it to the Voxelamming app using WebSockets, allowing users to create 3D voxel models by writing Ruby scripts.</p>
|
63
|
-
<h2
|
67
|
+
<h2>What's Voxelamming?</h2>
|
64
68
|
<p align="center"><img src="https://creativival.github.io/voxelamming/image/voxelamming_icon.png" alt="Voxelamming Logo" width="200"/></p>
|
65
69
|
<p>Voxelamming is an AR programming learning app. Even programming beginners can learn programming visually and enjoyably. Voxelamming supports iPhones and iPads with iOS 16 or later, and Apple Vision Pro.</p>
|
66
|
-
<h2
|
70
|
+
<h2>Resources</h2>
|
67
71
|
<ul>
|
68
|
-
<li><strong>Homepage:</strong>
|
69
|
-
<li><strong>Samples:</strong>
|
72
|
+
<li><strong>Homepage:</strong> https://creativival.github.io/voxelamming/index.en</li>
|
73
|
+
<li><strong>Samples:</strong> https://github.com/creativival/voxelamming/tree/main/sample/ruby</li>
|
70
74
|
</ul>
|
71
|
-
<h2
|
75
|
+
<h2>Installation</h2>
|
72
76
|
<pre><code class="bash">gem install voxelamming
|
73
77
|
</code></pre>
|
74
|
-
<h2
|
78
|
+
<h2>Usage</h2>
|
75
79
|
<pre><code class="ruby">require 'voxelamming'
|
76
80
|
|
77
81
|
room_name = '1000'
|
@@ -95,7 +99,7 @@ end
|
|
95
99
|
vox.send_data
|
96
100
|
</code></pre>
|
97
101
|
<p>This code snippet demonstrates a simple example where a red voxel is created at a specific location. You can use various functions provided by the <code>VoxelammingManager</code> class to build more complex models.</p>
|
98
|
-
<h4
|
102
|
+
<h4>Method description</h4>
|
99
103
|
<table>
|
100
104
|
<thead>
|
101
105
|
<tr><th> Method name </th><th> Description </th><th> Arguments </th></tr>
|
@@ -104,14 +108,14 @@ vox.send_data
|
|
104
108
|
<tr><td> <code>set_room_name(room_name)</code> </td><td> Sets the room name for communicating with the device. </td><td> <code>room_name</code>: Room name (string) </td></tr>
|
105
109
|
<tr><td> <code>set_box_size(size)</code> </td><td> Sets the size of the voxel (default: 1.0). </td><td> <code>size</code>: Size (float) </td></tr>
|
106
110
|
<tr><td> <code>set_build_interval(interval)</code> </td><td> Sets the placement interval of the voxels (default: 0.01 seconds). </td><td> <code>interval</code>: Interval (float) </td></tr>
|
107
|
-
<tr><td> <code>change_shape(shape)</code> </td><td> Changes the shape of the voxel. </td><td> <code>shape</code>: Shape (
|
111
|
+
<tr><td> <code>change_shape(shape)</code> </td><td> Changes the shape of the voxel. </td><td> <code>shape</code>: Shape ("box", "square", "plane") </td></tr>
|
108
112
|
<tr><td> <code>change_material(is_metallic, roughness)</code> </td><td> Changes the material of the voxel. </td><td> <code>is_metallic</code>: Whether to make it metallic (boolean), <code>roughness</code>: Roughness (float) </td></tr>
|
109
113
|
<tr><td> <code>create_box(x, y, z, r, g, b, alpha)</code> </td><td> Places a voxel. </td><td> <code>x</code>, <code>y</code>, <code>z</code>: Position (float), <code>r</code>, <code>g</code>, <code>b</code>, <code>alpha</code>: Color (float, 0-1) </td></tr>
|
110
114
|
<tr><td> <code>create_box(x, y, z, texture)</code> </td><td> Places a voxel with texture. </td><td> <code>x</code>, <code>y</code>, <code>z</code>: Position (float), <code>texture</code>: Texture name (string) </td></tr>
|
111
115
|
<tr><td> <code>remove_box(x, y, z)</code> </td><td> Removes a voxel. </td><td> <code>x</code>, <code>y</code>, <code>z</code>: Position (float) </td></tr>
|
112
116
|
<tr><td> <code>write_sentence(sentence, x, y, z, r, g, b, alpha)</code> </td><td> Draws a string with voxels. </td><td> <code>sentence</code>: String (string), <code>x</code>, <code>y</code>, <code>z</code>: Position (float), <code>r</code>, <code>g</code>, <code>b</code>, <code>alpha</code>: Color (float, 0-1) </td></tr>
|
113
|
-
<tr><td> <code>set_light(x, y, z, r, g, b, alpha, intensity, interval, light_type)</code> </td><td> Places a light. </td><td> <code>x</code>, <code>y</code>, <code>z</code>: Position (float), <code>r</code>, <code>g</code>, <code>b</code>, <code>alpha</code>: Color (float, 0-1), <code>intensity</code>: Intensity (float), <code>interval</code>: Blinking interval (float), <code>light_type</code>: Type of light (
|
114
|
-
<tr><td> <code>set_command(command)</code> </td><td> Executes a command. </td><td> <code>command</code>: Command (
|
117
|
+
<tr><td> <code>set_light(x, y, z, r, g, b, alpha, intensity, interval, light_type)</code> </td><td> Places a light. </td><td> <code>x</code>, <code>y</code>, <code>z</code>: Position (float), <code>r</code>, <code>g</code>, <code>b</code>, <code>alpha</code>: Color (float, 0-1), <code>intensity</code>: Intensity (float), <code>interval</code>: Blinking interval (float), <code>light_type</code>: Type of light ("point", "spot", "directional") </td></tr>
|
118
|
+
<tr><td> <code>set_command(command)</code> </td><td> Executes a command. </td><td> <code>command</code>: Command ("axis", "japaneseCastle", "float", "liteRender") </td></tr>
|
115
119
|
<tr><td> <code>draw_line(x1, y1, z1, x2, y2, z2, r, g, b, alpha)</code> </td><td> Draws a line between two points. </td><td> <code>x1</code>, <code>y1</code>, <code>z1</code>: Starting point (float), <code>x2</code>, <code>y2</code>, <code>z2</code>: Ending point (float), <code>r</code>, <code>g</code>, <code>b</code>, <code>alpha</code>: Color (float, 0-1) </td></tr>
|
116
120
|
<tr><td> <code>send_data(name)</code> </td><td> Sends voxel data to the device; if the name argument is set, the voxel data can be stored and reproduced as history. </td><td> </td></tr>
|
117
121
|
<tr><td> <code>clear_data()</code> </td><td> Initializes voxel data. </td><td> </td></tr>
|
@@ -124,16 +128,28 @@ vox.send_data
|
|
124
128
|
<tr><td> <code>frame_out()</code> </td><td> Ends recording a frame. </td><td> </td></tr>
|
125
129
|
<tr><td> <code>set_frame_fps(fps)</code> </td><td> Sets the frame rate (default: 2). </td><td> <code>fps</code>: Frame rate (int) </td></tr>
|
126
130
|
<tr><td> <code>set_frame_repeats(repeats)</code> </td><td> Sets the number of frame repetitions (default: 10). </td><td> <code>repeats</code>: Number of repetitions (int) </td></tr>
|
131
|
+
<tr><td> Game Method Name </td><td> Description </td><td> Arguments </td></tr>
|
132
|
+
<tr><td> <code>set_game_screen(width, height, angle=90, r=1, g=1, b=0, alpha=0.5)</code> </td><td> Sets the game screen size. </td><td> <code>width</code>, <code>height</code>: screen size (float), <code>angle</code>: angle (float), <code>r</code>, <code>g</code>, <code>b</code>, <code>alpha</code>: color (float, 0-1) </td></tr>
|
133
|
+
<tr><td> <code>set_game_score(score)</code> </td><td> Sets the game score. </td><td> <code>score</code>: game score (int) </td></tr>
|
134
|
+
<tr><td> <code>send_game_over()</code> </td><td> Triggers game over. </td><td> </td></tr>
|
135
|
+
<tr><td> <code>create_sprite(sprite_name, color_list, x, y, direction=90, scale=1, visible=True)</code> </td><td> Creates a sprite. </td><td> <code>sprite_name</code>: sprite name (string), <code>color_list</code>: dot color data (string), <code>x</code>, <code>y</code>: position (float), <code>direction</code>: angle (float), <code>scale</code>: scale (float), <code>visible</code>: visibility (boolean) </td></tr>
|
136
|
+
<tr><td> <code>move_sprite(sprite_name, x, y, direction=90, scale=1, visible=True)</code> </td><td> Moves a sprite. </td><td> <code>sprite_name</code>: sprite name (string), <code>x</code>, <code>y</code>: position (float), <code>direction</code>: angle (float), <code>scale</code>: scale (float), <code>visible</code>: visibility (boolean) </td></tr>
|
127
137
|
</tbody>
|
128
138
|
</table>
|
129
|
-
<h2
|
139
|
+
<h2>Development</h2>
|
130
140
|
<p>After checking out the repo, run <code>bin/setup</code> to install dependencies. Then, run <code>rake test</code> to run the tests. You can also run <code>bin/console</code> for an interactive prompt that will allow you to experiment.</p>
|
131
141
|
<p>To install this gem onto your local machine, run <code>bundle exec rake install</code>. To release a new version, update the version number in <code>version.rb</code>, and then run <code>bundle exec rake release</code>, which will create a git tag for the version, push git commits and the created tag, and push the <code>.gem</code> file to <a href="https://rubygems.org">rubygems.org</a>.</p>
|
132
|
-
<h2
|
133
|
-
<p>Bug reports and pull requests are welcome on GitHub at
|
134
|
-
<h2
|
142
|
+
<h2>Contributing</h2>
|
143
|
+
<p>Bug reports and pull requests are welcome on GitHub at https://github.com/creativival/voxelamming_ruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the <a href="https://github.com/[USERNAME]/voxelamming_ruby/blob/master/CODE_OF_CONDUCT.md">code of conduct</a>.</p>
|
144
|
+
<h2>License</h2>
|
135
145
|
<p>The gem is available as open source under the terms of the <a href="https://opensource.org/licenses/MIT">MIT License</a>.</p>
|
136
|
-
<h2
|
137
|
-
<p>Everyone interacting in the Voxelamming project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the <a href="https://github.com/[USERNAME]/
|
146
|
+
<h2>Code of Conduct</h2>
|
147
|
+
<p>Everyone interacting in the Voxelamming project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the <a href="https://github.com/[USERNAME]/voxelamming_ruby/blob/master/CODE_OF_CONDUCT.md">code of conduct</a>.</p>
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
|
138
154
|
</body>
|
139
155
|
</html>
|
data/lib/voxelamming/version.rb
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: voxelamming
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- creativival
|
@@ -44,14 +44,15 @@ files:
|
|
44
44
|
- sig/voxelamming.rbs
|
45
45
|
- voxelamming-0.2.0.gem
|
46
46
|
- voxelamming-0.3.0.gem
|
47
|
+
- voxelamming-0.3.1.gem
|
47
48
|
homepage: https://creativival.github.io/voxelamming
|
48
49
|
licenses:
|
49
50
|
- MIT
|
50
51
|
metadata:
|
51
52
|
allowed_push_host: https://rubygems.org
|
52
53
|
homepage_uri: https://creativival.github.io/voxelamming
|
53
|
-
source_code_uri: https://github.com/creativival/
|
54
|
-
changelog_uri: https://creativival.github.io/
|
54
|
+
source_code_uri: https://github.com/creativival/voxelamming_ruby
|
55
|
+
changelog_uri: https://creativival.github.io/voxelamming_ruby/CHANGELOG.md
|
55
56
|
post_install_message:
|
56
57
|
rdoc_options: []
|
57
58
|
require_paths:
|