dxopal 1.4.2 → 1.5.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +26 -0
  3. data/Gemfile +2 -1
  4. data/Gemfile.lock +20 -20
  5. data/README.md +3 -3
  6. data/Rakefile +3 -14
  7. data/build/dxopal.js +643 -430
  8. data/build/dxopal.min.js +1 -1
  9. data/config.ru +7 -0
  10. data/doc/api/DXOpal.html +10 -10
  11. data/doc/api/DXOpal/Constants.html +115 -0
  12. data/doc/api/DXOpal/Constants/Colors.html +172 -0
  13. data/doc/api/DXOpal/Font.html +71 -17
  14. data/doc/api/DXOpal/Image.html +891 -398
  15. data/doc/api/DXOpal/Input.html +814 -91
  16. data/doc/api/DXOpal/Input/KeyCodes.html +986 -0
  17. data/doc/api/DXOpal/Input/MouseCodes.html +7 -7
  18. data/doc/api/DXOpal/Input/Touch.html +834 -0
  19. data/doc/api/DXOpal/RemoteResource.html +16 -18
  20. data/doc/api/DXOpal/Sound.html +15 -15
  21. data/doc/api/DXOpal/SoundEffect.html +11 -13
  22. data/doc/api/DXOpal/SoundEffect/WaveTypes.html +7 -7
  23. data/doc/api/DXOpal/Sprite.html +517 -40
  24. data/doc/api/DXOpal/Sprite/CollisionArea.html +126 -0
  25. data/doc/api/DXOpal/Sprite/CollisionArea/Base.html +649 -0
  26. data/doc/api/DXOpal/Sprite/CollisionArea/Circle.html +656 -0
  27. data/doc/api/DXOpal/Sprite/CollisionArea/Point.html +448 -0
  28. data/doc/api/DXOpal/Sprite/CollisionArea/Rect.html +549 -0
  29. data/doc/api/DXOpal/Sprite/CollisionArea/Triangle.html +423 -0
  30. data/doc/api/DXOpal/Sprite/CollisionCheck.html +926 -0
  31. data/doc/api/DXOpal/Sprite/CollisionCheck/ClassMethods.html +268 -0
  32. data/doc/api/DXOpal/Sprite/Physics.html +426 -0
  33. data/doc/api/DXOpal/Window.html +235 -152
  34. data/doc/api/Kernel.html +131 -0
  35. data/doc/api/_index.html +276 -4
  36. data/doc/api/class_list.html +1 -1
  37. data/doc/api/css/style.css +1 -0
  38. data/doc/api/file.README.html +19 -18
  39. data/doc/api/frames.html +1 -1
  40. data/doc/api/index.html +19 -18
  41. data/doc/api/method_list.html +1600 -0
  42. data/doc/api/top-level-namespace.html +154 -3
  43. data/doc/en/index.html +3 -0
  44. data/doc/ja/index.html +3 -0
  45. data/exe/dxopal +1 -1
  46. data/lib/dxopal/image.rb +29 -1
  47. data/lib/dxopal/input.rb +95 -5
  48. data/lib/dxopal/version.rb +1 -1
  49. data/lib/dxopal/window.rb +44 -13
  50. data/template/index.html +1 -1
  51. metadata +21 -7
@@ -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.26
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
+ 127</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 127</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
+ 116
949
+ 117
950
+ 118
951
+ 119
952
+ 120
953
+ 121
954
+ 122
955
+ 123
956
+ 124</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 116</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,9 +998,6 @@ when loaded.</p>
983
998
  <pre class="lines">
984
999
 
985
1000
 
986
- 49
987
- 50
988
- 51
989
1001
  52
990
1002
  53
991
1003
  54
@@ -1032,26 +1044,55 @@ when loaded.</p>
1032
1044
  95
1033
1045
  96
1034
1046
  97
