dxopal 1.5.1 → 1.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +12 -0
  3. data/DEVELOPMENT.md +4 -4
  4. data/Gemfile +1 -1
  5. data/Gemfile.lock +23 -25
  6. data/README.md +7 -3
  7. data/Rakefile +8 -15
  8. data/build/dxopal.js +57670 -40007
  9. data/build/dxopal.min.js +1 -1
  10. data/config.ru +1 -1
  11. data/doc/api/DXOpal/Constants/Colors.html +172 -0
  12. data/doc/api/DXOpal/Constants.html +115 -0
  13. data/doc/api/DXOpal/Font.html +72 -18
  14. data/doc/api/DXOpal/Image.html +902 -409
  15. data/doc/api/DXOpal/Input/KeyCodes.html +986 -0
  16. data/doc/api/DXOpal/Input/MouseCodes.html +8 -8
  17. data/doc/api/DXOpal/Input/Touch.html +834 -0
  18. data/doc/api/DXOpal/Input.html +833 -104
  19. data/doc/api/DXOpal/RemoteResource.html +170 -41
  20. data/doc/api/DXOpal/Sound.html +33 -27
  21. data/doc/api/DXOpal/SoundEffect/WaveTypes.html +8 -8
  22. data/doc/api/DXOpal/SoundEffect.html +13 -15
  23. data/doc/api/DXOpal/Sprite/CollisionArea/Base.html +649 -0
  24. data/doc/api/DXOpal/Sprite/CollisionArea/Circle.html +656 -0
  25. data/doc/api/DXOpal/Sprite/CollisionArea/Point.html +448 -0
  26. data/doc/api/DXOpal/Sprite/CollisionArea/Rect.html +549 -0
  27. data/doc/api/DXOpal/Sprite/CollisionArea/Triangle.html +423 -0
  28. data/doc/api/DXOpal/Sprite/CollisionArea.html +126 -0
  29. data/doc/api/DXOpal/Sprite/CollisionCheck/ClassMethods.html +268 -0
  30. data/doc/api/DXOpal/Sprite/CollisionCheck.html +926 -0
  31. data/doc/api/DXOpal/Sprite/Physics.html +426 -0
  32. data/doc/api/DXOpal/Sprite.html +522 -45
  33. data/doc/api/DXOpal/Window.html +245 -156
  34. data/doc/api/DXOpal.html +11 -11
  35. data/doc/api/Kernel.html +131 -0
  36. data/doc/api/_index.html +277 -5
  37. data/doc/api/class_list.html +1 -1
  38. data/doc/api/css/style.css +1 -0
  39. data/doc/api/file.README.html +23 -22
  40. data/doc/api/frames.html +10 -5
  41. data/doc/api/index.html +23 -22
  42. data/doc/api/method_list.html +1608 -0
  43. data/doc/api/top-level-namespace.html +155 -4
  44. data/lib/dxopal/input.rb +9 -4
  45. data/lib/dxopal/remote_resource.rb +33 -1
  46. data/lib/dxopal/sound.rb +5 -2
  47. data/lib/dxopal/version.rb +1 -1
  48. data/lib/dxopal/window.rb +6 -3
  49. data/lib/dxopal.rb +1 -0
  50. metadata +21 -8
