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
@@ -6,15 +6,15 @@
6
6
  <title>
7
7
  Class: DXOpal::RemoteResource
8
8
 
9
- &mdash; Documentation by YARD 0.9.16
9
+ &mdash; Documentation by YARD 0.9.36
10
10
 
11
11
  </title>
12
12
 
13
- <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" />
14
14
 
15
- <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" />
16
16
 
17
- <script type="text/javascript" charset="utf-8">
17
+ <script type="text/javascript">
18
18
  pathId = "DXOpal::RemoteResource";
19
19
  relpath = '../';
20
20
  </script>
@@ -94,7 +94,7 @@
94
94
 
95
95
  <dl>
96
96
  <dt>Defined in:</dt>
97
- <dd>opal/dxopal/remote_resource.rb</dd>
97
+ <dd>lib/dxopal/remote_resource.rb</dd>
98
98
  </dl>
99
99
 
100
100
  </div>
@@ -102,11 +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
106
- `&lt;klass&gt;.register` and `&lt;<a href="name">klass></a>`. A subclass
107
- 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>
108
106
 
109
- <p>TODO: better name? (SoundEffect is not actually &#39;remote&#39;)</p>
107
+ <p>TODO: better name? (SoundEffect is not actually remote)</p>
110
108
 
111
109
 
112
110
  </div>
@@ -171,6 +169,22 @@ must impelment `&lt;klass&gt;._load`.</p>
171
169
  <div class="tags">
172
170
 
173
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
+
174
188
  </div>
175
189
  </dt>
176
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>
@@ -274,7 +288,7 @@ must impelment `&lt;klass&gt;._load`.</p>
274
288
 
275
289
 
276
290
  <span class="summary_desc"><div class='inline'>
277
- <p>Load actual content (defined on subclasses) Return `[instance, promise]`.</p>
291
+ <p>Load actual content (defined on subclasses) Return [instance, promise]`.</p>
278
292
  </div></span>
279
293
 
280
294
  </li>
@@ -301,6 +315,30 @@ must impelment `&lt;klass&gt;._load`.</p>
301
315
  <p>Called from Window.load_resources.</p>
302
316
  </div></span>
303
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
+
304
342
  </li>
305
343
 
306
344
 
@@ -385,16 +423,16 @@ must impelment `&lt;klass&gt;._load`.</p>
385
423
  <pre class="lines">
386
424
 
387
425
 
388
- 28
389
- 29
390
426
  30
391
427
  31
392
428
  32
393
429
  33
394
- 34</pre>
430
+ 34
431
+ 35
432
+ 36</pre>
395
433
  </td>
396
434
  <td>
397
- <pre class="code"><span class="info file"># File 'opal/dxopal/remote_resource.rb', line 28</span>
435
+ <pre class="code"><span class="info file"># File 'lib/dxopal/remote_resource.rb', line 30</span>
398
436
 
399
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>
400
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>
@@ -434,12 +472,12 @@ must impelment `&lt;klass&gt;._load`.</p>
434
472
  <pre class="lines">
435
473
 
436
474
 
437
- 63
438
- 64
439
- 65</pre>
475
+ 69
476
+ 70
477
+ 71</pre>
440
478
  </td>
441
479
  <td>
442
- <pre class="code"><span class="info file"># File 'opal/dxopal/remote_resource.rb', line 63</span>
480
+ <pre class="code"><span class="info file"># File 'lib/dxopal/remote_resource.rb', line 69</span>
443
481
 
444
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>
445
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>
@@ -461,7 +499,7 @@ must impelment `&lt;klass&gt;._load`.</p>
461
499
  </h3><div class="docstring">
462
500
  <div class="discussion">
463
501
 
464
- <p>Load actual content (defined on subclasses) Return `[instance, promise]`</p>
502
+ <p>Load actual content (defined on subclasses) Return [instance, promise]`</p>
465
503
 
466
504
 
467
505
  </div>
@@ -475,12 +513,12 @@ must impelment `&lt;klass&gt;._load`.</p>
475
513
  <pre class="lines">
476
514
 
477
515
 
478
- 58
479
- 59
480
- 60</pre>
516
+ 64
517
+ 65
518
+ 66</pre>
481
519
  </td>
482
520
  <td>
483
- <pre class="code"><span class="info file"># File 'opal/dxopal/remote_resource.rb', line 58</span>
521
+ <pre class="code"><span class="info file"># File 'lib/dxopal/remote_resource.rb', line 64</span>
484
522
 
485
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>
486
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>
@@ -516,8 +554,6 @@ must impelment `&lt;klass&gt;._load`.</p>
516
554
  <pre class="lines">
517
555
 
518
556
 
519
- 37
520
- 38
521
557
  39
522
558
  40
523
559
  41
@@ -533,19 +569,29 @@ must impelment `&lt;klass&gt;._load`.</p>
533
569
  51
534
570
  52
535
571
  53
536
- 54</pre>
572
+ 54
573
+ 55
574
+ 56
575
+ 57
576
+ 58
577
+ 59
578
+ 60</pre>
537
579
  </td>
538
580
  <td>
539
- <pre class="code"><span class="info file"># File 'opal/dxopal/remote_resource.rb', line 37</span>
581
+ <pre class="code"><span class="info file"># File 'lib/dxopal/remote_resource.rb', line 39</span>
540
582
 
541
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>
542
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
585
  <span class='id identifier rubyid_klass'>klass</span> <span class='op'>=</span> <span class='cvar'>@@klasses</span><span class='lbracket'>[</span><span class='id identifier rubyid_klass_name'>klass_name</span><span class='rbracket'>]</span>
544
- <span class='id identifier rubyid_items'>items</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_name'>name</span><span class='comma'>,</span> <span class='lparen'>(</span><span class='id identifier rubyid_block'>block</span><span class='comma'>,</span> <span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span><span class='op'>|</span>
586
+ <span class='id identifier rubyid_items'>items</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_name'>name</span><span class='comma'>,</span> <span class='lparen'>(</span><span class='id identifier rubyid_block2'>block2</span><span class='comma'>,</span> <span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span><span class='op'>|</span>
545
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>
546
- <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_block'>block</span><span class='rparen'>)</span>
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>
547
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>
548
- <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>
549
595
  <span class='kw'>end</span>
550
596
  <span class='kw'>end</span>
551
597
  <span class='kw'>end</span>
@@ -559,6 +605,89 @@ must impelment `&lt;klass&gt;._load`.</p>
559
605
  </td>
560
606
  </tr>
561
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>
562
691
  </div>
563
692
 
564
693
  <div class="method_details ">
@@ -576,12 +705,12 @@ must impelment `&lt;klass&gt;._load`.</p>
576
705
  <pre class="lines">
577
706
 
578
707
 
579
- 17
580
- 18
581
- 19</pre>
708
+ 19
709
+ 20
710
+ 21</pre>
582
711
  </td>
583
712
  <td>
584
- <pre class="code"><span class="info file"># File 'opal/dxopal/remote_resource.rb', line 17</span>
713
+ <pre class="code"><span class="info file"># File 'lib/dxopal/remote_resource.rb', line 19</span>
585
714
 
586
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>
587
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>
@@ -617,13 +746,13 @@ must impelment `&lt;klass&gt;._load`.</p>
617
746
  <pre class="lines">
618
747
 
619
748
 
620
- 22
621
- 23
622
749
  24
623
- 25</pre>
750
+ 25
751
+ 26
752
+ 27</pre>
624
753
  </td>
625
754
  <td>
626
- <pre class="code"><span class="info file"># File 'opal/dxopal/remote_resource.rb', line 22</span>
755
+ <pre class="code"><span class="info file"># File 'lib/dxopal/remote_resource.rb', line 24</span>
627
756
 
628
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>
629
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>
@@ -639,9 +768,9 @@ must impelment `&lt;klass&gt;._load`.</p>
639
768
  </div>
640
769
 
641
770
  <div id="footer">
642
- Generated on Sat Sep 29 15:56:48 2018 by
643
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
644
- 0.9.16 (ruby-2.5.1).
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).
645
774
  </div>
646
775
 
647
776
  </div>
@@ -6,15 +6,15 @@
6
6
  <title>
7
7
  Class: DXOpal::Sound
8
8
 
9
- &mdash; Documentation by YARD 0.9.16
9
+ &mdash; Documentation by YARD 0.9.36
10
10
 
11
11
  </title>
12
12
 
13
- <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" />
14
14
 
15
- <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" />
16
16
 
17
- <script type="text/javascript" charset="utf-8">
17
+ <script type="text/javascript">
18
18
  pathId = "DXOpal::Sound";
19
19
  relpath = '../';
20
20
  </script>
@@ -96,7 +96,7 @@
96
96
 
97
97
  <dl>
98
98
  <dt>Defined in:</dt>
99
- <dd>opal/dxopal/sound.rb</dd>
99
+ <dd>lib/dxopal/sound.rb</dd>
100
100
  </dl>
101
101
 
102
102
  </div>
@@ -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
 
@@ -312,7 +312,7 @@
312
312
  </h3><div class="docstring">
313
313
  <div class="discussion">
314
314
 
315
- <p>Returns a new instance of Sound</p>
315
+ <p>Returns a new instance of Sound.</p>
316
316
 
317
317
 
318
318
  </div>
@@ -331,7 +331,7 @@
331
331
  38</pre>
332
332
  </td>
333
333
  <td>
334
- <pre class="code"><span class="info file"># File 'opal/dxopal/sound.rb', line 36</span>
334
+ <pre class="code"><span class="info file"># File 'lib/dxopal/sound.rb', line 36</span>
335
335
 
336
336
  <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_path_or_url'>path_or_url</span><span class='rparen'>)</span>
337
337
  <span class='ivar'>@path_or_url</span> <span class='op'>=</span> <span class='id identifier rubyid_path_or_url'>path_or_url</span> <span class='comment'># Used in error message
@@ -360,7 +360,7 @@
360
360
  </h3><div class="docstring">
361
361
  <div class="discussion">
362
362
 
363
- <p>Returns the value of attribute decoded</p>
363
+ <p>Returns the value of attribute decoded.</p>
364
364
 
365
365
 
366
366
  </div>
@@ -379,7 +379,7 @@
379
379
  41</pre>
380
380
  </td>
381
381
  <td>
382
- <pre class="code"><span class="info file"># File 'opal/dxopal/sound.rb', line 39</span>
382
+ <pre class="code"><span class="info file"># File 'lib/dxopal/sound.rb', line 39</span>
383
383
 
384
384
  <span class='kw'>def</span> <span class='id identifier rubyid_decoded'>decoded</span>
385
385
  <span class='ivar'>@decoded</span>
@@ -444,7 +444,7 @@
444
444
  34</pre>
445
445
  </td>
446
446
  <td>
447
- <pre class="code"><span class="info file"># File 'opal/dxopal/sound.rb', line 15</span>
447
+ <pre class="code"><span class="info file"># File 'lib/dxopal/sound.rb', line 15</span>
448
448
 
449
449
  <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='id identifier rubyid_path_or_url'>path_or_url</span><span class='rparen'>)</span>
450
450
  <span class='id identifier rubyid_snd'>snd</span> <span class='op'>=</span> <span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_path_or_url'>path_or_url</span><span class='rparen'>)</span>
@@ -504,7 +504,7 @@
504
504
  12</pre>
505
505
  </td>
506
506
  <td>
507
- <pre class="code"><span class="info file"># File 'opal/dxopal/sound.rb', line 8</span>
507
+ <pre class="code"><span class="info file"># File 'lib/dxopal/sound.rb', line 8</span>
508
508
 
509
509
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_audio_context'>audio_context</span>
510
510
  <span class='cvar'>@@audio_context</span> <span class='op'>||=</span> <span class='backtick'>%x{</span><span class='tstring_content'>
@@ -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
- <pre class="code"><span class="info file"># File 'opal/dxopal/sound.rb', line 42</span>
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 'opal/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 Sat Sep 29 15:56:48 2018 by
635
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
636
- 0.9.16 (ruby-2.5.1).
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,15 +6,15 @@
6
6
  <title>
7
7
  Module: DXOpal::SoundEffect::WaveTypes
8
8
 
9
- &mdash; Documentation by YARD 0.9.16
9
+ &mdash; Documentation by YARD 0.9.36
10
10
 
11
11
  </title>
12
12
 
13
- <link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
13
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" />
14
14
 
15
- <link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
15
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" />
16
16
 
17
- <script type="text/javascript" charset="utf-8">
17
+ <script type="text/javascript">
18
18
  pathId = "DXOpal::SoundEffect::WaveTypes";
19
19
  relpath = '../../';
20
20
  </script>
@@ -78,7 +78,7 @@
78
78
 
79
79
  <dl>
80
80
  <dt>Defined in:</dt>
81
- <dd>opal/dxopal/sound_effect.rb</dd>
81
+ <dd>lib/dxopal/sound_effect.rb</dd>
82
82
  </dl>
83
83
 
84
84
  </div>
@@ -126,9 +126,9 @@
126
126
  </div>
127
127
 
128
128
  <div id="footer">
129
- Generated on Sat Sep 29 15:56:47 2018 by
130
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
131
- 0.9.16 (ruby-2.5.1).
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>