1035
- 98</pre>
1047
+ 98
1048
+ 99
1049
+ 100
1050
+ 101
1051
+ 102
1052
+ 103
1053
+ 104
1054
+ 105
1055
+ 106
1056
+ 107
1057
+ 108
1058
+ 109
1059
+ 110
1060
+ 111
1061
+ 112
1062
+ 113
1063
+ 114</pre>
1036
1064
  </td>
1037
1065
  <td>
1038
- <pre class="code"><span class="info file"># File 'opal/dxopal/window.rb', line 49</span>
1066
+ <pre class="code"><span class="info file"># File 'lib/dxopal/window.rb', line 52</span>
1039
1067
 
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>
1068
+ <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>
1069
+ <span class='cvar'>@@img</span> <span class='op'>||=</span> <span class='id identifier rubyid__init'>_init</span>
1043
1070
 
1044
1071
  <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>
1072
+ </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>
1073
+ <span class='cvar'>@@fps_ts</span> <span class='op'>||=</span> <span class='id identifier rubyid_timestamp'>timestamp</span>
1074
+ <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>
1075
+ <span class='cvar'>@@fps_ts</span> <span class='op'>=</span> <span class='id identifier rubyid_timestamp'>timestamp</span>
1076
+ <span class='cvar'>@@fps_ct</span> <span class='op'>+=</span> <span class='id identifier rubyid_passed_msec'>passed_msec</span>
1077
+ <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>
1078
+ <span class='cvar'>@@fps_ct</span> <span class='op'>-=</span> <span class='id identifier rubyid_frame_msec'>frame_msec</span>
1079
+ <span class='kw'>else</span>
1080
+ <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>
1081
+ <span class='kw'>return</span>
1082
+ <span class='kw'>end</span>
1083
+
1084
+ <span class='comment'># Calculate real_fps
1085
+ </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>
1086
+ <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
1087
  <span class='cvar'>@@real_fps</span> <span class='op'>=</span> <span class='cvar'>@@real_fps_ct</span>
1047
1088
  <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>
1089
+ <span class='cvar'>@@real_fps_t</span> <span class='op'>=</span> <span class='id identifier rubyid_t'>t</span>
1049
1090
  <span class='kw'>else</span>
1050
1091
  <span class='cvar'>@@real_fps_ct</span> <span class='op'>+=</span> <span class='int'>1</span>
1051
1092
  <span class='kw'>end</span>
1052
1093
 
1053
1094
  <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>
1095
+ </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
1096
 
1056
1097
  <span class='comment'># Detect inputs
1057
1098
  </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>
@@ -1107,10 +1148,10 @@ when loaded.</p>
1107
1148
  <pre class="lines">
1108
1149
 
1109
1150
 
1110
- 120</pre>
1151
+ 151</pre>
1111
1152
  </td>
1112
1153
  <td>
1113
- <pre class="code"><span class="info file"># File 'opal/dxopal/window.rb', line 120</span>
1154
+ <pre class="code"><span class="info file"># File 'lib/dxopal/window.rb', line 151</span>
1114
1155
 
1115
1156
  <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
1157
  </td>
@@ -1133,10 +1174,10 @@ when loaded.</p>
1133
1174
  <pre class="lines">
1134
1175
 
1135
1176
 
1136
- 121</pre>
1177
+ 152</pre>
1137
1178
  </td>
1138
1179
  <td>
1139
- <pre class="code"><span class="info file"># File 'opal/dxopal/window.rb', line 121</span>
1180
+ <pre class="code"><span class="info file"># File 'lib/dxopal/window.rb', line 152</span>
1140
1181
 
1141
1182
  <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
1183
  </td>
@@ -1159,12 +1200,12 @@ when loaded.</p>
1159
1200
  <pre class="lines">
1160
1201
 
1161
1202
 
1162
- 123
1163
- 124
1164
- 125</pre>
1203
+ 154
1204
+ 155
1205
+ 156</pre>
1165
1206
  </td>
