dxopal 1.5.2 → 1.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +7 -0
  3. data/DEVELOPMENT.md +4 -4
  4. data/Gemfile +0 -1
  5. data/Gemfile.lock +22 -24
  6. data/README.md +4 -0
  7. data/Rakefile +6 -1
  8. data/build/dxopal.js +48950 -38847
  9. data/build/dxopal.min.js +1 -1
  10. data/config.ru +1 -1
  11. data/doc/api/DXOpal/Constants/Colors.html +4 -4
  12. data/doc/api/DXOpal/Constants.html +4 -4
  13. data/doc/api/DXOpal/Font.html +4 -4
  14. data/doc/api/DXOpal/Image.html +19 -19
  15. data/doc/api/DXOpal/Input/KeyCodes.html +6 -6
  16. data/doc/api/DXOpal/Input/MouseCodes.html +4 -4
  17. data/doc/api/DXOpal/Input/Touch.html +47 -47
  18. data/doc/api/DXOpal/Input.html +87 -81
  19. data/doc/api/DXOpal/RemoteResource.html +164 -33
  20. data/doc/api/DXOpal/Sound.html +22 -16
  21. data/doc/api/DXOpal/SoundEffect/WaveTypes.html +4 -4
  22. data/doc/api/DXOpal/SoundEffect.html +6 -6
  23. data/doc/api/DXOpal/Sprite/CollisionArea/Base.html +5 -5
  24. data/doc/api/DXOpal/Sprite/CollisionArea/Circle.html +4 -4
  25. data/doc/api/DXOpal/Sprite/CollisionArea/Point.html +4 -4
  26. data/doc/api/DXOpal/Sprite/CollisionArea/Rect.html +4 -4
  27. data/doc/api/DXOpal/Sprite/CollisionArea/Triangle.html +4 -4
  28. data/doc/api/DXOpal/Sprite/CollisionArea.html +4 -4
  29. data/doc/api/DXOpal/Sprite/CollisionCheck/ClassMethods.html +7 -7
  30. data/doc/api/DXOpal/Sprite/CollisionCheck.html +8 -8
  31. data/doc/api/DXOpal/Sprite/Physics.html +4 -4
  32. data/doc/api/DXOpal/Sprite.html +10 -10
  33. data/doc/api/DXOpal/Window.html +120 -114
  34. data/doc/api/DXOpal.html +5 -5
  35. data/doc/api/Kernel.html +4 -4
  36. data/doc/api/_index.html +5 -5
  37. data/doc/api/file.README.html +23 -20
  38. data/doc/api/frames.html +10 -5
  39. data/doc/api/index.html +23 -20
  40. data/doc/api/method_list.html +214 -206
  41. data/doc/api/top-level-namespace.html +4 -4
  42. data/lib/dxopal/input.rb +5 -2
  43. data/lib/dxopal/remote_resource.rb +33 -1
  44. data/lib/dxopal/sound.rb +5 -2
  45. data/lib/dxopal/version.rb +1 -1
  46. data/lib/dxopal/window.rb +6 -3
  47. data/lib/dxopal.rb +1 -0
  48. metadata +3 -3
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Class: DXOpal::RemoteResource
8
8
 
9
- &mdash; Documentation by YARD 0.9.26
9
+ &mdash; Documentation by YARD 0.9.36
10
10
 
11
11
  </title>
12
12
 
@@ -102,9 +102,9 @@
102
102
  <h2>Overview</h2><div class="docstring">
103
103
  <div class="discussion">
104
104
 
105
- <p>A base class for resources acquired through JS Promises. Provides `&lt;klass&gt;.register` and `&lt;<a href="name">klass></a>`. A subclass must impelment `&lt;klass&gt;._load`.</p>
105
+ <p>A base class for resources acquired through JS Promises. Provides ‘&lt;klass&gt;.register` and `&lt;<a href="name">klass&gt;</a>`. A subclass must impelment `&lt;klass&gt;._load`.</p>
106
106
 
107
- <p>TODO: better name? (SoundEffect is not actually &#39;remote&#39;)</p>
107
+ <p>TODO: better name? (SoundEffect is not actually remote)</p>
108
108
 
109
109
 
110
110
  </div>
@@ -169,6 +169,22 @@
169
169
  <div class="tags">
170
170
 
171
171
 
172
+ </div>
173
+ </dt>
174
+ <dd><pre class="code"><span class='const'>Hash</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_h'>h</span><span class='comma'>,</span><span class='id identifier rubyid_k'>k</span><span class='op'>|</span> <span class='id identifier rubyid_h'>h</span><span class='lbracket'>[</span><span class='id identifier rubyid_k'>k</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rbrace'>}</span></pre></dd>
175
+
176
+ <dt id="loaded-classvariable" class="">@@loaded =
177
+ <div class="docstring">
178
+ <div class="discussion">
179
+
180
+ <p>‘true` if the resource is loaded</p>
181
+
182
+
183
+ </div>
184
+ </div>
185
+ <div class="tags">
186
+
187
+
172
188
  </div>