@@ -0,0 +1,448 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Class: DXOpal::Sprite::CollisionArea::Point
8
+
9
+ &mdash; Documentation by YARD 0.9.36
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../../../css/style.css" type="text/css" />
14
+
15
+ <link rel="stylesheet" href="../../../css/common.css" type="text/css" />
16
+
17
+ <script type="text/javascript">
18
+ pathId = "DXOpal::Sprite::CollisionArea::Point";
19
+ relpath = '../../../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../../../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../../../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../../../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../../../_index.html">Index (P)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../../../DXOpal.html" title="DXOpal (module)">DXOpal</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../Sprite.html" title="DXOpal::Sprite (class)">Sprite</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../CollisionArea.html" title="DXOpal::Sprite::CollisionArea (module)">CollisionArea</a></span></span>
41
+ &raquo;
42
+ <span class="title">Point</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../../../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Class: DXOpal::Sprite::CollisionArea::Point
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName"><span class='object_link'><a href="Base.html" title="DXOpal::Sprite::CollisionArea::Base (class)">Base</a></span></span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next"><span class='object_link'><a href="Base.html" title="DXOpal::Sprite::CollisionArea::Base (class)">Base</a></span></li>
78
+
79
+ <li class="next">DXOpal::Sprite::CollisionArea::Point</li>
80
+
81
+ </ul>
82
+ <a href="#" class="inheritanceTree">show all</a>
83
+
84
+ </dd>
85
+ </dl>
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+ <dl>
98
+ <dt>Defined in:</dt>
99
+ <dd>lib/dxopal/sprite/collision_area.rb</dd>
100
+ </dl>
101
+
102
+ </div>
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+ <h2>Instance Attribute Summary</h2>
111
+
112
+ <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Base.html" title="DXOpal::Sprite::CollisionArea::Base (class)">Base</a></span></h3>
113
+ <p class="inherited"><span class='object_link'><a href="Base.html#sprite-instance_method" title="DXOpal::Sprite::CollisionArea::Base#sprite (method)">#sprite</a></span></p>
114
+
115
+
116
+
117
+ <h2>
118
+ Instance Method Summary
119
+ <small><a href="#" class="summary_toggle">collapse</a></small>
120
+ </h2>
121
+
122
+ <ul class="summary">
123
+
124
+ <li class="public ">
125
+ <span class="summary_signature">
126
+
127
+ <a href="#absolute_pos-instance_method" title="#absolute_pos (instance method)">#<strong>absolute_pos</strong> &#x21d2; Object </a>
128
+
129
+
130
+
131
+ </span>
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+
141
+ <span class="summary_desc"><div class='inline'>
142
+ <p>Return [x, y].</p>
143
+ </div></span>
144
+
145
+ </li>
146
+
147
+
148
+ <li class="public ">
149
+ <span class="summary_signature">
150
+
151
+ <a href="#collides%3F-instance_method" title="#collides? (instance method)">#<strong>collides?</strong>(other) &#x21d2; Boolean </a>
152
+
153
+
154
+
155
+ </span>
156
+
157
+
158
+
159
+
160
+
161
+
162
+
163
+
164
+
165
+ <span class="summary_desc"><div class='inline'></div></span>
166
+
167
+ </li>
168
+
169
+
170
+ <li class="public ">
171
+ <span class="summary_signature">
172
+
173
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(sprite, x, y) &#x21d2; Point </a>
174
+
175
+
176
+
177
+ </span>
178
+
179
+
180
+ <span class="note title constructor">constructor</span>
181
+
182
+
183
+
184
+
185
+
186
+
187
+
188
+
189
+ <span class="summary_desc"><div class='inline'>
190
+ <p>A new instance of Point.</p>
191
+ </div></span>
192
+
193
+ </li>
194
+
195
+
196
+ <li class="public ">
197
+ <span class="summary_signature">
198
+
199
+ <a href="#type-instance_method" title="#type (instance method)">#<strong>type</strong> &#x21d2; Object </a>
200
+
201
+
202
+
203
+ </span>
204
+
205
+
206
+
207
+
208
+
209
+
210
+
211
+
212
+
213
+ <span class="summary_desc"><div class='inline'></div></span>
214
+
215
+ </li>
216
+
217
+
218
+ </ul>
219
+
220
+
221
+
222
+
223
+
224
+
225
+
226
+
227
+
228
+
229
+
230
+ <h3 class="inherited">Methods inherited from <span class='object_link'><a href="Base.html" title="DXOpal::Sprite::CollisionArea::Base (class)">Base</a></span></h3>
231
+ <p class="inherited"><span class='object_link'><a href="Base.html#aabb-instance_method" title="DXOpal::Sprite::CollisionArea::Base#aabb (method)">#aabb</a></span>, <span class='object_link'><a href="Base.html#absolute-instance_method" title="DXOpal::Sprite::CollisionArea::Base#absolute (method)">#absolute</a></span>, <span class='object_link'><a href="Base.html#absolute1-instance_method" title="DXOpal::Sprite::CollisionArea::Base#absolute1 (method)">#absolute1</a></span>, <span class='object_link'><a href="Base.html#transback-instance_method" title="DXOpal::Sprite::CollisionArea::Base#transback (method)">#transback</a></span>, <span class='object_link'><a href="Base.html#transback1-instance_method" title="DXOpal::Sprite::CollisionArea::Base#transback1 (method)">#transback1</a></span></p>
232
+ <div id="constructor_details" class="method_details_list">
233
+ <h2>Constructor Details</h2>
234
+
235
+ <div class="method_details first">
236
+ <h3 class="signature first" id="initialize-instance_method">
237
+
238
+ #<strong>initialize</strong>(sprite, x, y) &#x21d2; <tt><span class='object_link'><a href="" title="DXOpal::Sprite::CollisionArea::Point (class)">Point</a></span></tt>
239
+
240
+
241
+
242
+
243
+
244
+ </h3><div class="docstring">
245
+ <div class="discussion">
246
+
247
+ <p>Returns a new instance of Point.</p>
248
+
249
+
250
+ </div>
251
+ </div>
252
+ <div class="tags">
253
+
254
+
255
+ </div><table class="source_code">
256
+ <tr>
257
+ <td>
258
+ <pre class="lines">
259
+
260
+
261
+ 89
262
+ 90
263
+ 91
264
+ 92</pre>
265
+ </td>
266
+ <td>
267
+ <pre class="code"><span class="info file"># File 'lib/dxopal/sprite/collision_area.rb', line 89</span>
268
+
269
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_sprite'>sprite</span><span class='comma'>,</span> <span class='id identifier rubyid_x'>x</span><span class='comma'>,</span> <span class='id identifier rubyid_y'>y</span><span class='rparen'>)</span>
270
+ <span class='ivar'>@sprite</span><span class='comma'>,</span> <span class='ivar'>@x</span><span class='comma'>,</span> <span class='ivar'>@y</span> <span class='op'>=</span> <span class='id identifier rubyid_sprite'>sprite</span><span class='comma'>,</span> <span class='id identifier rubyid_x'>x</span><span class='comma'>,</span> <span class='id identifier rubyid_y'>y</span>
271
+ <span class='kw'>super</span><span class='lparen'>(</span><span class='rparen'>)</span>
272
+ <span class='kw'>end</span></pre>
273
+ </td>
274
+ </tr>
275
+ </table>
276
+ </div>
277
+
278
+ </div>
279
+
280
+
281
+ <div id="instance_method_details" class="method_details_list">
282
+ <h2>Instance Method Details</h2>
283
+
284
+
285
+ <div class="method_details first">
286
+ <h3 class="signature first" id="absolute_pos-instance_method">
287
+
288
+ #<strong>absolute_pos</strong> &#x21d2; <tt>Object</tt>
289
+
290
+
291
+
292
+
293
+
294
+ </h3><div class="docstring">
295
+ <div class="discussion">
296
+
297
+ <p>Return [x, y]</p>
298
+
299
+
300
+ </div>
301
+ </div>
302
+ <div class="tags">
303
+
304
+
305
+ </div><table class="source_code">
306
+ <tr>
307
+ <td>
308
+ <pre class="lines">
309
+
310
+
311
+ 117
312
+ 118
313
+ 119</pre>
314
+ </td>
315
+ <td>
316
+ <pre class="code"><span class="info file"># File 'lib/dxopal/sprite/collision_area.rb', line 117</span>
317
+
318
+ <span class='kw'>def</span> <span class='id identifier rubyid_absolute_pos'>absolute_pos</span>
319
+ <span class='id identifier rubyid_absolute1'>absolute1</span><span class='lparen'>(</span><span class='lbracket'>[</span><span class='ivar'>@x</span><span class='comma'>,</span> <span class='ivar'>@y</span><span class='rbracket'>]</span><span class='rparen'>)</span>
320
+ <span class='kw'>end</span></pre>
321
+ </td>
322
+ </tr>
323
+ </table>
324
+ </div>
325
+
326
+ <div class="method_details ">
327
+ <h3 class="signature " id="collides?-instance_method">
328
+
329
+ #<strong>collides?</strong>(other) &#x21d2; <tt>Boolean</tt>
330
+
331
+
332
+
333
+
334
+
335
+ </h3><div class="docstring">
336
+ <div class="discussion">
337
+
338
+
339
+ </div>
340
+ </div>
341
+ <div class="tags">
342
+
343
+ <p class="tag_title">Returns:</p>
344
+ <ul class="return">
345
+
346
+ <li>
347
+
348
+
349
+ <span class='type'>(<tt>Boolean</tt>)</span>
350
+
351
+
352
+
353
+ </li>
354
+
355
+ </ul>
356
+
357
+ </div><table class="source_code">
358
+ <tr>
359
+ <td>
360
+ <pre class="lines">
361
+
362
+
363
+ 96
364
+ 97
365
+ 98
366
+ 99
367
+ 100
368
+ 101
369
+ 102
370
+ 103
371
+ 104
372
+ 105
373
+ 106
374
+ 107
375
+ 108
376
+ 109
377
+ 110
378
+ 111
379
+ 112
380
+ 113
381
+ 114</pre>
382
+ </td>
383
+ <td>
384
+ <pre class="code"><span class="info file"># File 'lib/dxopal/sprite/collision_area.rb', line 96</span>
385
+
386
+ <span class='kw'>def</span> <span class='id identifier rubyid_collides?'>collides?</span><span class='lparen'>(</span><span class='id identifier rubyid_other'>other</span><span class='rparen'>)</span>
387
+ <span class='kw'>case</span> <span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span>
388
+ <span class='kw'>when</span> <span class='symbol'>:Point</span>
389
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_absolute_pos'>absolute_pos</span> <span class='op'>==</span> <span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_absolute_pos'>absolute_pos</span>
390
+ <span class='kw'>when</span> <span class='symbol'>:Circle</span>
391
+ <span class='id identifier rubyid_x'>x</span><span class='comma'>,</span> <span class='id identifier rubyid_y'>y</span> <span class='op'>=</span> <span class='op'>*</span><span class='id identifier rubyid_transback1'>transback1</span><span class='lparen'>(</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_absolute_pos'>absolute_pos</span><span class='comma'>,</span> <span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_sprite'>sprite</span><span class='rparen'>)</span>
392
+ <span class='id identifier rubyid_cx'>cx</span><span class='comma'>,</span> <span class='id identifier rubyid_cy'>cy</span> <span class='op'>=</span> <span class='op'>*</span><span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_absolute_norot_pos'>absolute_norot_pos</span>
393
+ <span class='backtick'>`</span><span class='tstring_content'>Opal.DXOpal.CCk.check_point_circle(x, y, cx, cy, </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_r'>r</span><span class='embexpr_end'>}</span><span class='tstring_content'>)</span><span class='tstring_end'>`</span></span>
394
+ <span class='kw'>when</span> <span class='symbol'>:Rect</span>
395
+ <span class='id identifier rubyid_x'>x</span><span class='comma'>,</span> <span class='id identifier rubyid_y'>y</span> <span class='op'>=</span> <span class='op'>*</span><span class='id identifier rubyid_transback1'>transback1</span><span class='lparen'>(</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_absolute_pos'>absolute_pos</span><span class='comma'>,</span> <span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_sprite'>sprite</span><span class='rparen'>)</span>
396
+ <span class='lparen'>(</span><span class='lparen'>(</span><span class='id identifier rubyid_x1'>x1</span><span class='comma'>,</span> <span class='id identifier rubyid_y1'>y1</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='lparen'>(</span><span class='id identifier rubyid_x2'>x2</span><span class='comma'>,</span> <span class='id identifier rubyid_y2'>y2</span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='op'>=</span> <span class='op'>*</span><span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_absolute_norot_poss'>absolute_norot_poss</span>
397
+ <span class='backtick'>`</span><span class='tstring_content'>Opal.DXOpal.CCk.check_point_straight_rect(x, y, x1, y1, x2, y2)</span><span class='tstring_end'>`</span></span>
398
+ <span class='kw'>when</span> <span class='symbol'>:Triangle</span>
399
+ <span class='id identifier rubyid_x'>x</span><span class='comma'>,</span> <span class='id identifier rubyid_y'>y</span> <span class='op'>=</span> <span class='op'>*</span><span class='id identifier rubyid_absolute_pos'>absolute_pos</span>
400
+ <span class='lparen'>(</span><span class='id identifier rubyid_x1'>x1</span><span class='comma'>,</span> <span class='id identifier rubyid_y1'>y1</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='lparen'>(</span><span class='id identifier rubyid_x2'>x2</span><span class='comma'>,</span> <span class='id identifier rubyid_y2'>y2</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='lparen'>(</span><span class='id identifier rubyid_x3'>x3</span><span class='comma'>,</span> <span class='id identifier rubyid_y3'>y3</span><span class='rparen'>)</span> <span class='op'>=</span> <span class='op'>*</span><span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_absolute_poss'>absolute_poss</span>
401
+ <span class='backtick'>`</span><span class='tstring_content'>Opal.DXOpal.CCk.check_point_triangle(x, y, x1, y1, x2, y2, x3, y3)</span><span class='tstring_end'>`</span></span>
402
+ <span class='kw'>else</span> <span class='id identifier rubyid_raise'>raise</span>
403
+ <span class='kw'>end</span>
404
+ <span class='kw'>end</span></pre>
405
+ </td>
406
+ </tr>
407
+ </table>
408
+ </div>
409
+
410
+ <div class="method_details ">
411
+ <h3 class="signature " id="type-instance_method">
412
+
413
+ #<strong>type</strong> &#x21d2; <tt>Object</tt>
414
+
415
+
416
+
417
+
418
+
419
+ </h3><table class="source_code">
420
+ <tr>
421
+ <td>
422
+ <pre class="lines">
423
+
424
+
425
+ 94</pre>
426
+ </td>
427
+ <td>
428
+ <pre class="code"><span class="info file"># File 'lib/dxopal/sprite/collision_area.rb', line 94</span>
429
+
430
+ <span class='kw'>def</span> <span class='id identifier rubyid_type'>type</span><span class='semicolon'>;</span> <span class='symbol'>:Point</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
431
+ </td>
432
+ </tr>
433
+ </table>
434
+ </div>
435
+
436
+ </div>
437
+
438
+ </div>
439
+
440
+ <div id="footer">
441
+ Generated on Tue Jul 9 22:42:34 2024 by
442
+ <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
443
+ 0.9.36 (ruby-3.2.2).
444
+ </div>
445
+
446
+ </div>
447
+ </body>
448
+ </html>