1166
1207
  <td>
1167
- <pre class="code"><span class="info file"># File 'opal/dxopal/window.rb', line 123</span>
1208
+ <pre class="code"><span class="info file"># File 'lib/dxopal/window.rb', line 154</span>
1168
1209
 
1169
1210
  <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
1211
  <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 +1230,12 @@ when loaded.</p>
1189
1230
  <pre class="lines">
1190
1231
 
1191
1232
 
1192
- 153
1193
- 154
1194
- 155</pre>
1233
+ 184
1234
+ 185
1235
+ 186</pre>
1195
1236
  </td>
1196
1237
  <td>
1197
- <pre class="code"><span class="info file"># File 'opal/dxopal/window.rb', line 153</span>
1238
+ <pre class="code"><span class="info file"># File 'lib/dxopal/window.rb', line 184</span>
1198
1239
 
1199
1240
  <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
1241
  <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 +1260,12 @@ when loaded.</p>
1219
1260
  <pre class="lines">
1220
1261
 
1221
1262
 
1222
- 157
1223
- 158
1224
- 159</pre>
1263
+ 188
1264
+ 189
1265
+ 190</pre>
1225
1266
  </td>
1226
1267
  <td>
1227
- <pre class="code"><span class="info file"># File 'opal/dxopal/window.rb', line 157</span>
1268
+ <pre class="code"><span class="info file"># File 'lib/dxopal/window.rb', line 188</span>
1228
1269
 
1229
1270
  <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
1271
  <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 +1290,12 @@ when loaded.</p>
1249
1290
  <pre class="lines">
1250
1291
 
1251
1292
 
1252
- 161
1253
- 162
1254
- 163</pre>
1293
+ 192
1294
+ 193
1295
+ 194</pre>
1255
1296
  </td>
1256
1297
  <td>
1257
- <pre class="code"><span class="info file"># File 'opal/dxopal/window.rb', line 161</span>
1298
+ <pre class="code"><span class="info file"># File 'lib/dxopal/window.rb', line 192</span>
1258
1299
 
1259
1300
  <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
1301
  <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 +1320,12 @@ when loaded.</p>
1279
1320
  <pre class="lines">
1280
1321
 
1281
1322
 
1282
- 165
1283
- 166
1284
- 167</pre>
1323
+ 196
1324
+ 197
1325
+ 198</pre>
1285
1326
  </td>
1286
1327
  <td>
1287
- <pre class="code"><span class="info file"># File 'opal/dxopal/window.rb', line 165</span>
1328
+ <pre class="code"><span class="info file"># File 'lib/dxopal/window.rb', line 196</span>
1288
1329
 
1289
1330
  <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
1331
  <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 +1350,12 @@ when loaded.</p>
1309
1350
  <pre class="lines">
1310
1351
 
1311
1352
 
1312
- 135
1313
- 136
1314
- 137</pre>
1353
+ 166
1354
+ 167
1355
+ 168</pre>
1315
1356
  </td>
1316
1357
  <td>
1317
- <pre class="code"><span class="info file"># File 'opal/dxopal/window.rb', line 135</span>
1358
+ <pre class="code"><span class="info file"># File 'lib/dxopal/window.rb', line 166</span>
1318
1359
 
1319
1360
  <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
1361
  <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 +1380,14 @@ when loaded.</p>
1339
1380
  <pre class="lines">
1340
1381
 
1341
1382
 
1342
- 139
1343
- 140
1344
- 141
1345
- 142
1346
- 143</pre>
1383
+ 170
1384
+ 171
1385
+ 172
1386
+ 173
1387
+ 174</pre>
1347
1388
  </td>
1348
1389
  <td>
1349
- <pre class="code"><span class="info file"># File 'opal/dxopal/window.rb', line 139</span>
1390
+ <pre class="code"><span class="info file"># File 'lib/dxopal/window.rb', line 170</span>
1350
1391
 
1351
1392
  <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
1393
  <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 +1414,12 @@ when loaded.</p>
1373
1414
  <pre class="lines">
1374
1415
 
1375
1416
 
1376
- 149
1377
- 150
1378
- 151</pre>
1417
+ 180
1418
+ 181
1419
+ 182</pre>
1379
1420
  </td>
1380
1421
  <td>
1381
- <pre class="code"><span class="info file"># File 'opal/dxopal/window.rb', line 149</span>
1422
+ <pre class="code"><span class="info file"># File 'lib/dxopal/window.rb', line 180</span>
1382
1423
 
1383
1424
  <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
1425
  <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 +1444,13 @@ when loaded.</p>
1403
1444
  <pre class="lines">
1404
1445
 
1405
1446
 
1406
- 43
1407
- 44
1408
- 45
1409
- 46</pre>
1447
+ 46
1448
+ 47
1449
+ 48
1450
+ 49</pre>
1410
1451
  </td>
1411
1452
  <td>
1412
- <pre class="code"><span class="info file"># File 'opal/dxopal/window.rb', line 43</span>
1453
+ <pre class="code"><span class="info file"># File 'lib/dxopal/window.rb', line 46</span>
1413
1454
 
1414
1455
  <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
1456
  <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 +1476,12 @@ when loaded.</p>
1435
1476
  <pre class="lines">
1436
1477
 
1437
1478
 
1438
- 145
1439
- 146
1440
- 147</pre>
1479
+ 176
1480
+ 177
1481
+ 178</pre>
1441
1482
  </td>
1442
1483
  <td>
1443
- <pre class="code"><span class="info file"># File 'opal/dxopal/window.rb', line 145</span>
1484
+ <pre class="code"><span class="info file"># File 'lib/dxopal/window.rb', line 176</span>
1444
1485
 
1445
1486
  <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
1487
  <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 +1506,12 @@ when loaded.</p>
1465
1506
  <pre class="lines">
1466
1507
 
1467
1508
 
1468
- 131
1469
- 132
1470
- 133</pre>
1509
+ 162
1510
+ 163
1511
+ 164</pre>
1471
1512
  </td>
1472
1513
  <td>
1473
- <pre class="code"><span class="info file"># File 'opal/dxopal/window.rb', line 131</span>
1514
+ <pre class="code"><span class="info file"># File 'lib/dxopal/window.rb', line 162</span>
1474
1515
 
1475
1516
  <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
1517
  <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 +1536,12 @@ when loaded.</p>
1495
1536
  <pre class="lines">
1496
1537
 
1497
1538
 
1498
- 127
1499
- 128
1500
- 129</pre>
1539
+ 158
1540
+ 159
1541
+ 160</pre>
1501
1542
  </td>
1502
1543
  <td>
1503
- <pre class="code"><span class="info file"># File 'opal/dxopal/window.rb', line 127</span>
1544
+ <pre class="code"><span class="info file"># File 'lib/dxopal/window.rb', line 158</span>
1504
1545
 
1505
1546
  <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
1547
  <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 +1566,12 @@ when loaded.</p>
1525
1566
  <pre class="lines">
1526
1567
 
1527
1568
 
1528
- 169
1529
- 170
1530
- 171</pre>
1569
+ 200
1570
+ 201
1571
+ 202</pre>
1531
1572
  </td>
1532
1573
  <td>
1533
- <pre class="code"><span class="info file"># File 'opal/dxopal/window.rb', line 169</span>
1574
+ <pre class="code"><span class="info file"># File 'lib/dxopal/window.rb', line 200</span>
1534
1575
 
1535
1576
  <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
1577
  <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 +1596,12 @@ when loaded.</p>
1555
1596
  <pre class="lines">
1556
1597
 
1557
1598
 
1558
- 173
1559
- 174
1560
- 175</pre>
1599
+ 204
1600
+ 205
1601
+ 206</pre>
1561
1602
  </td>
1562
1603
  <td>
1563
- <pre class="code"><span class="info file"># File 'opal/dxopal/window.rb', line 173</span>
1604
+ <pre class="code"><span class="info file"># File 'lib/dxopal/window.rb', line 204</span>
1564
1605
 
1565
1606
  <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
1607
  <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 +1637,12 @@ when loaded.</p>
1596
1637
  <pre class="lines">
1597
1638
 
1598
1639
 
1599
- 178
1600
- 179
1601
- 180</pre>
1640
+ 209
1641
+ 210
1642
+ 211</pre>
1602
1643
  </td>
1603
1644
  <td>
1604
- <pre class="code"><span class="info file"># File 'opal/dxopal/window.rb', line 178</span>
1645
+ <pre class="code"><span class="info file"># File 'lib/dxopal/window.rb', line 209</span>
1605
1646
 
1606
1647
  <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
1648
  <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 +1667,10 @@ when loaded.</p>
1626
1667
  <pre class="lines">
1627
1668
 
1628
1669
 
1629
- 112</pre>
1670
+ 129</pre>
1630
1671
  </td>
1631
1672
  <td>
1632
- <pre class="code"><span class="info file"># File 'opal/dxopal/window.rb', line 112</span>
1673
+ <pre class="code"><span class="info file"># File 'lib/dxopal/window.rb', line 129</span>
1633
1674
 
1634
1675
  <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
1676
  </td>
@@ -1652,10 +1693,10 @@ when loaded.</p>
1652
1693
  <pre class="lines">
1653
1694
 
1654
1695
 
1655
- 113</pre>
1696
+ 130</pre>
1656
1697
  </td>
1657
1698
  <td>
1658
- <pre class="code"><span class="info file"># File 'opal/dxopal/window.rb', line 113</span>
1699
+ <pre class="code"><span class="info file"># File 'lib/dxopal/window.rb', line 130</span>
1659
1700
 
1660
1701
  <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
1702
  </td>
@@ -1678,10 +1719,10 @@ when loaded.</p>
1678
1719
  <pre class="lines">
1679
1720
 
1680
1721
 
1681
- 117</pre>
1722
+ 141</pre>
1682
1723
  </td>
1683
1724
  <td>
1684
- <pre class="code"><span class="info file"># File 'opal/dxopal/window.rb', line 117</span>
1725
+ <pre class="code"><span class="info file"># File 'lib/dxopal/window.rb', line 141</span>
1685
1726
 
1686
1727
  <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
1728
  </td>
@@ -1698,18 +1739,39 @@ when loaded.</p>
1698
1739
 
1699
1740
 
1700
1741
 
1701
- </h3><table class="source_code">
1742
+ </h3><div class="docstring">
1743
+ <div class="discussion">
1744
+
1745
+ <p>Set window height and resize the canvas Set `nil` to maximize canvas</p>
1746
+
1747
+
1748
+ </div>
1749
+ </div>
1750
+ <div class="tags">
1751
+
1752
+
1753
+ </div><table class="source_code">
1702
1754
  <tr>
1703
1755
  <td>
1704
1756
  <pre class="lines">
1705
1757
 
1706
1758
 
1707
- 118</pre>
1759
+ 144
1760
+ 145
1761
+ 146
1762
+ 147
1763
+ 148
1764
+ 149</pre>
1708
1765
  </td>
1709
1766
  <td>
1710
- <pre class="code"><span class="info file"># File 'opal/dxopal/window.rb', line 118</span>
1767
+ <pre class="code"><span class="info file"># File 'lib/dxopal/window.rb', line 144</span>
1711
1768
 
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>
1769
+ <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>
1770
+ <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>
1771
+ <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>
1772
+ <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>
1773
+ <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>
1774
+ <span class='kw'>end</span></pre>
1713
1775
  </td>
1714
1776
  </tr>
1715
1777
  </table>
@@ -1727,8 +1789,7 @@ when loaded.</p>
1727
1789
  </h3><div class="docstring">
1728
1790
  <div class="discussion">
1729
1791
 
1730
- <p>Load resources specified with Image.register or Sound.register Call block
1731
- when loaded</p>
1792
+ <p>Load resources specified with Image.register or Sound.register Call block when loaded</p>
1732
1793
 
1733
1794
 
1734
1795
  </div>
@@ -1742,14 +1803,14 @@ when loaded</p>
1742
1803
  <pre class="lines">
1743
1804
 
1744
1805
 
1745
- 16
1746
- 17
1747
1806
  18
1748
1807
  19
1749
- 20</pre>
1808
+ 20
1809
+ 21
1810
+ 22</pre>
1750
1811
  </td>
1751
1812
  <td>
1752
- <pre class="code"><span class="info file"># File 'opal/dxopal/window.rb', line 16</span>
1813
+ <pre class="code"><span class="info file"># File 'lib/dxopal/window.rb', line 18</span>
1753
1814
 
1754
1815
  <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
1816
  <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 +1836,7 @@ when loaded</p>
1775
1836
 
1776
1837
  <p>Start main loop</p>
1777
1838
 
1778
- <p>When called twice, previous loop is stopped (this is useful when
1779
- implementing interactive game editor, etc.)</p>
1839
+ <p>When called twice, previous loop is stopped (this is useful when implementing interactive game editor, etc.)</p>
1780
1840
 
1781
1841
 
1782
1842
  </div>
@@ -1790,19 +1850,21 @@ implementing interactive game editor, etc.)</p>
1790
1850
  <pre class="lines">
1791
1851
 
1792
1852
 
1793
- 26
1794
- 27
1795
1853
  28
1796
1854
  29
1797
- 30</pre>
1855
+ 30
1856
+ 31
1857
+ 32
1858
+ 33</pre>
1798
1859
  </td>
1799
1860
  <td>
1800
- <pre class="code"><span class="info file"># File 'opal/dxopal/window.rb', line 26</span>
1861
+ <pre class="code"><span class="info file"># File 'lib/dxopal/window.rb', line 28</span>
1801
1862
 
1802
1863
  <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
1864
  <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
1865
  <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>
1866
+ <span class='kw'>return</span> <span class='kw'>if</span> <span class='id identifier rubyid_already_running'>already_running</span>
1867
+ <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>
1806
1868
  <span class='kw'>end</span></pre>
1807
1869
  </td>
1808
1870
  </tr>
@@ -1835,14 +1897,14 @@ implementing interactive game editor, etc.)</p>
1835
1897
  <pre class="lines">
1836
1898
 
1837
1899
 
1838
- 33
1839
- 34
1840
- 35
1841
1900
  36
1842
- 37</pre>
1901
+ 37
1902
+ 38
1903
+ 39
1904
+ 40</pre>
1843
1905
  </td>
1844
1906
  <td>
1845
- <pre class="code"><span class="info file"># File 'opal/dxopal/window.rb', line 33</span>
1907
+ <pre class="code"><span class="info file"># File 'lib/dxopal/window.rb', line 36</span>
1846
1908
 
1847
1909
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_pause'>pause</span>
1848
1910
  <span class='cvar'>@@paused</span> <span class='op'>=</span> <span class='kw'>true</span>
@@ -1891,10 +1953,10 @@ implementing interactive game editor, etc.)</p>
1891
1953
  <pre class="lines">
1892
1954
 
1893
1955
 
1894
- 38</pre>
1956
+ 41</pre>
1895
1957
  </td>
1896
1958
  <td>
1897
- <pre class="code"><span class="info file"># File 'opal/dxopal/window.rb', line 38</span>
1959
+ <pre class="code"><span class="info file"># File 'lib/dxopal/window.rb', line 41</span>
1898
1960
 
1899
1961
  <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
1962
  </td>
@@ -1917,10 +1979,10 @@ implementing interactive game editor, etc.)</p>
1917
1979
  <pre class="lines">
1918
1980
 
1919
1981
 
1920
- 114</pre>
1982
+ 131</pre>
1921
1983
  </td>
1922
1984
  <td>
1923
- <pre class="code"><span class="info file"># File 'opal/dxopal/window.rb', line 114</span>
1985
+ <pre class="code"><span class="info file"># File 'lib/dxopal/window.rb', line 131</span>
1924
1986
 
1925
1987
  <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
1988
  </td>
@@ -1943,13 +2005,13 @@ implementing interactive game editor, etc.)</p>
1943
2005
  <pre class="lines">
1944
2006
 
1945
2007
 
1946
- 39
1947
- 40
1948
- 41
1949
- 42</pre>
2008
+ 42
2009
+ 43
2010
+ 44
2011
+ 45</pre>
1950
2012
  </td>
1951
2013
  <td>
1952
- <pre class="code"><span class="info file"># File 'opal/dxopal/window.rb', line 39</span>
2014
+ <pre class="code"><span class="info file"># File 'lib/dxopal/window.rb', line 42</span>
1953
2015
 
1954
2016
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_resume'>resume</span>
1955
2017
  <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 +2037,10 @@ implementing interactive game editor, etc.)</p>
1975
2037
  <pre class="lines">
1976
2038
 
1977
2039
 
1978
- 115</pre>
2040
+ 132</pre>
1979
2041
  </td>
1980
2042
  <td>
1981
- <pre class="code"><span class="info file"># File 'opal/dxopal/window.rb', line 115</span>
2043
+ <pre class="code"><span class="info file"># File 'lib/dxopal/window.rb', line 132</span>
1982
2044
 
1983
2045
  <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
2046
  </td>
@@ -1995,18 +2057,39 @@ implementing interactive game editor, etc.)</p>
1995
2057
 
1996
2058
 
1997
2059
 
1998
- </h3><table class="source_code">
2060
+ </h3><div class="docstring">
2061
+ <div class="discussion">
2062
+
2063
+ <p>Set window width and resize the canvas Set `nil` to maximize canvas</p>
2064
+
2065
+
2066
+ </div>
2067
+ </div>
2068
+ <div class="tags">
2069
+
2070
+
2071
+ </div><table class="source_code">
1999
2072
  <tr>
2000
2073
  <td>
2001
2074
  <pre class="lines">
2002
2075
 
2003
2076
 
2004
- 116</pre>
2077
+ 135
2078
+ 136
2079
+ 137
2080
+ 138
2081
+ 139
2082
+ 140</pre>
2005
2083
  </td>
2006
2084
  <td>
2007
- <pre class="code"><span class="info file"># File 'opal/dxopal/window.rb', line 116</span>
2085
+ <pre class="code"><span class="info file"># File 'lib/dxopal/window.rb', line 135</span>
2008
2086
 
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>
2087
+ <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>
2088
+ <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>
2089
+ <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>
2090
+ <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>
2091
+ <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>
2092
+ <span class='kw'>end</span></pre>
2010
2093
  </td>
2011
2094
  </tr>
2012
2095
  </table>
@@ -2017,9 +2100,9 @@ implementing interactive game editor, etc.)</p>
2017
2100
  </div>
2018
2101
 
2019
2102
  <div id="footer">
2020
- Generated on Sat Sep 29 15:56:47 2018 by
2103
+ Generated on Tue Dec 29 11:37:23 2020 by
2021
2104
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
2022
- 0.9.16 (ruby-2.5.1).
2105
+ 0.9.26 (ruby-2.7.0).
2023
2106
  </div>
2024
2107
 
2025
2108
  </div>