173
189
  </dt>
174
190
  <dd><pre class="code"><span class='const'>Hash</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_h'>h</span><span class='comma'>,</span><span class='id identifier rubyid_k'>k</span><span class='op'>|</span> <span class='id identifier rubyid_h'>h</span><span class='lbracket'>[</span><span class='id identifier rubyid_k'>k</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rbrace'>}</span></pre></dd>
@@ -272,7 +288,7 @@
272
288
 
273
289
 
274
290
  <span class="summary_desc"><div class='inline'>
275
- <p>Load actual content (defined on subclasses) Return `[instance, promise]`.</p>
291
+ <p>Load actual content (defined on subclasses) Return [instance, promise]`.</p>
276
292
  </div></span>
277
293
 
278
294
  </li>
@@ -299,6 +315,30 @@
299
315
  <p>Called from Window.load_resources.</p>
300
316
  </div></span>
301
317
 
318
+ </li>
319
+
320
+
321
+ <li class="public ">
322
+ <span class="summary_signature">
323
+
324
+ <a href="#_update_loading_status-class_method" title="_update_loading_status (class method)">.<strong>_update_loading_status</strong> &#x21d2; Object </a>
325
+
326
+
327
+
328
+ </span>
329
+
330
+
331
+
332
+
333
+
334
+
335
+
336
+
337
+
338
+ <span class="summary_desc"><div class='inline'>
339
+ <p>Update loading status if ‘dxopal-loading` is defined.</p>
340
+ </div></span>
341
+
302
342
  </li>
303
343
 
304
344
 
@@ -383,16 +423,16 @@
383
423
  <pre class="lines">
384
424
 
385
425
 
386
- 28
387
- 29
388
426
  30
389
427
  31
390
428
  32
391
429
  33
392
- 34</pre>
430
+ 34
431
+ 35
432
+ 36</pre>
393
433
  </td>
394
434
  <td>
395
- <pre class="code"><span class="info file"># File 'lib/dxopal/remote_resource.rb', line 28</span>
435
+ <pre class="code"><span class="info file"># File 'lib/dxopal/remote_resource.rb', line 30</span>
396
436
 
397
437
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='op'>[]</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
398
438
  <span class='kw'>if</span> <span class='lparen'>(</span><span class='id identifier rubyid_ret'>ret</span> <span class='op'>=</span> <span class='cvar'>@@instances</span><span class='lbracket'>[</span><span class='id identifier rubyid__klass_name'>_klass_name</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='id identifier rubyid_name'>name</span><span class='rbracket'>]</span><span class='rparen'>)</span>
@@ -432,12 +472,12 @@
432
472
  <pre class="lines">
433
473
 
434
474
 
435
- 63
436
- 64
437
- 65</pre>
475
+ 69
476
+ 70
477
+ 71</pre>
438
478
  </td>
439
479
  <td>
440
- <pre class="code"><span class="info file"># File 'lib/dxopal/remote_resource.rb', line 63</span>
480
+ <pre class="code"><span class="info file"># File 'lib/dxopal/remote_resource.rb', line 69</span>
441
481
 
442
482
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid__klass_name'>_klass_name</span>
443
483
  <span class='kw'>return</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>::</span><span class='regexp_end'>/</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_last'>last</span>
@@ -459,7 +499,7 @@
459
499
  </h3><div class="docstring">
460
500
  <div class="discussion">
461
501
 
462
- <p>Load actual content (defined on subclasses) Return `[instance, promise]`</p>
502
+ <p>Load actual content (defined on subclasses) Return [instance, promise]`</p>
463
503
 
464
504
 
465
505
  </div>
@@ -473,12 +513,12 @@
473
513
  <pre class="lines">
474
514
 
475
515
 
476
- 58
477
- 59
478
- 60</pre>
516
+ 64
517
+ 65
518
+ 66</pre>
479
519
  </td>
480
520
  <td>
481
- <pre class="code"><span class="info file"># File 'lib/dxopal/remote_resource.rb', line 58</span>
521
+ <pre class="code"><span class="info file"># File 'lib/dxopal/remote_resource.rb', line 64</span>
482
522
 
483
523
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid__load'>_load</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
484
524
  <span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>override me</span><span class='tstring_end'>&quot;</span></span>
@@ -514,8 +554,6 @@
514
554
  <pre class="lines">
515
555
 
516
556
 
517
- 37
518
- 38
519
557
  39
520
558
  40
521
559
  41
@@ -531,10 +569,16 @@
531
569
  51
532
570
  52
533
571
  53
534
- 54</pre>
572
+ 54
573
+ 55
574
+ 56
575
+ 57
576
+ 58
577
+ 59
578
+ 60</pre>
535
579
  </td>
536
580
  <td>
537
- <pre class="code"><span class="info file"># File 'lib/dxopal/remote_resource.rb', line 37</span>
581
+ <pre class="code"><span class="info file"># File 'lib/dxopal/remote_resource.rb', line 39</span>
538
582
 
539
583
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid__load_resources'>_load_resources</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
540
584
  <span class='cvar'>@@resources</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_klass_name'>klass_name</span><span class='comma'>,</span> <span class='id identifier rubyid_items'>items</span><span class='op'>|</span>
@@ -543,7 +587,11 @@
543
587
  <span class='kw'>if</span> <span class='op'>!</span><span class='cvar'>@@promises</span><span class='lbracket'>[</span><span class='id identifier rubyid_klass_name'>klass_name</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='id identifier rubyid_name'>name</span><span class='rbracket'>]</span>
544
588
  <span class='id identifier rubyid_instance'>instance</span><span class='comma'>,</span> <span class='id identifier rubyid_promise'>promise</span> <span class='op'>=</span> <span class='id identifier rubyid_klass'>klass</span><span class='period'>.</span><span class='id identifier rubyid__load'>_load</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block2'>block2</span><span class='rparen'>)</span>
545
589
  <span class='cvar'>@@instances</span><span class='lbracket'>[</span><span class='id identifier rubyid_klass_name'>klass_name</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='id identifier rubyid_name'>name</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_instance'>instance</span>
546
- <span class='cvar'>@@promises</span><span class='lbracket'>[</span><span class='id identifier rubyid_klass_name'>klass_name</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='id identifier rubyid_name'>name</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_promise'>promise</span>
590
+ <span class='cvar'>@@loaded</span><span class='lbracket'>[</span><span class='id identifier rubyid_klass_name'>klass_name</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='id identifier rubyid_name'>name</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='kw'>false</span>
591
+ <span class='cvar'>@@promises</span><span class='lbracket'>[</span><span class='id identifier rubyid_klass_name'>klass_name</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='id identifier rubyid_name'>name</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_promise'>promise</span><span class='period'>.</span><span class='const'>JS</span><span class='period'>.</span><span class='id identifier rubyid_then'>then</span><span class='lbrace'>{</span>
592
+ <span class='cvar'>@@loaded</span><span class='lbracket'>[</span><span class='id identifier rubyid_klass_name'>klass_name</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='id identifier rubyid_name'>name</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='kw'>true</span>
593
+ <span class='const'><span class='object_link'><a href="" title="DXOpal::RemoteResource (class)">RemoteResource</a></span></span><span class='period'>.</span><span class='id identifier rubyid__update_loading_status'><span class='object_link'><a href="#_update_loading_status-class_method" title="DXOpal::RemoteResource._update_loading_status (method)">_update_loading_status</a></span></span>
594
+ <span class='rbrace'>}</span>
547
595
  <span class='kw'>end</span>
548
596
  <span class='kw'>end</span>
549
597
  <span class='kw'>end</span>
@@ -557,6 +605,89 @@
557
605
  </td>
558
606
  </tr>
559
607
  </table>
608
+ </div>
609
+
610
+ <div class="method_details ">
611
+ <h3 class="signature " id="_update_loading_status-class_method">
612
+
613
+ .<strong>_update_loading_status</strong> &#x21d2; <tt>Object</tt>
614
+
615
+
616
+
617
+
618
+
619
+ </h3><div class="docstring">
620
+ <div class="discussion">
621
+
622
+ <p>Update loading status if ‘dxopal-loading` is defined.</p>
623
+
624
+
625
+ </div>
626
+ </div>
627
+ <div class="tags">
628
+
629
+
630
+ </div><table class="source_code">
631
+ <tr>
632
+ <td>
633
+ <pre class="lines">
634
+
635
+
636
+ 74
637
+ 75
638
+ 76
639
+ 77
640
+ 78
641
+ 79
642
+ 80
643
+ 81
644
+ 82
645
+ 83
646
+ 84
647
+ 85
648
+ 86
649
+ 87
650
+ 88
651
+ 89
652
+ 90
653
+ 91
654
+ 92
655
+ 93
656
+ 94
657
+ 95
658
+ 96
659
+ 97</pre>
660
+ </td>
661
+ <td>
662
+ <pre class="code"><span class="info file"># File 'lib/dxopal/remote_resource.rb', line 74</span>
663
+
664
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid__update_loading_status'>_update_loading_status</span>
665
+ <span class='id identifier rubyid_done'>done</span> <span class='op'>=</span> <span class='kw'>true</span>
666
+ <span class='id identifier rubyid_report'>report</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>DXOpal loading...\n</span><span class='tstring_end'>&quot;</span></span> <span class='op'>+</span>
667
+ <span class='cvar'>@@promises</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_klass_name'>klass_name</span><span class='comma'>,</span> <span class='id identifier rubyid_promises'>promises</span><span class='op'>|</span>
668
+ <span class='id identifier rubyid_n_total'>n_total</span> <span class='op'>=</span> <span class='cvar'>@@resources</span><span class='lbracket'>[</span><span class='id identifier rubyid_klass_name'>klass_name</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_count'>count</span>
669
+ <span class='id identifier rubyid_n_loaded'>n_loaded</span> <span class='op'>=</span> <span class='cvar'>@@loaded</span><span class='lbracket'>[</span><span class='id identifier rubyid_klass_name'>klass_name</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_values'>values</span><span class='period'>.</span><span class='id identifier rubyid_count'>count</span><span class='lparen'>(</span><span class='kw'>true</span><span class='rparen'>)</span>
670
+ <span class='id identifier rubyid_done'>done</span> <span class='op'>=</span> <span class='kw'>false</span> <span class='kw'>if</span> <span class='id identifier rubyid_n_loaded'>n_loaded</span> <span class='op'>&lt;</span> <span class='id identifier rubyid_n_total'>n_total</span>
671
+ <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_klass_name'>klass_name</span><span class='embexpr_end'>}</span><span class='tstring_content'>: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_n_loaded'>n_loaded</span><span class='embexpr_end'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_n_total'>n_total</span><span class='embexpr_end'>}</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span>
672
+ <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span>
673
+ <span class='id identifier rubyid_div'>div</span> <span class='op'>=</span> <span class='backtick'>`</span><span class='tstring_content'>document.getElementById(&#39;dxopal-loading&#39;)</span><span class='tstring_end'>`</span></span>
674
+ <span class='kw'>if</span> <span class='backtick'>`</span><span class='tstring_content'>div</span><span class='tstring_end'>`</span></span>
675
+ <span class='backtick'>%x{</span><span class='tstring_content'>
676
+ let pre = div.firstChild;
677
+ if (!pre) {
678
+ pre = document.createElement(&#39;pre&#39;);
679
+ div.appendChild(pre);
680
+ }
681
+ pre.textContent = </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_report'>report</span><span class='embexpr_end'>}</span><span class='tstring_content'>;
682
+ if (</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_done'>done</span><span class='embexpr_end'>}</span><span class='tstring_content'>) {
683
+ div.style.display = &#39;none&#39;;
684
+ }
685
+ </span><span class='tstring_end'>}</span></span>
686
+ <span class='kw'>end</span>
687
+ <span class='kw'>end</span></pre>
688
+ </td>
689
+ </tr>
690
+ </table>
560
691
  </div>
561
692
 
562
693
  <div class="method_details ">
@@ -574,12 +705,12 @@
574
705
  <pre class="lines">
575
706
 
576
707
 
577
- 17
578
- 18
579
- 19</pre>
708
+ 19
709
+ 20
710
+ 21</pre>
580
711
  </td>
581
712
  <td>
582
- <pre class="code"><span class="info file"># File 'lib/dxopal/remote_resource.rb', line 17</span>
713
+ <pre class="code"><span class="info file"># File 'lib/dxopal/remote_resource.rb', line 19</span>
583
714
 
584
715
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_add_class'>add_class</span><span class='lparen'>(</span><span class='id identifier rubyid_subklass'>subklass</span><span class='rparen'>)</span>
585
716
  <span class='cvar'>@@klasses</span><span class='lbracket'>[</span><span class='id identifier rubyid_subklass'>subklass</span><span class='period'>.</span><span class='id identifier rubyid__klass_name'>_klass_name</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_subklass'>subklass</span>
@@ -615,13 +746,13 @@
615
746
  <pre class="lines">
616
747
 
617
748
 
618
- 22
619
- 23
620
749
  24
621
- 25</pre>
750
+ 25
751
+ 26
752
+ 27</pre>
622
753
  </td>
623
754
  <td>
624
- <pre class="code"><span class="info file"># File 'lib/dxopal/remote_resource.rb', line 22</span>
755
+ <pre class="code"><span class="info file"># File 'lib/dxopal/remote_resource.rb', line 24</span>
625
756
 
626
757
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_register'>register</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
627
758
  <span class='cvar'>@@resources</span><span class='lbracket'>[</span><span class='id identifier rubyid__klass_name'>_klass_name</span><span class='rbracket'>]</span> <span class='op'>||=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
@@ -637,9 +768,9 @@
637
768
  </div>
638
769
 
639
770
  <div id="footer">
640
- Generated on Tue Dec 29 11:37:24 2020 by
641
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
642
- 0.9.26 (ruby-2.7.0).
771
+ Generated on Tue Jul 9 22:42:34 2024 by
772
+ <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
773
+ 0.9.36 (ruby-3.2.2).
643
774
  </div>
644
775
 
645
776
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Class: DXOpal::Sound
8
8
 
9
- &mdash; Documentation by YARD 0.9.26
9
+ &mdash; Documentation by YARD 0.9.36
10
10
 
11
11
  </title>
12
12
 
@@ -238,7 +238,7 @@
238
238
  <li class="public ">
239
239
  <span class="summary_signature">
240
240
 
241
- <a href="#play-instance_method" title="#play (instance method)">#<strong>play</strong> &#x21d2; Object </a>
241
+ <a href="#play-instance_method" title="#play (instance method)">#<strong>play</strong>(loop_ = false) &#x21d2; Object </a>
242
242
 
243
243
 
244
244
 
@@ -253,7 +253,7 @@
253
253
 
254
254
 
255
255
  <span class="summary_desc"><div class='inline'>
256
- <p>Play this sound once.</p>
256
+ <p>Play this sound.</p>
257
257
  </div></span>
258
258
 
259
259
  </li>
@@ -296,7 +296,7 @@
296
296
 
297
297
 
298
298
  <h3 class="inherited">Methods inherited from <span class='object_link'><a href="RemoteResource.html" title="DXOpal::RemoteResource (class)">RemoteResource</a></span></h3>
299
- <p class="inherited"><span class='object_link'><a href="RemoteResource.html#[]-class_method" title="DXOpal::RemoteResource.[] (method)">[]</a></span>, <span class='object_link'><a href="RemoteResource.html#_klass_name-class_method" title="DXOpal::RemoteResource._klass_name (method)">_klass_name</a></span>, <span class='object_link'><a href="RemoteResource.html#_load_resources-class_method" title="DXOpal::RemoteResource._load_resources (method)">_load_resources</a></span>, <span class='object_link'><a href="RemoteResource.html#add_class-class_method" title="DXOpal::RemoteResource.add_class (method)">add_class</a></span>, <span class='object_link'><a href="RemoteResource.html#register-class_method" title="DXOpal::RemoteResource.register (method)">register</a></span></p>
299
+ <p class="inherited"><span class='object_link'><a href="RemoteResource.html#[]-class_method" title="DXOpal::RemoteResource.[] (method)">[]</a></span>, <span class='object_link'><a href="RemoteResource.html#_klass_name-class_method" title="DXOpal::RemoteResource._klass_name (method)">_klass_name</a></span>, <span class='object_link'><a href="RemoteResource.html#_load_resources-class_method" title="DXOpal::RemoteResource._load_resources (method)">_load_resources</a></span>, <span class='object_link'><a href="RemoteResource.html#_update_loading_status-class_method" title="DXOpal::RemoteResource._update_loading_status (method)">_update_loading_status</a></span>, <span class='object_link'><a href="RemoteResource.html#add_class-class_method" title="DXOpal::RemoteResource.add_class (method)">add_class</a></span>, <span class='object_link'><a href="RemoteResource.html#register-class_method" title="DXOpal::RemoteResource.register (method)">register</a></span></p>
300
300
  <div id="constructor_details" class="method_details_list">
301
301
  <h2>Constructor Details</h2>
302
302
 
@@ -525,7 +525,7 @@
525
525
  <div class="method_details first">
526
526
  <h3 class="signature first" id="play-instance_method">
527
527
 
528
- #<strong>play</strong> &#x21d2; <tt>Object</tt>
528
+ #<strong>play</strong>(loop_ = false) &#x21d2; <tt>Object</tt>
529
529
 
530
530
 
531
531
 
@@ -534,7 +534,7 @@
534
534
  </h3><div class="docstring">
535
535
  <div class="discussion">
536
536
 
537
- <p>Play this sound once</p>
537
+ <p>Play this sound</p>
538
538
 
539
539
 
540
540
  </div>
@@ -559,18 +559,24 @@
559
559
  50
560
560
  51
561
561
  52
562
- 53</pre>
562
+ 53
563
+ 54
564
+ 55
565
+ 56</pre>
563
566
  </td>
564
567
  <td>
565
568
  <pre class="code"><span class="info file"># File 'lib/dxopal/sound.rb', line 42</span>
566
569
 
567
- <span class='kw'>def</span> <span class='id identifier rubyid_play'>play</span>
570
+ <span class='kw'>def</span> <span class='id identifier rubyid_play'>play</span><span class='lparen'>(</span><span class='id identifier rubyid_loop_'>loop_</span> <span class='op'>=</span> <span class='kw'>false</span><span class='rparen'>)</span>
568
571
  <span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Sound </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_path_or_url'>path_or_url</span><span class='embexpr_end'>}</span><span class='tstring_content'> is not loaded yet</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>unless</span> <span class='ivar'>@decoded</span>
569
572
  <span class='id identifier rubyid_source'>source</span> <span class='op'>=</span> <span class='kw'>nil</span>
570
573
  <span class='backtick'>%x{</span><span class='tstring_content'>
571
574
  var context = </span><span class='embexpr_beg'>#{</span><span class='const'><span class='object_link'><a href="" title="DXOpal::Sound (class)">Sound</a></span></span><span class='period'>.</span><span class='id identifier rubyid_audio_context'><span class='object_link'><a href="#audio_context-class_method" title="DXOpal::Sound.audio_context (method)">audio_context</a></span></span><span class='embexpr_end'>}</span><span class='tstring_content'>;
572
575
  source = context.createBufferSource();
573
576
  source.buffer = </span><span class='embexpr_beg'>#{</span><span class='ivar'>@decoded</span><span class='embexpr_end'>}</span><span class='tstring_content'>;
577
+ if (</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_loop_'>loop_</span><span class='embexpr_end'>}</span><span class='tstring_content'>) {
578
+ source.loop = true;
579
+ }
574
580
  source.connect(context.destination);
575
581
  source.start(0);
576
582
  </span><span class='tstring_end'>}</span></span>
@@ -607,14 +613,14 @@
607
613
  <pre class="lines">
608
614
 
609
615
 
610
- 56
611
- 57
612
- 58
613
616
  59
614
- 60</pre>
617
+ 60
618
+ 61
619
+ 62
620
+ 63</pre>
615
621
  </td>
616
622
  <td>
617
- <pre class="code"><span class="info file"># File 'lib/dxopal/sound.rb', line 56</span>
623
+ <pre class="code"><span class="info file"># File 'lib/dxopal/sound.rb', line 59</span>
618
624
 
619
625
  <span class='kw'>def</span> <span class='id identifier rubyid_stop'>stop</span>
620
626
  <span class='kw'>return</span> <span class='kw'>unless</span> <span class='ivar'>@decoded</span>
@@ -631,9 +637,9 @@
631
637
  </div>
632
638
 
633
639
  <div id="footer">
634
- Generated on Tue Dec 29 11:37:24 2020 by
635
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
636
- 0.9.26 (ruby-2.7.0).
640
+ Generated on Tue Jul 9 22:42:34 2024 by
641
+ <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
642
+ 0.9.36 (ruby-3.2.2).
637
643
  </div>
638
644
 
639
645
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Module: DXOpal::SoundEffect::WaveTypes
8
8
 
9
- &mdash; Documentation by YARD 0.9.26
9
+ &mdash; Documentation by YARD 0.9.36
10
10
 
11
11
  </title>
12
12
 
@@ -126,9 +126,9 @@
126
126
  </div>
127
127
 
128
128
  <div id="footer">
129
- Generated on Tue Dec 29 11:37:22 2020 by
130
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
131
- 0.9.26 (ruby-2.7.0).
129
+ Generated on Tue Jul 9 22:42:33 2024 by
130
+ <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
131
+ 0.9.36 (ruby-3.2.2).
132
132
  </div>
133
133
 
134
134
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Class: DXOpal::SoundEffect
8
8
 
9
- &mdash; Documentation by YARD 0.9.26
9
+ &mdash; Documentation by YARD 0.9.36
10
10
 
11
11
  </title>
12
12
 
@@ -173,7 +173,7 @@
173
173
 
174
174
 
175
175
  <span class="summary_desc"><div class='inline'>
176
- <p>time : Total number of ticks When resolution=1000(default), `time` is equivalent to the total length of the sound in milliseconds.</p>
176
+ <p>time : Total number of ticks When resolution=1000(default), time` is equivalent to the total length of the sound in milliseconds.</p>
177
177
  </div></span>
178
178
 
179
179
  </li>
@@ -234,7 +234,7 @@
234
234
 
235
235
 
236
236
  <h3 class="inherited">Methods inherited from <span class='object_link'><a href="RemoteResource.html" title="DXOpal::RemoteResource (class)">RemoteResource</a></span></h3>
237
- <p class="inherited"><span class='object_link'><a href="RemoteResource.html#[]-class_method" title="DXOpal::RemoteResource.[] (method)">[]</a></span>, <span class='object_link'><a href="RemoteResource.html#_klass_name-class_method" title="DXOpal::RemoteResource._klass_name (method)">_klass_name</a></span>, <span class='object_link'><a href="RemoteResource.html#_load_resources-class_method" title="DXOpal::RemoteResource._load_resources (method)">_load_resources</a></span>, <span class='object_link'><a href="RemoteResource.html#add_class-class_method" title="DXOpal::RemoteResource.add_class (method)">add_class</a></span>, <span class='object_link'><a href="RemoteResource.html#register-class_method" title="DXOpal::RemoteResource.register (method)">register</a></span></p>
237
+ <p class="inherited"><span class='object_link'><a href="RemoteResource.html#[]-class_method" title="DXOpal::RemoteResource.[] (method)">[]</a></span>, <span class='object_link'><a href="RemoteResource.html#_klass_name-class_method" title="DXOpal::RemoteResource._klass_name (method)">_klass_name</a></span>, <span class='object_link'><a href="RemoteResource.html#_load_resources-class_method" title="DXOpal::RemoteResource._load_resources (method)">_load_resources</a></span>, <span class='object_link'><a href="RemoteResource.html#_update_loading_status-class_method" title="DXOpal::RemoteResource._update_loading_status (method)">_update_loading_status</a></span>, <span class='object_link'><a href="RemoteResource.html#add_class-class_method" title="DXOpal::RemoteResource.add_class (method)">add_class</a></span>, <span class='object_link'><a href="RemoteResource.html#register-class_method" title="DXOpal::RemoteResource.register (method)">register</a></span></p>
238
238
  <div id="constructor_details" class="method_details_list">
239
239
  <h2>Constructor Details</h2>
240
240
 
@@ -437,9 +437,9 @@ total length of the sound in milliseconds.
437
437
  </div>
438
438
 
439
439
  <div id="footer">
440
- Generated on Tue Dec 29 11:37:24 2020 by
441
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
442
- 0.9.26 (ruby-2.7.0).
440
+ Generated on Tue Jul 9 22:42:34 2024 by
441
+ <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
442
+ 0.9.36 (ruby-3.2.2).
443
443
  </div>
444
444
 
445
445
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Class: DXOpal::Sprite::CollisionArea::Base
8
8
 
9
- &mdash; Documentation by YARD 0.9.26
9
+ &mdash; Documentation by YARD 0.9.36
10
10
 
11
11
  </title>
12
12
 
@@ -605,7 +605,7 @@
605
605
  </h3><div class="docstring">
606
606
  <div class="discussion">
607
607
 
608
- <p>Return a string like “Point”, “Rect”, etc. Used for type checking in `collides?` (because Opal&#39;s Class#is_a? is not very fast)</p>
608
+ <p>Return a string like “Point”, “Rect”, etc. Used for type checking in collides?` (because Opals Class#is_a? is not very fast)</p>
609
609
 
610
610
 
611
611
  </div>
@@ -639,9 +639,9 @@
639
639
  </div>
640
640
 
641
641
  <div id="footer">
642
- Generated on Tue Dec 29 11:37:25 2020 by
643
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
644
- 0.9.26 (ruby-2.7.0).
642
+ Generated on Tue Jul 9 22:42:34 2024 by
643
+ <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
644
+ 0.9.36 (ruby-3.2.2).
645
645
  </div>
646
646
 
647
647
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Class: DXOpal::Sprite::CollisionArea::Circle
8
8
 
9
- &mdash; Documentation by YARD 0.9.26
9
+ &mdash; Documentation by YARD 0.9.36
10
10
 
11
11
  </title>
12
12
 
@@ -646,9 +646,9 @@
646
646
  </div>
647
647
 
648
648
  <div id="footer">
649
- Generated on Tue Dec 29 11:37:25 2020 by
650
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
651
- 0.9.26 (ruby-2.7.0).
649
+ Generated on Tue Jul 9 22:42:34 2024 by
650
+ <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
651
+ 0.9.36 (ruby-3.2.2).
652
652
  </div>
653
653
 
654
654
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Class: DXOpal::Sprite::CollisionArea::Point
8
8
 
9
- &mdash; Documentation by YARD 0.9.26
9
+ &mdash; Documentation by YARD 0.9.36
10
10
 
11
11
  </title>
12
12
 
@@ -438,9 +438,9 @@
438
438
  </div>
439
439
 
440
440
  <div id="footer">
441
- Generated on Tue Dec 29 11:37:25 2020 by
442
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
443
- 0.9.26 (ruby-2.7.0).
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
444
  </div>
445
445
 
446
446
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Class: DXOpal::Sprite::CollisionArea::Rect
8
8
 
9
- &mdash; Documentation by YARD 0.9.26
9
+ &mdash; Documentation by YARD 0.9.36
10
10
 
11
11
  </title>
12
12
 
@@ -539,9 +539,9 @@
539
539
  </div>
540
540
 
541
541
  <div id="footer">
542
- Generated on Tue Dec 29 11:37:25 2020 by
543
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
544
- 0.9.26 (ruby-2.7.0).
542
+ Generated on Tue Jul 9 22:42:34 2024 by
543
+ <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
544
+ 0.9.36 (ruby-3.2.2).
545
545
  </div>
546
546
 
547
547
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Class: DXOpal::Sprite::CollisionArea::Triangle
8
8
 
9
- &mdash; Documentation by YARD 0.9.26
9
+ &mdash; Documentation by YARD 0.9.36
10
10
 
11
11
  </title>
12
12
 
@@ -413,9 +413,9 @@
413
413
  </div>
414
414
 
415
415
  <div id="footer">
416
- Generated on Tue Dec 29 11:37:26 2020 by
417
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
418
- 0.9.26 (ruby-2.7.0).
416
+ Generated on Tue Jul 9 22:42:34 2024 by
417
+ <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
418
+ 0.9.36 (ruby-3.2.2).
419
419
  </div>
420
420
 
421
421
  </div>