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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cfc40d2cd2af116222490bcd16e2738790ff96fbc9e71c2791786f0e1dad48d5
4
- data.tar.gz: 963960a9697ba5bf0a6b70c3a6114e06202206d0b80c469c0205df7066438eaf
3
+ metadata.gz: 653a6e648abd3cae2bb721b8e39c0ff46f96f9c605d9724463294c0e5c174540
4
+ data.tar.gz: 440c68675c73e5a6e4a957c19322653fcd7be6431c1ca8dcafcf11d6723c23e2
5
5
  SHA512:
6
- metadata.gz: 5c31b1d345afd868e04a0f8137f4919ceb3483e259ff3d4b4811bf5ab8e064d623763c87ba0a524269ebefc465db5e81f4ac4392088445491fab1a417a7d56fa
7
- data.tar.gz: c05d465645818fc0c230607309f0981b079b0f120d54ee515782fced24afac134d741dacfeab22e8cef3ca29e35598e14c94e5ea2b2a88f28125800609ef0432
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/voxelamming_ruby_gem. 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_gem/blob/master/CODE_OF_CONDUCT.md).
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]/voxelamming_ruby_gem/blob/master/CODE_OF_CONDUCT.md).
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
- <h1><a href="#voxelamminggem" id="voxelamminggem"></a>Voxelamming</h1>
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><a href="#whats-voxelamming" id="whats-voxelamming"></a>What's Voxelamming?</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><a href="#resources" id="resources"></a>Resources</h2>
70
+ <h2>Resources</h2>
67
71
  <ul>
68
- <li><strong>Homepage:</strong> <a href="https://creativival.github.io/voxelamming/index.en">https://creativival.github.io/voxelamming/index.en</a></li>
69
- <li><strong>Samples:</strong> <a href="https://github.com/creativival/voxelamming/tree/main/sample/ruby">https://github.com/creativival/voxelamming/tree/main/sample/ruby</a></li>
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><a href="#installation" id="installation"></a>Installation</h2>
75
+ <h2>Installation</h2>
72
76
  <pre><code class="bash">gem install voxelamming
73
77
  </code></pre>
74
- <h2><a href="#usage" id="usage"></a>Usage</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><a href="#method-description" id="method-description"></a>Method description</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 ("box", "square", "plane") </td></tr>
111
+ <tr><td> <code>change_shape(shape)</code> </td><td> Changes the shape of the voxel. </td><td> <code>shape</code>: Shape (&quot;box&quot;, &quot;square&quot;, &quot;plane&quot;) </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 ("point", "spot", "directional") </td></tr>
114
- <tr><td> <code>set_command(command)</code> </td><td> Executes a command. </td><td> <code>command</code>: Command ("axis", "japaneseCastle", "float", "liteRender") </td></tr>
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 (&quot;point&quot;, &quot;spot&quot;, &quot;directional&quot;) </td></tr>
118
+ <tr><td> <code>set_command(command)</code> </td><td> Executes a command. </td><td> <code>command</code>: Command (&quot;axis&quot;, &quot;japaneseCastle&quot;, &quot;float&quot;, &quot;liteRender&quot;) </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><a href="#development" id="development"></a>Development</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><a href="#contributing" id="contributing"></a>Contributing</h2>
133
- <p>Bug reports and pull requests are welcome on GitHub at <a href="https://github.com/[USERNAME]/voxelamming_ruby_gem">https://github.com/[USERNAME]/voxelamming_ruby_gem</a>. 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_gem/blob/master/CODE_OF_CONDUCT.md">code of conduct</a>.</p>
134
- <h2><a href="#license" id="license"></a>License</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><a href="#code-of-conduct" id="code-of-conduct"></a>Code of Conduct</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]/voxelamming_ruby_gem/blob/master/CODE_OF_CONDUCT.md">code of conduct</a>.</p>
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>
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Voxelamming
4
- VERSION = "0.3.1"
4
+ VERSION = "0.3.2"
5
5
  end
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.1
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/voxelamming_ruby_gem
54
- changelog_uri: https://creativival.github.io/voxelamming_ruby_gem/CHANGELOG.md
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: