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
  Module: DXOpal::Window
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::Window";
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/window.rb</dd>
81
+ <dd>lib/dxopal/window.rb</dd>
82
82
  </dl>
83
83
 
84
84
  </div>
@@ -97,6 +97,16 @@
97
97
  </dt>
98
98
  <dd><pre class="code"><span class='int'>60</span></pre></dd>
99
99
 
100
+ <dt id="fps_ts-classvariable" class="">@@fps_ts =
101
+
102
+ </dt>
103
+ <dd><pre class="code"><span class='kw'>nil</span></pre></dd>
104
+
105
+ <dt id="fps_ct-classvariable" class="">@@fps_ct =
106
+
107
+ </dt>
108
+ <dd><pre class="code"><span class='int'>0</span></pre></dd>
109
+
100
110
  <dt id="real_fps-classvariable" class="">@@real_fps =
101
111
 
102
112
  </dt>
@@ -135,7 +145,7 @@
135
145
  <dt id="bgcolor-classvariable" class="">@@bgcolor =
136
146
 
137
147
  </dt>
138
- <dd><pre class="code"><span class='const'>Constants</span><span class='op'>::</span><span class='const'>Colors</span><span class='op'>::</span><span class='const'>C_BLACK</span></pre></dd>
148
+ <dd><pre class="code"><span class='const'><span class='object_link'><a href="Constants.html" title="DXOpal::Constants (module)">Constants</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Constants/Colors.html" title="DXOpal::Constants::Colors (module)">Colors</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Constants/Colors.html#C_BLACK-constant" title="DXOpal::Constants::Colors::C_BLACK (constant)">C_BLACK</a></span></span></pre></dd>
139
149
 
140
150
  </dl>
141
151
 
@@ -181,7 +191,7 @@
181
191
  <li class="public ">
182
192
  <span class="summary_signature">
183
193
 
184
- <a href="#_init-class_method" title="_init (class method)">.<strong>_init</strong>(w, h) &#x21d2; Object </a>
194
+ <a href="#_init-class_method" title="_init (class method)">.<strong>_init</strong> &#x21d2; Object </a>
185
195
 
186
196
 
187
197
 
@@ -203,7 +213,7 @@
203
213
  <li class="public ">
204
214
  <span class="summary_signature">
205
215
 
206
- <a href="#_loop-class_method" title="_loop (class method)">.<strong>_loop</strong>(time = 0) &#x21d2; Object </a>
216
+ <a href="#_loop-class_method" title="_loop (class method)">.<strong>_loop</strong>(timestamp) &#x21d2; Object </a>
207
217
 
208
218
 
209
219
 
@@ -683,7 +693,9 @@
683
693
 
684
694
 
685
695
 
686
- <span class="summary_desc"><div class='inline'></div></span>
696
+ <span class="summary_desc"><div class='inline'>
697
+ <p>Set window height and resize the canvas Set ‘nil` to maximize canvas.</p>
698
+ </div></span>
687
699
 
688
700
  </li>
689
701
 
@@ -706,8 +718,7 @@
706
718
 
707
719
 
708
720
  <span class="summary_desc"><div class='inline'>
709
- <p>Load resources specified with Image.register or Sound.register Call block
710
- when loaded.</p>
721
+ <p>Load resources specified with Image.register or Sound.register Call block when loaded.</p>
711
722
  </div></span>
712
723
 
713
724
  </li>
@@ -866,7 +877,9 @@ when loaded.</p>
866
877
 
867
878
 
868
879
 
869
- <span class="summary_desc"><div class='inline'></div></span>
880
+ <span class="summary_desc"><div class='inline'>
881
+ <p>Set window width and resize the canvas Set ‘nil` to maximize canvas.</p>
882
+ </div></span>
870
883
 
871
884
  </li>
872
885
 
@@ -906,10 +919,10 @@ when loaded.</p>
906
919
  <pre class="lines">
907
920
 
908
921
 
909
- 110</pre>
922
+ 130</pre>
910
923
  </td>
911
924
  <td>
912
- <pre class="code"><span class="info file"># File 'opal/dxopal/window.rb', line 110</span>
925
+ <pre class="code"><span class="info file"># File 'lib/dxopal/window.rb', line 130</span>
913
926
 
914
927
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid__img'>_img</span><span class='semicolon'>;</span> <span class='cvar'>@@img</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
915
928
  </td>
@@ -920,7 +933,7 @@ when loaded.</p>
920
933
  <div class="method_details ">
921
934
  <h3 class="signature " id="_init-class_method">
922
935
 
923
- .<strong>_init</strong>(w, h) &#x21d2; <tt>Object</tt>
936
+ .<strong>_init</strong> &#x21d2; <tt>Object</tt>
924
937
 
925
938
 
926
939
 
@@ -932,23 +945,25 @@ when loaded.</p>
932
945
  <pre class="lines">
933
946
 
934
947
 
935
- 100
936
- 101
937
- 102
938
- 103
939
- 104
940
- 105
941
- 106
942
- 107</pre>
948
+ 119
949
+ 120
950
+ 121
951
+ 122
952
+ 123
953
+ 124
954
+ 125
955
+ 126
956
+ 127</pre>
943
957
  </td>
944
958
  <td>
945
- <pre class="code"><span class="info file"># File 'opal/dxopal/window.rb', line 100</span>
959
+ <pre class="code"><span class="info file"># File 'lib/dxopal/window.rb', line 119</span>
946
960
 
947
- <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid__init'>_init</span><span class='lparen'>(</span><span class='id identifier rubyid_w'>w</span><span class='comma'>,</span> <span class='id identifier rubyid_h'>h</span><span class='rparen'>)</span>
961
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid__init'>_init</span>
948
962
  <span class='id identifier rubyid_canvas'>canvas</span> <span class='op'>=</span> <span class='backtick'>`</span><span class='tstring_content'>document.getElementById(&quot;dxopal-canvas&quot;)</span><span class='tstring_end'>`</span></span>
949
- <span class='backtick'>`</span><span class='tstring_content'>canvas.width = w</span><span class='tstring_end'>`</span></span>
950
- <span class='backtick'>`</span><span class='tstring_content'>canvas.height = h</span><span class='tstring_end'>`</span></span>
951
- <span class='id identifier rubyid_img'>img</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="Image.html" title="DXOpal::Image (class)">Image</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Image.html#initialize-instance_method" title="DXOpal::Image#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_w'>w</span><span class='comma'>,</span> <span class='id identifier rubyid_h'>h</span><span class='comma'>,</span> <span class='label'>canvas:</span> <span class='id identifier rubyid_canvas'>canvas</span><span class='rparen'>)</span>
963
+ <span class='comment'># If user did not change Window.width/Window.height, set the canvas size here
964
+ </span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_width'>width</span> <span class='op'>=</span> <span class='cvar'>@@width</span>
965
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_height'>height</span> <span class='op'>=</span> <span class='cvar'>@@height</span>
966
+ <span class='id identifier rubyid_img'>img</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="Image.html" title="DXOpal::Image (class)">Image</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Image.html#initialize-instance_method" title="DXOpal::Image#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_width'>width</span><span class='comma'>,</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_height'>height</span><span class='comma'>,</span> <span class='label'>canvas:</span> <span class='id identifier rubyid_canvas'>canvas</span><span class='rparen'>)</span>
952
967
  <span class='const'><span class='object_link'><a href="Input.html" title="DXOpal::Input (module)">Input</a></span></span><span class='period'>.</span><span class='id identifier rubyid__init'><span class='object_link'><a href="Input.html#_init-class_method" title="DXOpal::Input._init (method)">_init</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_canvas'>canvas</span><span class='rparen'>)</span>
953
968
  <span class='kw'>return</span> <span class='id identifier rubyid_img'>img</span>
954
969
  <span class='kw'>end</span></pre>
@@ -960,7 +975,7 @@ when loaded.</p>
960
975
  <div class="method_details ">
961
976
  <h3 class="signature " id="_loop-class_method">
962
977
 
963
- .<strong>_loop</strong>(time = 0) &#x21d2; <tt>Object</tt>
978
+ .<strong>_loop</strong>(timestamp) &#x21d2; <tt>Object</tt>
964
979
 
965
980
 
966
981
 
@@ -983,10 +998,6 @@ when loaded.</p>
983
998
  <pre class="lines">
984
999
 
985
1000
 
986
- 49
987
- 50
988
- 51
989
- 52
990
1001
  53
991
1002
  54
992
1003
  55
@@ -1032,26 +1043,59 @@ when loaded.</p>
1032
1043
  95
1033
1044
  96
1034
1045
  97
1035
- 98</pre>
1046
+ 98
1047
+ 99
1048
+ 100
1049
+ 101
1050
+ 102
1051
+ 103
1052
+ 104
1053
+ 105
1054
+ 106
1055
+ 107
1056
+ 108
1057
+ 109
1058
+ 110
1059
+ 111
1060
+ 112
1061
+ 113
1062
+ 114
1063
+ 115
1064
+ 116
1065
+ 117</pre>
1036
1066
  </td>
1037
1067
  <td>
1038
- <pre class="code"><span class="info file"># File 'opal/dxopal/window.rb', line 49</span>
1068
+ <pre class="code"><span class="info file"># File 'lib/dxopal/window.rb', line 53</span>
1039
1069
 
1040
- <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid__loop'>_loop</span><span class='lparen'>(</span><span class='id identifier rubyid_time'>time</span><span class='op'>=</span><span class='int'>0</span><span class='rparen'>)</span>
1041
- <span class='cvar'>@@img</span> <span class='op'>||=</span> <span class='id identifier rubyid__init'>_init</span><span class='lparen'>(</span><span class='cvar'>@@width</span><span class='comma'>,</span> <span class='cvar'>@@height</span><span class='rparen'>)</span>
1042
- <span class='id identifier rubyid_t0'>t0</span> <span class='op'>=</span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_now'>now</span>
1070
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid__loop'>_loop</span><span class='lparen'>(</span><span class='id identifier rubyid_timestamp'>timestamp</span><span class='rparen'>)</span>
1071
+ <span class='cvar'>@@img</span> <span class='op'>||=</span> <span class='id identifier rubyid__init'>_init</span>
1043
1072
 
1044
1073
  <span class='comment'># Calculate fps
1045
- </span> <span class='kw'>if</span> <span class='id identifier rubyid_t0'>t0</span> <span class='op'>-</span> <span class='cvar'>@@real_fps_t</span> <span class='op'>&gt;=</span> <span class='float'>1.0</span>
1074
+ </span> <span class='id identifier rubyid_frame_msec'>frame_msec</span> <span class='op'>=</span> <span class='float'>1000.0</span> <span class='op'>/</span> <span class='cvar'>@@fps</span>
1075
+ <span class='cvar'>@@fps_ts</span> <span class='op'>||=</span> <span class='id identifier rubyid_timestamp'>timestamp</span>
1076
+ <span class='id identifier rubyid_passed_msec'>passed_msec</span> <span class='op'>=</span> <span class='id identifier rubyid_timestamp'>timestamp</span> <span class='op'>-</span> <span class='cvar'>@@fps_ts</span>
1077
+ <span class='cvar'>@@fps_ts</span> <span class='op'>=</span> <span class='id identifier rubyid_timestamp'>timestamp</span>
1078
+ <span class='cvar'>@@fps_ct</span> <span class='op'>+=</span> <span class='id identifier rubyid_passed_msec'>passed_msec</span>
1079
+ <span class='kw'>if</span> <span class='cvar'>@@fps_ct</span> <span class='op'>&gt;=</span> <span class='id identifier rubyid_frame_msec'>frame_msec</span>
1080
+ <span class='cvar'>@@fps_ct</span> <span class='op'>-=</span> <span class='id identifier rubyid_frame_msec'>frame_msec</span>
1081
+ <span class='kw'>else</span>
1082
+ <span class='id identifier rubyid_self_'>self_</span> <span class='op'>=</span> <span class='kw'>self</span>
1083
+ <span class='backtick'>`</span><span class='tstring_content'>window</span><span class='tstring_end'>`</span></span><span class='period'>.</span><span class='const'>JS</span><span class='period'>.</span><span class='id identifier rubyid_requestAnimationFrame'>requestAnimationFrame</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_time'>time</span><span class='op'>|</span> <span class='id identifier rubyid_self_'>self_</span><span class='period'>.</span><span class='id identifier rubyid__loop'>_loop</span><span class='lparen'>(</span><span class='id identifier rubyid_time'>time</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
1084
+ <span class='kw'>return</span>
1085
+ <span class='kw'>end</span>
1086
+
1087
+ <span class='comment'># Calculate real_fps
1088
+ </span> <span class='id identifier rubyid_t'>t</span> <span class='op'>=</span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_now'>now</span>
1089
+ <span class='kw'>if</span> <span class='id identifier rubyid_t'>t</span> <span class='op'>-</span> <span class='cvar'>@@real_fps_t</span> <span class='op'>&gt;=</span> <span class='float'>1.0</span>
1046
1090
  <span class='cvar'>@@real_fps</span> <span class='op'>=</span> <span class='cvar'>@@real_fps_ct</span>
1047
1091
  <span class='cvar'>@@real_fps_ct</span> <span class='op'>=</span> <span class='int'>1</span>
1048
- <span class='cvar'>@@real_fps_t</span> <span class='op'>=</span> <span class='id identifier rubyid_t0'>t0</span>
1092
+ <span class='cvar'>@@real_fps_t</span> <span class='op'>=</span> <span class='id identifier rubyid_t'>t</span>
1049
1093
  <span class='kw'>else</span>
1050
1094
  <span class='cvar'>@@real_fps_ct</span> <span class='op'>+=</span> <span class='int'>1</span>
1051
1095
  <span class='kw'>end</span>
1052
1096
 
1053
1097
  <span class='comment'># Update physics
1054
- </span> <span class='const'><span class='object_link'><a href="Sprite.html" title="DXOpal::Sprite (class)">Sprite</a></span></span><span class='period'>.</span><span class='id identifier rubyid_matter_tick'>matter_tick</span><span class='lparen'>(</span><span class='id identifier rubyid_time'>time</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='const'><span class='object_link'><a href="Sprite.html" title="DXOpal::Sprite (class)">Sprite</a></span></span><span class='period'>.</span><span class='id identifier rubyid_matter_enabled?'>matter_enabled?</span>
1098
+ </span> <span class='const'><span class='object_link'><a href="Sprite.html" title="DXOpal::Sprite (class)">Sprite</a></span></span><span class='period'>.</span><span class='id identifier rubyid_matter_tick'><span class='object_link'><a href="Sprite.html#matter_tick-class_method" title="DXOpal::Sprite.matter_tick (method)">matter_tick</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_timestamp'>timestamp</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='const'><span class='object_link'><a href="Sprite.html" title="DXOpal::Sprite (class)">Sprite</a></span></span><span class='period'>.</span><span class='id identifier rubyid_matter_enabled?'><span class='object_link'><a href="Sprite.html#matter_enabled%3F-class_method" title="DXOpal::Sprite.matter_enabled? (method)">matter_enabled?</a></span></span>
1055
1099
 
1056
1100
  <span class='comment'># Detect inputs
1057
1101
  </span> <span class='const'><span class='object_link'><a href="Input.html" title="DXOpal::Input (module)">Input</a></span></span><span class='period'>.</span><span class='id identifier rubyid__on_tick'><span class='object_link'><a href="Input.html#_on_tick-class_method" title="DXOpal::Input._on_tick (method)">_on_tick</a></span></span>
@@ -1085,7 +1129,8 @@ when loaded.</p>
1085
1129
  <span class='kw'>end</span>
1086
1130
  <span class='kw'>end</span>
1087
1131
 
1088
- <span class='backtick'>`</span><span class='tstring_content'>window</span><span class='tstring_end'>`</span></span><span class='period'>.</span><span class='const'>JS</span><span class='period'>.</span><span class='id identifier rubyid_requestAnimationFrame'>requestAnimationFrame</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_time'>time</span><span class='op'>|</span> <span class='id identifier rubyid__loop'>_loop</span><span class='lparen'>(</span><span class='id identifier rubyid_time'>time</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
1132
+ <span class='id identifier rubyid_self_'>self_</span> <span class='op'>=</span> <span class='kw'>self</span>
1133
+ <span class='backtick'>`</span><span class='tstring_content'>window</span><span class='tstring_end'>`</span></span><span class='period'>.</span><span class='const'>JS</span><span class='period'>.</span><span class='id identifier rubyid_requestAnimationFrame'>requestAnimationFrame</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_time'>time</span><span class='op'>|</span> <span class='id identifier rubyid_self_'>self_</span><span class='period'>.</span><span class='id identifier rubyid__loop'>_loop</span><span class='lparen'>(</span><span class='id identifier rubyid_time'>time</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
1089
1134
  <span class='kw'>end</span></pre>
1090
1135
  </td>
1091
1136
  </tr>
@@ -1107,10 +1152,10 @@ when loaded.</p>
1107
1152
  <pre class="lines">
1108
1153
 
1109
1154
 
1110
- 120</pre>
1155
+ 154</pre>
1111
1156
  </td>
1112
1157
  <td>
1113
- <pre class="code"><span class="info file"># File 'opal/dxopal/window.rb', line 120</span>
1158
+ <pre class="code"><span class="info file"># File 'lib/dxopal/window.rb', line 154</span>
1114
1159
 
1115
1160
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_bgcolor'>bgcolor</span><span class='semicolon'>;</span> <span class='cvar'>@@bgcolor</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
1116
1161
  </td>
@@ -1133,10 +1178,10 @@ when loaded.</p>
1133
1178
  <pre class="lines">
1134
1179
 
1135
1180
 
1136
- 121</pre>
1181
+ 155</pre>
1137
1182
  </td>
1138
1183
  <td>
1139
- <pre class="code"><span class="info file"># File 'opal/dxopal/window.rb', line 121</span>
1184
+ <pre class="code"><span class="info file"># File 'lib/dxopal/window.rb', line 155</span>
1140
1185
 
1141
1186
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_bgcolor='>bgcolor=</span><span class='lparen'>(</span><span class='id identifier rubyid_col'>col</span><span class='rparen'>)</span><span class='semicolon'>;</span> <span class='cvar'>@@bgcolor</span> <span class='op'>=</span> <span class='id identifier rubyid_col'>col</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
1142
1187
  </td>
@@ -1159,12 +1204,12 @@ when loaded.</p>
1159
1204
  <pre class="lines">
1160
1205
 
1161
1206
 
1162
- 123
1163
- 124
1164
- 125</pre>
1207
+ 157
1208
+ 158
1209
+ 159</pre>
1165
1210
  </td>
1166
1211
  <td>
1167
- <pre class="code"><span class="info file"># File 'opal/dxopal/window.rb', line 123</span>
1212
+ <pre class="code"><span class="info file"># File 'lib/dxopal/window.rb', line 157</span>
1168
1213
 
1169
1214
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_draw'>draw</span><span class='lparen'>(</span><span class='id identifier rubyid_x'>x</span><span class='comma'>,</span> <span class='id identifier rubyid_y'>y</span><span class='comma'>,</span> <span class='id identifier rubyid_image'>image</span><span class='comma'>,</span> <span class='id identifier rubyid_z'>z</span><span class='op'>=</span><span class='int'>0</span><span class='rparen'>)</span>
1170
1215
  <span class='id identifier rubyid_enqueue_draw'>enqueue_draw</span><span class='lparen'>(</span><span class='id identifier rubyid_z'>z</span><span class='comma'>,</span> <span class='symbol'>:image</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='comma'>,</span> <span class='id identifier rubyid_image'>image</span><span class='rparen'>)</span>
@@ -1189,12 +1234,12 @@ when loaded.</p>
1189
1234
  <pre class="lines">
1190
1235
 
1191
1236
 
1192
- 153
1193
- 154
1194
- 155</pre>
1237
+ 187
1238
+ 188
1239
+ 189</pre>
1195
1240
  </td>
1196
1241
  <td>
1197
- <pre class="code"><span class="info file"># File 'opal/dxopal/window.rb', line 153</span>
1242
+ <pre class="code"><span class="info file"># File 'lib/dxopal/window.rb', line 187</span>
1198
1243
 
1199
1244
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_draw_box'>draw_box</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='comma'>,</span> <span class='id identifier rubyid_x2'>x2</span><span class='comma'>,</span> <span class='id identifier rubyid_y2'>y2</span><span class='comma'>,</span> <span class='id identifier rubyid_color'>color</span><span class='comma'>,</span> <span class='id identifier rubyid_z'>z</span><span class='op'>=</span><span class='int'>0</span><span class='rparen'>)</span>
1200
1245
  <span class='id identifier rubyid_enqueue_draw'>enqueue_draw</span><span class='lparen'>(</span><span class='id identifier rubyid_z'>z</span><span class='comma'>,</span> <span class='symbol'>:box</span><span class='comma'>,</span> <span class='id identifier rubyid_x1'>x1</span><span class='comma'>,</span> <span class='id identifier rubyid_y1'>y1</span><span class='comma'>,</span> <span class='id identifier rubyid_x2'>x2</span><span class='comma'>,</span> <span class='id identifier rubyid_y2'>y2</span><span class='comma'>,</span> <span class='id identifier rubyid_color'>color</span><span class='rparen'>)</span>
@@ -1219,12 +1264,12 @@ when loaded.</p>
1219
1264
  <pre class="lines">
1220
1265
 
1221
1266
 
1222
- 157
1223
- 158
1224
- 159</pre>
1267
+ 191
1268
+ 192
1269
+ 193</pre>
1225
1270
  </td>
1226
1271
  <td>
1227
- <pre class="code"><span class="info file"># File 'opal/dxopal/window.rb', line 157</span>
1272
+ <pre class="code"><span class="info file"># File 'lib/dxopal/window.rb', line 191</span>
1228
1273
 
1229
1274
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_draw_box_fill'>draw_box_fill</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='comma'>,</span> <span class='id identifier rubyid_x2'>x2</span><span class='comma'>,</span> <span class='id identifier rubyid_y2'>y2</span><span class='comma'>,</span> <span class='id identifier rubyid_color'>color</span><span class='comma'>,</span> <span class='id identifier rubyid_z'>z</span><span class='op'>=</span><span class='int'>0</span><span class='rparen'>)</span>
1230
1275
  <span class='id identifier rubyid_enqueue_draw'>enqueue_draw</span><span class='lparen'>(</span><span class='id identifier rubyid_z'>z</span><span class='comma'>,</span> <span class='symbol'>:box_fill</span><span class='comma'>,</span> <span class='id identifier rubyid_x1'>x1</span><span class='comma'>,</span> <span class='id identifier rubyid_y1'>y1</span><span class='comma'>,</span> <span class='id identifier rubyid_x2'>x2</span><span class='comma'>,</span> <span class='id identifier rubyid_y2'>y2</span><span class='comma'>,</span> <span class='id identifier rubyid_color'>color</span><span class='rparen'>)</span>
@@ -1249,12 +1294,12 @@ when loaded.</p>
1249
1294
  <pre class="lines">
1250
1295
 
1251
1296
 
1252
- 161
1253
- 162
1254
- 163</pre>
1297
+ 195
1298
+ 196
1299
+ 197</pre>
1255
1300
  </td>
1256
1301
  <td>
1257
- <pre class="code"><span class="info file"># File 'opal/dxopal/window.rb', line 161</span>
1302
+ <pre class="code"><span class="info file"># File 'lib/dxopal/window.rb', line 195</span>
1258
1303
 
1259
1304
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_draw_circle'>draw_circle</span><span class='lparen'>(</span><span class='id identifier rubyid_x'>x</span><span class='comma'>,</span> <span class='id identifier rubyid_y'>y</span><span class='comma'>,</span> <span class='id identifier rubyid_r'>r</span><span class='comma'>,</span> <span class='id identifier rubyid_color'>color</span><span class='comma'>,</span> <span class='id identifier rubyid_z'>z</span><span class='op'>=</span><span class='int'>0</span><span class='rparen'>)</span>
1260
1305
  <span class='id identifier rubyid_enqueue_draw'>enqueue_draw</span><span class='lparen'>(</span><span class='id identifier rubyid_z'>z</span><span class='comma'>,</span> <span class='symbol'>:circle</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='comma'>,</span> <span class='id identifier rubyid_r'>r</span><span class='comma'>,</span> <span class='id identifier rubyid_color'>color</span><span class='rparen'>)</span>
@@ -1279,12 +1324,12 @@ when loaded.</p>
1279
1324
  <pre class="lines">
1280
1325
 
1281
1326
 
1282
- 165
1283
- 166
1284
- 167</pre>
1327
+ 199
1328
+ 200
1329
+ 201</pre>
1285
1330
  </td>
1286
1331
  <td>
1287
- <pre class="code"><span class="info file"># File 'opal/dxopal/window.rb', line 165</span>
1332
+ <pre class="code"><span class="info file"># File 'lib/dxopal/window.rb', line 199</span>
1288
1333
 
1289
1334
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_draw_circle_fill'>draw_circle_fill</span><span class='lparen'>(</span><span class='id identifier rubyid_x'>x</span><span class='comma'>,</span> <span class='id identifier rubyid_y'>y</span><span class='comma'>,</span> <span class='id identifier rubyid_r'>r</span><span class='comma'>,</span> <span class='id identifier rubyid_color'>color</span><span class='comma'>,</span> <span class='id identifier rubyid_z'>z</span><span class='op'>=</span><span class='int'>0</span><span class='rparen'>)</span>
1290
1335
  <span class='id identifier rubyid_enqueue_draw'>enqueue_draw</span><span class='lparen'>(</span><span class='id identifier rubyid_z'>z</span><span class='comma'>,</span> <span class='symbol'>:circle_fill</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='comma'>,</span> <span class='id identifier rubyid_r'>r</span><span class='comma'>,</span> <span class='id identifier rubyid_color'>color</span><span class='rparen'>)</span>
@@ -1309,12 +1354,12 @@ when loaded.</p>
1309
1354
  <pre class="lines">
1310
1355
 
1311
1356
 
1312
- 135
1313
- 136
1314
- 137</pre>
1357
+ 169
1358
+ 170
1359
+ 171</pre>
1315
1360
  </td>
1316
1361
  <td>
1317
- <pre class="code"><span class="info file"># File 'opal/dxopal/window.rb', line 135</span>
1362
+ <pre class="code"><span class="info file"># File 'lib/dxopal/window.rb', line 169</span>
1318
1363
 
1319
1364
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_draw_ex'>draw_ex</span><span class='lparen'>(</span><span class='id identifier rubyid_x'>x</span><span class='comma'>,</span> <span class='id identifier rubyid_y'>y</span><span class='comma'>,</span> <span class='id identifier rubyid_image'>image</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
1320
1365
  <span class='id identifier rubyid_enqueue_draw'>enqueue_draw</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:z</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='int'>0</span><span class='comma'>,</span> <span class='symbol'>:draw_ex</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='comma'>,</span> <span class='id identifier rubyid_image'>image</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
@@ -1339,14 +1384,14 @@ when loaded.</p>
1339
1384
  <pre class="lines">
1340
1385
 
1341
1386
 
1342
- 139
1343
- 140
1344
- 141
1345
- 142
1346
- 143</pre>
1387
+ 173
1388
+ 174
1389
+ 175
1390
+ 176
1391
+ 177</pre>
1347
1392
  </td>
1348
1393
  <td>
1349
- <pre class="code"><span class="info file"># File 'opal/dxopal/window.rb', line 139</span>
1394
+ <pre class="code"><span class="info file"># File 'lib/dxopal/window.rb', line 173</span>
1350
1395
 
1351
1396
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_draw_font'>draw_font</span><span class='lparen'>(</span><span class='id identifier rubyid_x'>x</span><span class='comma'>,</span> <span class='id identifier rubyid_y'>y</span><span class='comma'>,</span> <span class='id identifier rubyid_string'>string</span><span class='comma'>,</span> <span class='id identifier rubyid_font'>font</span><span class='comma'>,</span> <span class='id identifier rubyid_option'>option</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
1352
1397
  <span class='id identifier rubyid_z'>z</span> <span class='op'>=</span> <span class='id identifier rubyid_option'>option</span><span class='lbracket'>[</span><span class='symbol'>:z</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='int'>0</span>
@@ -1373,12 +1418,12 @@ when loaded.</p>
1373
1418
  <pre class="lines">
1374
1419
 
1375
1420
 
1376
- 149
1377
- 150
1378
- 151</pre>
1421
+ 183
1422
+ 184
1423
+ 185</pre>
1379
1424
  </td>
1380
1425
  <td>
1381
- <pre class="code"><span class="info file"># File 'opal/dxopal/window.rb', line 149</span>
1426
+ <pre class="code"><span class="info file"># File 'lib/dxopal/window.rb', line 183</span>
1382
1427
 
1383
1428
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_draw_line'>draw_line</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='comma'>,</span> <span class='id identifier rubyid_x2'>x2</span><span class='comma'>,</span> <span class='id identifier rubyid_y2'>y2</span><span class='comma'>,</span> <span class='id identifier rubyid_color'>color</span><span class='comma'>,</span> <span class='id identifier rubyid_z'>z</span><span class='op'>=</span><span class='int'>0</span><span class='rparen'>)</span>
1384
1429
  <span class='id identifier rubyid_enqueue_draw'>enqueue_draw</span><span class='lparen'>(</span><span class='id identifier rubyid_z'>z</span><span class='comma'>,</span> <span class='symbol'>:line</span><span class='comma'>,</span> <span class='id identifier rubyid_x1'>x1</span><span class='comma'>,</span> <span class='id identifier rubyid_y1'>y1</span><span class='comma'>,</span> <span class='id identifier rubyid_x2'>x2</span><span class='comma'>,</span> <span class='id identifier rubyid_y2'>y2</span><span class='comma'>,</span> <span class='id identifier rubyid_color'>color</span><span class='rparen'>)</span>
@@ -1403,13 +1448,13 @@ when loaded.</p>
1403
1448
  <pre class="lines">
1404
1449
 
1405
1450
 
1406
- 43
1407
- 44
1408
- 45
1409
- 46</pre>
1451
+ 47
1452
+ 48
1453
+ 49
1454
+ 50</pre>
1410
1455
  </td>
1411
1456
  <td>
1412
- <pre class="code"><span class="info file"># File 'opal/dxopal/window.rb', line 43</span>
1457
+ <pre class="code"><span class="info file"># File 'lib/dxopal/window.rb', line 47</span>
1413
1458
 
1414
1459
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_draw_pause_screen'>draw_pause_screen</span>
1415
1460
  <span class='const'><span class='object_link'><a href="" title="DXOpal::Window (module)">Window</a></span></span><span class='period'>.</span><span class='id identifier rubyid_draw_box_fill'><span class='object_link'><a href="#draw_box_fill-class_method" title="DXOpal::Window.draw_box_fill (method)">draw_box_fill</a></span></span><span class='lparen'>(</span><span class='int'>0</span><span class='comma'>,</span> <span class='int'>0</span><span class='comma'>,</span> <span class='const'><span class='object_link'><a href="" title="DXOpal::Window (module)">Window</a></span></span><span class='period'>.</span><span class='id identifier rubyid_width'><span class='object_link'><a href="#width-class_method" title="DXOpal::Window.width (method)">width</a></span></span><span class='comma'>,</span> <span class='const'><span class='object_link'><a href="" title="DXOpal::Window (module)">Window</a></span></span><span class='period'>.</span><span class='id identifier rubyid_height'><span class='object_link'><a href="#height-class_method" title="DXOpal::Window.height (method)">height</a></span></span><span class='comma'>,</span> <span class='const'>C_BLACK</span><span class='rparen'>)</span>
@@ -1435,12 +1480,12 @@ when loaded.</p>
1435
1480
  <pre class="lines">
1436
1481
 
1437
1482
 
1438
- 145
1439
- 146
1440
- 147</pre>
1483
+ 179
1484
+ 180
1485
+ 181</pre>
1441
1486
  </td>
1442
1487
  <td>
1443
- <pre class="code"><span class="info file"># File 'opal/dxopal/window.rb', line 145</span>
1488
+ <pre class="code"><span class="info file"># File 'lib/dxopal/window.rb', line 179</span>
1444
1489
 
1445
1490
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_draw_pixel'>draw_pixel</span><span class='lparen'>(</span><span class='id identifier rubyid_x'>x</span><span class='comma'>,</span> <span class='id identifier rubyid_y'>y</span><span class='comma'>,</span> <span class='id identifier rubyid_color'>color</span><span class='comma'>,</span> <span class='id identifier rubyid_z'>z</span><span class='op'>=</span><span class='int'>0</span><span class='rparen'>)</span>
1446
1491
  <span class='id identifier rubyid_enqueue_draw'>enqueue_draw</span><span class='lparen'>(</span><span class='id identifier rubyid_z'>z</span><span class='comma'>,</span> <span class='symbol'>:pixel</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='comma'>,</span> <span class='id identifier rubyid_color'>color</span><span class='rparen'>)</span>
@@ -1465,12 +1510,12 @@ when loaded.</p>
1465
1510
  <pre class="lines">
1466
1511
 
1467
1512
 
1468
- 131
1469
- 132
1470
- 133</pre>
1513
+ 165
1514
+ 166
1515
+ 167</pre>
1471
1516
  </td>
1472
1517
  <td>
1473
- <pre class="code"><span class="info file"># File 'opal/dxopal/window.rb', line 131</span>
1518
+ <pre class="code"><span class="info file"># File 'lib/dxopal/window.rb', line 165</span>
1474
1519
 
1475
1520
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_draw_rot'>draw_rot</span><span class='lparen'>(</span><span class='id identifier rubyid_x'>x</span><span class='comma'>,</span> <span class='id identifier rubyid_y'>y</span><span class='comma'>,</span> <span class='id identifier rubyid_image'>image</span><span class='comma'>,</span> <span class='id identifier rubyid_angle'>angle</span><span class='comma'>,</span> <span class='id identifier rubyid_center_x'>center_x</span><span class='op'>=</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_center_y'>center_y</span><span class='op'>=</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_z'>z</span><span class='op'>=</span><span class='int'>0</span><span class='rparen'>)</span>
1476
1521
  <span class='id identifier rubyid_enqueue_draw'>enqueue_draw</span><span class='lparen'>(</span><span class='id identifier rubyid_z'>z</span><span class='comma'>,</span> <span class='symbol'>:image_rot</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='comma'>,</span> <span class='id identifier rubyid_image'>image</span><span class='comma'>,</span> <span class='id identifier rubyid_angle'>angle</span><span class='comma'>,</span> <span class='id identifier rubyid_center_x'>center_x</span><span class='comma'>,</span> <span class='id identifier rubyid_center_y'>center_y</span><span class='rparen'>)</span>
@@ -1495,12 +1540,12 @@ when loaded.</p>
1495
1540
  <pre class="lines">
1496
1541
 
1497
1542
 
1498
- 127
1499
- 128
1500
- 129</pre>
1543
+ 161
1544
+ 162
1545
+ 163</pre>
1501
1546
  </td>
1502
1547
  <td>
1503
- <pre class="code"><span class="info file"># File 'opal/dxopal/window.rb', line 127</span>
1548
+ <pre class="code"><span class="info file"># File 'lib/dxopal/window.rb', line 161</span>
1504
1549
 
1505
1550
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_draw_scale'>draw_scale</span><span class='lparen'>(</span><span class='id identifier rubyid_x'>x</span><span class='comma'>,</span> <span class='id identifier rubyid_y'>y</span><span class='comma'>,</span> <span class='id identifier rubyid_image'>image</span><span class='comma'>,</span> <span class='id identifier rubyid_scale_x'>scale_x</span><span class='comma'>,</span> <span class='id identifier rubyid_scale_y'>scale_y</span><span class='comma'>,</span> <span class='id identifier rubyid_center_x'>center_x</span><span class='op'>=</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_center_y'>center_y</span><span class='op'>=</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_z'>z</span><span class='op'>=</span><span class='int'>0</span><span class='rparen'>)</span>
1506
1551
  <span class='id identifier rubyid_enqueue_draw'>enqueue_draw</span><span class='lparen'>(</span><span class='id identifier rubyid_z'>z</span><span class='comma'>,</span> <span class='symbol'>:image_scale</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='comma'>,</span> <span class='id identifier rubyid_image'>image</span><span class='comma'>,</span> <span class='id identifier rubyid_scale_x'>scale_x</span><span class='comma'>,</span> <span class='id identifier rubyid_scale_y'>scale_y</span><span class='comma'>,</span> <span class='id identifier rubyid_center_x'>center_x</span><span class='comma'>,</span> <span class='id identifier rubyid_center_y'>center_y</span><span class='rparen'>)</span>
@@ -1525,12 +1570,12 @@ when loaded.</p>
1525
1570
  <pre class="lines">
1526
1571
 
1527
1572
 
1528
- 169
1529
- 170
1530
- 171</pre>
1573
+ 203
1574
+ 204
1575
+ 205</pre>
1531
1576
  </td>
1532
1577
  <td>
1533
- <pre class="code"><span class="info file"># File 'opal/dxopal/window.rb', line 169</span>
1578
+ <pre class="code"><span class="info file"># File 'lib/dxopal/window.rb', line 203</span>
1534
1579
 
1535
1580
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_draw_triangle'>draw_triangle</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='comma'>,</span> <span class='id identifier rubyid_x2'>x2</span><span class='comma'>,</span> <span class='id identifier rubyid_y2'>y2</span><span class='comma'>,</span> <span class='id identifier rubyid_x3'>x3</span><span class='comma'>,</span> <span class='id identifier rubyid_y3'>y3</span><span class='comma'>,</span> <span class='id identifier rubyid_color'>color</span><span class='comma'>,</span> <span class='id identifier rubyid_z'>z</span><span class='op'>=</span><span class='int'>0</span><span class='rparen'>)</span>
1536
1581
  <span class='id identifier rubyid_enqueue_draw'>enqueue_draw</span><span class='lparen'>(</span><span class='id identifier rubyid_z'>z</span><span class='comma'>,</span> <span class='symbol'>:triangle</span><span class='comma'>,</span> <span class='id identifier rubyid_x1'>x1</span><span class='comma'>,</span> <span class='id identifier rubyid_y1'>y1</span><span class='comma'>,</span> <span class='id identifier rubyid_x2'>x2</span><span class='comma'>,</span> <span class='id identifier rubyid_y2'>y2</span><span class='comma'>,</span> <span class='id identifier rubyid_x3'>x3</span><span class='comma'>,</span> <span class='id identifier rubyid_y3'>y3</span><span class='comma'>,</span> <span class='id identifier rubyid_color'>color</span><span class='rparen'>)</span>
@@ -1555,12 +1600,12 @@ when loaded.</p>
1555
1600
  <pre class="lines">
1556
1601
 
1557
1602
 
1558
- 173
1559
- 174
1560
- 175</pre>
1603
+ 207
1604
+ 208
1605
+ 209</pre>
1561
1606
  </td>
1562
1607
  <td>
1563
- <pre class="code"><span class="info file"># File 'opal/dxopal/window.rb', line 173</span>
1608
+ <pre class="code"><span class="info file"># File 'lib/dxopal/window.rb', line 207</span>
1564
1609
 
1565
1610
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_draw_triangle_fill'>draw_triangle_fill</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='comma'>,</span> <span class='id identifier rubyid_x2'>x2</span><span class='comma'>,</span> <span class='id identifier rubyid_y2'>y2</span><span class='comma'>,</span> <span class='id identifier rubyid_x3'>x3</span><span class='comma'>,</span> <span class='id identifier rubyid_y3'>y3</span><span class='comma'>,</span> <span class='id identifier rubyid_color'>color</span><span class='comma'>,</span> <span class='id identifier rubyid_z'>z</span><span class='op'>=</span><span class='int'>0</span><span class='rparen'>)</span>
1566
1611
  <span class='id identifier rubyid_enqueue_draw'>enqueue_draw</span><span class='lparen'>(</span><span class='id identifier rubyid_z'>z</span><span class='comma'>,</span> <span class='symbol'>:triangle_fill</span><span class='comma'>,</span> <span class='id identifier rubyid_x1'>x1</span><span class='comma'>,</span> <span class='id identifier rubyid_y1'>y1</span><span class='comma'>,</span> <span class='id identifier rubyid_x2'>x2</span><span class='comma'>,</span> <span class='id identifier rubyid_y2'>y2</span><span class='comma'>,</span> <span class='id identifier rubyid_x3'>x3</span><span class='comma'>,</span> <span class='id identifier rubyid_y3'>y3</span><span class='comma'>,</span> <span class='id identifier rubyid_color'>color</span><span class='rparen'>)</span>
@@ -1596,12 +1641,12 @@ when loaded.</p>
1596
1641
  <pre class="lines">
1597
1642
 
1598
1643
 
1599
- 178
1600
- 179
1601
- 180</pre>
1644
+ 212
1645
+ 213
1646
+ 214</pre>
1602
1647
  </td>
1603
1648
  <td>
1604
- <pre class="code"><span class="info file"># File 'opal/dxopal/window.rb', line 178</span>
1649
+ <pre class="code"><span class="info file"># File 'lib/dxopal/window.rb', line 212</span>
1605
1650
 
1606
1651
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_enqueue_draw'>enqueue_draw</span><span class='lparen'>(</span><span class='id identifier rubyid_z'>z</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
1607
1652
  <span class='cvar'>@@draw_queue</span><span class='period'>.</span><span class='id identifier rubyid_push'>push</span><span class='lparen'>(</span><span class='lbracket'>[</span><span class='id identifier rubyid_z'>z</span><span class='comma'>,</span> <span class='cvar'>@@draw_queue</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rbracket'>]</span><span class='rparen'>)</span>
@@ -1626,10 +1671,10 @@ when loaded.</p>
1626
1671
  <pre class="lines">
1627
1672
 
1628
1673
 
1629
- 112</pre>
1674
+ 132</pre>
1630
1675
  </td>
1631
1676
  <td>
1632
- <pre class="code"><span class="info file"># File 'opal/dxopal/window.rb', line 112</span>
1677
+ <pre class="code"><span class="info file"># File 'lib/dxopal/window.rb', line 132</span>
1633
1678
 
1634
1679
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_fps'>fps</span><span class='semicolon'>;</span> <span class='cvar'>@@fps</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
1635
1680
  </td>
@@ -1652,10 +1697,10 @@ when loaded.</p>
1652
1697
  <pre class="lines">
1653
1698
 
1654
1699
 
1655
- 113</pre>
1700
+ 133</pre>
1656
1701
  </td>
1657
1702
  <td>
1658
- <pre class="code"><span class="info file"># File 'opal/dxopal/window.rb', line 113</span>
1703
+ <pre class="code"><span class="info file"># File 'lib/dxopal/window.rb', line 133</span>
1659
1704
 
1660
1705
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_fps='>fps=</span><span class='lparen'>(</span><span class='id identifier rubyid_w'>w</span><span class='rparen'>)</span><span class='semicolon'>;</span> <span class='cvar'>@@fps</span> <span class='op'>=</span> <span class='id identifier rubyid_w'>w</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
1661
1706
  </td>
@@ -1678,10 +1723,10 @@ when loaded.</p>
1678
1723
  <pre class="lines">
1679
1724
 
1680
1725
 
1681
- 117</pre>
1726
+ 144</pre>
1682
1727
  </td>
1683
1728
  <td>
1684
- <pre class="code"><span class="info file"># File 'opal/dxopal/window.rb', line 117</span>
1729
+ <pre class="code"><span class="info file"># File 'lib/dxopal/window.rb', line 144</span>
1685
1730
 
1686
1731
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_height'>height</span><span class='semicolon'>;</span> <span class='cvar'>@@height</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
1687
1732
  </td>
@@ -1698,18 +1743,39 @@ when loaded.</p>
1698
1743
 
1699
1744
 
1700
1745
 
1701
- </h3><table class="source_code">
1746
+ </h3><div class="docstring">
1747
+ <div class="discussion">
1748
+
1749
+ <p>Set window height and resize the canvas Set ‘nil` to maximize canvas</p>
1750
+
1751
+
1752
+ </div>
1753
+ </div>
1754
+ <div class="tags">
1755
+
1756
+
1757
+ </div><table class="source_code">
1702
1758
  <tr>
1703
1759
  <td>
1704
1760
  <pre class="lines">
1705
1761
 
1706
1762
 
1707
- 118</pre>
1763
+ 147
1764
+ 148
1765
+ 149
1766
+ 150
1767
+ 151
1768
+ 152</pre>
1708
1769
  </td>
1709
1770
  <td>
1710
- <pre class="code"><span class="info file"># File 'opal/dxopal/window.rb', line 118</span>
1771
+ <pre class="code"><span class="info file"># File 'lib/dxopal/window.rb', line 147</span>
1711
1772
 
1712
- <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_height='>height=</span><span class='lparen'>(</span><span class='id identifier rubyid_h'>h</span><span class='rparen'>)</span><span class='semicolon'>;</span> <span class='cvar'>@@height</span> <span class='op'>=</span> <span class='id identifier rubyid_h'>h</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
1773
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_height='>height=</span><span class='lparen'>(</span><span class='id identifier rubyid_h'>h</span><span class='rparen'>)</span>
1774
+ <span class='id identifier rubyid_canvas'>canvas</span> <span class='op'>=</span> <span class='backtick'>`</span><span class='tstring_content'>document.getElementById(&quot;dxopal-canvas&quot;)</span><span class='tstring_end'>`</span></span>
1775
+ <span class='cvar'>@@height</span> <span class='op'>=</span> <span class='id identifier rubyid_h'>h</span> <span class='op'>||</span> <span class='backtick'>`</span><span class='tstring_content'>window.innerHeight</span><span class='tstring_end'>`</span></span>
1776
+ <span class='backtick'>`</span><span class='tstring_content'>canvas.height = </span><span class='embexpr_beg'>#{</span><span class='cvar'>@@height</span><span class='embexpr_end'>}</span><span class='tstring_end'>`</span></span>
1777
+ <span class='backtick'>`</span><span class='tstring_content'>canvas.style.height = </span><span class='embexpr_beg'>#{</span><span class='cvar'>@@height</span><span class='embexpr_end'>}</span><span class='tstring_end'>`</span></span>
1778
+ <span class='kw'>end</span></pre>
1713
1779
  </td>
1714
1780
  </tr>
1715
1781
  </table>
@@ -1727,8 +1793,7 @@ when loaded.</p>
1727
1793
  </h3><div class="docstring">
1728
1794
  <div class="discussion">
1729
1795
 
1730
- <p>Load resources specified with Image.register or Sound.register Call block
1731
- when loaded</p>
1796
+ <p>Load resources specified with Image.register or Sound.register Call block when loaded</p>
1732
1797
 
1733
1798
 
1734
1799
  </div>
@@ -1742,14 +1807,14 @@ when loaded</p>
1742
1807
  <pre class="lines">
1743
1808
 
1744
1809
 
1745
- 16
1746
- 17
1747
1810
  18
1748
1811
  19
1749
- 20</pre>
1812
+ 20
1813
+ 21
1814
+ 22</pre>
1750
1815
  </td>
1751
1816
  <td>
1752
- <pre class="code"><span class="info file"># File 'opal/dxopal/window.rb', line 16</span>
1817
+ <pre class="code"><span class="info file"># File 'lib/dxopal/window.rb', line 18</span>
1753
1818
 
1754
1819
  <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>
1755
1820
  <span class='const'><span class='object_link'><a href="RemoteResource.html" title="DXOpal::RemoteResource (class)">RemoteResource</a></span></span><span class='period'>.</span><span class='id identifier rubyid__load_resources'><span class='object_link'><a href="RemoteResource.html#_load_resources-class_method" title="DXOpal::RemoteResource._load_resources (method)">_load_resources</a></span></span> <span class='kw'>do</span>
@@ -1775,8 +1840,7 @@ when loaded</p>
1775
1840
 
1776
1841
  <p>Start main loop</p>
1777
1842
 
1778
- <p>When called twice, previous loop is stopped (this is useful when
1779
- implementing interactive game editor, etc.)</p>
1843
+ <p>When called twice, previous loop is stopped (this is useful when implementing interactive game editor, etc.)</p>
1780
1844
 
1781
1845
 
1782
1846
  </div>
@@ -1790,19 +1854,23 @@ implementing interactive game editor, etc.)</p>
1790
1854
  <pre class="lines">
1791
1855
 
1792
1856
 
1793
- 26
1794
- 27
1795
1857
  28
1796
1858
  29
1797
- 30</pre>
1859
+ 30
1860
+ 31
1861
+ 32
1862
+ 33
1863
+ 34</pre>
1798
1864
  </td>
1799
1865
  <td>
1800
- <pre class="code"><span class="info file"># File 'opal/dxopal/window.rb', line 26</span>
1866
+ <pre class="code"><span class="info file"># File 'lib/dxopal/window.rb', line 28</span>
1801
1867
 
1802
1868
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_loop'>loop</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
1803
1869
  <span class='id identifier rubyid_already_running'>already_running</span> <span class='op'>=</span> <span class='op'>!</span><span class='op'>!</span><span class='cvar'>@@block</span>
1804
1870
  <span class='cvar'>@@block</span> <span class='op'>=</span> <span class='id identifier rubyid_block'>block</span>
1805
- <span class='id identifier rubyid__loop'>_loop</span> <span class='kw'>unless</span> <span class='id identifier rubyid_already_running'>already_running</span>
1871
+ <span class='kw'>return</span> <span class='kw'>if</span> <span class='id identifier rubyid_already_running'>already_running</span>
1872
+ <span class='id identifier rubyid_self_'>self_</span> <span class='op'>=</span> <span class='kw'>self</span>
1873
+ <span class='backtick'>`</span><span class='tstring_content'>window</span><span class='tstring_end'>`</span></span><span class='period'>.</span><span class='const'>JS</span><span class='period'>.</span><span class='id identifier rubyid_requestAnimationFrame'>requestAnimationFrame</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_time'>time</span><span class='op'>|</span> <span class='id identifier rubyid_self_'>self_</span><span class='period'>.</span><span class='id identifier rubyid__loop'>_loop</span><span class='lparen'>(</span><span class='id identifier rubyid_time'>time</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
1806
1874
  <span class='kw'>end</span></pre>
1807
1875
  </td>
1808
1876
  </tr>
@@ -1835,14 +1903,14 @@ implementing interactive game editor, etc.)</p>
1835
1903
  <pre class="lines">
1836
1904
 
1837
1905
 
1838
- 33
1839
- 34
1840
- 35
1841
- 36
1842
- 37</pre>
1906
+ 37
1907
+ 38
1908
+ 39
1909
+ 40
1910
+ 41</pre>
1843
1911
  </td>
1844
1912
  <td>
1845
- <pre class="code"><span class="info file"># File 'opal/dxopal/window.rb', line 33</span>
1913
+ <pre class="code"><span class="info file"># File 'lib/dxopal/window.rb', line 37</span>
1846
1914
 
1847
1915
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_pause'>pause</span>
1848
1916
  <span class='cvar'>@@paused</span> <span class='op'>=</span> <span class='kw'>true</span>
@@ -1891,10 +1959,10 @@ implementing interactive game editor, etc.)</p>
1891
1959
  <pre class="lines">
1892
1960
 
1893
1961
 
1894
- 38</pre>
1962
+ 42</pre>
1895
1963
  </td>
1896
1964
  <td>
1897
- <pre class="code"><span class="info file"># File 'opal/dxopal/window.rb', line 38</span>
1965
+ <pre class="code"><span class="info file"># File 'lib/dxopal/window.rb', line 42</span>
1898
1966
 
1899
1967
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_paused?'>paused?</span><span class='semicolon'>;</span> <span class='cvar'>@@paused</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
1900
1968
  </td>
@@ -1917,10 +1985,10 @@ implementing interactive game editor, etc.)</p>
1917
1985
  <pre class="lines">
1918
1986
 
1919
1987
 
1920
- 114</pre>
1988
+ 134</pre>
1921
1989
  </td>
1922
1990
  <td>
1923
- <pre class="code"><span class="info file"># File 'opal/dxopal/window.rb', line 114</span>
1991
+ <pre class="code"><span class="info file"># File 'lib/dxopal/window.rb', line 134</span>
1924
1992
 
1925
1993
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_real_fps'>real_fps</span><span class='semicolon'>;</span> <span class='cvar'>@@real_fps</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
1926
1994
  </td>
@@ -1943,13 +2011,13 @@ implementing interactive game editor, etc.)</p>
1943
2011
  <pre class="lines">
1944
2012
 
1945
2013
 
1946
- 39
1947
- 40
1948
- 41
1949
- 42</pre>
2014
+ 43
2015
+ 44
2016
+ 45
2017
+ 46</pre>
1950
2018
  </td>
1951
2019
  <td>
1952
- <pre class="code"><span class="info file"># File 'opal/dxopal/window.rb', line 39</span>
2020
+ <pre class="code"><span class="info file"># File 'lib/dxopal/window.rb', line 43</span>
1953
2021
 
1954
2022
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_resume'>resume</span>
1955
2023
  <span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Window.resume is called before Window.loop</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>if</span> <span class='cvar'>@@block</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
@@ -1975,10 +2043,10 @@ implementing interactive game editor, etc.)</p>
1975
2043
  <pre class="lines">
1976
2044
 
1977
2045
 
1978
- 115</pre>
2046
+ 135</pre>
1979
2047
  </td>
1980
2048
  <td>
1981
- <pre class="code"><span class="info file"># File 'opal/dxopal/window.rb', line 115</span>
2049
+ <pre class="code"><span class="info file"># File 'lib/dxopal/window.rb', line 135</span>
1982
2050
 
1983
2051
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_width'>width</span><span class='semicolon'>;</span> <span class='cvar'>@@width</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
1984
2052
  </td>
@@ -1995,18 +2063,39 @@ implementing interactive game editor, etc.)</p>
1995
2063
 
1996
2064
 
1997
2065
 
1998
- </h3><table class="source_code">
2066
+ </h3><div class="docstring">
2067
+ <div class="discussion">
2068
+
2069
+ <p>Set window width and resize the canvas Set ‘nil` to maximize canvas</p>
2070
+
2071
+
2072
+ </div>
2073
+ </div>
2074
+ <div class="tags">
2075
+
2076
+
2077
+ </div><table class="source_code">
1999
2078
  <tr>
2000
2079
  <td>
2001
2080
  <pre class="lines">
2002
2081
 
2003
2082
 
2004
- 116</pre>
2083
+ 138
2084
+ 139
2085
+ 140
2086
+ 141
2087
+ 142
2088
+ 143</pre>
2005
2089
  </td>
2006
2090
  <td>
2007
- <pre class="code"><span class="info file"># File 'opal/dxopal/window.rb', line 116</span>
2091
+ <pre class="code"><span class="info file"># File 'lib/dxopal/window.rb', line 138</span>
2008
2092
 
2009
- <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_width='>width=</span><span class='lparen'>(</span><span class='id identifier rubyid_w'>w</span><span class='rparen'>)</span><span class='semicolon'>;</span> <span class='cvar'>@@width</span> <span class='op'>=</span> <span class='id identifier rubyid_w'>w</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
2093
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_width='>width=</span><span class='lparen'>(</span><span class='id identifier rubyid_w'>w</span><span class='rparen'>)</span>
2094
+ <span class='id identifier rubyid_canvas'>canvas</span> <span class='op'>=</span> <span class='backtick'>`</span><span class='tstring_content'>document.getElementById(&quot;dxopal-canvas&quot;)</span><span class='tstring_end'>`</span></span>
2095
+ <span class='cvar'>@@width</span> <span class='op'>=</span> <span class='id identifier rubyid_w'>w</span> <span class='op'>||</span> <span class='backtick'>`</span><span class='tstring_content'>window.innerWidth</span><span class='tstring_end'>`</span></span>
2096
+ <span class='backtick'>`</span><span class='tstring_content'>canvas.width = </span><span class='embexpr_beg'>#{</span><span class='cvar'>@@width</span><span class='embexpr_end'>}</span><span class='tstring_end'>`</span></span>
2097
+ <span class='backtick'>`</span><span class='tstring_content'>canvas.style.width = </span><span class='embexpr_beg'>#{</span><span class='cvar'>@@width</span><span class='embexpr_end'>}</span><span class='tstring_end'>`</span></span>
2098
+ <span class='kw'>end</span></pre>
2010
2099
  </td>
2011
2100
  </tr>
2012
2101
  </table>
@@ -2017,9 +2106,9 @@ implementing interactive game editor, etc.)</p>
2017
2106
  </div>
2018
2107
 
2019
2108
  <div id="footer">
2020
- Generated on Sat Sep 29 15:56:47 2018 by
2021
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
2022
- 0.9.16 (ruby-2.5.1).
2109
+ Generated on Tue Jul 9 22:42:33 2024 by
2110
+ <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
2111
+ 0.9.36 (ruby-3.2.2).
2023
2112
  </div>
2024
2113
 
2025
2114
  </div>