dxopal 1.5.1 → 1.5.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/CHANGELOG.md +5 -0
- data/Gemfile +2 -1
- data/Gemfile.lock +20 -20
- data/README.md +3 -3
- data/Rakefile +2 -14
- data/build/dxopal.js +26114 -18554
- data/build/dxopal.min.js +1 -1
- data/doc/api/DXOpal.html +10 -10
- data/doc/api/DXOpal/Constants.html +115 -0
- data/doc/api/DXOpal/Constants/Colors.html +172 -0
- data/doc/api/DXOpal/Font.html +71 -17
- data/doc/api/DXOpal/Image.html +891 -398
- data/doc/api/DXOpal/Input.html +814 -91
- data/doc/api/DXOpal/Input/KeyCodes.html +986 -0
- data/doc/api/DXOpal/Input/MouseCodes.html +7 -7
- data/doc/api/DXOpal/Input/Touch.html +834 -0
- data/doc/api/DXOpal/RemoteResource.html +16 -18
- data/doc/api/DXOpal/Sound.html +15 -15
- data/doc/api/DXOpal/SoundEffect.html +11 -13
- data/doc/api/DXOpal/SoundEffect/WaveTypes.html +7 -7
- data/doc/api/DXOpal/Sprite.html +517 -40
- data/doc/api/DXOpal/Sprite/CollisionArea.html +126 -0
- data/doc/api/DXOpal/Sprite/CollisionArea/Base.html +649 -0
- data/doc/api/DXOpal/Sprite/CollisionArea/Circle.html +656 -0
- data/doc/api/DXOpal/Sprite/CollisionArea/Point.html +448 -0
- data/doc/api/DXOpal/Sprite/CollisionArea/Rect.html +549 -0
- data/doc/api/DXOpal/Sprite/CollisionArea/Triangle.html +423 -0
- data/doc/api/DXOpal/Sprite/CollisionCheck.html +926 -0
- data/doc/api/DXOpal/Sprite/CollisionCheck/ClassMethods.html +268 -0
- data/doc/api/DXOpal/Sprite/Physics.html +426 -0
- data/doc/api/DXOpal/Window.html +235 -152
- data/doc/api/Kernel.html +131 -0
- data/doc/api/_index.html +276 -4
- data/doc/api/class_list.html +1 -1
- data/doc/api/css/style.css +1 -0
- data/doc/api/file.README.html +6 -8
- data/doc/api/frames.html +1 -1
- data/doc/api/index.html +6 -8
- data/doc/api/method_list.html +1600 -0
- data/doc/api/top-level-namespace.html +154 -3
- data/lib/dxopal/input.rb +4 -2
- data/lib/dxopal/version.rb +1 -1
- metadata +21 -8
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Top Level Namespace
|
8
8
|
|
9
|
-
— Documentation by YARD 0.9.
|
9
|
+
— Documentation by YARD 0.9.26
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -78,21 +78,172 @@
|
|
78
78
|
|
79
79
|
</div>
|
80
80
|
|
81
|
+
<h2>Defined Under Namespace</h2>
|
82
|
+
<p class="children">
|
83
|
+
|
84
|
+
|
85
|
+
<strong class="modules">Modules:</strong> <span class='object_link'><a href="DXOpal.html" title="DXOpal (module)">DXOpal</a></span>, <span class='object_link'><a href="Kernel.html" title="Kernel (module)">Kernel</a></span>
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
</p>
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
<h2>
|
100
|
+
Instance Method Summary
|
101
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
102
|
+
</h2>
|
103
|
+
|
104
|
+
<ul class="summary">
|
105
|
+
|
106
|
+
<li class="public ">
|
107
|
+
<span class="summary_signature">
|
108
|
+
|
109
|
+
<a href="top-level-namespace.html#require-instance_method" title="#require (instance method)">#<strong>require</strong>(*args) ⇒ Object </a>
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
</span>
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
124
|
+
|
125
|
+
</li>
|
126
|
+
|
127
|
+
|
128
|
+
<li class="public ">
|
129
|
+
<span class="summary_signature">
|
130
|
+
|
131
|
+
<a href="top-level-namespace.html#require_remote-instance_method" title="#require_remote (instance method)">#<strong>require_remote</strong>(url) ⇒ Object </a>
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
</span>
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
146
|
+
|
147
|
+
</li>
|
148
|
+
|
149
|
+
|
150
|
+
</ul>
|
151
|
+
|
81
152
|
|
82
153
|
|
83
154
|
|
155
|
+
<div id="instance_method_details" class="method_details_list">
|
156
|
+
<h2>Instance Method Details</h2>
|
157
|
+
|
158
|
+
|
159
|
+
<div class="method_details first">
|
160
|
+
<h3 class="signature first" id="require-instance_method">
|
161
|
+
|
162
|
+
#<strong>require</strong>(*args) ⇒ <tt>Object</tt>
|
163
|
+
|
84
164
|
|
165
|
+
|
85
166
|
|
167
|
+
|
168
|
+
</h3><table class="source_code">
|
169
|
+
<tr>
|
170
|
+
<td>
|
171
|
+
<pre class="lines">
|
86
172
|
|
87
173
|
|
174
|
+
24
|
175
|
+
25
|
176
|
+
26
|
177
|
+
27
|
178
|
+
28
|
179
|
+
29
|
180
|
+
30</pre>
|
181
|
+
</td>
|
182
|
+
<td>
|
183
|
+
<pre class="code"><span class="info file"># File 'lib/dxopal/patches/require_dxopal.rb', line 24</span>
|
88
184
|
|
185
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_require'>require</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
|
186
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_args'>args</span> <span class='op'>==</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>dxopal</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
|
187
|
+
<span class='comment'># Do nothing, because DXOpal is already loaded and you don't need to find it
|
188
|
+
</span> <span class='kw'>else</span>
|
189
|
+
<span class='id identifier rubyid_dxopal_orig_require'>dxopal_orig_require</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
|
190
|
+
<span class='kw'>end</span>
|
191
|
+
<span class='kw'>end</span></pre>
|
192
|
+
</td>
|
193
|
+
</tr>
|
194
|
+
</table>
|
195
|
+
</div>
|
196
|
+
|
197
|
+
<div class="method_details ">
|
198
|
+
<h3 class="signature " id="require_remote-instance_method">
|
199
|
+
|
200
|
+
#<strong>require_remote</strong>(url) ⇒ <tt>Object</tt>
|
201
|
+
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
</h3><table class="source_code">
|
207
|
+
<tr>
|
208
|
+
<td>
|
209
|
+
<pre class="lines">
|
210
|
+
|
211
|
+
|
212
|
+
2
|
213
|
+
3
|
214
|
+
4
|
215
|
+
5
|
216
|
+
6
|
217
|
+
7
|
218
|
+
8
|
219
|
+
9
|
220
|
+
10</pre>
|
221
|
+
</td>
|
222
|
+
<td>
|
223
|
+
<pre class="code"><span class="info file"># File 'lib/dxopal/patches/require_remote.rb', line 2</span>
|
224
|
+
|
225
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_require_remote'>require_remote</span><span class='lparen'>(</span><span class='id identifier rubyid_url'>url</span><span class='rparen'>)</span>
|
226
|
+
<span class='backtick'>%x{</span><span class='tstring_content'>
|
227
|
+
var r = new XMLHttpRequest();
|
228
|
+
r.overrideMimeType("text/plain"); // https://github.com/yhara/dxopal/issues/12
|
229
|
+
r.open("GET", url, false);
|
230
|
+
r.send('');
|
231
|
+
</span><span class='tstring_end'>}</span></span>
|
232
|
+
<span class='id identifier rubyid_eval'>eval</span> <span class='backtick'>`</span><span class='tstring_content'>r.responseText</span><span class='tstring_end'>`</span></span>
|
233
|
+
<span class='kw'>end</span></pre>
|
234
|
+
</td>
|
235
|
+
</tr>
|
236
|
+
</table>
|
237
|
+
</div>
|
238
|
+
|
239
|
+
</div>
|
89
240
|
|
90
241
|
</div>
|
91
242
|
|
92
243
|
<div id="footer">
|
93
|
-
Generated on
|
244
|
+
Generated on Tue Dec 29 11:37:22 2020 by
|
94
245
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
95
|
-
0.9.
|
246
|
+
0.9.26 (ruby-2.7.0).
|
96
247
|
</div>
|
97
248
|
|
98
249
|
</div>
|
data/lib/dxopal/input.rb
CHANGED
@@ -135,9 +135,11 @@ module DXOpal
|
|
135
135
|
document.addEventListener('mouseup', function(ev){
|
136
136
|
#{@@mouse_info}.x = ev.pageX - #{@@canvas_x};
|
137
137
|
#{@@mouse_info}.y = ev.pageY - #{@@canvas_y};
|
138
|
+
// ev.button => ev.buttons
|
139
|
+
table = { 0: 1, 1: 4, 2: 2, 3: 8, 4: 16 };
|
138
140
|
for (var k=1; k<=16; k<<=1) {
|
139
|
-
if (
|
140
|
-
#{@@pressing_mouse_buttons}[
|
141
|
+
if (#{@@pressing_mouse_buttons}[k]) {
|
142
|
+
#{@@pressing_mouse_buttons}[table[ev.button]] = -#{@@tick};
|
141
143
|
}
|
142
144
|
}
|
143
145
|
});
|
data/lib/dxopal/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dxopal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yutaka HARA
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-12-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -38,7 +38,7 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '2.0'
|
41
|
-
description:
|
41
|
+
description:
|
42
42
|
email:
|
43
43
|
- yutaka.hara+github@gmail.com
|
44
44
|
executables:
|
@@ -61,16 +61,30 @@ files:
|
|
61
61
|
- build/dxopal.min.js
|
62
62
|
- config.ru
|
63
63
|
- doc/api/DXOpal.html
|
64
|
+
- doc/api/DXOpal/Constants.html
|
65
|
+
- doc/api/DXOpal/Constants/Colors.html
|
64
66
|
- doc/api/DXOpal/Font.html
|
65
67
|
- doc/api/DXOpal/Image.html
|
66
68
|
- doc/api/DXOpal/Input.html
|
69
|
+
- doc/api/DXOpal/Input/KeyCodes.html
|
67
70
|
- doc/api/DXOpal/Input/MouseCodes.html
|
71
|
+
- doc/api/DXOpal/Input/Touch.html
|
68
72
|
- doc/api/DXOpal/RemoteResource.html
|
69
73
|
- doc/api/DXOpal/Sound.html
|
70
74
|
- doc/api/DXOpal/SoundEffect.html
|
71
75
|
- doc/api/DXOpal/SoundEffect/WaveTypes.html
|
72
76
|
- doc/api/DXOpal/Sprite.html
|
77
|
+
- doc/api/DXOpal/Sprite/CollisionArea.html
|
78
|
+
- doc/api/DXOpal/Sprite/CollisionArea/Base.html
|
79
|
+
- doc/api/DXOpal/Sprite/CollisionArea/Circle.html
|
80
|
+
- doc/api/DXOpal/Sprite/CollisionArea/Point.html
|
81
|
+
- doc/api/DXOpal/Sprite/CollisionArea/Rect.html
|
82
|
+
- doc/api/DXOpal/Sprite/CollisionArea/Triangle.html
|
83
|
+
- doc/api/DXOpal/Sprite/CollisionCheck.html
|
84
|
+
- doc/api/DXOpal/Sprite/CollisionCheck/ClassMethods.html
|
85
|
+
- doc/api/DXOpal/Sprite/Physics.html
|
73
86
|
- doc/api/DXOpal/Window.html
|
87
|
+
- doc/api/Kernel.html
|
74
88
|
- doc/api/_index.html
|
75
89
|
- doc/api/class_list.html
|
76
90
|
- doc/api/css/common.css
|
@@ -116,7 +130,7 @@ licenses:
|
|
116
130
|
- MIT
|
117
131
|
metadata:
|
118
132
|
source_code_uri: https://github.com/yhara/dxopal
|
119
|
-
post_install_message:
|
133
|
+
post_install_message:
|
120
134
|
rdoc_options: []
|
121
135
|
require_paths:
|
122
136
|
- lib
|
@@ -131,9 +145,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
131
145
|
- !ruby/object:Gem::Version
|
132
146
|
version: '0'
|
133
147
|
requirements: []
|
134
|
-
|
135
|
-
|
136
|
-
signing_key:
|
148
|
+
rubygems_version: 3.1.2
|
149
|
+
signing_key:
|
137
150
|
specification_version: 4
|
138
151
|
summary: Game development framework for Opal
|
139
152
|
test_files: []
|