1 | <!DOCTYPE html>
|
2 |
|
3 | <html lang="en">
|
4 | <head>
|
5 | <meta charset="utf-8">
|
6 | <meta name="viewport" content="width=device-width">
|
7 | <title>CrossBrowdy API documentation Namespace: CB_Collisions</title>
|
8 |
|
9 | |
10 |
|
11 |
|
12 | <link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
|
13 |
|
14 | <link type="text/css" rel="stylesheet" href="styles/site.cosmo.css">
|
15 |
|
16 | </head>
|
17 |
|
18 | <body style="min-width:800px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
19 |
|
20 | <div class="navbar navbar-default navbar-fixed-top ">
|
21 | <div class="container">
|
22 | <div class="navbar-header">
|
23 | <a class="navbar-brand" href="index.html">CrossBrowdy API documentation</a>
|
24 | <button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">
|
25 | <span class="icon-bar"></span>
|
26 | <span class="icon-bar"></span>
|
27 | <span class="icon-bar"></span>
|
28 | </button>
|
29 | </div>
|
30 | <div class="navbar-collapse collapse" id="topNavigation">
|
31 | <ul class="nav navbar-nav">
|
32 |
|
33 | <li class="dropdown">
|
34 | <a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b class="caret"></b></a>
|
35 | <ul class="dropdown-menu inline">
|
36 | <li><a href="CB_Arrays.html">CB_Arrays</a></li><li><a href="CB_AudioDetector.html">CB_AudioDetector</a></li><li><a href="CB_baseSymbols.html">CB_baseSymbols</a></li><li><a href="CB_Client.html">CB_Client</a></li><li><a href="CB_Collisions.html">CB_Collisions</a></li><li><a href="CB_Configuration.html">CB_Configuration</a></li><li><a href="CB_Configuration.CrossBase.html">CB_Configuration.CrossBase</a></li><li><a href="CB_Configuration.CrossBrowdy.html">CB_Configuration.CrossBrowdy</a></li><li><a href="CB_Controllers.html">CB_Controllers</a></li><li><a href="CB_Controllers_Proprietary.html">CB_Controllers_Proprietary</a></li><li><a href="CB_Controllers_Proprietary.WII.html">CB_Controllers_Proprietary.WII</a></li><li><a href="CB_Controllers_Proprietary.WII_U.html">CB_Controllers_Proprietary.WII_U</a></li><li><a href="CB_Device.html">CB_Device</a></li><li><a href="CB_Device.AmbientLight.html">CB_Device.AmbientLight</a></li><li><a href="CB_Device.Battery.html">CB_Device.Battery</a></li><li><a href="CB_Device.Location.html">CB_Device.Location</a></li><li><a href="CB_Device.Motion.html">CB_Device.Motion</a></li><li><a href="CB_Device.Orientation.html">CB_Device.Orientation</a></li><li><a href="CB_Device.Proximity.html">CB_Device.Proximity</a></li><li><a href="CB_Device.Vibration.html">CB_Device.Vibration</a></li><li><a href="CB_Elements.html">CB_Elements</a></li><li><a href="CB_Events.html">CB_Events</a></li><li><a href="CB_Keyboard.html">CB_Keyboard</a></li><li><a href="CB_Keyboard.chars.html">CB_Keyboard.chars</a></li><li><a href="CB_Keyboard.extended.html">CB_Keyboard.extended</a></li><li><a href="CB_Keyboard.keys.html">CB_Keyboard.keys</a></li><li><a href="CB_Modules.html">CB_Modules</a></li><li><a href="CB_Mouse.html">CB_Mouse</a></li><li><a href="CB_Mouse.CursorImage.html">CB_Mouse.CursorImage</a></li><li><a href="CB_Net.html">CB_Net</a></li><li><a href="CB_Net.Fetch.html">CB_Net.Fetch</a></li><li><a href="CB_Net.REST.html">CB_Net.REST</a></li><li><a href="CB_Net.Sockets.html">CB_Net.Sockets</a></li><li><a href="CB_Net.Sockets.SockJS.html">CB_Net.Sockets.SockJS</a></li><li><a href="CB_Net.XHR.html">CB_Net.XHR</a></li><li><a href="CB_Pointer.html">CB_Pointer</a></li><li><a href="CB_Screen.html">CB_Screen</a></li><li><a href="CB_Speaker.html">CB_Speaker</a></li><li><a href="CB_Touch.html">CB_Touch</a></li>
|
37 | </ul>
|
38 | </li>
|
39 |
|
40 | <li class="dropdown">
|
41 | <a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b class="caret"></b></a>
|
42 | <ul class="dropdown-menu inline">
|
43 | <li><a href="CB_AudioFile.html">CB_AudioFile</a></li><li><a href="CB_AudioFile_API.AAPI.html">CB_AudioFile_API.AAPI</a></li><li><a href="CB_AudioFile_API.ACMP.html">CB_AudioFile_API.ACMP</a></li><li><a href="CB_AudioFile_API.SM2.html">CB_AudioFile_API.SM2</a></li><li><a href="CB_AudioFile_API.WAAPI.html">CB_AudioFile_API.WAAPI</a></li><li><a href="CB_AudioFileCache.html">CB_AudioFileCache</a></li><li><a href="CB_AudioFileSprites.html">CB_AudioFileSprites</a></li><li><a href="CB_AudioFileSpritesPool.html">CB_AudioFileSpritesPool</a></li><li><a href="CB_Canvas.html">CB_Canvas</a></li><li><a href="CB_GraphicSprites.html">CB_GraphicSprites</a></li><li><a href="CB_GraphicSpritesScene.html">CB_GraphicSpritesScene</a></li>
|
44 | </ul>
|
45 | </li>
|
46 |
|
47 | <li class="dropdown">
|
48 | <a href="global.html" class="dropdown-toggle" data-toggle="dropdown">Global<b class="caret"></b></a>
|
49 | <ul class="dropdown-menu inline">
|
50 | <li><a href="global.html#CB_addCredits">CB_addCredits</a></li><li><a href="global.html#CB_BASE_NAME">CB_BASE_NAME</a></li><li><a href="global.html#CB_baseToBase">CB_baseToBase</a></li><li><a href="global.html#CB_baseToInt">CB_baseToInt</a></li><li><a href="global.html#CB_br2nl">CB_br2nl</a></li><li><a href="global.html#CB_brToNl">CB_brToNl</a></li><li><a href="global.html#CB_combineArraysOrObjects">CB_combineArraysOrObjects</a></li><li><a href="global.html#CB_combineAutomatically">CB_combineAutomatically</a></li><li><a href="global.html#CB_combineJSON">CB_combineJSON</a></li><li><a href="global.html#CB_combineURIParameters">CB_combineURIParameters</a></li><li><a href="global.html#CB_combineURLParameters">CB_combineURLParameters</a></li><li><a href="global.html#CB_console">CB_console</a></li><li><a href="global.html#CB_copyObject">CB_copyObject</a></li><li><a href="global.html#CB_countDecimalDigits">CB_countDecimalDigits</a></li><li><a href="global.html#CB_countDecimalPart">CB_countDecimalPart</a></li><li><a href="global.html#CB_countDecimals">CB_countDecimals</a></li><li><a href="global.html#CB_countIntegerDigits">CB_countIntegerDigits</a></li><li><a href="global.html#CB_countIntegerPart">CB_countIntegerPart</a></li><li><a href="global.html#CB_credits">CB_credits</a></li><li><a href="global.html#CB_CREDITS_DEFAULT">CB_CREDITS_DEFAULT</a></li><li><a href="global.html#CB_forceString">CB_forceString</a></li><li><a href="global.html#CB_forEach">CB_forEach</a></li><li><a href="global.html#CB_getBase64StringObject">CB_getBase64StringObject</a></li><li><a href="global.html#CB_getCookie">CB_getCookie</a></li><li><a href="global.html#CB_getDatum">CB_getDatum</a></li><li><a href="global.html#CB_getJSONPropertyValue">CB_getJSONPropertyValue</a></li><li><a href="global.html#CB_getLZStringObject">CB_getLZStringObject</a></li><li><a href="global.html#CB_getValueIndex">CB_getValueIndex</a></li><li><a href="global.html#CB_getValuePath">CB_getValuePath</a></li><li><a href="global.html#CB_includeJSFile">CB_includeJSFile</a></li><li><a href="global.html#CB_indexOf">CB_indexOf</a></li><li><a href="global.html#CB_init">CB_init</a></li><li><a href="global.html#CB_intToBase">CB_intToBase</a></li><li><a href="global.html#CB_isArray">CB_isArray</a></li><li><a href="global.html#CB_isEmail">CB_isEmail</a></li><li><a href="global.html#CB_isFileLocal">CB_isFileLocal</a></li><li><a href="global.html#CB_isString">CB_isString</a></li><li><a href="global.html#CB_lastIndexOf">CB_lastIndexOf</a></li><li><a href="global.html#CB_ltrim">CB_ltrim</a></li><li><a href="global.html#CB_NAME">CB_NAME</a></li><li><a href="global.html#CB_nl2br">CB_nl2br</a></li><li><a href="global.html#CB_nlToBr">CB_nlToBr</a></li><li><a href="global.html#CB_numberFormat">CB_numberFormat</a></li><li><a href="global.html#CB_numberOfDecimalDigits">CB_numberOfDecimalDigits</a></li><li><a href="global.html#CB_numberOfDecimals">CB_numberOfDecimals</a></li><li><a href="global.html#CB_numberOfIntegerDigits">CB_numberOfIntegerDigits</a></li><li><a href="global.html#CB_OPTIONS">CB_OPTIONS</a></li><li><a href="global.html#CB_parseJSON">CB_parseJSON</a></li><li><a href="global.html#CB_parseString">CB_parseString</a></li><li><a href="global.html#CB_regularExpressionString">CB_regularExpressionString</a></li><li><a href="global.html#CB_renderString">CB_renderString</a></li><li><a href="global.html#CB_replaceAll">CB_replaceAll</a></li><li><a href="global.html#CB_rtrim">CB_rtrim</a></li><li><a href="global.html#CB_scriptPath">CB_scriptPath</a></li><li><a href="global.html#CB_scriptPathCalculate">CB_scriptPathCalculate</a></li><li><a href="global.html#CB_setCookie">CB_setCookie</a></li><li><a href="global.html#CB_setDatum">CB_setDatum</a></li><li><a href="global.html#CB_sizeof">CB_sizeof</a></li><li><a href="global.html#CB_sizeOf">CB_sizeOf</a></li><li><a href="global.html#CB_stringifyJSON">CB_stringifyJSON</a></li><li><a href="global.html#CB_symmetricCall">CB_symmetricCall</a></li><li><a href="global.html#CB_symmetricCallClear">CB_symmetricCallClear</a></li><li><a href="global.html#CB_this">CB_this</a></li><li><a href="global.html#CB_trim">CB_trim</a></li><li><a href="global.html#CB_VERSION">CB_VERSION</a></li>
|
51 | </ul>
|
52 | </li>
|
53 |
|
54 | </ul>
|
55 |
|
56 | <div class="col-sm-3 col-md-3">
|
57 | <form class="navbar-form" role="search">
|
58 | <div class="input-group">
|
59 | <input type="text" class="form-control" placeholder="Search" name="q" id="search-input">
|
60 | <div class="input-group-btn">
|
61 | <button class="btn btn-default" id="search-submit"><i class="glyphicon glyphicon-search"></i></button>
|
62 | </div>
|
63 | </div>
|
64 | </form>
|
65 | </div>
|
66 |
|
67 | </div>
|
68 |
|
69 | </div>
|
70 | </div>
|
71 |
|
72 |
|
73 | <div class="container" id="toc-content" style="width:100%;">
|
74 | <div class="row" style="width:100%;">
|
75 |
|
76 |
|
77 | <div class="col-md-8" style="width:85%;">
|
78 |
|
79 | <div id="main">
|
80 |
|
81 |
|
82 |
|
83 | <h1 class="page-title">Namespace: CB_Collisions</h1>
|
84 |
|
85 | <section>
|
86 |
|
87 | <header>
|
88 |
|
89 | <h2>
|
90 | CB_Collisions
|
91 | </h2>
|
92 |
|
93 |
|
94 | </header>
|
95 |
|
96 |
|
97 | <article>
|
98 | <div class="container-overview">
|
99 |
|
100 |
|
101 | <div class="description"><p>Static class to manage collisions. It will return itself if it is tried to be instantiated.</p></div>
|
102 |
|
103 |
|
104 |
|
105 | <dl class="details">
|
106 |
|
107 |
|
108 |
|
109 |
|
110 |
|
111 |
|
112 |
|
113 |
|
114 |
|
115 |
|
116 |
|
117 |
|
118 |
|
119 |
|
120 |
|
121 |
|
122 |
|
123 |
|
124 |
|
125 |
|
126 |
|
127 |
|
128 |
|
129 |
|
130 |
|
131 |
|
132 |
|
133 |
|
134 |
|
135 | <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
|
136 | <dd class="tag-source">
|
137 | <ul class="dummy">
|
138 | <li>
|
139 | <a href="CrossBase_general_CB_Collisions.js.html">CrossBase/general/CB_Collisions.js</a>,
|
140 | <a href="CrossBase_general_CB_Collisions.js.html#sunlight-1-line-18">line 18</a>
|
141 | </li>
|
142 | </ul>
|
143 | </dd>
|
144 |
|
145 |
|
146 |
|
147 |
|
148 |
|
149 |
|
150 |
|
151 | <dt class="tag-todo method-doc-label method-doc-details-label">To Do:</dt>
|
152 | <dd class="tag-todo">
|
153 | <ul>
|
154 | <li>Finish many functions for many more kinds of collisions.</li>
|
155 |
|
156 | <li>Add triangles, polygons, arcs, etc.</li>
|
157 |
|
158 | <li>Add support to more dimensions (at least to 3D).</li>
|
159 |
|
160 | <li>Add lacking "touching" functions, equivalent to the "over" ones.</li>
|
161 |
|
162 | <li>Add a boolean parameter and a border parameter to detect collision just when it hits the border (not when it is inside of the object without touching the border), for "hollow" shapes.</li>
|
163 |
|
164 | <li>Think about adding function aliases with reversed names (for example, "isElementOverPoint" that points to "isPointOverElement", etc.). Think about whether the aliases should or not have some parameters in reversed order.</li>
|
165 | </ul>
|
166 | </dd>
|
167 |
|
168 | </dl>
|
169 |
|
170 |
|
171 |
|
172 |
|
173 | </div>
|
174 |
|
175 |
|
176 |
|
177 |
|
178 |
|
179 |
|
180 |
|
181 |
|
182 |
|
183 |
|
184 |
|
185 |
|
186 |
|
187 |
|
188 | <h3 class="subsection-title">Methods</h3>
|
189 |
|
190 | <dl>
|
191 |
|
192 | <hr>
|
193 | <dt>
|
194 | <h4 class="name" id=".getDistancePoints"><span class="type-signature"><static> </span>getDistancePoints<span class="signature">(x, y, x2, y2)</span><span class="type-signature"> → {number|null}</span></h4>
|
195 |
|
196 |
|
197 | </dt>
|
198 | <dd>
|
199 |
|
200 |
|
201 | <div class="description">
|
202 | <p>Tells the distance between two points.</p>
|
203 | </div>
|
204 |
|
205 |
|
206 |
|
207 |
|
208 |
|
209 |
|
210 |
|
211 |
|
212 | <h5>Parameters:</h5>
|
213 |
|
214 |
|
215 | <table class="params table table-striped">
|
216 | <thead>
|
217 | <tr>
|
218 |
|
219 | <th style="width:12%; min-width:110px;">Name</th>
|
220 |
|
221 |
|
222 | <th style="width:12%; min-width:110px;">Type</th>
|
223 |
|
224 |
|
225 |
|
226 |
|
227 |
|
228 | <th class="last" style="min-width:310px;">Description</th>
|
229 | </tr>
|
230 | </thead>
|
231 |
|
232 | <tbody>
|
233 |
|
234 |
|
235 | <tr>
|
236 |
|
237 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>x</code></td>
|
238 |
|
239 |
|
240 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
241 |
|
242 |
|
243 | <span class="param-type">number</span>
|
244 |
|
245 |
|
246 |
|
247 |
|
248 | </td>
|
249 |
|
250 |
|
251 |
|
252 |
|
253 |
|
254 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "X" coordinate of the first point.</p></td>
|
255 | </tr>
|
256 |
|
257 |
|
258 |
|
259 | <tr>
|
260 |
|
261 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>y</code></td>
|
262 |
|
263 |
|
264 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
265 |
|
266 |
|
267 | <span class="param-type">number</span>
|
268 |
|
269 |
|
270 |
|
271 |
|
272 | </td>
|
273 |
|
274 |
|
275 |
|
276 |
|
277 |
|
278 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "Y" coordinate of the first point.</p></td>
|
279 | </tr>
|
280 |
|
281 |
|
282 |
|
283 | <tr>
|
284 |
|
285 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>x2</code></td>
|
286 |
|
287 |
|
288 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
289 |
|
290 |
|
291 | <span class="param-type">number</span>
|
292 |
|
293 |
|
294 |
|
295 |
|
296 | </td>
|
297 |
|
298 |
|
299 |
|
300 |
|
301 |
|
302 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "X" coordinate of the second point.</p></td>
|
303 | </tr>
|
304 |
|
305 |
|
306 |
|
307 | <tr>
|
308 |
|
309 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>y2</code></td>
|
310 |
|
311 |
|
312 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
313 |
|
314 |
|
315 | <span class="param-type">number</span>
|
316 |
|
317 |
|
318 |
|
319 |
|
320 | </td>
|
321 |
|
322 |
|
323 |
|
324 |
|
325 |
|
326 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "Y" coordinate of the second point.</p></td>
|
327 | </tr>
|
328 |
|
329 |
|
330 | </tbody>
|
331 | </table>
|
332 |
|
333 |
|
334 |
|
335 |
|
336 | <dl class="details">
|
337 |
|
338 |
|
339 |
|
340 |
|
341 |
|
342 |
|
343 |
|
344 |
|
345 |
|
346 |
|
347 |
|
348 |
|
349 |
|
350 |
|
351 |
|
352 |
|
353 |
|
354 |
|
355 |
|
356 |
|
357 |
|
358 |
|
359 |
|
360 |
|
361 |
|
362 |
|
363 |
|
364 |
|
365 |
|
366 | <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
|
367 | <dd class="tag-source">
|
368 | <ul class="dummy">
|
369 | <li>
|
370 | <a href="CrossBase_general_CB_Collisions.js.html">CrossBase/general/CB_Collisions.js</a>,
|
371 | <a href="CrossBase_general_CB_Collisions.js.html#sunlight-1-line-49">line 49</a>
|
372 | </li>
|
373 | </ul>
|
374 | </dd>
|
375 |
|
376 |
|
377 |
|
378 |
|
379 |
|
380 |
|
381 |
|
382 | </dl>
|
383 |
|
384 |
|
385 |
|
386 |
|
387 |
|
388 |
|
389 |
|
390 |
|
391 |
|
392 |
|
393 |
|
394 |
|
395 |
|
396 | <h5>Returns:</h5>
|
397 |
|
398 |
|
399 | <div class="param-desc">
|
400 | <p>Returns the distance between the two points. In the case that it could not be calculated, returns null.</p>
|
401 | </div>
|
402 |
|
403 |
|
404 |
|
405 | <dl>
|
406 | <dt>
|
407 | Type
|
408 | </dt>
|
409 | <dd>
|
410 |
|
411 | <span class="param-type">number</span>
|
412 | |
|
413 |
|
414 | <span class="param-type">null</span>
|
415 |
|
416 |
|
417 |
|
418 | </dd>
|
419 | </dl>
|
420 |
|
421 |
|
422 |
|
423 |
|
424 |
|
425 | </dd>
|
426 |
|
427 |
|
428 |
|
429 | <hr>
|
430 | <dt>
|
431 | <h4 class="name" id=".isCircleOverCircle"><span class="type-signature"><static> </span>isCircleOverCircle<span class="signature">(centreX, centreY, radius, centreX2, centreY2, radius2)</span><span class="type-signature"> → {boolean}</span></h4>
|
432 |
|
433 |
|
434 | </dt>
|
435 | <dd>
|
436 |
|
437 |
|
438 | <div class="description">
|
439 | <p>Tells whether a circle is over another circle.</p>
|
440 | </div>
|
441 |
|
442 |
|
443 |
|
444 |
|
445 |
|
446 |
|
447 |
|
448 |
|
449 | <h5>Parameters:</h5>
|
450 |
|
451 |
|
452 | <table class="params table table-striped">
|
453 | <thead>
|
454 | <tr>
|
455 |
|
456 | <th style="width:12%; min-width:110px;">Name</th>
|
457 |
|
458 |
|
459 | <th style="width:12%; min-width:110px;">Type</th>
|
460 |
|
461 |
|
462 |
|
463 |
|
464 |
|
465 | <th class="last" style="min-width:310px;">Description</th>
|
466 | </tr>
|
467 | </thead>
|
468 |
|
469 | <tbody>
|
470 |
|
471 |
|
472 | <tr>
|
473 |
|
474 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>centreX</code></td>
|
475 |
|
476 |
|
477 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
478 |
|
479 |
|
480 | <span class="param-type">number</span>
|
481 |
|
482 |
|
483 |
|
484 |
|
485 | </td>
|
486 |
|
487 |
|
488 |
|
489 |
|
490 |
|
491 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "X" coordinate of the center of the first circle.</p></td>
|
492 | </tr>
|
493 |
|
494 |
|
495 |
|
496 | <tr>
|
497 |
|
498 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>centreY</code></td>
|
499 |
|
500 |
|
501 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
502 |
|
503 |
|
504 | <span class="param-type">number</span>
|
505 |
|
506 |
|
507 |
|
508 |
|
509 | </td>
|
510 |
|
511 |
|
512 |
|
513 |
|
514 |
|
515 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "Y" coordinate of the center of the first circle.</p></td>
|
516 | </tr>
|
517 |
|
518 |
|
519 |
|
520 | <tr>
|
521 |
|
522 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>radius</code></td>
|
523 |
|
524 |
|
525 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
526 |
|
527 |
|
528 | <span class="param-type">number</span>
|
529 |
|
530 |
|
531 |
|
532 |
|
533 | </td>
|
534 |
|
535 |
|
536 |
|
537 |
|
538 |
|
539 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The radius of the first circle.</p></td>
|
540 | </tr>
|
541 |
|
542 |
|
543 |
|
544 | <tr>
|
545 |
|
546 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>centreX2</code></td>
|
547 |
|
548 |
|
549 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
550 |
|
551 |
|
552 | <span class="param-type">number</span>
|
553 |
|
554 |
|
555 |
|
556 |
|
557 | </td>
|
558 |
|
559 |
|
560 |
|
561 |
|
562 |
|
563 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "X" coordinate of the center of the second circle.</p></td>
|
564 | </tr>
|
565 |
|
566 |
|
567 |
|
568 | <tr>
|
569 |
|
570 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>centreY2</code></td>
|
571 |
|
572 |
|
573 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
574 |
|
575 |
|
576 | <span class="param-type">number</span>
|
577 |
|
578 |
|
579 |
|
580 |
|
581 | </td>
|
582 |
|
583 |
|
584 |
|
585 |
|
586 |
|
587 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "Y" coordinate of the center of the second circle.</p></td>
|
588 | </tr>
|
589 |
|
590 |
|
591 |
|
592 | <tr>
|
593 |
|
594 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>radius2</code></td>
|
595 |
|
596 |
|
597 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
598 |
|
599 |
|
600 | <span class="param-type">number</span>
|
601 |
|
602 |
|
603 |
|
604 |
|
605 | </td>
|
606 |
|
607 |
|
608 |
|
609 |
|
610 |
|
611 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The radius of the second circle.</p></td>
|
612 | </tr>
|
613 |
|
614 |
|
615 | </tbody>
|
616 | </table>
|
617 |
|
618 |
|
619 |
|
620 |
|
621 | <dl class="details">
|
622 |
|
623 |
|
624 |
|
625 |
|
626 |
|
627 |
|
628 |
|
629 |
|
630 |
|
631 |
|
632 |
|
633 |
|
634 |
|
635 |
|
636 |
|
637 |
|
638 |
|
639 |
|
640 |
|
641 |
|
642 |
|
643 |
|
644 |
|
645 |
|
646 |
|
647 |
|
648 |
|
649 |
|
650 |
|
651 | <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
|
652 | <dd class="tag-source">
|
653 | <ul class="dummy">
|
654 | <li>
|
655 | <a href="CrossBase_general_CB_Collisions.js.html">CrossBase/general/CB_Collisions.js</a>,
|
656 | <a href="CrossBase_general_CB_Collisions.js.html#sunlight-1-line-434">line 434</a>
|
657 | </li>
|
658 | </ul>
|
659 | </dd>
|
660 |
|
661 |
|
662 |
|
663 |
|
664 |
|
665 |
|
666 |
|
667 | </dl>
|
668 |
|
669 |
|
670 |
|
671 |
|
672 |
|
673 |
|
674 |
|
675 |
|
676 |
|
677 |
|
678 |
|
679 |
|
680 |
|
681 | <h5>Returns:</h5>
|
682 |
|
683 |
|
684 | <div class="param-desc">
|
685 | <p>Returns whether the circle is over the other circle.</p>
|
686 | </div>
|
687 |
|
688 |
|
689 |
|
690 | <dl>
|
691 | <dt>
|
692 | Type
|
693 | </dt>
|
694 | <dd>
|
695 |
|
696 | <span class="param-type">boolean</span>
|
697 |
|
698 |
|
699 |
|
700 | </dd>
|
701 | </dl>
|
702 |
|
703 |
|
704 |
|
705 |
|
706 |
|
707 | </dd>
|
708 |
|
709 |
|
710 |
|
711 | <hr>
|
712 | <dt>
|
713 | <h4 class="name" id=".isCircleTouchingCircle"><span class="type-signature"><static> </span>isCircleTouchingCircle<span class="signature">(centreX, centreY, radius, centreX2, centreY2, radius2)</span><span class="type-signature"> → {boolean}</span></h4>
|
714 |
|
715 |
|
716 | </dt>
|
717 | <dd>
|
718 |
|
719 |
|
720 | <div class="description">
|
721 | <p>Tells whether a circle is touching (maybe over) another circle. This will also return true if they are adjacent (next to each other).</p>
|
722 | </div>
|
723 |
|
724 |
|
725 |
|
726 |
|
727 |
|
728 |
|
729 |
|
730 |
|
731 | <h5>Parameters:</h5>
|
732 |
|
733 |
|
734 | <table class="params table table-striped">
|
735 | <thead>
|
736 | <tr>
|
737 |
|
738 | <th style="width:12%; min-width:110px;">Name</th>
|
739 |
|
740 |
|
741 | <th style="width:12%; min-width:110px;">Type</th>
|
742 |
|
743 |
|
744 |
|
745 |
|
746 |
|
747 | <th class="last" style="min-width:310px;">Description</th>
|
748 | </tr>
|
749 | </thead>
|
750 |
|
751 | <tbody>
|
752 |
|
753 |
|
754 | <tr>
|
755 |
|
756 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>centreX</code></td>
|
757 |
|
758 |
|
759 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
760 |
|
761 |
|
762 | <span class="param-type">number</span>
|
763 |
|
764 |
|
765 |
|
766 |
|
767 | </td>
|
768 |
|
769 |
|
770 |
|
771 |
|
772 |
|
773 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "X" coordinate of the center of the first circle.</p></td>
|
774 | </tr>
|
775 |
|
776 |
|
777 |
|
778 | <tr>
|
779 |
|
780 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>centreY</code></td>
|
781 |
|
782 |
|
783 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
784 |
|
785 |
|
786 | <span class="param-type">number</span>
|
787 |
|
788 |
|
789 |
|
790 |
|
791 | </td>
|
792 |
|
793 |
|
794 |
|
795 |
|
796 |
|
797 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "Y" coordinate of the center of the first circle.</p></td>
|
798 | </tr>
|
799 |
|
800 |
|
801 |
|
802 | <tr>
|
803 |
|
804 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>radius</code></td>
|
805 |
|
806 |
|
807 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
808 |
|
809 |
|
810 | <span class="param-type">number</span>
|
811 |
|
812 |
|
813 |
|
814 |
|
815 | </td>
|
816 |
|
817 |
|
818 |
|
819 |
|
820 |
|
821 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The radius of the first circle.</p></td>
|
822 | </tr>
|
823 |
|
824 |
|
825 |
|
826 | <tr>
|
827 |
|
828 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>centreX2</code></td>
|
829 |
|
830 |
|
831 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
832 |
|
833 |
|
834 | <span class="param-type">number</span>
|
835 |
|
836 |
|
837 |
|
838 |
|
839 | </td>
|
840 |
|
841 |
|
842 |
|
843 |
|
844 |
|
845 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "X" coordinate of the center of the second circle.</p></td>
|
846 | </tr>
|
847 |
|
848 |
|
849 |
|
850 | <tr>
|
851 |
|
852 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>centreY2</code></td>
|
853 |
|
854 |
|
855 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
856 |
|
857 |
|
858 | <span class="param-type">number</span>
|
859 |
|
860 |
|
861 |
|
862 |
|
863 | </td>
|
864 |
|
865 |
|
866 |
|
867 |
|
868 |
|
869 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "Y" coordinate of the center of the second circle.</p></td>
|
870 | </tr>
|
871 |
|
872 |
|
873 |
|
874 | <tr>
|
875 |
|
876 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>radius2</code></td>
|
877 |
|
878 |
|
879 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
880 |
|
881 |
|
882 | <span class="param-type">number</span>
|
883 |
|
884 |
|
885 |
|
886 |
|
887 | </td>
|
888 |
|
889 |
|
890 |
|
891 |
|
892 |
|
893 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The radius of the second circle.</p></td>
|
894 | </tr>
|
895 |
|
896 |
|
897 | </tbody>
|
898 | </table>
|
899 |
|
900 |
|
901 |
|
902 |
|
903 | <dl class="details">
|
904 |
|
905 |
|
906 |
|
907 |
|
908 |
|
909 |
|
910 |
|
911 |
|
912 |
|
913 |
|
914 |
|
915 |
|
916 |
|
917 |
|
918 |
|
919 |
|
920 |
|
921 |
|
922 |
|
923 |
|
924 |
|
925 |
|
926 |
|
927 |
|
928 |
|
929 |
|
930 |
|
931 |
|
932 |
|
933 | <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
|
934 | <dd class="tag-source">
|
935 | <ul class="dummy">
|
936 | <li>
|
937 | <a href="CrossBase_general_CB_Collisions.js.html">CrossBase/general/CB_Collisions.js</a>,
|
938 | <a href="CrossBase_general_CB_Collisions.js.html#sunlight-1-line-452">line 452</a>
|
939 | </li>
|
940 | </ul>
|
941 | </dd>
|
942 |
|
943 |
|
944 |
|
945 |
|
946 |
|
947 |
|
948 |
|
949 | </dl>
|
950 |
|
951 |
|
952 |
|
953 |
|
954 |
|
955 |
|
956 |
|
957 |
|
958 |
|
959 |
|
960 |
|
961 |
|
962 |
|
963 | <h5>Returns:</h5>
|
964 |
|
965 |
|
966 | <div class="param-desc">
|
967 | <p>Returns whether the circle is touching (maybe over) the other circle. This will also return true if they are adjacent (next to each other).</p>
|
968 | </div>
|
969 |
|
970 |
|
971 |
|
972 | <dl>
|
973 | <dt>
|
974 | Type
|
975 | </dt>
|
976 | <dd>
|
977 |
|
978 | <span class="param-type">boolean</span>
|
979 |
|
980 |
|
981 |
|
982 | </dd>
|
983 | </dl>
|
984 |
|
985 |
|
986 |
|
987 |
|
988 |
|
989 | </dd>
|
990 |
|
991 |
|
992 |
|
993 | <hr>
|
994 | <dt>
|
995 | <h4 class="name" id=".isElementOverElement"><span class="type-signature"><static> </span>isElementOverElement<span class="signature">(element, element2)</span><span class="type-signature"> → {boolean}</span></h4>
|
996 |
|
997 |
|
998 | </dt>
|
999 | <dd>
|
1000 |
|
1001 |
|
1002 | <div class="description">
|
1003 | <p>Tells whether two given DOM elements are over each other (they will be considered a rectangle).</p>
|
1004 | </div>
|
1005 |
|
1006 |
|
1007 |
|
1008 |
|
1009 |
|
1010 |
|
1011 |
|
1012 |
|
1013 | <h5>Parameters:</h5>
|
1014 |
|
1015 |
|
1016 | <table class="params table table-striped">
|
1017 | <thead>
|
1018 | <tr>
|
1019 |
|
1020 | <th style="width:12%; min-width:110px;">Name</th>
|
1021 |
|
1022 |
|
1023 | <th style="width:12%; min-width:110px;">Type</th>
|
1024 |
|
1025 |
|
1026 |
|
1027 |
|
1028 |
|
1029 | <th class="last" style="min-width:310px;">Description</th>
|
1030 | </tr>
|
1031 | </thead>
|
1032 |
|
1033 | <tbody>
|
1034 |
|
1035 |
|
1036 | <tr>
|
1037 |
|
1038 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>element</code></td>
|
1039 |
|
1040 |
|
1041 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
1042 |
|
1043 |
|
1044 | <span class="param-type">Element</span>
|
1045 |
|
1046 |
|
1047 |
|
1048 |
|
1049 | </td>
|
1050 |
|
1051 |
|
1052 |
|
1053 |
|
1054 |
|
1055 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The first DOM element that we want to check (it will be considered a rectangle).</p></td>
|
1056 | </tr>
|
1057 |
|
1058 |
|
1059 |
|
1060 | <tr>
|
1061 |
|
1062 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>element2</code></td>
|
1063 |
|
1064 |
|
1065 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
1066 |
|
1067 |
|
1068 | <span class="param-type">Element</span>
|
1069 |
|
1070 |
|
1071 |
|
1072 |
|
1073 | </td>
|
1074 |
|
1075 |
|
1076 |
|
1077 |
|
1078 |
|
1079 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The second DOM element that we want to check (it will be considered a rectangle).</p></td>
|
1080 | </tr>
|
1081 |
|
1082 |
|
1083 | </tbody>
|
1084 | </table>
|
1085 |
|
1086 |
|
1087 |
|
1088 |
|
1089 | <dl class="details">
|
1090 |
|
1091 |
|
1092 |
|
1093 |
|
1094 |
|
1095 |
|
1096 |
|
1097 |
|
1098 |
|
1099 |
|
1100 |
|
1101 |
|
1102 |
|
1103 |
|
1104 |
|
1105 |
|
1106 |
|
1107 |
|
1108 |
|
1109 |
|
1110 |
|
1111 |
|
1112 |
|
1113 |
|
1114 |
|
1115 |
|
1116 |
|
1117 |
|
1118 |
|
1119 | <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
|
1120 | <dd class="tag-source">
|
1121 | <ul class="dummy">
|
1122 | <li>
|
1123 | <a href="CrossBase_general_CB_Collisions.js.html">CrossBase/general/CB_Collisions.js</a>,
|
1124 | <a href="CrossBase_general_CB_Collisions.js.html#sunlight-1-line-402">line 402</a>
|
1125 | </li>
|
1126 | </ul>
|
1127 | </dd>
|
1128 |
|
1129 |
|
1130 |
|
1131 |
|
1132 |
|
1133 |
|
1134 |
|
1135 | </dl>
|
1136 |
|
1137 |
|
1138 |
|
1139 |
|
1140 |
|
1141 |
|
1142 |
|
1143 |
|
1144 |
|
1145 |
|
1146 |
|
1147 |
|
1148 |
|
1149 | <h5>Returns:</h5>
|
1150 |
|
1151 |
|
1152 | <div class="param-desc">
|
1153 | <p>Returns whether the two given DOM elements are over each other (they will be considered a rectangle).</p>
|
1154 | </div>
|
1155 |
|
1156 |
|
1157 |
|
1158 | <dl>
|
1159 | <dt>
|
1160 | Type
|
1161 | </dt>
|
1162 | <dd>
|
1163 |
|
1164 | <span class="param-type">boolean</span>
|
1165 |
|
1166 |
|
1167 |
|
1168 | </dd>
|
1169 | </dl>
|
1170 |
|
1171 |
|
1172 |
|
1173 |
|
1174 |
|
1175 | </dd>
|
1176 |
|
1177 |
|
1178 |
|
1179 | <hr>
|
1180 | <dt>
|
1181 | <h4 class="name" id=".isElementTouchingElement"><span class="type-signature"><static> </span>isElementTouchingElement<span class="signature">(element, element2)</span><span class="type-signature"> → {boolean}</span></h4>
|
1182 |
|
1183 |
|
1184 | </dt>
|
1185 | <dd>
|
1186 |
|
1187 |
|
1188 | <div class="description">
|
1189 | <p>Tells whether two given DOM elements are touching each other, maybe over each other (they will be considered a rectangle). This will also return true if they are adjacent (next to each other).</p>
|
1190 | </div>
|
1191 |
|
1192 |
|
1193 |
|
1194 |
|
1195 |
|
1196 |
|
1197 |
|
1198 |
|
1199 | <h5>Parameters:</h5>
|
1200 |
|
1201 |
|
1202 | <table class="params table table-striped">
|
1203 | <thead>
|
1204 | <tr>
|
1205 |
|
1206 | <th style="width:12%; min-width:110px;">Name</th>
|
1207 |
|
1208 |
|
1209 | <th style="width:12%; min-width:110px;">Type</th>
|
1210 |
|
1211 |
|
1212 |
|
1213 |
|
1214 |
|
1215 | <th class="last" style="min-width:310px;">Description</th>
|
1216 | </tr>
|
1217 | </thead>
|
1218 |
|
1219 | <tbody>
|
1220 |
|
1221 |
|
1222 | <tr>
|
1223 |
|
1224 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>element</code></td>
|
1225 |
|
1226 |
|
1227 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
1228 |
|
1229 |
|
1230 | <span class="param-type">Element</span>
|
1231 |
|
1232 |
|
1233 |
|
1234 |
|
1235 | </td>
|
1236 |
|
1237 |
|
1238 |
|
1239 |
|
1240 |
|
1241 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The first DOM element that we want to check (it will be considered a rectangle).</p></td>
|
1242 | </tr>
|
1243 |
|
1244 |
|
1245 |
|
1246 | <tr>
|
1247 |
|
1248 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>element2</code></td>
|
1249 |
|
1250 |
|
1251 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
1252 |
|
1253 |
|
1254 | <span class="param-type">Element</span>
|
1255 |
|
1256 |
|
1257 |
|
1258 |
|
1259 | </td>
|
1260 |
|
1261 |
|
1262 |
|
1263 |
|
1264 |
|
1265 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The second DOM element that we want to check (it will be considered a rectangle).</p></td>
|
1266 | </tr>
|
1267 |
|
1268 |
|
1269 | </tbody>
|
1270 | </table>
|
1271 |
|
1272 |
|
1273 |
|
1274 |
|
1275 | <dl class="details">
|
1276 |
|
1277 |
|
1278 |
|
1279 |
|
1280 |
|
1281 |
|
1282 |
|
1283 |
|
1284 |
|
1285 |
|
1286 |
|
1287 |
|
1288 |
|
1289 |
|
1290 |
|
1291 |
|
1292 |
|
1293 |
|
1294 |
|
1295 |
|
1296 |
|
1297 |
|
1298 |
|
1299 |
|
1300 |
|
1301 |
|
1302 |
|
1303 |
|
1304 |
|
1305 | <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
|
1306 | <dd class="tag-source">
|
1307 | <ul class="dummy">
|
1308 | <li>
|
1309 | <a href="CrossBase_general_CB_Collisions.js.html">CrossBase/general/CB_Collisions.js</a>,
|
1310 | <a href="CrossBase_general_CB_Collisions.js.html#sunlight-1-line-416">line 416</a>
|
1311 | </li>
|
1312 | </ul>
|
1313 | </dd>
|
1314 |
|
1315 |
|
1316 |
|
1317 |
|
1318 |
|
1319 |
|
1320 |
|
1321 | </dl>
|
1322 |
|
1323 |
|
1324 |
|
1325 |
|
1326 |
|
1327 |
|
1328 |
|
1329 |
|
1330 |
|
1331 |
|
1332 |
|
1333 |
|
1334 |
|
1335 | <h5>Returns:</h5>
|
1336 |
|
1337 |
|
1338 | <div class="param-desc">
|
1339 | <p>Returns whether the two given DOM elements are touching each other, maybe over each other (they will be considered a rectangle). This will also return true if they are adjacent (next to each other).</p>
|
1340 | </div>
|
1341 |
|
1342 |
|
1343 |
|
1344 | <dl>
|
1345 | <dt>
|
1346 | Type
|
1347 | </dt>
|
1348 | <dd>
|
1349 |
|
1350 | <span class="param-type">boolean</span>
|
1351 |
|
1352 |
|
1353 |
|
1354 | </dd>
|
1355 | </dl>
|
1356 |
|
1357 |
|
1358 |
|
1359 |
|
1360 |
|
1361 | </dd>
|
1362 |
|
1363 |
|
1364 |
|
1365 | <hr>
|
1366 | <dt>
|
1367 | <h4 class="name" id=".isLineOverCircle"><span class="type-signature"><static> </span>isLineOverCircle<span class="signature">(lineX1, lineY1, lineX2, lineY2, centreX, centreY, radius)</span><span class="type-signature"> → {boolean}</span></h4>
|
1368 |
|
1369 |
|
1370 | </dt>
|
1371 | <dd>
|
1372 |
|
1373 |
|
1374 | <div class="description">
|
1375 | <p>Tells whether a line (infinite) is over a given circle.</p>
|
1376 | </div>
|
1377 |
|
1378 |
|
1379 |
|
1380 |
|
1381 |
|
1382 |
|
1383 |
|
1384 |
|
1385 | <h5>Parameters:</h5>
|
1386 |
|
1387 |
|
1388 | <table class="params table table-striped">
|
1389 | <thead>
|
1390 | <tr>
|
1391 |
|
1392 | <th style="width:12%; min-width:110px;">Name</th>
|
1393 |
|
1394 |
|
1395 | <th style="width:12%; min-width:110px;">Type</th>
|
1396 |
|
1397 |
|
1398 |
|
1399 |
|
1400 |
|
1401 | <th class="last" style="min-width:310px;">Description</th>
|
1402 | </tr>
|
1403 | </thead>
|
1404 |
|
1405 | <tbody>
|
1406 |
|
1407 |
|
1408 | <tr>
|
1409 |
|
1410 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>lineX1</code></td>
|
1411 |
|
1412 |
|
1413 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
1414 |
|
1415 |
|
1416 | <span class="param-type">number</span>
|
1417 |
|
1418 |
|
1419 |
|
1420 |
|
1421 | </td>
|
1422 |
|
1423 |
|
1424 |
|
1425 |
|
1426 |
|
1427 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "X" coordinate of a first point of the line.</p></td>
|
1428 | </tr>
|
1429 |
|
1430 |
|
1431 |
|
1432 | <tr>
|
1433 |
|
1434 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>lineY1</code></td>
|
1435 |
|
1436 |
|
1437 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
1438 |
|
1439 |
|
1440 | <span class="param-type">number</span>
|
1441 |
|
1442 |
|
1443 |
|
1444 |
|
1445 | </td>
|
1446 |
|
1447 |
|
1448 |
|
1449 |
|
1450 |
|
1451 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "Y" coordinate of a first point of the line.</p></td>
|
1452 | </tr>
|
1453 |
|
1454 |
|
1455 |
|
1456 | <tr>
|
1457 |
|
1458 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>lineX2</code></td>
|
1459 |
|
1460 |
|
1461 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
1462 |
|
1463 |
|
1464 | <span class="param-type">number</span>
|
1465 |
|
1466 |
|
1467 |
|
1468 |
|
1469 | </td>
|
1470 |
|
1471 |
|
1472 |
|
1473 |
|
1474 |
|
1475 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "X" coordinate of a second point of the line.</p></td>
|
1476 | </tr>
|
1477 |
|
1478 |
|
1479 |
|
1480 | <tr>
|
1481 |
|
1482 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>lineY2</code></td>
|
1483 |
|
1484 |
|
1485 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
1486 |
|
1487 |
|
1488 | <span class="param-type">number</span>
|
1489 |
|
1490 |
|
1491 |
|
1492 |
|
1493 | </td>
|
1494 |
|
1495 |
|
1496 |
|
1497 |
|
1498 |
|
1499 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "Y" coordinate of a second point of the line.</p></td>
|
1500 | </tr>
|
1501 |
|
1502 |
|
1503 |
|
1504 | <tr>
|
1505 |
|
1506 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>centreX</code></td>
|
1507 |
|
1508 |
|
1509 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
1510 |
|
1511 |
|
1512 | <span class="param-type">number</span>
|
1513 |
|
1514 |
|
1515 |
|
1516 |
|
1517 | </td>
|
1518 |
|
1519 |
|
1520 |
|
1521 |
|
1522 |
|
1523 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "X" coordinate of the center of the first circle.</p></td>
|
1524 | </tr>
|
1525 |
|
1526 |
|
1527 |
|
1528 | <tr>
|
1529 |
|
1530 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>centreY</code></td>
|
1531 |
|
1532 |
|
1533 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
1534 |
|
1535 |
|
1536 | <span class="param-type">number</span>
|
1537 |
|
1538 |
|
1539 |
|
1540 |
|
1541 | </td>
|
1542 |
|
1543 |
|
1544 |
|
1545 |
|
1546 |
|
1547 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "Y" coordinate of the center of the first circle.</p></td>
|
1548 | </tr>
|
1549 |
|
1550 |
|
1551 |
|
1552 | <tr>
|
1553 |
|
1554 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>radius</code></td>
|
1555 |
|
1556 |
|
1557 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
1558 |
|
1559 |
|
1560 | <span class="param-type">number</span>
|
1561 |
|
1562 |
|
1563 |
|
1564 |
|
1565 | </td>
|
1566 |
|
1567 |
|
1568 |
|
1569 |
|
1570 |
|
1571 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The radius of the first circle.</p></td>
|
1572 | </tr>
|
1573 |
|
1574 |
|
1575 | </tbody>
|
1576 | </table>
|
1577 |
|
1578 |
|
1579 |
|
1580 |
|
1581 | <dl class="details">
|
1582 |
|
1583 |
|
1584 |
|
1585 |
|
1586 |
|
1587 |
|
1588 |
|
1589 |
|
1590 |
|
1591 |
|
1592 |
|
1593 |
|
1594 |
|
1595 |
|
1596 |
|
1597 |
|
1598 |
|
1599 |
|
1600 |
|
1601 |
|
1602 |
|
1603 |
|
1604 |
|
1605 |
|
1606 |
|
1607 |
|
1608 |
|
1609 |
|
1610 |
|
1611 | <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
|
1612 | <dd class="tag-source">
|
1613 | <ul class="dummy">
|
1614 | <li>
|
1615 | <a href="CrossBase_general_CB_Collisions.js.html">CrossBase/general/CB_Collisions.js</a>,
|
1616 | <a href="CrossBase_general_CB_Collisions.js.html#sunlight-1-line-536">line 536</a>
|
1617 | </li>
|
1618 | </ul>
|
1619 | </dd>
|
1620 |
|
1621 |
|
1622 |
|
1623 |
|
1624 |
|
1625 |
|
1626 |
|
1627 | </dl>
|
1628 |
|
1629 |
|
1630 |
|
1631 |
|
1632 |
|
1633 |
|
1634 |
|
1635 |
|
1636 |
|
1637 |
|
1638 |
|
1639 |
|
1640 |
|
1641 | <h5>Returns:</h5>
|
1642 |
|
1643 |
|
1644 | <div class="param-desc">
|
1645 | <p>Returns whether the line (infinite) is over the circle.</p>
|
1646 | </div>
|
1647 |
|
1648 |
|
1649 |
|
1650 | <dl>
|
1651 | <dt>
|
1652 | Type
|
1653 | </dt>
|
1654 | <dd>
|
1655 |
|
1656 | <span class="param-type">boolean</span>
|
1657 |
|
1658 |
|
1659 |
|
1660 | </dd>
|
1661 | </dl>
|
1662 |
|
1663 |
|
1664 |
|
1665 |
|
1666 |
|
1667 | </dd>
|
1668 |
|
1669 |
|
1670 |
|
1671 | <hr>
|
1672 | <dt>
|
1673 | <h4 class="name" id=".isLineTouchingCircle"><span class="type-signature"><static> </span>isLineTouchingCircle<span class="signature">(lineX1, lineY1, lineX2, lineY2, centreX, centreY, radius)</span><span class="type-signature"> → {boolean}</span></h4>
|
1674 |
|
1675 |
|
1676 | </dt>
|
1677 | <dd>
|
1678 |
|
1679 |
|
1680 | <div class="description">
|
1681 | <p>Tells whether a line (infinite) is touching (maybe over) a given circle.</p>
|
1682 | </div>
|
1683 |
|
1684 |
|
1685 |
|
1686 |
|
1687 |
|
1688 |
|
1689 |
|
1690 |
|
1691 | <h5>Parameters:</h5>
|
1692 |
|
1693 |
|
1694 | <table class="params table table-striped">
|
1695 | <thead>
|
1696 | <tr>
|
1697 |
|
1698 | <th style="width:12%; min-width:110px;">Name</th>
|
1699 |
|
1700 |
|
1701 | <th style="width:12%; min-width:110px;">Type</th>
|
1702 |
|
1703 |
|
1704 |
|
1705 |
|
1706 |
|
1707 | <th class="last" style="min-width:310px;">Description</th>
|
1708 | </tr>
|
1709 | </thead>
|
1710 |
|
1711 | <tbody>
|
1712 |
|
1713 |
|
1714 | <tr>
|
1715 |
|
1716 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>lineX1</code></td>
|
1717 |
|
1718 |
|
1719 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
1720 |
|
1721 |
|
1722 | <span class="param-type">number</span>
|
1723 |
|
1724 |
|
1725 |
|
1726 |
|
1727 | </td>
|
1728 |
|
1729 |
|
1730 |
|
1731 |
|
1732 |
|
1733 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "X" coordinate of a first point of the line.</p></td>
|
1734 | </tr>
|
1735 |
|
1736 |
|
1737 |
|
1738 | <tr>
|
1739 |
|
1740 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>lineY1</code></td>
|
1741 |
|
1742 |
|
1743 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
1744 |
|
1745 |
|
1746 | <span class="param-type">number</span>
|
1747 |
|
1748 |
|
1749 |
|
1750 |
|
1751 | </td>
|
1752 |
|
1753 |
|
1754 |
|
1755 |
|
1756 |
|
1757 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "Y" coordinate of a first point of the line.</p></td>
|
1758 | </tr>
|
1759 |
|
1760 |
|
1761 |
|
1762 | <tr>
|
1763 |
|
1764 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>lineX2</code></td>
|
1765 |
|
1766 |
|
1767 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
1768 |
|
1769 |
|
1770 | <span class="param-type">number</span>
|
1771 |
|
1772 |
|
1773 |
|
1774 |
|
1775 | </td>
|
1776 |
|
1777 |
|
1778 |
|
1779 |
|
1780 |
|
1781 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "X" coordinate of a second point of the line.</p></td>
|
1782 | </tr>
|
1783 |
|
1784 |
|
1785 |
|
1786 | <tr>
|
1787 |
|
1788 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>lineY2</code></td>
|
1789 |
|
1790 |
|
1791 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
1792 |
|
1793 |
|
1794 | <span class="param-type">number</span>
|
1795 |
|
1796 |
|
1797 |
|
1798 |
|
1799 | </td>
|
1800 |
|
1801 |
|
1802 |
|
1803 |
|
1804 |
|
1805 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "Y" coordinate of a second point of the line.</p></td>
|
1806 | </tr>
|
1807 |
|
1808 |
|
1809 |
|
1810 | <tr>
|
1811 |
|
1812 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>centreX</code></td>
|
1813 |
|
1814 |
|
1815 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
1816 |
|
1817 |
|
1818 | <span class="param-type">number</span>
|
1819 |
|
1820 |
|
1821 |
|
1822 |
|
1823 | </td>
|
1824 |
|
1825 |
|
1826 |
|
1827 |
|
1828 |
|
1829 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "X" coordinate of the center of the first circle.</p></td>
|
1830 | </tr>
|
1831 |
|
1832 |
|
1833 |
|
1834 | <tr>
|
1835 |
|
1836 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>centreY</code></td>
|
1837 |
|
1838 |
|
1839 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
1840 |
|
1841 |
|
1842 | <span class="param-type">number</span>
|
1843 |
|
1844 |
|
1845 |
|
1846 |
|
1847 | </td>
|
1848 |
|
1849 |
|
1850 |
|
1851 |
|
1852 |
|
1853 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "Y" coordinate of the center of the first circle.</p></td>
|
1854 | </tr>
|
1855 |
|
1856 |
|
1857 |
|
1858 | <tr>
|
1859 |
|
1860 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>radius</code></td>
|
1861 |
|
1862 |
|
1863 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
1864 |
|
1865 |
|
1866 | <span class="param-type">number</span>
|
1867 |
|
1868 |
|
1869 |
|
1870 |
|
1871 | </td>
|
1872 |
|
1873 |
|
1874 |
|
1875 |
|
1876 |
|
1877 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The radius of the first circle.</p></td>
|
1878 | </tr>
|
1879 |
|
1880 |
|
1881 | </tbody>
|
1882 | </table>
|
1883 |
|
1884 |
|
1885 |
|
1886 |
|
1887 | <dl class="details">
|
1888 |
|
1889 |
|
1890 |
|
1891 |
|
1892 |
|
1893 |
|
1894 |
|
1895 |
|
1896 |
|
1897 |
|
1898 |
|
1899 |
|
1900 |
|
1901 |
|
1902 |
|
1903 |
|
1904 |
|
1905 |
|
1906 |
|
1907 |
|
1908 |
|
1909 |
|
1910 |
|
1911 |
|
1912 |
|
1913 |
|
1914 |
|
1915 |
|
1916 |
|
1917 | <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
|
1918 | <dd class="tag-source">
|
1919 | <ul class="dummy">
|
1920 | <li>
|
1921 | <a href="CrossBase_general_CB_Collisions.js.html">CrossBase/general/CB_Collisions.js</a>,
|
1922 | <a href="CrossBase_general_CB_Collisions.js.html#sunlight-1-line-577">line 577</a>
|
1923 | </li>
|
1924 | </ul>
|
1925 | </dd>
|
1926 |
|
1927 |
|
1928 |
|
1929 |
|
1930 |
|
1931 |
|
1932 |
|
1933 | </dl>
|
1934 |
|
1935 |
|
1936 |
|
1937 |
|
1938 |
|
1939 |
|
1940 |
|
1941 |
|
1942 |
|
1943 |
|
1944 |
|
1945 |
|
1946 |
|
1947 | <h5>Returns:</h5>
|
1948 |
|
1949 |
|
1950 | <div class="param-desc">
|
1951 | <p>Returns whether the line (infinite) is touching (maybe over) the circle.</p>
|
1952 | </div>
|
1953 |
|
1954 |
|
1955 |
|
1956 | <dl>
|
1957 | <dt>
|
1958 | Type
|
1959 | </dt>
|
1960 | <dd>
|
1961 |
|
1962 | <span class="param-type">boolean</span>
|
1963 |
|
1964 |
|
1965 |
|
1966 | </dd>
|
1967 | </dl>
|
1968 |
|
1969 |
|
1970 |
|
1971 |
|
1972 |
|
1973 | </dd>
|
1974 |
|
1975 |
|
1976 |
|
1977 | <hr>
|
1978 | <dt>
|
1979 | <h4 class="name" id=".isPointOverCircle"><span class="type-signature"><static> </span>isPointOverCircle<span class="signature">(x, y, centreX, centreY, radius)</span><span class="type-signature"> → {boolean}</span></h4>
|
1980 |
|
1981 |
|
1982 | </dt>
|
1983 | <dd>
|
1984 |
|
1985 |
|
1986 | <div class="description">
|
1987 | <p>Tells whether a point is over a circle.</p>
|
1988 | </div>
|
1989 |
|
1990 |
|
1991 |
|
1992 |
|
1993 |
|
1994 |
|
1995 |
|
1996 |
|
1997 | <h5>Parameters:</h5>
|
1998 |
|
1999 |
|
2000 | <table class="params table table-striped">
|
2001 | <thead>
|
2002 | <tr>
|
2003 |
|
2004 | <th style="width:12%; min-width:110px;">Name</th>
|
2005 |
|
2006 |
|
2007 | <th style="width:12%; min-width:110px;">Type</th>
|
2008 |
|
2009 |
|
2010 |
|
2011 |
|
2012 |
|
2013 | <th class="last" style="min-width:310px;">Description</th>
|
2014 | </tr>
|
2015 | </thead>
|
2016 |
|
2017 | <tbody>
|
2018 |
|
2019 |
|
2020 | <tr>
|
2021 |
|
2022 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>x</code></td>
|
2023 |
|
2024 |
|
2025 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
2026 |
|
2027 |
|
2028 | <span class="param-type">number</span>
|
2029 |
|
2030 |
|
2031 |
|
2032 |
|
2033 | </td>
|
2034 |
|
2035 |
|
2036 |
|
2037 |
|
2038 |
|
2039 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "X" coordinate of the point.</p></td>
|
2040 | </tr>
|
2041 |
|
2042 |
|
2043 |
|
2044 | <tr>
|
2045 |
|
2046 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>y</code></td>
|
2047 |
|
2048 |
|
2049 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
2050 |
|
2051 |
|
2052 | <span class="param-type">number</span>
|
2053 |
|
2054 |
|
2055 |
|
2056 |
|
2057 | </td>
|
2058 |
|
2059 |
|
2060 |
|
2061 |
|
2062 |
|
2063 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "Y" coordinate of the point.</p></td>
|
2064 | </tr>
|
2065 |
|
2066 |
|
2067 |
|
2068 | <tr>
|
2069 |
|
2070 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>centreX</code></td>
|
2071 |
|
2072 |
|
2073 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
2074 |
|
2075 |
|
2076 | <span class="param-type">number</span>
|
2077 |
|
2078 |
|
2079 |
|
2080 |
|
2081 | </td>
|
2082 |
|
2083 |
|
2084 |
|
2085 |
|
2086 |
|
2087 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "X" coordinate of the center of the circle.</p></td>
|
2088 | </tr>
|
2089 |
|
2090 |
|
2091 |
|
2092 | <tr>
|
2093 |
|
2094 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>centreY</code></td>
|
2095 |
|
2096 |
|
2097 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
2098 |
|
2099 |
|
2100 | <span class="param-type">number</span>
|
2101 |
|
2102 |
|
2103 |
|
2104 |
|
2105 | </td>
|
2106 |
|
2107 |
|
2108 |
|
2109 |
|
2110 |
|
2111 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "Y" coordinate of the center of the circle.</p></td>
|
2112 | </tr>
|
2113 |
|
2114 |
|
2115 |
|
2116 | <tr>
|
2117 |
|
2118 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>radius</code></td>
|
2119 |
|
2120 |
|
2121 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
2122 |
|
2123 |
|
2124 | <span class="param-type">number</span>
|
2125 |
|
2126 |
|
2127 |
|
2128 |
|
2129 | </td>
|
2130 |
|
2131 |
|
2132 |
|
2133 |
|
2134 |
|
2135 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The radius of the circle.</p></td>
|
2136 | </tr>
|
2137 |
|
2138 |
|
2139 | </tbody>
|
2140 | </table>
|
2141 |
|
2142 |
|
2143 |
|
2144 |
|
2145 | <dl class="details">
|
2146 |
|
2147 |
|
2148 |
|
2149 |
|
2150 |
|
2151 |
|
2152 |
|
2153 |
|
2154 |
|
2155 |
|
2156 |
|
2157 |
|
2158 |
|
2159 |
|
2160 |
|
2161 |
|
2162 |
|
2163 |
|
2164 |
|
2165 |
|
2166 |
|
2167 |
|
2168 |
|
2169 |
|
2170 |
|
2171 |
|
2172 |
|
2173 |
|
2174 |
|
2175 | <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
|
2176 | <dd class="tag-source">
|
2177 | <ul class="dummy">
|
2178 | <li>
|
2179 | <a href="CrossBase_general_CB_Collisions.js.html">CrossBase/general/CB_Collisions.js</a>,
|
2180 | <a href="CrossBase_general_CB_Collisions.js.html#sunlight-1-line-237">line 237</a>
|
2181 | </li>
|
2182 | </ul>
|
2183 | </dd>
|
2184 |
|
2185 |
|
2186 |
|
2187 |
|
2188 |
|
2189 |
|
2190 |
|
2191 | </dl>
|
2192 |
|
2193 |
|
2194 |
|
2195 |
|
2196 |
|
2197 |
|
2198 |
|
2199 |
|
2200 |
|
2201 |
|
2202 |
|
2203 |
|
2204 |
|
2205 | <h5>Returns:</h5>
|
2206 |
|
2207 |
|
2208 | <div class="param-desc">
|
2209 | <p>Returns whether the point is over the circle.</p>
|
2210 | </div>
|
2211 |
|
2212 |
|
2213 |
|
2214 | <dl>
|
2215 | <dt>
|
2216 | Type
|
2217 | </dt>
|
2218 | <dd>
|
2219 |
|
2220 | <span class="param-type">boolean</span>
|
2221 |
|
2222 |
|
2223 |
|
2224 | </dd>
|
2225 | </dl>
|
2226 |
|
2227 |
|
2228 |
|
2229 |
|
2230 |
|
2231 | </dd>
|
2232 |
|
2233 |
|
2234 |
|
2235 | <hr>
|
2236 | <dt>
|
2237 | <h4 class="name" id=".isPointOverElement"><span class="type-signature"><static> </span>isPointOverElement<span class="signature">(x, y, element)</span><span class="type-signature"> → {boolean}</span></h4>
|
2238 |
|
2239 |
|
2240 | </dt>
|
2241 | <dd>
|
2242 |
|
2243 |
|
2244 | <div class="description">
|
2245 | <p>Tells whether a given point is over a given DOM element (it will be considered a rectangle).</p>
|
2246 | </div>
|
2247 |
|
2248 |
|
2249 |
|
2250 |
|
2251 |
|
2252 |
|
2253 |
|
2254 |
|
2255 | <h5>Parameters:</h5>
|
2256 |
|
2257 |
|
2258 | <table class="params table table-striped">
|
2259 | <thead>
|
2260 | <tr>
|
2261 |
|
2262 | <th style="width:12%; min-width:110px;">Name</th>
|
2263 |
|
2264 |
|
2265 | <th style="width:12%; min-width:110px;">Type</th>
|
2266 |
|
2267 |
|
2268 |
|
2269 |
|
2270 |
|
2271 | <th class="last" style="min-width:310px;">Description</th>
|
2272 | </tr>
|
2273 | </thead>
|
2274 |
|
2275 | <tbody>
|
2276 |
|
2277 |
|
2278 | <tr>
|
2279 |
|
2280 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>x</code></td>
|
2281 |
|
2282 |
|
2283 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
2284 |
|
2285 |
|
2286 | <span class="param-type">number</span>
|
2287 |
|
2288 |
|
2289 |
|
2290 |
|
2291 | </td>
|
2292 |
|
2293 |
|
2294 |
|
2295 |
|
2296 |
|
2297 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "X" coordinate of the point.</p></td>
|
2298 | </tr>
|
2299 |
|
2300 |
|
2301 |
|
2302 | <tr>
|
2303 |
|
2304 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>y</code></td>
|
2305 |
|
2306 |
|
2307 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
2308 |
|
2309 |
|
2310 | <span class="param-type">number</span>
|
2311 |
|
2312 |
|
2313 |
|
2314 |
|
2315 | </td>
|
2316 |
|
2317 |
|
2318 |
|
2319 |
|
2320 |
|
2321 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "Y" coordinate of the point.</p></td>
|
2322 | </tr>
|
2323 |
|
2324 |
|
2325 |
|
2326 | <tr>
|
2327 |
|
2328 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>element</code></td>
|
2329 |
|
2330 |
|
2331 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
2332 |
|
2333 |
|
2334 | <span class="param-type">Element</span>
|
2335 |
|
2336 |
|
2337 |
|
2338 |
|
2339 | </td>
|
2340 |
|
2341 |
|
2342 |
|
2343 |
|
2344 |
|
2345 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The DOM element that we want to check (it will be considered a rectangle).</p></td>
|
2346 | </tr>
|
2347 |
|
2348 |
|
2349 | </tbody>
|
2350 | </table>
|
2351 |
|
2352 |
|
2353 |
|
2354 |
|
2355 | <dl class="details">
|
2356 |
|
2357 |
|
2358 |
|
2359 |
|
2360 |
|
2361 |
|
2362 |
|
2363 |
|
2364 |
|
2365 |
|
2366 |
|
2367 |
|
2368 |
|
2369 |
|
2370 |
|
2371 |
|
2372 |
|
2373 |
|
2374 |
|
2375 |
|
2376 |
|
2377 |
|
2378 |
|
2379 |
|
2380 |
|
2381 |
|
2382 |
|
2383 |
|
2384 |
|
2385 | <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
|
2386 | <dd class="tag-source">
|
2387 | <ul class="dummy">
|
2388 | <li>
|
2389 | <a href="CrossBase_general_CB_Collisions.js.html">CrossBase/general/CB_Collisions.js</a>,
|
2390 | <a href="CrossBase_general_CB_Collisions.js.html#sunlight-1-line-64">line 64</a>
|
2391 | </li>
|
2392 | </ul>
|
2393 | </dd>
|
2394 |
|
2395 |
|
2396 |
|
2397 |
|
2398 |
|
2399 |
|
2400 |
|
2401 | </dl>
|
2402 |
|
2403 |
|
2404 |
|
2405 |
|
2406 |
|
2407 |
|
2408 |
|
2409 |
|
2410 |
|
2411 |
|
2412 |
|
2413 |
|
2414 |
|
2415 | <h5>Returns:</h5>
|
2416 |
|
2417 |
|
2418 | <div class="param-desc">
|
2419 | <p>Returns whether the point is over the given DOM element (it will be considered a rectangle).</p>
|
2420 | </div>
|
2421 |
|
2422 |
|
2423 |
|
2424 | <dl>
|
2425 | <dt>
|
2426 | Type
|
2427 | </dt>
|
2428 | <dd>
|
2429 |
|
2430 | <span class="param-type">boolean</span>
|
2431 |
|
2432 |
|
2433 |
|
2434 | </dd>
|
2435 | </dl>
|
2436 |
|
2437 |
|
2438 |
|
2439 |
|
2440 |
|
2441 | </dd>
|
2442 |
|
2443 |
|
2444 |
|
2445 | <hr>
|
2446 | <dt>
|
2447 | <h4 class="name" id=".isPointOverEllipse"><span class="type-signature"><static> </span>isPointOverEllipse<span class="signature">(x, y, centreX, centreY, radiusX, radiusY [, rotation] [, rotationUseDegrees])</span><span class="type-signature"> → {boolean}</span></h4>
|
2448 |
|
2449 |
|
2450 | </dt>
|
2451 | <dd>
|
2452 |
|
2453 |
|
2454 | <div class="description">
|
2455 | <p>Tells whether a point is over an ellipse.</p>
|
2456 | </div>
|
2457 |
|
2458 |
|
2459 |
|
2460 |
|
2461 |
|
2462 |
|
2463 |
|
2464 |
|
2465 | <h5>Parameters:</h5>
|
2466 |
|
2467 |
|
2468 | <table class="params table table-striped">
|
2469 | <thead>
|
2470 | <tr>
|
2471 |
|
2472 | <th style="width:12%; min-width:110px;">Name</th>
|
2473 |
|
2474 |
|
2475 | <th style="width:12%; min-width:110px;">Type</th>
|
2476 |
|
2477 |
|
2478 | <th style="width:12%; min-width:110px;">Argument</th>
|
2479 |
|
2480 |
|
2481 |
|
2482 | <th style="width:12%; min-width:110px;">Default</th>
|
2483 |
|
2484 |
|
2485 | <th class="last" style="min-width:310px;">Description</th>
|
2486 | </tr>
|
2487 | </thead>
|
2488 |
|
2489 | <tbody>
|
2490 |
|
2491 |
|
2492 | <tr>
|
2493 |
|
2494 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>x</code></td>
|
2495 |
|
2496 |
|
2497 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
2498 |
|
2499 |
|
2500 | <span class="param-type">number</span>
|
2501 |
|
2502 |
|
2503 |
|
2504 |
|
2505 | </td>
|
2506 |
|
2507 |
|
2508 | <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
2509 |
|
2510 |
|
2511 |
|
2512 |
|
2513 |
|
2514 | </td>
|
2515 |
|
2516 |
|
2517 |
|
2518 | <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
2519 |
|
2520 | </td>
|
2521 |
|
2522 |
|
2523 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "X" coordinate of the point.</p></td>
|
2524 | </tr>
|
2525 |
|
2526 |
|
2527 |
|
2528 | <tr>
|
2529 |
|
2530 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>y</code></td>
|
2531 |
|
2532 |
|
2533 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
2534 |
|
2535 |
|
2536 | <span class="param-type">number</span>
|
2537 |
|
2538 |
|
2539 |
|
2540 |
|
2541 | </td>
|
2542 |
|
2543 |
|
2544 | <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
2545 |
|
2546 |
|
2547 |
|
2548 |
|
2549 |
|
2550 | </td>
|
2551 |
|
2552 |
|
2553 |
|
2554 | <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
2555 |
|
2556 | </td>
|
2557 |
|
2558 |
|
2559 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "Y" coordinate of the point.</p></td>
|
2560 | </tr>
|
2561 |
|
2562 |
|
2563 |
|
2564 | <tr>
|
2565 |
|
2566 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>centreX</code></td>
|
2567 |
|
2568 |
|
2569 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
2570 |
|
2571 |
|
2572 | <span class="param-type">number</span>
|
2573 |
|
2574 |
|
2575 |
|
2576 |
|
2577 | </td>
|
2578 |
|
2579 |
|
2580 | <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
2581 |
|
2582 |
|
2583 |
|
2584 |
|
2585 |
|
2586 | </td>
|
2587 |
|
2588 |
|
2589 |
|
2590 | <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
2591 |
|
2592 | </td>
|
2593 |
|
2594 |
|
2595 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "X" coordinate of the center of the ellipse.</p></td>
|
2596 | </tr>
|
2597 |
|
2598 |
|
2599 |
|
2600 | <tr>
|
2601 |
|
2602 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>centreY</code></td>
|
2603 |
|
2604 |
|
2605 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
2606 |
|
2607 |
|
2608 | <span class="param-type">number</span>
|
2609 |
|
2610 |
|
2611 |
|
2612 |
|
2613 | </td>
|
2614 |
|
2615 |
|
2616 | <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
2617 |
|
2618 |
|
2619 |
|
2620 |
|
2621 |
|
2622 | </td>
|
2623 |
|
2624 |
|
2625 |
|
2626 | <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
2627 |
|
2628 | </td>
|
2629 |
|
2630 |
|
2631 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "Y" coordinate of the center of the ellipse.</p></td>
|
2632 | </tr>
|
2633 |
|
2634 |
|
2635 |
|
2636 | <tr>
|
2637 |
|
2638 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>radiusX</code></td>
|
2639 |
|
2640 |
|
2641 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
2642 |
|
2643 |
|
2644 | <span class="param-type">number</span>
|
2645 |
|
2646 |
|
2647 |
|
2648 |
|
2649 | </td>
|
2650 |
|
2651 |
|
2652 | <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
2653 |
|
2654 |
|
2655 |
|
2656 |
|
2657 |
|
2658 | </td>
|
2659 |
|
2660 |
|
2661 |
|
2662 | <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
2663 |
|
2664 | </td>
|
2665 |
|
2666 |
|
2667 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The X (horizontal) radius of the ellipse.</p></td>
|
2668 | </tr>
|
2669 |
|
2670 |
|
2671 |
|
2672 | <tr>
|
2673 |
|
2674 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>radiusY</code></td>
|
2675 |
|
2676 |
|
2677 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
2678 |
|
2679 |
|
2680 | <span class="param-type">number</span>
|
2681 |
|
2682 |
|
2683 |
|
2684 |
|
2685 | </td>
|
2686 |
|
2687 |
|
2688 | <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
2689 |
|
2690 |
|
2691 |
|
2692 |
|
2693 |
|
2694 | </td>
|
2695 |
|
2696 |
|
2697 |
|
2698 | <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
2699 |
|
2700 | </td>
|
2701 |
|
2702 |
|
2703 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The Y (vertical) radius of the ellipse.</p></td>
|
2704 | </tr>
|
2705 |
|
2706 |
|
2707 |
|
2708 | <tr>
|
2709 |
|
2710 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>rotation</code></td>
|
2711 |
|
2712 |
|
2713 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
2714 |
|
2715 |
|
2716 | <span class="param-type">number</span>
|
2717 |
|
2718 |
|
2719 |
|
2720 |
|
2721 | </td>
|
2722 |
|
2723 |
|
2724 | <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
2725 |
|
2726 | <optional><br>
|
2727 |
|
2728 |
|
2729 |
|
2730 |
|
2731 |
|
2732 | </td>
|
2733 |
|
2734 |
|
2735 |
|
2736 | <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
2737 |
|
2738 | 0
|
2739 |
|
2740 | </td>
|
2741 |
|
2742 |
|
2743 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The ellipse rotation. The value given will be considered either degrees or radians depending on the given "rotationUseDegrees" parameter (by default, it is considered radians). Not implemented yet!</p></td>
|
2744 | </tr>
|
2745 |
|
2746 |
|
2747 |
|
2748 | <tr>
|
2749 |
|
2750 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>rotationUseDegrees</code></td>
|
2751 |
|
2752 |
|
2753 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
2754 |
|
2755 |
|
2756 | <span class="param-type">boolean</span>
|
2757 |
|
2758 |
|
2759 |
|
2760 |
|
2761 | </td>
|
2762 |
|
2763 |
|
2764 | <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
2765 |
|
2766 | <optional><br>
|
2767 |
|
2768 |
|
2769 |
|
2770 |
|
2771 |
|
2772 | </td>
|
2773 |
|
2774 |
|
2775 |
|
2776 | <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
2777 |
|
2778 | false
|
2779 |
|
2780 | </td>
|
2781 |
|
2782 |
|
2783 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>Defines whether the "rotation" given should be considered degrees or not (radians). Not implemented yet!</p></td>
|
2784 | </tr>
|
2785 |
|
2786 |
|
2787 | </tbody>
|
2788 | </table>
|
2789 |
|
2790 |
|
2791 |
|
2792 |
|
2793 | <dl class="details">
|
2794 |
|
2795 |
|
2796 |
|
2797 |
|
2798 |
|
2799 |
|
2800 |
|
2801 |
|
2802 |
|
2803 |
|
2804 |
|
2805 |
|
2806 |
|
2807 |
|
2808 |
|
2809 |
|
2810 |
|
2811 |
|
2812 |
|
2813 |
|
2814 |
|
2815 |
|
2816 |
|
2817 |
|
2818 |
|
2819 |
|
2820 |
|
2821 |
|
2822 |
|
2823 | <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
|
2824 | <dd class="tag-source">
|
2825 | <ul class="dummy">
|
2826 | <li>
|
2827 | <a href="CrossBase_general_CB_Collisions.js.html">CrossBase/general/CB_Collisions.js</a>,
|
2828 | <a href="CrossBase_general_CB_Collisions.js.html#sunlight-1-line-277">line 277</a>
|
2829 | </li>
|
2830 | </ul>
|
2831 | </dd>
|
2832 |
|
2833 |
|
2834 |
|
2835 |
|
2836 |
|
2837 |
|
2838 |
|
2839 | <dt class="tag-todo method-doc-label method-doc-details-label">To Do:</dt>
|
2840 | <dd class="tag-todo">
|
2841 | <ul>
|
2842 | <li>Make the "rotation" parameter work (check https://math.stackexchange.com/questions/426150/what-is-the-general-equation-of-the-ellipse-that-is-not-in-the-origin-and-rotate).</li>
|
2843 | </ul>
|
2844 | </dd>
|
2845 |
|
2846 | </dl>
|
2847 |
|
2848 |
|
2849 |
|
2850 |
|
2851 |
|
2852 |
|
2853 |
|
2854 |
|
2855 |
|
2856 |
|
2857 |
|
2858 |
|
2859 |
|
2860 | <h5>Returns:</h5>
|
2861 |
|
2862 |
|
2863 | <div class="param-desc">
|
2864 | <p>Returns whether the point is over the ellipse.</p>
|
2865 | </div>
|
2866 |
|
2867 |
|
2868 |
|
2869 | <dl>
|
2870 | <dt>
|
2871 | Type
|
2872 | </dt>
|
2873 | <dd>
|
2874 |
|
2875 | <span class="param-type">boolean</span>
|
2876 |
|
2877 |
|
2878 |
|
2879 | </dd>
|
2880 | </dl>
|
2881 |
|
2882 |
|
2883 |
|
2884 |
|
2885 |
|
2886 | </dd>
|
2887 |
|
2888 |
|
2889 |
|
2890 | <hr>
|
2891 | <dt>
|
2892 | <h4 class="name" id=".isPointOverLine"><span class="type-signature"><static> </span>isPointOverLine<span class="signature">(x, y, lineX1, lineY1, lineX2, lineY2 [, tolerance])</span><span class="type-signature"> → {boolean}</span></h4>
|
2893 |
|
2894 |
|
2895 | </dt>
|
2896 | <dd>
|
2897 |
|
2898 |
|
2899 | <div class="description">
|
2900 | <p>Tells whether a point is over a line (infinite).</p>
|
2901 | </div>
|
2902 |
|
2903 |
|
2904 |
|
2905 |
|
2906 |
|
2907 |
|
2908 |
|
2909 |
|
2910 | <h5>Parameters:</h5>
|
2911 |
|
2912 |
|
2913 | <table class="params table table-striped">
|
2914 | <thead>
|
2915 | <tr>
|
2916 |
|
2917 | <th style="width:12%; min-width:110px;">Name</th>
|
2918 |
|
2919 |
|
2920 | <th style="width:12%; min-width:110px;">Type</th>
|
2921 |
|
2922 |
|
2923 | <th style="width:12%; min-width:110px;">Argument</th>
|
2924 |
|
2925 |
|
2926 |
|
2927 | <th style="width:12%; min-width:110px;">Default</th>
|
2928 |
|
2929 |
|
2930 | <th class="last" style="min-width:310px;">Description</th>
|
2931 | </tr>
|
2932 | </thead>
|
2933 |
|
2934 | <tbody>
|
2935 |
|
2936 |
|
2937 | <tr>
|
2938 |
|
2939 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>x</code></td>
|
2940 |
|
2941 |
|
2942 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
2943 |
|
2944 |
|
2945 | <span class="param-type">number</span>
|
2946 |
|
2947 |
|
2948 |
|
2949 |
|
2950 | </td>
|
2951 |
|
2952 |
|
2953 | <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
2954 |
|
2955 |
|
2956 |
|
2957 |
|
2958 |
|
2959 | </td>
|
2960 |
|
2961 |
|
2962 |
|
2963 | <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
2964 |
|
2965 | </td>
|
2966 |
|
2967 |
|
2968 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "X" coordinate of the point.</p></td>
|
2969 | </tr>
|
2970 |
|
2971 |
|
2972 |
|
2973 | <tr>
|
2974 |
|
2975 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>y</code></td>
|
2976 |
|
2977 |
|
2978 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
2979 |
|
2980 |
|
2981 | <span class="param-type">number</span>
|
2982 |
|
2983 |
|
2984 |
|
2985 |
|
2986 | </td>
|
2987 |
|
2988 |
|
2989 | <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
2990 |
|
2991 |
|
2992 |
|
2993 |
|
2994 |
|
2995 | </td>
|
2996 |
|
2997 |
|
2998 |
|
2999 | <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
3000 |
|
3001 | </td>
|
3002 |
|
3003 |
|
3004 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "Y" coordinate of the point.</p></td>
|
3005 | </tr>
|
3006 |
|
3007 |
|
3008 |
|
3009 | <tr>
|
3010 |
|
3011 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>lineX1</code></td>
|
3012 |
|
3013 |
|
3014 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
3015 |
|
3016 |
|
3017 | <span class="param-type">number</span>
|
3018 |
|
3019 |
|
3020 |
|
3021 |
|
3022 | </td>
|
3023 |
|
3024 |
|
3025 | <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
3026 |
|
3027 |
|
3028 |
|
3029 |
|
3030 |
|
3031 | </td>
|
3032 |
|
3033 |
|
3034 |
|
3035 | <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
3036 |
|
3037 | </td>
|
3038 |
|
3039 |
|
3040 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "X" coordinate of a first point of the line.</p></td>
|
3041 | </tr>
|
3042 |
|
3043 |
|
3044 |
|
3045 | <tr>
|
3046 |
|
3047 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>lineY1</code></td>
|
3048 |
|
3049 |
|
3050 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
3051 |
|
3052 |
|
3053 | <span class="param-type">number</span>
|
3054 |
|
3055 |
|
3056 |
|
3057 |
|
3058 | </td>
|
3059 |
|
3060 |
|
3061 | <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
3062 |
|
3063 |
|
3064 |
|
3065 |
|
3066 |
|
3067 | </td>
|
3068 |
|
3069 |
|
3070 |
|
3071 | <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
3072 |
|
3073 | </td>
|
3074 |
|
3075 |
|
3076 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "Y" coordinate of a first point of the line.</p></td>
|
3077 | </tr>
|
3078 |
|
3079 |
|
3080 |
|
3081 | <tr>
|
3082 |
|
3083 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>lineX2</code></td>
|
3084 |
|
3085 |
|
3086 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
3087 |
|
3088 |
|
3089 | <span class="param-type">number</span>
|
3090 |
|
3091 |
|
3092 |
|
3093 |
|
3094 | </td>
|
3095 |
|
3096 |
|
3097 | <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
3098 |
|
3099 |
|
3100 |
|
3101 |
|
3102 |
|
3103 | </td>
|
3104 |
|
3105 |
|
3106 |
|
3107 | <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
3108 |
|
3109 | </td>
|
3110 |
|
3111 |
|
3112 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "X" coordinate of a second point of the line.</p></td>
|
3113 | </tr>
|
3114 |
|
3115 |
|
3116 |
|
3117 | <tr>
|
3118 |
|
3119 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>lineY2</code></td>
|
3120 |
|
3121 |
|
3122 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
3123 |
|
3124 |
|
3125 | <span class="param-type">number</span>
|
3126 |
|
3127 |
|
3128 |
|
3129 |
|
3130 | </td>
|
3131 |
|
3132 |
|
3133 | <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
3134 |
|
3135 |
|
3136 |
|
3137 |
|
3138 |
|
3139 | </td>
|
3140 |
|
3141 |
|
3142 |
|
3143 | <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
3144 |
|
3145 | </td>
|
3146 |
|
3147 |
|
3148 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "Y" coordinate of a second point of the line.</p></td>
|
3149 | </tr>
|
3150 |
|
3151 |
|
3152 |
|
3153 | <tr>
|
3154 |
|
3155 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>tolerance</code></td>
|
3156 |
|
3157 |
|
3158 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
3159 |
|
3160 |
|
3161 | <span class="param-type">number</span>
|
3162 |
|
3163 |
|
3164 |
|
3165 |
|
3166 | </td>
|
3167 |
|
3168 |
|
3169 | <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
3170 |
|
3171 | <optional><br>
|
3172 |
|
3173 |
|
3174 |
|
3175 |
|
3176 |
|
3177 | </td>
|
3178 |
|
3179 |
|
3180 |
|
3181 | <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
3182 |
|
3183 | 0.001
|
3184 |
|
3185 | </td>
|
3186 |
|
3187 |
|
3188 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The amount of loss of precision we can tolerate to consider a collision.</p></td>
|
3189 | </tr>
|
3190 |
|
3191 |
|
3192 | </tbody>
|
3193 | </table>
|
3194 |
|
3195 |
|
3196 |
|
3197 |
|
3198 | <dl class="details">
|
3199 |
|
3200 |
|
3201 |
|
3202 |
|
3203 |
|
3204 |
|
3205 |
|
3206 |
|
3207 |
|
3208 |
|
3209 |
|
3210 |
|
3211 |
|
3212 |
|
3213 |
|
3214 |
|
3215 |
|
3216 |
|
3217 |
|
3218 |
|
3219 |
|
3220 |
|
3221 |
|
3222 |
|
3223 |
|
3224 |
|
3225 |
|
3226 |
|
3227 |
|
3228 | <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
|
3229 | <dd class="tag-source">
|
3230 | <ul class="dummy">
|
3231 | <li>
|
3232 | <a href="CrossBase_general_CB_Collisions.js.html">CrossBase/general/CB_Collisions.js</a>,
|
3233 | <a href="CrossBase_general_CB_Collisions.js.html#sunlight-1-line-100">line 100</a>
|
3234 | </li>
|
3235 | </ul>
|
3236 | </dd>
|
3237 |
|
3238 |
|
3239 |
|
3240 |
|
3241 |
|
3242 |
|
3243 |
|
3244 | <dt class="tag-todo method-doc-label method-doc-details-label">To Do:</dt>
|
3245 | <dd class="tag-todo">
|
3246 | <ul>
|
3247 | <li>Think about using a "width" parameter (apart from the "tolerance" parameter).</li>
|
3248 |
|
3249 | <li>Create a CB_Collisions.isPointTouchingLine function.</li>
|
3250 | </ul>
|
3251 | </dd>
|
3252 |
|
3253 | </dl>
|
3254 |
|
3255 |
|
3256 |
|
3257 |
|
3258 |
|
3259 |
|
3260 |
|
3261 |
|
3262 |
|
3263 |
|
3264 |
|
3265 |
|
3266 |
|
3267 | <h5>Returns:</h5>
|
3268 |
|
3269 |
|
3270 | <div class="param-desc">
|
3271 | <p>Returns whether the point is over the line (infinite).</p>
|
3272 | </div>
|
3273 |
|
3274 |
|
3275 |
|
3276 | <dl>
|
3277 | <dt>
|
3278 | Type
|
3279 | </dt>
|
3280 | <dd>
|
3281 |
|
3282 | <span class="param-type">boolean</span>
|
3283 |
|
3284 |
|
3285 |
|
3286 | </dd>
|
3287 | </dl>
|
3288 |
|
3289 |
|
3290 |
|
3291 |
|
3292 |
|
3293 | </dd>
|
3294 |
|
3295 |
|
3296 |
|
3297 | <hr>
|
3298 | <dt>
|
3299 | <h4 class="name" id=".isPointOverRectangle"><span class="type-signature"><static> </span>isPointOverRectangle<span class="signature">(x, y, rectangleX, rectangleY, rectangleWidth, rectangleHeight)</span><span class="type-signature"> → {boolean}</span></h4>
|
3300 |
|
3301 |
|
3302 | </dt>
|
3303 | <dd>
|
3304 |
|
3305 |
|
3306 | <div class="description">
|
3307 | <p>Tells whether a point is over a rectangle.</p>
|
3308 | </div>
|
3309 |
|
3310 |
|
3311 |
|
3312 |
|
3313 |
|
3314 |
|
3315 |
|
3316 |
|
3317 | <h5>Parameters:</h5>
|
3318 |
|
3319 |
|
3320 | <table class="params table table-striped">
|
3321 | <thead>
|
3322 | <tr>
|
3323 |
|
3324 | <th style="width:12%; min-width:110px;">Name</th>
|
3325 |
|
3326 |
|
3327 | <th style="width:12%; min-width:110px;">Type</th>
|
3328 |
|
3329 |
|
3330 |
|
3331 |
|
3332 |
|
3333 | <th class="last" style="min-width:310px;">Description</th>
|
3334 | </tr>
|
3335 | </thead>
|
3336 |
|
3337 | <tbody>
|
3338 |
|
3339 |
|
3340 | <tr>
|
3341 |
|
3342 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>x</code></td>
|
3343 |
|
3344 |
|
3345 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
3346 |
|
3347 |
|
3348 | <span class="param-type">number</span>
|
3349 |
|
3350 |
|
3351 |
|
3352 |
|
3353 | </td>
|
3354 |
|
3355 |
|
3356 |
|
3357 |
|
3358 |
|
3359 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "X" coordinate of the point.</p></td>
|
3360 | </tr>
|
3361 |
|
3362 |
|
3363 |
|
3364 | <tr>
|
3365 |
|
3366 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>y</code></td>
|
3367 |
|
3368 |
|
3369 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
3370 |
|
3371 |
|
3372 | <span class="param-type">number</span>
|
3373 |
|
3374 |
|
3375 |
|
3376 |
|
3377 | </td>
|
3378 |
|
3379 |
|
3380 |
|
3381 |
|
3382 |
|
3383 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "Y" coordinate of the point.</p></td>
|
3384 | </tr>
|
3385 |
|
3386 |
|
3387 |
|
3388 | <tr>
|
3389 |
|
3390 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>rectangleX</code></td>
|
3391 |
|
3392 |
|
3393 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
3394 |
|
3395 |
|
3396 | <span class="param-type">number</span>
|
3397 |
|
3398 |
|
3399 |
|
3400 |
|
3401 | </td>
|
3402 |
|
3403 |
|
3404 |
|
3405 |
|
3406 |
|
3407 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "X" coordinate of the upper left corner of the rectangle.</p></td>
|
3408 | </tr>
|
3409 |
|
3410 |
|
3411 |
|
3412 | <tr>
|
3413 |
|
3414 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>rectangleY</code></td>
|
3415 |
|
3416 |
|
3417 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
3418 |
|
3419 |
|
3420 | <span class="param-type">number</span>
|
3421 |
|
3422 |
|
3423 |
|
3424 |
|
3425 | </td>
|
3426 |
|
3427 |
|
3428 |
|
3429 |
|
3430 |
|
3431 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "Y" coordinate of the upper left corner of the rectangle.</p></td>
|
3432 | </tr>
|
3433 |
|
3434 |
|
3435 |
|
3436 | <tr>
|
3437 |
|
3438 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>rectangleWidth</code></td>
|
3439 |
|
3440 |
|
3441 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
3442 |
|
3443 |
|
3444 | <span class="param-type">number</span>
|
3445 |
|
3446 |
|
3447 |
|
3448 |
|
3449 | </td>
|
3450 |
|
3451 |
|
3452 |
|
3453 |
|
3454 |
|
3455 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The width of the rectangle.</p></td>
|
3456 | </tr>
|
3457 |
|
3458 |
|
3459 |
|
3460 | <tr>
|
3461 |
|
3462 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>rectangleHeight</code></td>
|
3463 |
|
3464 |
|
3465 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
3466 |
|
3467 |
|
3468 | <span class="param-type">number</span>
|
3469 |
|
3470 |
|
3471 |
|
3472 |
|
3473 | </td>
|
3474 |
|
3475 |
|
3476 |
|
3477 |
|
3478 |
|
3479 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The height of the rectangle.</p></td>
|
3480 | </tr>
|
3481 |
|
3482 |
|
3483 | </tbody>
|
3484 | </table>
|
3485 |
|
3486 |
|
3487 |
|
3488 |
|
3489 | <dl class="details">
|
3490 |
|
3491 |
|
3492 |
|
3493 |
|
3494 |
|
3495 |
|
3496 |
|
3497 |
|
3498 |
|
3499 |
|
3500 |
|
3501 |
|
3502 |
|
3503 |
|
3504 |
|
3505 |
|
3506 |
|
3507 |
|
3508 |
|
3509 |
|
3510 |
|
3511 |
|
3512 |
|
3513 |
|
3514 |
|
3515 |
|
3516 |
|
3517 |
|
3518 |
|
3519 | <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
|
3520 | <dd class="tag-source">
|
3521 | <ul class="dummy">
|
3522 | <li>
|
3523 | <a href="CrossBase_general_CB_Collisions.js.html">CrossBase/general/CB_Collisions.js</a>,
|
3524 | <a href="CrossBase_general_CB_Collisions.js.html#sunlight-1-line-193">line 193</a>
|
3525 | </li>
|
3526 | </ul>
|
3527 | </dd>
|
3528 |
|
3529 |
|
3530 |
|
3531 |
|
3532 |
|
3533 |
|
3534 |
|
3535 | <dt class="tag-todo method-doc-label method-doc-details-label">To Do:</dt>
|
3536 | <dd class="tag-todo">
|
3537 | <ul>
|
3538 | <li>Think about using a "rotation" parameter to accept rotated rectangles.</li>
|
3539 | </ul>
|
3540 | </dd>
|
3541 |
|
3542 | </dl>
|
3543 |
|
3544 |
|
3545 |
|
3546 |
|
3547 |
|
3548 |
|
3549 |
|
3550 |
|
3551 |
|
3552 |
|
3553 |
|
3554 |
|
3555 |
|
3556 | <h5>Returns:</h5>
|
3557 |
|
3558 |
|
3559 | <div class="param-desc">
|
3560 | <p>Returns whether the point is over the rectangle.</p>
|
3561 | </div>
|
3562 |
|
3563 |
|
3564 |
|
3565 | <dl>
|
3566 | <dt>
|
3567 | Type
|
3568 | </dt>
|
3569 | <dd>
|
3570 |
|
3571 | <span class="param-type">boolean</span>
|
3572 |
|
3573 |
|
3574 |
|
3575 | </dd>
|
3576 | </dl>
|
3577 |
|
3578 |
|
3579 |
|
3580 |
|
3581 |
|
3582 | </dd>
|
3583 |
|
3584 |
|
3585 |
|
3586 | <hr>
|
3587 | <dt>
|
3588 | <h4 class="name" id=".isPointOverSegment"><span class="type-signature"><static> </span>isPointOverSegment<span class="signature">(x, y, segmentX1, segmentY1, segmentX2, segmentY2 [, tolerance])</span><span class="type-signature"> → {boolean}</span></h4>
|
3589 |
|
3590 |
|
3591 | </dt>
|
3592 | <dd>
|
3593 |
|
3594 |
|
3595 | <div class="description">
|
3596 | <p>Tells whether a point is over a line segment.</p>
|
3597 | </div>
|
3598 |
|
3599 |
|
3600 |
|
3601 |
|
3602 |
|
3603 |
|
3604 |
|
3605 |
|
3606 | <h5>Parameters:</h5>
|
3607 |
|
3608 |
|
3609 | <table class="params table table-striped">
|
3610 | <thead>
|
3611 | <tr>
|
3612 |
|
3613 | <th style="width:12%; min-width:110px;">Name</th>
|
3614 |
|
3615 |
|
3616 | <th style="width:12%; min-width:110px;">Type</th>
|
3617 |
|
3618 |
|
3619 | <th style="width:12%; min-width:110px;">Argument</th>
|
3620 |
|
3621 |
|
3622 |
|
3623 | <th style="width:12%; min-width:110px;">Default</th>
|
3624 |
|
3625 |
|
3626 | <th class="last" style="min-width:310px;">Description</th>
|
3627 | </tr>
|
3628 | </thead>
|
3629 |
|
3630 | <tbody>
|
3631 |
|
3632 |
|
3633 | <tr>
|
3634 |
|
3635 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>x</code></td>
|
3636 |
|
3637 |
|
3638 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
3639 |
|
3640 |
|
3641 | <span class="param-type">number</span>
|
3642 |
|
3643 |
|
3644 |
|
3645 |
|
3646 | </td>
|
3647 |
|
3648 |
|
3649 | <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
3650 |
|
3651 |
|
3652 |
|
3653 |
|
3654 |
|
3655 | </td>
|
3656 |
|
3657 |
|
3658 |
|
3659 | <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
3660 |
|
3661 | </td>
|
3662 |
|
3663 |
|
3664 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "X" coordinate of the point.</p></td>
|
3665 | </tr>
|
3666 |
|
3667 |
|
3668 |
|
3669 | <tr>
|
3670 |
|
3671 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>y</code></td>
|
3672 |
|
3673 |
|
3674 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
3675 |
|
3676 |
|
3677 | <span class="param-type">number</span>
|
3678 |
|
3679 |
|
3680 |
|
3681 |
|
3682 | </td>
|
3683 |
|
3684 |
|
3685 | <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
3686 |
|
3687 |
|
3688 |
|
3689 |
|
3690 |
|
3691 | </td>
|
3692 |
|
3693 |
|
3694 |
|
3695 | <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
3696 |
|
3697 | </td>
|
3698 |
|
3699 |
|
3700 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "Y" coordinate of the point.</p></td>
|
3701 | </tr>
|
3702 |
|
3703 |
|
3704 |
|
3705 | <tr>
|
3706 |
|
3707 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>segmentX1</code></td>
|
3708 |
|
3709 |
|
3710 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
3711 |
|
3712 |
|
3713 | <span class="param-type">number</span>
|
3714 |
|
3715 |
|
3716 |
|
3717 |
|
3718 | </td>
|
3719 |
|
3720 |
|
3721 | <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
3722 |
|
3723 |
|
3724 |
|
3725 |
|
3726 |
|
3727 | </td>
|
3728 |
|
3729 |
|
3730 |
|
3731 | <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
3732 |
|
3733 | </td>
|
3734 |
|
3735 |
|
3736 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "X" coordinate of the beginning point of the line.</p></td>
|
3737 | </tr>
|
3738 |
|
3739 |
|
3740 |
|
3741 | <tr>
|
3742 |
|
3743 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>segmentY1</code></td>
|
3744 |
|
3745 |
|
3746 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
3747 |
|
3748 |
|
3749 | <span class="param-type">number</span>
|
3750 |
|
3751 |
|
3752 |
|
3753 |
|
3754 | </td>
|
3755 |
|
3756 |
|
3757 | <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
3758 |
|
3759 |
|
3760 |
|
3761 |
|
3762 |
|
3763 | </td>
|
3764 |
|
3765 |
|
3766 |
|
3767 | <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
3768 |
|
3769 | </td>
|
3770 |
|
3771 |
|
3772 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "Y" coordinate of the beginning point of the line.</p></td>
|
3773 | </tr>
|
3774 |
|
3775 |
|
3776 |
|
3777 | <tr>
|
3778 |
|
3779 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>segmentX2</code></td>
|
3780 |
|
3781 |
|
3782 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
3783 |
|
3784 |
|
3785 | <span class="param-type">number</span>
|
3786 |
|
3787 |
|
3788 |
|
3789 |
|
3790 | </td>
|
3791 |
|
3792 |
|
3793 | <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
3794 |
|
3795 |
|
3796 |
|
3797 |
|
3798 |
|
3799 | </td>
|
3800 |
|
3801 |
|
3802 |
|
3803 | <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
3804 |
|
3805 | </td>
|
3806 |
|
3807 |
|
3808 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "X" coordinate of the end point of the line.</p></td>
|
3809 | </tr>
|
3810 |
|
3811 |
|
3812 |
|
3813 | <tr>
|
3814 |
|
3815 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>segmentY2</code></td>
|
3816 |
|
3817 |
|
3818 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
3819 |
|
3820 |
|
3821 | <span class="param-type">number</span>
|
3822 |
|
3823 |
|
3824 |
|
3825 |
|
3826 | </td>
|
3827 |
|
3828 |
|
3829 | <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
3830 |
|
3831 |
|
3832 |
|
3833 |
|
3834 |
|
3835 | </td>
|
3836 |
|
3837 |
|
3838 |
|
3839 | <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
3840 |
|
3841 | </td>
|
3842 |
|
3843 |
|
3844 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "Y" coordinate of the end point of the line.</p></td>
|
3845 | </tr>
|
3846 |
|
3847 |
|
3848 |
|
3849 | <tr>
|
3850 |
|
3851 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>tolerance</code></td>
|
3852 |
|
3853 |
|
3854 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
3855 |
|
3856 |
|
3857 | <span class="param-type">number</span>
|
3858 |
|
3859 |
|
3860 |
|
3861 |
|
3862 | </td>
|
3863 |
|
3864 |
|
3865 | <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
3866 |
|
3867 | <optional><br>
|
3868 |
|
3869 |
|
3870 |
|
3871 |
|
3872 |
|
3873 | </td>
|
3874 |
|
3875 |
|
3876 |
|
3877 | <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
3878 |
|
3879 | 0.001
|
3880 |
|
3881 | </td>
|
3882 |
|
3883 |
|
3884 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The amount of loss of precision we can tolerate to consider a collision.</p></td>
|
3885 | </tr>
|
3886 |
|
3887 |
|
3888 | </tbody>
|
3889 | </table>
|
3890 |
|
3891 |
|
3892 |
|
3893 |
|
3894 | <dl class="details">
|
3895 |
|
3896 |
|
3897 |
|
3898 |
|
3899 |
|
3900 |
|
3901 |
|
3902 |
|
3903 |
|
3904 |
|
3905 |
|
3906 |
|
3907 |
|
3908 |
|
3909 |
|
3910 |
|
3911 |
|
3912 |
|
3913 |
|
3914 |
|
3915 |
|
3916 |
|
3917 |
|
3918 |
|
3919 |
|
3920 |
|
3921 |
|
3922 |
|
3923 |
|
3924 | <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
|
3925 | <dd class="tag-source">
|
3926 | <ul class="dummy">
|
3927 | <li>
|
3928 | <a href="CrossBase_general_CB_Collisions.js.html">CrossBase/general/CB_Collisions.js</a>,
|
3929 | <a href="CrossBase_general_CB_Collisions.js.html#sunlight-1-line-154">line 154</a>
|
3930 | </li>
|
3931 | </ul>
|
3932 | </dd>
|
3933 |
|
3934 |
|
3935 |
|
3936 |
|
3937 |
|
3938 |
|
3939 |
|
3940 | <dt class="tag-todo method-doc-label method-doc-details-label">To Do:</dt>
|
3941 | <dd class="tag-todo">
|
3942 | <ul>
|
3943 | <li>Think about using a "width" parameter (apart from the "tolerance" parameter).</li>
|
3944 |
|
3945 | <li>Create a CB_Collisions.isPointTouchingSegment function.</li>
|
3946 | </ul>
|
3947 | </dd>
|
3948 |
|
3949 | </dl>
|
3950 |
|
3951 |
|
3952 |
|
3953 |
|
3954 |
|
3955 |
|
3956 |
|
3957 |
|
3958 |
|
3959 |
|
3960 |
|
3961 |
|
3962 |
|
3963 | <h5>Returns:</h5>
|
3964 |
|
3965 |
|
3966 | <div class="param-desc">
|
3967 | <p>Returns whether the point is over the line segment.</p>
|
3968 | </div>
|
3969 |
|
3970 |
|
3971 |
|
3972 | <dl>
|
3973 | <dt>
|
3974 | Type
|
3975 | </dt>
|
3976 | <dd>
|
3977 |
|
3978 | <span class="param-type">boolean</span>
|
3979 |
|
3980 |
|
3981 |
|
3982 | </dd>
|
3983 | </dl>
|
3984 |
|
3985 |
|
3986 |
|
3987 |
|
3988 |
|
3989 | </dd>
|
3990 |
|
3991 |
|
3992 |
|
3993 | <hr>
|
3994 | <dt>
|
3995 | <h4 class="name" id=".isPointTouchingCircle"><span class="type-signature"><static> </span>isPointTouchingCircle<span class="signature">(x, y, centreX, centreY, radius)</span><span class="type-signature"> → {boolean}</span></h4>
|
3996 |
|
3997 |
|
3998 | </dt>
|
3999 | <dd>
|
4000 |
|
4001 |
|
4002 | <div class="description">
|
4003 | <p>Tells whether a point is touching (maybe over) a circle. This will also return true if they are adjacent (next to each other).</p>
|
4004 | </div>
|
4005 |
|
4006 |
|
4007 |
|
4008 |
|
4009 |
|
4010 |
|
4011 |
|
4012 |
|
4013 | <h5>Parameters:</h5>
|
4014 |
|
4015 |
|
4016 | <table class="params table table-striped">
|
4017 | <thead>
|
4018 | <tr>
|
4019 |
|
4020 | <th style="width:12%; min-width:110px;">Name</th>
|
4021 |
|
4022 |
|
4023 | <th style="width:12%; min-width:110px;">Type</th>
|
4024 |
|
4025 |
|
4026 |
|
4027 |
|
4028 |
|
4029 | <th class="last" style="min-width:310px;">Description</th>
|
4030 | </tr>
|
4031 | </thead>
|
4032 |
|
4033 | <tbody>
|
4034 |
|
4035 |
|
4036 | <tr>
|
4037 |
|
4038 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>x</code></td>
|
4039 |
|
4040 |
|
4041 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
4042 |
|
4043 |
|
4044 | <span class="param-type">number</span>
|
4045 |
|
4046 |
|
4047 |
|
4048 |
|
4049 | </td>
|
4050 |
|
4051 |
|
4052 |
|
4053 |
|
4054 |
|
4055 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "X" coordinate of the point.</p></td>
|
4056 | </tr>
|
4057 |
|
4058 |
|
4059 |
|
4060 | <tr>
|
4061 |
|
4062 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>y</code></td>
|
4063 |
|
4064 |
|
4065 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
4066 |
|
4067 |
|
4068 | <span class="param-type">number</span>
|
4069 |
|
4070 |
|
4071 |
|
4072 |
|
4073 | </td>
|
4074 |
|
4075 |
|
4076 |
|
4077 |
|
4078 |
|
4079 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "Y" coordinate of the point.</p></td>
|
4080 | </tr>
|
4081 |
|
4082 |
|
4083 |
|
4084 | <tr>
|
4085 |
|
4086 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>centreX</code></td>
|
4087 |
|
4088 |
|
4089 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
4090 |
|
4091 |
|
4092 | <span class="param-type">number</span>
|
4093 |
|
4094 |
|
4095 |
|
4096 |
|
4097 | </td>
|
4098 |
|
4099 |
|
4100 |
|
4101 |
|
4102 |
|
4103 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "X" coordinate of the center of the circle.</p></td>
|
4104 | </tr>
|
4105 |
|
4106 |
|
4107 |
|
4108 | <tr>
|
4109 |
|
4110 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>centreY</code></td>
|
4111 |
|
4112 |
|
4113 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
4114 |
|
4115 |
|
4116 | <span class="param-type">number</span>
|
4117 |
|
4118 |
|
4119 |
|
4120 |
|
4121 | </td>
|
4122 |
|
4123 |
|
4124 |
|
4125 |
|
4126 |
|
4127 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "Y" coordinate of the center of the circle.</p></td>
|
4128 | </tr>
|
4129 |
|
4130 |
|
4131 |
|
4132 | <tr>
|
4133 |
|
4134 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>radius</code></td>
|
4135 |
|
4136 |
|
4137 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
4138 |
|
4139 |
|
4140 | <span class="param-type">number</span>
|
4141 |
|
4142 |
|
4143 |
|
4144 |
|
4145 | </td>
|
4146 |
|
4147 |
|
4148 |
|
4149 |
|
4150 |
|
4151 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The radius of the circle.</p></td>
|
4152 | </tr>
|
4153 |
|
4154 |
|
4155 | </tbody>
|
4156 | </table>
|
4157 |
|
4158 |
|
4159 |
|
4160 |
|
4161 | <dl class="details">
|
4162 |
|
4163 |
|
4164 |
|
4165 |
|
4166 |
|
4167 |
|
4168 |
|
4169 |
|
4170 |
|
4171 |
|
4172 |
|
4173 |
|
4174 |
|
4175 |
|
4176 |
|
4177 |
|
4178 |
|
4179 |
|
4180 |
|
4181 |
|
4182 |
|
4183 |
|
4184 |
|
4185 |
|
4186 |
|
4187 |
|
4188 |
|
4189 |
|
4190 |
|
4191 | <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
|
4192 | <dd class="tag-source">
|
4193 | <ul class="dummy">
|
4194 | <li>
|
4195 | <a href="CrossBase_general_CB_Collisions.js.html">CrossBase/general/CB_Collisions.js</a>,
|
4196 | <a href="CrossBase_general_CB_Collisions.js.html#sunlight-1-line-255">line 255</a>
|
4197 | </li>
|
4198 | </ul>
|
4199 | </dd>
|
4200 |
|
4201 |
|
4202 |
|
4203 |
|
4204 |
|
4205 |
|
4206 |
|
4207 | </dl>
|
4208 |
|
4209 |
|
4210 |
|
4211 |
|
4212 |
|
4213 |
|
4214 |
|
4215 |
|
4216 |
|
4217 |
|
4218 |
|
4219 |
|
4220 |
|
4221 | <h5>Returns:</h5>
|
4222 |
|
4223 |
|
4224 | <div class="param-desc">
|
4225 | <p>Returns whether the point is touching (maybe over) the circle. This will also return true if they are adjacent (next to each other).</p>
|
4226 | </div>
|
4227 |
|
4228 |
|
4229 |
|
4230 | <dl>
|
4231 | <dt>
|
4232 | Type
|
4233 | </dt>
|
4234 | <dd>
|
4235 |
|
4236 | <span class="param-type">boolean</span>
|
4237 |
|
4238 |
|
4239 |
|
4240 | </dd>
|
4241 | </dl>
|
4242 |
|
4243 |
|
4244 |
|
4245 |
|
4246 |
|
4247 | </dd>
|
4248 |
|
4249 |
|
4250 |
|
4251 | <hr>
|
4252 | <dt>
|
4253 | <h4 class="name" id=".isPointTouchingElement"><span class="type-signature"><static> </span>isPointTouchingElement<span class="signature">(x, y, element)</span><span class="type-signature"> → {boolean}</span></h4>
|
4254 |
|
4255 |
|
4256 | </dt>
|
4257 | <dd>
|
4258 |
|
4259 |
|
4260 | <div class="description">
|
4261 | <p>Tells whether a given point is touching (maybe over) a given DOM element (it will be considered a rectangle). This will also return true if they are adjacent (next to each other).</p>
|
4262 | </div>
|
4263 |
|
4264 |
|
4265 |
|
4266 |
|
4267 |
|
4268 |
|
4269 |
|
4270 |
|
4271 | <h5>Parameters:</h5>
|
4272 |
|
4273 |
|
4274 | <table class="params table table-striped">
|
4275 | <thead>
|
4276 | <tr>
|
4277 |
|
4278 | <th style="width:12%; min-width:110px;">Name</th>
|
4279 |
|
4280 |
|
4281 | <th style="width:12%; min-width:110px;">Type</th>
|
4282 |
|
4283 |
|
4284 |
|
4285 |
|
4286 |
|
4287 | <th class="last" style="min-width:310px;">Description</th>
|
4288 | </tr>
|
4289 | </thead>
|
4290 |
|
4291 | <tbody>
|
4292 |
|
4293 |
|
4294 | <tr>
|
4295 |
|
4296 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>x</code></td>
|
4297 |
|
4298 |
|
4299 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
4300 |
|
4301 |
|
4302 | <span class="param-type">number</span>
|
4303 |
|
4304 |
|
4305 |
|
4306 |
|
4307 | </td>
|
4308 |
|
4309 |
|
4310 |
|
4311 |
|
4312 |
|
4313 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "X" coordinate of the point.</p></td>
|
4314 | </tr>
|
4315 |
|
4316 |
|
4317 |
|
4318 | <tr>
|
4319 |
|
4320 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>y</code></td>
|
4321 |
|
4322 |
|
4323 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
4324 |
|
4325 |
|
4326 | <span class="param-type">number</span>
|
4327 |
|
4328 |
|
4329 |
|
4330 |
|
4331 | </td>
|
4332 |
|
4333 |
|
4334 |
|
4335 |
|
4336 |
|
4337 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "Y" coordinate of the point.</p></td>
|
4338 | </tr>
|
4339 |
|
4340 |
|
4341 |
|
4342 | <tr>
|
4343 |
|
4344 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>element</code></td>
|
4345 |
|
4346 |
|
4347 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
4348 |
|
4349 |
|
4350 | <span class="param-type">Element</span>
|
4351 |
|
4352 |
|
4353 |
|
4354 |
|
4355 | </td>
|
4356 |
|
4357 |
|
4358 |
|
4359 |
|
4360 |
|
4361 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The DOM element that we want to check (it will be considered a rectangle).</p></td>
|
4362 | </tr>
|
4363 |
|
4364 |
|
4365 | </tbody>
|
4366 | </table>
|
4367 |
|
4368 |
|
4369 |
|
4370 |
|
4371 | <dl class="details">
|
4372 |
|
4373 |
|
4374 |
|
4375 |
|
4376 |
|
4377 |
|
4378 |
|
4379 |
|
4380 |
|
4381 |
|
4382 |
|
4383 |
|
4384 |
|
4385 |
|
4386 |
|
4387 |
|
4388 |
|
4389 |
|
4390 |
|
4391 |
|
4392 |
|
4393 |
|
4394 |
|
4395 |
|
4396 |
|
4397 |
|
4398 |
|
4399 |
|
4400 |
|
4401 | <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
|
4402 | <dd class="tag-source">
|
4403 | <ul class="dummy">
|
4404 | <li>
|
4405 | <a href="CrossBase_general_CB_Collisions.js.html">CrossBase/general/CB_Collisions.js</a>,
|
4406 | <a href="CrossBase_general_CB_Collisions.js.html#sunlight-1-line-79">line 79</a>
|
4407 | </li>
|
4408 | </ul>
|
4409 | </dd>
|
4410 |
|
4411 |
|
4412 |
|
4413 |
|
4414 |
|
4415 |
|
4416 |
|
4417 | </dl>
|
4418 |
|
4419 |
|
4420 |
|
4421 |
|
4422 |
|
4423 |
|
4424 |
|
4425 |
|
4426 |
|
4427 |
|
4428 |
|
4429 |
|
4430 |
|
4431 | <h5>Returns:</h5>
|
4432 |
|
4433 |
|
4434 | <div class="param-desc">
|
4435 | <p>Returns whether the point is touching (maybe over) the given DOM element (it will be considered a rectangle). This will also return true if they are adjacent (next to each other).</p>
|
4436 | </div>
|
4437 |
|
4438 |
|
4439 |
|
4440 | <dl>
|
4441 | <dt>
|
4442 | Type
|
4443 | </dt>
|
4444 | <dd>
|
4445 |
|
4446 | <span class="param-type">boolean</span>
|
4447 |
|
4448 |
|
4449 |
|
4450 | </dd>
|
4451 | </dl>
|
4452 |
|
4453 |
|
4454 |
|
4455 |
|
4456 |
|
4457 | </dd>
|
4458 |
|
4459 |
|
4460 |
|
4461 | <hr>
|
4462 | <dt>
|
4463 | <h4 class="name" id=".isPointTouchingEllipse"><span class="type-signature"><static> </span>isPointTouchingEllipse<span class="signature">(x, y, centreX, centreY, radiusX, radiusY [, rotation] [, rotationUseDegrees])</span><span class="type-signature"> → {boolean}</span></h4>
|
4464 |
|
4465 |
|
4466 | </dt>
|
4467 | <dd>
|
4468 |
|
4469 |
|
4470 | <div class="description">
|
4471 | <p>Tells whether a point is touching (maybe over) a ellipse. This will also return true if they are adjacent (next to each other).</p>
|
4472 | </div>
|
4473 |
|
4474 |
|
4475 |
|
4476 |
|
4477 |
|
4478 |
|
4479 |
|
4480 |
|
4481 | <h5>Parameters:</h5>
|
4482 |
|
4483 |
|
4484 | <table class="params table table-striped">
|
4485 | <thead>
|
4486 | <tr>
|
4487 |
|
4488 | <th style="width:12%; min-width:110px;">Name</th>
|
4489 |
|
4490 |
|
4491 | <th style="width:12%; min-width:110px;">Type</th>
|
4492 |
|
4493 |
|
4494 | <th style="width:12%; min-width:110px;">Argument</th>
|
4495 |
|
4496 |
|
4497 |
|
4498 | <th style="width:12%; min-width:110px;">Default</th>
|
4499 |
|
4500 |
|
4501 | <th class="last" style="min-width:310px;">Description</th>
|
4502 | </tr>
|
4503 | </thead>
|
4504 |
|
4505 | <tbody>
|
4506 |
|
4507 |
|
4508 | <tr>
|
4509 |
|
4510 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>x</code></td>
|
4511 |
|
4512 |
|
4513 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
4514 |
|
4515 |
|
4516 | <span class="param-type">number</span>
|
4517 |
|
4518 |
|
4519 |
|
4520 |
|
4521 | </td>
|
4522 |
|
4523 |
|
4524 | <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
4525 |
|
4526 |
|
4527 |
|
4528 |
|
4529 |
|
4530 | </td>
|
4531 |
|
4532 |
|
4533 |
|
4534 | <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
4535 |
|
4536 | </td>
|
4537 |
|
4538 |
|
4539 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "X" coordinate of the point.</p></td>
|
4540 | </tr>
|
4541 |
|
4542 |
|
4543 |
|
4544 | <tr>
|
4545 |
|
4546 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>y</code></td>
|
4547 |
|
4548 |
|
4549 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
4550 |
|
4551 |
|
4552 | <span class="param-type">number</span>
|
4553 |
|
4554 |
|
4555 |
|
4556 |
|
4557 | </td>
|
4558 |
|
4559 |
|
4560 | <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
4561 |
|
4562 |
|
4563 |
|
4564 |
|
4565 |
|
4566 | </td>
|
4567 |
|
4568 |
|
4569 |
|
4570 | <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
4571 |
|
4572 | </td>
|
4573 |
|
4574 |
|
4575 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "Y" coordinate of the point.</p></td>
|
4576 | </tr>
|
4577 |
|
4578 |
|
4579 |
|
4580 | <tr>
|
4581 |
|
4582 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>centreX</code></td>
|
4583 |
|
4584 |
|
4585 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
4586 |
|
4587 |
|
4588 | <span class="param-type">number</span>
|
4589 |
|
4590 |
|
4591 |
|
4592 |
|
4593 | </td>
|
4594 |
|
4595 |
|
4596 | <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
4597 |
|
4598 |
|
4599 |
|
4600 |
|
4601 |
|
4602 | </td>
|
4603 |
|
4604 |
|
4605 |
|
4606 | <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
4607 |
|
4608 | </td>
|
4609 |
|
4610 |
|
4611 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "X" coordinate of the center of the ellipse.</p></td>
|
4612 | </tr>
|
4613 |
|
4614 |
|
4615 |
|
4616 | <tr>
|
4617 |
|
4618 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>centreY</code></td>
|
4619 |
|
4620 |
|
4621 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
4622 |
|
4623 |
|
4624 | <span class="param-type">number</span>
|
4625 |
|
4626 |
|
4627 |
|
4628 |
|
4629 | </td>
|
4630 |
|
4631 |
|
4632 | <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
4633 |
|
4634 |
|
4635 |
|
4636 |
|
4637 |
|
4638 | </td>
|
4639 |
|
4640 |
|
4641 |
|
4642 | <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
4643 |
|
4644 | </td>
|
4645 |
|
4646 |
|
4647 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "Y" coordinate of the center of the ellipse.</p></td>
|
4648 | </tr>
|
4649 |
|
4650 |
|
4651 |
|
4652 | <tr>
|
4653 |
|
4654 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>radiusX</code></td>
|
4655 |
|
4656 |
|
4657 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
4658 |
|
4659 |
|
4660 | <span class="param-type">number</span>
|
4661 |
|
4662 |
|
4663 |
|
4664 |
|
4665 | </td>
|
4666 |
|
4667 |
|
4668 | <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
4669 |
|
4670 |
|
4671 |
|
4672 |
|
4673 |
|
4674 | </td>
|
4675 |
|
4676 |
|
4677 |
|
4678 | <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
4679 |
|
4680 | </td>
|
4681 |
|
4682 |
|
4683 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The X (horizontal) radius of the ellipse.</p></td>
|
4684 | </tr>
|
4685 |
|
4686 |
|
4687 |
|
4688 | <tr>
|
4689 |
|
4690 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>radiusY</code></td>
|
4691 |
|
4692 |
|
4693 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
4694 |
|
4695 |
|
4696 | <span class="param-type">number</span>
|
4697 |
|
4698 |
|
4699 |
|
4700 |
|
4701 | </td>
|
4702 |
|
4703 |
|
4704 | <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
4705 |
|
4706 |
|
4707 |
|
4708 |
|
4709 |
|
4710 | </td>
|
4711 |
|
4712 |
|
4713 |
|
4714 | <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
4715 |
|
4716 | </td>
|
4717 |
|
4718 |
|
4719 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The Y (vertical) radius of the ellipse.</p></td>
|
4720 | </tr>
|
4721 |
|
4722 |
|
4723 |
|
4724 | <tr>
|
4725 |
|
4726 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>rotation</code></td>
|
4727 |
|
4728 |
|
4729 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
4730 |
|
4731 |
|
4732 | <span class="param-type">number</span>
|
4733 |
|
4734 |
|
4735 |
|
4736 |
|
4737 | </td>
|
4738 |
|
4739 |
|
4740 | <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
4741 |
|
4742 | <optional><br>
|
4743 |
|
4744 |
|
4745 |
|
4746 |
|
4747 |
|
4748 | </td>
|
4749 |
|
4750 |
|
4751 |
|
4752 | <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
4753 |
|
4754 | 0
|
4755 |
|
4756 | </td>
|
4757 |
|
4758 |
|
4759 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The ellipse rotation. The value given will be considered either degrees or radians depending on the given "rotationUseDegrees" parameter (by default, it is considered radians). Not implemented yet!</p></td>
|
4760 | </tr>
|
4761 |
|
4762 |
|
4763 |
|
4764 | <tr>
|
4765 |
|
4766 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>rotationUseDegrees</code></td>
|
4767 |
|
4768 |
|
4769 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
4770 |
|
4771 |
|
4772 | <span class="param-type">boolean</span>
|
4773 |
|
4774 |
|
4775 |
|
4776 |
|
4777 | </td>
|
4778 |
|
4779 |
|
4780 | <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
4781 |
|
4782 | <optional><br>
|
4783 |
|
4784 |
|
4785 |
|
4786 |
|
4787 |
|
4788 | </td>
|
4789 |
|
4790 |
|
4791 |
|
4792 | <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
4793 |
|
4794 | false
|
4795 |
|
4796 | </td>
|
4797 |
|
4798 |
|
4799 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>Defines whether the "rotation" given should be considered degrees or not (radians). Not implemented yet!</p></td>
|
4800 | </tr>
|
4801 |
|
4802 |
|
4803 | </tbody>
|
4804 | </table>
|
4805 |
|
4806 |
|
4807 |
|
4808 |
|
4809 | <dl class="details">
|
4810 |
|
4811 |
|
4812 |
|
4813 |
|
4814 |
|
4815 |
|
4816 |
|
4817 |
|
4818 |
|
4819 |
|
4820 |
|
4821 |
|
4822 |
|
4823 |
|
4824 |
|
4825 |
|
4826 |
|
4827 |
|
4828 |
|
4829 |
|
4830 |
|
4831 |
|
4832 |
|
4833 |
|
4834 |
|
4835 |
|
4836 |
|
4837 |
|
4838 |
|
4839 | <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
|
4840 | <dd class="tag-source">
|
4841 | <ul class="dummy">
|
4842 | <li>
|
4843 | <a href="CrossBase_general_CB_Collisions.js.html">CrossBase/general/CB_Collisions.js</a>,
|
4844 | <a href="CrossBase_general_CB_Collisions.js.html#sunlight-1-line-302">line 302</a>
|
4845 | </li>
|
4846 | </ul>
|
4847 | </dd>
|
4848 |
|
4849 |
|
4850 |
|
4851 |
|
4852 |
|
4853 |
|
4854 |
|
4855 | <dt class="tag-todo method-doc-label method-doc-details-label">To Do:</dt>
|
4856 | <dd class="tag-todo">
|
4857 | <ul>
|
4858 | <li>Make the "rotation" parameter work (check https://math.stackexchange.com/questions/426150/what-is-the-general-equation-of-the-ellipse-that-is-not-in-the-origin-and-rotate).</li>
|
4859 | </ul>
|
4860 | </dd>
|
4861 |
|
4862 | </dl>
|
4863 |
|
4864 |
|
4865 |
|
4866 |
|
4867 |
|
4868 |
|
4869 |
|
4870 |
|
4871 |
|
4872 |
|
4873 |
|
4874 |
|
4875 |
|
4876 | <h5>Returns:</h5>
|
4877 |
|
4878 |
|
4879 | <div class="param-desc">
|
4880 | <p>Returns whether the point is touching (maybe over) the ellipse. This will also return true if they are adjacent (next to each other).</p>
|
4881 | </div>
|
4882 |
|
4883 |
|
4884 |
|
4885 | <dl>
|
4886 | <dt>
|
4887 | Type
|
4888 | </dt>
|
4889 | <dd>
|
4890 |
|
4891 | <span class="param-type">boolean</span>
|
4892 |
|
4893 |
|
4894 |
|
4895 | </dd>
|
4896 | </dl>
|
4897 |
|
4898 |
|
4899 |
|
4900 |
|
4901 |
|
4902 | </dd>
|
4903 |
|
4904 |
|
4905 |
|
4906 | <hr>
|
4907 | <dt>
|
4908 | <h4 class="name" id=".isPointTouchingRectangle"><span class="type-signature"><static> </span>isPointTouchingRectangle<span class="signature">(x, y, rectangleX, rectangleY, rectangleWidth, rectangleHeight)</span><span class="type-signature"> → {boolean}</span></h4>
|
4909 |
|
4910 |
|
4911 | </dt>
|
4912 | <dd>
|
4913 |
|
4914 |
|
4915 | <div class="description">
|
4916 | <p>Tells whether a point is touching (maybe over) a rectangle. This will also return true if they are adjacent (next to each other).</p>
|
4917 | </div>
|
4918 |
|
4919 |
|
4920 |
|
4921 |
|
4922 |
|
4923 |
|
4924 |
|
4925 |
|
4926 | <h5>Parameters:</h5>
|
4927 |
|
4928 |
|
4929 | <table class="params table table-striped">
|
4930 | <thead>
|
4931 | <tr>
|
4932 |
|
4933 | <th style="width:12%; min-width:110px;">Name</th>
|
4934 |
|
4935 |
|
4936 | <th style="width:12%; min-width:110px;">Type</th>
|
4937 |
|
4938 |
|
4939 |
|
4940 |
|
4941 |
|
4942 | <th class="last" style="min-width:310px;">Description</th>
|
4943 | </tr>
|
4944 | </thead>
|
4945 |
|
4946 | <tbody>
|
4947 |
|
4948 |
|
4949 | <tr>
|
4950 |
|
4951 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>x</code></td>
|
4952 |
|
4953 |
|
4954 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
4955 |
|
4956 |
|
4957 | <span class="param-type">number</span>
|
4958 |
|
4959 |
|
4960 |
|
4961 |
|
4962 | </td>
|
4963 |
|
4964 |
|
4965 |
|
4966 |
|
4967 |
|
4968 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "X" coordinate of the point.</p></td>
|
4969 | </tr>
|
4970 |
|
4971 |
|
4972 |
|
4973 | <tr>
|
4974 |
|
4975 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>y</code></td>
|
4976 |
|
4977 |
|
4978 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
4979 |
|
4980 |
|
4981 | <span class="param-type">number</span>
|
4982 |
|
4983 |
|
4984 |
|
4985 |
|
4986 | </td>
|
4987 |
|
4988 |
|
4989 |
|
4990 |
|
4991 |
|
4992 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "Y" coordinate of the point.</p></td>
|
4993 | </tr>
|
4994 |
|
4995 |
|
4996 |
|
4997 | <tr>
|
4998 |
|
4999 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>rectangleX</code></td>
|
5000 |
|
5001 |
|
5002 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
5003 |
|
5004 |
|
5005 | <span class="param-type">number</span>
|
5006 |
|
5007 |
|
5008 |
|
5009 |
|
5010 | </td>
|
5011 |
|
5012 |
|
5013 |
|
5014 |
|
5015 |
|
5016 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "X" coordinate of the upper left corner of the rectangle.</p></td>
|
5017 | </tr>
|
5018 |
|
5019 |
|
5020 |
|
5021 | <tr>
|
5022 |
|
5023 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>rectangleY</code></td>
|
5024 |
|
5025 |
|
5026 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
5027 |
|
5028 |
|
5029 | <span class="param-type">number</span>
|
5030 |
|
5031 |
|
5032 |
|
5033 |
|
5034 | </td>
|
5035 |
|
5036 |
|
5037 |
|
5038 |
|
5039 |
|
5040 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "Y" coordinate of the upper left corner of the rectangle.</p></td>
|
5041 | </tr>
|
5042 |
|
5043 |
|
5044 |
|
5045 | <tr>
|
5046 |
|
5047 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>rectangleWidth</code></td>
|
5048 |
|
5049 |
|
5050 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
5051 |
|
5052 |
|
5053 | <span class="param-type">number</span>
|
5054 |
|
5055 |
|
5056 |
|
5057 |
|
5058 | </td>
|
5059 |
|
5060 |
|
5061 |
|
5062 |
|
5063 |
|
5064 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The width of the rectangle.</p></td>
|
5065 | </tr>
|
5066 |
|
5067 |
|
5068 |
|
5069 | <tr>
|
5070 |
|
5071 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>rectangleHeight</code></td>
|
5072 |
|
5073 |
|
5074 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
5075 |
|
5076 |
|
5077 | <span class="param-type">number</span>
|
5078 |
|
5079 |
|
5080 |
|
5081 |
|
5082 | </td>
|
5083 |
|
5084 |
|
5085 |
|
5086 |
|
5087 |
|
5088 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The height of the rectangle.</p></td>
|
5089 | </tr>
|
5090 |
|
5091 |
|
5092 | </tbody>
|
5093 | </table>
|
5094 |
|
5095 |
|
5096 |
|
5097 |
|
5098 | <dl class="details">
|
5099 |
|
5100 |
|
5101 |
|
5102 |
|
5103 |
|
5104 |
|
5105 |
|
5106 |
|
5107 |
|
5108 |
|
5109 |
|
5110 |
|
5111 |
|
5112 |
|
5113 |
|
5114 |
|
5115 |
|
5116 |
|
5117 |
|
5118 |
|
5119 |
|
5120 |
|
5121 |
|
5122 |
|
5123 |
|
5124 |
|
5125 |
|
5126 |
|
5127 |
|
5128 | <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
|
5129 | <dd class="tag-source">
|
5130 | <ul class="dummy">
|
5131 | <li>
|
5132 | <a href="CrossBase_general_CB_Collisions.js.html">CrossBase/general/CB_Collisions.js</a>,
|
5133 | <a href="CrossBase_general_CB_Collisions.js.html#sunlight-1-line-211">line 211</a>
|
5134 | </li>
|
5135 | </ul>
|
5136 | </dd>
|
5137 |
|
5138 |
|
5139 |
|
5140 |
|
5141 |
|
5142 |
|
5143 |
|
5144 | <dt class="tag-todo method-doc-label method-doc-details-label">To Do:</dt>
|
5145 | <dd class="tag-todo">
|
5146 | <ul>
|
5147 | <li>Think about using a "rotation" parameter to accept rotated rectangles.</li>
|
5148 | </ul>
|
5149 | </dd>
|
5150 |
|
5151 | </dl>
|
5152 |
|
5153 |
|
5154 |
|
5155 |
|
5156 |
|
5157 |
|
5158 |
|
5159 |
|
5160 |
|
5161 |
|
5162 |
|
5163 |
|
5164 |
|
5165 | <h5>Returns:</h5>
|
5166 |
|
5167 |
|
5168 | <div class="param-desc">
|
5169 | <p>Returns whether the point is touching (maybe over) the rectangle. This will also return true if they are adjacent (next to each other).</p>
|
5170 | </div>
|
5171 |
|
5172 |
|
5173 |
|
5174 | <dl>
|
5175 | <dt>
|
5176 | Type
|
5177 | </dt>
|
5178 | <dd>
|
5179 |
|
5180 | <span class="param-type">boolean</span>
|
5181 |
|
5182 |
|
5183 |
|
5184 | </dd>
|
5185 | </dl>
|
5186 |
|
5187 |
|
5188 |
|
5189 |
|
5190 |
|
5191 | </dd>
|
5192 |
|
5193 |
|
5194 |
|
5195 | <hr>
|
5196 | <dt>
|
5197 | <h4 class="name" id=".isRectangleOverCircle"><span class="type-signature"><static> </span>isRectangleOverCircle<span class="signature">(centreX, centreY, radius, rectangleX, rectangleY, rectangleWidth, rectangleHeight)</span><span class="type-signature"> → {boolean}</span></h4>
|
5198 |
|
5199 |
|
5200 | </dt>
|
5201 | <dd>
|
5202 |
|
5203 |
|
5204 | <div class="description">
|
5205 | <p>Tells whether a circle is over a given rectangle.</p>
|
5206 | </div>
|
5207 |
|
5208 |
|
5209 |
|
5210 |
|
5211 |
|
5212 |
|
5213 |
|
5214 |
|
5215 | <h5>Parameters:</h5>
|
5216 |
|
5217 |
|
5218 | <table class="params table table-striped">
|
5219 | <thead>
|
5220 | <tr>
|
5221 |
|
5222 | <th style="width:12%; min-width:110px;">Name</th>
|
5223 |
|
5224 |
|
5225 | <th style="width:12%; min-width:110px;">Type</th>
|
5226 |
|
5227 |
|
5228 |
|
5229 |
|
5230 |
|
5231 | <th class="last" style="min-width:310px;">Description</th>
|
5232 | </tr>
|
5233 | </thead>
|
5234 |
|
5235 | <tbody>
|
5236 |
|
5237 |
|
5238 | <tr>
|
5239 |
|
5240 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>centreX</code></td>
|
5241 |
|
5242 |
|
5243 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
5244 |
|
5245 |
|
5246 | <span class="param-type">number</span>
|
5247 |
|
5248 |
|
5249 |
|
5250 |
|
5251 | </td>
|
5252 |
|
5253 |
|
5254 |
|
5255 |
|
5256 |
|
5257 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "X" coordinate of the center of the first circle.</p></td>
|
5258 | </tr>
|
5259 |
|
5260 |
|
5261 |
|
5262 | <tr>
|
5263 |
|
5264 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>centreY</code></td>
|
5265 |
|
5266 |
|
5267 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
5268 |
|
5269 |
|
5270 | <span class="param-type">number</span>
|
5271 |
|
5272 |
|
5273 |
|
5274 |
|
5275 | </td>
|
5276 |
|
5277 |
|
5278 |
|
5279 |
|
5280 |
|
5281 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "Y" coordinate of the center of the first circle.</p></td>
|
5282 | </tr>
|
5283 |
|
5284 |
|
5285 |
|
5286 | <tr>
|
5287 |
|
5288 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>radius</code></td>
|
5289 |
|
5290 |
|
5291 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
5292 |
|
5293 |
|
5294 | <span class="param-type">number</span>
|
5295 |
|
5296 |
|
5297 |
|
5298 |
|
5299 | </td>
|
5300 |
|
5301 |
|
5302 |
|
5303 |
|
5304 |
|
5305 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The radius of the first circle.</p></td>
|
5306 | </tr>
|
5307 |
|
5308 |
|
5309 |
|
5310 | <tr>
|
5311 |
|
5312 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>rectangleX</code></td>
|
5313 |
|
5314 |
|
5315 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
5316 |
|
5317 |
|
5318 | <span class="param-type">number</span>
|
5319 |
|
5320 |
|
5321 |
|
5322 |
|
5323 | </td>
|
5324 |
|
5325 |
|
5326 |
|
5327 |
|
5328 |
|
5329 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "X" coordinate of the upper left corner of the first rectangle.</p></td>
|
5330 | </tr>
|
5331 |
|
5332 |
|
5333 |
|
5334 | <tr>
|
5335 |
|
5336 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>rectangleY</code></td>
|
5337 |
|
5338 |
|
5339 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
5340 |
|
5341 |
|
5342 | <span class="param-type">number</span>
|
5343 |
|
5344 |
|
5345 |
|
5346 |
|
5347 | </td>
|
5348 |
|
5349 |
|
5350 |
|
5351 |
|
5352 |
|
5353 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "Y" coordinate of the upper left corner of the first rectangle.</p></td>
|
5354 | </tr>
|
5355 |
|
5356 |
|
5357 |
|
5358 | <tr>
|
5359 |
|
5360 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>rectangleWidth</code></td>
|
5361 |
|
5362 |
|
5363 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
5364 |
|
5365 |
|
5366 | <span class="param-type">number</span>
|
5367 |
|
5368 |
|
5369 |
|
5370 |
|
5371 | </td>
|
5372 |
|
5373 |
|
5374 |
|
5375 |
|
5376 |
|
5377 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The width of the first rectangle.</p></td>
|
5378 | </tr>
|
5379 |
|
5380 |
|
5381 |
|
5382 | <tr>
|
5383 |
|
5384 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>rectangleHeight</code></td>
|
5385 |
|
5386 |
|
5387 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
5388 |
|
5389 |
|
5390 | <span class="param-type">number</span>
|
5391 |
|
5392 |
|
5393 |
|
5394 |
|
5395 | </td>
|
5396 |
|
5397 |
|
5398 |
|
5399 |
|
5400 |
|
5401 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The height of the first rectangle.</p></td>
|
5402 | </tr>
|
5403 |
|
5404 |
|
5405 | </tbody>
|
5406 | </table>
|
5407 |
|
5408 |
|
5409 |
|
5410 |
|
5411 | <dl class="details">
|
5412 |
|
5413 |
|
5414 |
|
5415 |
|
5416 |
|
5417 |
|
5418 |
|
5419 |
|
5420 |
|
5421 |
|
5422 |
|
5423 |
|
5424 |
|
5425 |
|
5426 |
|
5427 |
|
5428 |
|
5429 |
|
5430 |
|
5431 |
|
5432 |
|
5433 |
|
5434 |
|
5435 |
|
5436 |
|
5437 |
|
5438 |
|
5439 |
|
5440 |
|
5441 | <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
|
5442 | <dd class="tag-source">
|
5443 | <ul class="dummy">
|
5444 | <li>
|
5445 | <a href="CrossBase_general_CB_Collisions.js.html">CrossBase/general/CB_Collisions.js</a>,
|
5446 | <a href="CrossBase_general_CB_Collisions.js.html#sunlight-1-line-473">line 473</a>
|
5447 | </li>
|
5448 | </ul>
|
5449 | </dd>
|
5450 |
|
5451 |
|
5452 |
|
5453 |
|
5454 |
|
5455 |
|
5456 |
|
5457 | <dt class="tag-todo method-doc-label method-doc-details-label">To Do:</dt>
|
5458 | <dd class="tag-todo">
|
5459 | <ul>
|
5460 | <li>Think about using a "rotation" parameter to accept rotated rectangles.</li>
|
5461 | </ul>
|
5462 | </dd>
|
5463 |
|
5464 | </dl>
|
5465 |
|
5466 |
|
5467 |
|
5468 |
|
5469 |
|
5470 |
|
5471 |
|
5472 |
|
5473 |
|
5474 |
|
5475 |
|
5476 |
|
5477 |
|
5478 | <h5>Returns:</h5>
|
5479 |
|
5480 |
|
5481 | <div class="param-desc">
|
5482 | <p>Returns whether the circle is over the rectangle.</p>
|
5483 | </div>
|
5484 |
|
5485 |
|
5486 |
|
5487 | <dl>
|
5488 | <dt>
|
5489 | Type
|
5490 | </dt>
|
5491 | <dd>
|
5492 |
|
5493 | <span class="param-type">boolean</span>
|
5494 |
|
5495 |
|
5496 |
|
5497 | </dd>
|
5498 | </dl>
|
5499 |
|
5500 |
|
5501 |
|
5502 |
|
5503 |
|
5504 | </dd>
|
5505 |
|
5506 |
|
5507 |
|
5508 | <hr>
|
5509 | <dt>
|
5510 | <h4 class="name" id=".isRectangleOverElement"><span class="type-signature"><static> </span>isRectangleOverElement<span class="signature">(rectangleX, rectangleY, rectangleWidth, rectangleHeight, element)</span><span class="type-signature"> → {boolean}</span></h4>
|
5511 |
|
5512 |
|
5513 | </dt>
|
5514 | <dd>
|
5515 |
|
5516 |
|
5517 | <div class="description">
|
5518 | <p>Tells whether a rectangle is over a given DOM element (it will be considered a rectangle).</p>
|
5519 | </div>
|
5520 |
|
5521 |
|
5522 |
|
5523 |
|
5524 |
|
5525 |
|
5526 |
|
5527 |
|
5528 | <h5>Parameters:</h5>
|
5529 |
|
5530 |
|
5531 | <table class="params table table-striped">
|
5532 | <thead>
|
5533 | <tr>
|
5534 |
|
5535 | <th style="width:12%; min-width:110px;">Name</th>
|
5536 |
|
5537 |
|
5538 | <th style="width:12%; min-width:110px;">Type</th>
|
5539 |
|
5540 |
|
5541 |
|
5542 |
|
5543 |
|
5544 | <th class="last" style="min-width:310px;">Description</th>
|
5545 | </tr>
|
5546 | </thead>
|
5547 |
|
5548 | <tbody>
|
5549 |
|
5550 |
|
5551 | <tr>
|
5552 |
|
5553 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>rectangleX</code></td>
|
5554 |
|
5555 |
|
5556 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
5557 |
|
5558 |
|
5559 | <span class="param-type">number</span>
|
5560 |
|
5561 |
|
5562 |
|
5563 |
|
5564 | </td>
|
5565 |
|
5566 |
|
5567 |
|
5568 |
|
5569 |
|
5570 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "X" coordinate of the upper left corner of the first rectangle.</p></td>
|
5571 | </tr>
|
5572 |
|
5573 |
|
5574 |
|
5575 | <tr>
|
5576 |
|
5577 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>rectangleY</code></td>
|
5578 |
|
5579 |
|
5580 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
5581 |
|
5582 |
|
5583 | <span class="param-type">number</span>
|
5584 |
|
5585 |
|
5586 |
|
5587 |
|
5588 | </td>
|
5589 |
|
5590 |
|
5591 |
|
5592 |
|
5593 |
|
5594 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "Y" coordinate of the upper left corner of the first rectangle.</p></td>
|
5595 | </tr>
|
5596 |
|
5597 |
|
5598 |
|
5599 | <tr>
|
5600 |
|
5601 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>rectangleWidth</code></td>
|
5602 |
|
5603 |
|
5604 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
5605 |
|
5606 |
|
5607 | <span class="param-type">number</span>
|
5608 |
|
5609 |
|
5610 |
|
5611 |
|
5612 | </td>
|
5613 |
|
5614 |
|
5615 |
|
5616 |
|
5617 |
|
5618 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The width of the first rectangle.</p></td>
|
5619 | </tr>
|
5620 |
|
5621 |
|
5622 |
|
5623 | <tr>
|
5624 |
|
5625 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>rectangleHeight</code></td>
|
5626 |
|
5627 |
|
5628 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
5629 |
|
5630 |
|
5631 | <span class="param-type">number</span>
|
5632 |
|
5633 |
|
5634 |
|
5635 |
|
5636 | </td>
|
5637 |
|
5638 |
|
5639 |
|
5640 |
|
5641 |
|
5642 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The height of the first rectangle.</p></td>
|
5643 | </tr>
|
5644 |
|
5645 |
|
5646 |
|
5647 | <tr>
|
5648 |
|
5649 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>element</code></td>
|
5650 |
|
5651 |
|
5652 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
5653 |
|
5654 |
|
5655 | <span class="param-type">Element</span>
|
5656 |
|
5657 |
|
5658 |
|
5659 |
|
5660 | </td>
|
5661 |
|
5662 |
|
5663 |
|
5664 |
|
5665 |
|
5666 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The DOM element that we want to check (it will be considered a rectangle).</p></td>
|
5667 | </tr>
|
5668 |
|
5669 |
|
5670 | </tbody>
|
5671 | </table>
|
5672 |
|
5673 |
|
5674 |
|
5675 |
|
5676 | <dl class="details">
|
5677 |
|
5678 |
|
5679 |
|
5680 |
|
5681 |
|
5682 |
|
5683 |
|
5684 |
|
5685 |
|
5686 |
|
5687 |
|
5688 |
|
5689 |
|
5690 |
|
5691 |
|
5692 |
|
5693 |
|
5694 |
|
5695 |
|
5696 |
|
5697 |
|
5698 |
|
5699 |
|
5700 |
|
5701 |
|
5702 |
|
5703 |
|
5704 |
|
5705 |
|
5706 | <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
|
5707 | <dd class="tag-source">
|
5708 | <ul class="dummy">
|
5709 | <li>
|
5710 | <a href="CrossBase_general_CB_Collisions.js.html">CrossBase/general/CB_Collisions.js</a>,
|
5711 | <a href="CrossBase_general_CB_Collisions.js.html#sunlight-1-line-370">line 370</a>
|
5712 | </li>
|
5713 | </ul>
|
5714 | </dd>
|
5715 |
|
5716 |
|
5717 |
|
5718 |
|
5719 |
|
5720 |
|
5721 |
|
5722 | <dt class="tag-todo method-doc-label method-doc-details-label">To Do:</dt>
|
5723 | <dd class="tag-todo">
|
5724 | <ul>
|
5725 | <li>Think about using a "rotation" parameter to accept rotated rectangles.</li>
|
5726 | </ul>
|
5727 | </dd>
|
5728 |
|
5729 | </dl>
|
5730 |
|
5731 |
|
5732 |
|
5733 |
|
5734 |
|
5735 |
|
5736 |
|
5737 |
|
5738 |
|
5739 |
|
5740 |
|
5741 |
|
5742 |
|
5743 | <h5>Returns:</h5>
|
5744 |
|
5745 |
|
5746 | <div class="param-desc">
|
5747 | <p>Returns whether the rectangle is over the given DOM element (it will be considered a rectangle).</p>
|
5748 | </div>
|
5749 |
|
5750 |
|
5751 |
|
5752 | <dl>
|
5753 | <dt>
|
5754 | Type
|
5755 | </dt>
|
5756 | <dd>
|
5757 |
|
5758 | <span class="param-type">boolean</span>
|
5759 |
|
5760 |
|
5761 |
|
5762 | </dd>
|
5763 | </dl>
|
5764 |
|
5765 |
|
5766 |
|
5767 |
|
5768 |
|
5769 | </dd>
|
5770 |
|
5771 |
|
5772 |
|
5773 | <hr>
|
5774 | <dt>
|
5775 | <h4 class="name" id=".isRectangleOverRectangle"><span class="type-signature"><static> </span>isRectangleOverRectangle<span class="signature">(rectangleX, rectangleY, rectangleWidth, rectangleHeight, rectangleX2, rectangleY2, rectangleWidth2, rectangleHeight2)</span><span class="type-signature"> → {boolean}</span></h4>
|
5776 |
|
5777 |
|
5778 | </dt>
|
5779 | <dd>
|
5780 |
|
5781 |
|
5782 | <div class="description">
|
5783 | <p>Tells whether a rectangle is over another rectangle.</p>
|
5784 | </div>
|
5785 |
|
5786 |
|
5787 |
|
5788 |
|
5789 |
|
5790 |
|
5791 |
|
5792 |
|
5793 | <h5>Parameters:</h5>
|
5794 |
|
5795 |
|
5796 | <table class="params table table-striped">
|
5797 | <thead>
|
5798 | <tr>
|
5799 |
|
5800 | <th style="width:12%; min-width:110px;">Name</th>
|
5801 |
|
5802 |
|
5803 | <th style="width:12%; min-width:110px;">Type</th>
|
5804 |
|
5805 |
|
5806 |
|
5807 |
|
5808 |
|
5809 | <th class="last" style="min-width:310px;">Description</th>
|
5810 | </tr>
|
5811 | </thead>
|
5812 |
|
5813 | <tbody>
|
5814 |
|
5815 |
|
5816 | <tr>
|
5817 |
|
5818 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>rectangleX</code></td>
|
5819 |
|
5820 |
|
5821 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
5822 |
|
5823 |
|
5824 | <span class="param-type">number</span>
|
5825 |
|
5826 |
|
5827 |
|
5828 |
|
5829 | </td>
|
5830 |
|
5831 |
|
5832 |
|
5833 |
|
5834 |
|
5835 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "X" coordinate of the upper left corner of the first rectangle.</p></td>
|
5836 | </tr>
|
5837 |
|
5838 |
|
5839 |
|
5840 | <tr>
|
5841 |
|
5842 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>rectangleY</code></td>
|
5843 |
|
5844 |
|
5845 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
5846 |
|
5847 |
|
5848 | <span class="param-type">number</span>
|
5849 |
|
5850 |
|
5851 |
|
5852 |
|
5853 | </td>
|
5854 |
|
5855 |
|
5856 |
|
5857 |
|
5858 |
|
5859 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "Y" coordinate of the upper left corner of the first rectangle.</p></td>
|
5860 | </tr>
|
5861 |
|
5862 |
|
5863 |
|
5864 | <tr>
|
5865 |
|
5866 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>rectangleWidth</code></td>
|
5867 |
|
5868 |
|
5869 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
5870 |
|
5871 |
|
5872 | <span class="param-type">number</span>
|
5873 |
|
5874 |
|
5875 |
|
5876 |
|
5877 | </td>
|
5878 |
|
5879 |
|
5880 |
|
5881 |
|
5882 |
|
5883 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The width of the first rectangle.</p></td>
|
5884 | </tr>
|
5885 |
|
5886 |
|
5887 |
|
5888 | <tr>
|
5889 |
|
5890 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>rectangleHeight</code></td>
|
5891 |
|
5892 |
|
5893 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
5894 |
|
5895 |
|
5896 | <span class="param-type">number</span>
|
5897 |
|
5898 |
|
5899 |
|
5900 |
|
5901 | </td>
|
5902 |
|
5903 |
|
5904 |
|
5905 |
|
5906 |
|
5907 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The height of the first rectangle.</p></td>
|
5908 | </tr>
|
5909 |
|
5910 |
|
5911 |
|
5912 | <tr>
|
5913 |
|
5914 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>rectangleX2</code></td>
|
5915 |
|
5916 |
|
5917 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
5918 |
|
5919 |
|
5920 | <span class="param-type">number</span>
|
5921 |
|
5922 |
|
5923 |
|
5924 |
|
5925 | </td>
|
5926 |
|
5927 |
|
5928 |
|
5929 |
|
5930 |
|
5931 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "X" coordinate of the upper left corner of the second rectangle.</p></td>
|
5932 | </tr>
|
5933 |
|
5934 |
|
5935 |
|
5936 | <tr>
|
5937 |
|
5938 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>rectangleY2</code></td>
|
5939 |
|
5940 |
|
5941 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
5942 |
|
5943 |
|
5944 | <span class="param-type">number</span>
|
5945 |
|
5946 |
|
5947 |
|
5948 |
|
5949 | </td>
|
5950 |
|
5951 |
|
5952 |
|
5953 |
|
5954 |
|
5955 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "Y" coordinate of the upper left corner of the second rectangle.</p></td>
|
5956 | </tr>
|
5957 |
|
5958 |
|
5959 |
|
5960 | <tr>
|
5961 |
|
5962 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>rectangleWidth2</code></td>
|
5963 |
|
5964 |
|
5965 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
5966 |
|
5967 |
|
5968 | <span class="param-type">number</span>
|
5969 |
|
5970 |
|
5971 |
|
5972 |
|
5973 | </td>
|
5974 |
|
5975 |
|
5976 |
|
5977 |
|
5978 |
|
5979 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The width of the second rectangle.</p></td>
|
5980 | </tr>
|
5981 |
|
5982 |
|
5983 |
|
5984 | <tr>
|
5985 |
|
5986 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>rectangleHeight2</code></td>
|
5987 |
|
5988 |
|
5989 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
5990 |
|
5991 |
|
5992 | <span class="param-type">number</span>
|
5993 |
|
5994 |
|
5995 |
|
5996 |
|
5997 | </td>
|
5998 |
|
5999 |
|
6000 |
|
6001 |
|
6002 |
|
6003 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The height of the second rectangle.</p></td>
|
6004 | </tr>
|
6005 |
|
6006 |
|
6007 | </tbody>
|
6008 | </table>
|
6009 |
|
6010 |
|
6011 |
|
6012 |
|
6013 | <dl class="details">
|
6014 |
|
6015 |
|
6016 |
|
6017 |
|
6018 |
|
6019 |
|
6020 |
|
6021 |
|
6022 |
|
6023 |
|
6024 |
|
6025 |
|
6026 |
|
6027 |
|
6028 |
|
6029 |
|
6030 |
|
6031 |
|
6032 |
|
6033 |
|
6034 |
|
6035 |
|
6036 |
|
6037 |
|
6038 |
|
6039 |
|
6040 |
|
6041 |
|
6042 |
|
6043 | <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
|
6044 | <dd class="tag-source">
|
6045 | <ul class="dummy">
|
6046 | <li>
|
6047 | <a href="CrossBase_general_CB_Collisions.js.html">CrossBase/general/CB_Collisions.js</a>,
|
6048 | <a href="CrossBase_general_CB_Collisions.js.html#sunlight-1-line-327">line 327</a>
|
6049 | </li>
|
6050 | </ul>
|
6051 | </dd>
|
6052 |
|
6053 |
|
6054 |
|
6055 |
|
6056 |
|
6057 |
|
6058 |
|
6059 | <dt class="tag-todo method-doc-label method-doc-details-label">To Do:</dt>
|
6060 | <dd class="tag-todo">
|
6061 | <ul>
|
6062 | <li>Think about using "rotation" and "rotation2" parameters to accept rotated rectangles.</li>
|
6063 | </ul>
|
6064 | </dd>
|
6065 |
|
6066 | </dl>
|
6067 |
|
6068 |
|
6069 |
|
6070 |
|
6071 |
|
6072 |
|
6073 |
|
6074 |
|
6075 |
|
6076 |
|
6077 |
|
6078 |
|
6079 |
|
6080 | <h5>Returns:</h5>
|
6081 |
|
6082 |
|
6083 | <div class="param-desc">
|
6084 | <p>Returns whether the rectangle is over the other rectangle.</p>
|
6085 | </div>
|
6086 |
|
6087 |
|
6088 |
|
6089 | <dl>
|
6090 | <dt>
|
6091 | Type
|
6092 | </dt>
|
6093 | <dd>
|
6094 |
|
6095 | <span class="param-type">boolean</span>
|
6096 |
|
6097 |
|
6098 |
|
6099 | </dd>
|
6100 | </dl>
|
6101 |
|
6102 |
|
6103 |
|
6104 |
|
6105 |
|
6106 | </dd>
|
6107 |
|
6108 |
|
6109 |
|
6110 | <hr>
|
6111 | <dt>
|
6112 | <h4 class="name" id=".isRectangleTouchingCircle"><span class="type-signature"><static> </span>isRectangleTouchingCircle<span class="signature">(rectangleX, rectangleY, rectangleWidth, rectangleHeight, centreX, centreY, radius)</span><span class="type-signature"> → {boolean}</span></h4>
|
6113 |
|
6114 |
|
6115 | </dt>
|
6116 | <dd>
|
6117 |
|
6118 |
|
6119 | <div class="description">
|
6120 | <p>Tells whether a circle is touching (maybe over) a given rectangle.</p>
|
6121 | </div>
|
6122 |
|
6123 |
|
6124 |
|
6125 |
|
6126 |
|
6127 |
|
6128 |
|
6129 |
|
6130 | <h5>Parameters:</h5>
|
6131 |
|
6132 |
|
6133 | <table class="params table table-striped">
|
6134 | <thead>
|
6135 | <tr>
|
6136 |
|
6137 | <th style="width:12%; min-width:110px;">Name</th>
|
6138 |
|
6139 |
|
6140 | <th style="width:12%; min-width:110px;">Type</th>
|
6141 |
|
6142 |
|
6143 |
|
6144 |
|
6145 |
|
6146 | <th class="last" style="min-width:310px;">Description</th>
|
6147 | </tr>
|
6148 | </thead>
|
6149 |
|
6150 | <tbody>
|
6151 |
|
6152 |
|
6153 | <tr>
|
6154 |
|
6155 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>rectangleX</code></td>
|
6156 |
|
6157 |
|
6158 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
6159 |
|
6160 |
|
6161 | <span class="param-type">number</span>
|
6162 |
|
6163 |
|
6164 |
|
6165 |
|
6166 | </td>
|
6167 |
|
6168 |
|
6169 |
|
6170 |
|
6171 |
|
6172 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "X" coordinate of the upper left corner of the first rectangle.</p></td>
|
6173 | </tr>
|
6174 |
|
6175 |
|
6176 |
|
6177 | <tr>
|
6178 |
|
6179 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>rectangleY</code></td>
|
6180 |
|
6181 |
|
6182 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
6183 |
|
6184 |
|
6185 | <span class="param-type">number</span>
|
6186 |
|
6187 |
|
6188 |
|
6189 |
|
6190 | </td>
|
6191 |
|
6192 |
|
6193 |
|
6194 |
|
6195 |
|
6196 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "Y" coordinate of the upper left corner of the first rectangle.</p></td>
|
6197 | </tr>
|
6198 |
|
6199 |
|
6200 |
|
6201 | <tr>
|
6202 |
|
6203 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>rectangleWidth</code></td>
|
6204 |
|
6205 |
|
6206 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
6207 |
|
6208 |
|
6209 | <span class="param-type">number</span>
|
6210 |
|
6211 |
|
6212 |
|
6213 |
|
6214 | </td>
|
6215 |
|
6216 |
|
6217 |
|
6218 |
|
6219 |
|
6220 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The width of the first rectangle.</p></td>
|
6221 | </tr>
|
6222 |
|
6223 |
|
6224 |
|
6225 | <tr>
|
6226 |
|
6227 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>rectangleHeight</code></td>
|
6228 |
|
6229 |
|
6230 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
6231 |
|
6232 |
|
6233 | <span class="param-type">number</span>
|
6234 |
|
6235 |
|
6236 |
|
6237 |
|
6238 | </td>
|
6239 |
|
6240 |
|
6241 |
|
6242 |
|
6243 |
|
6244 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The height of the first rectangle.</p></td>
|
6245 | </tr>
|
6246 |
|
6247 |
|
6248 |
|
6249 | <tr>
|
6250 |
|
6251 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>centreX</code></td>
|
6252 |
|
6253 |
|
6254 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
6255 |
|
6256 |
|
6257 | <span class="param-type">number</span>
|
6258 |
|
6259 |
|
6260 |
|
6261 |
|
6262 | </td>
|
6263 |
|
6264 |
|
6265 |
|
6266 |
|
6267 |
|
6268 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "X" coordinate of the center of the first circle.</p></td>
|
6269 | </tr>
|
6270 |
|
6271 |
|
6272 |
|
6273 | <tr>
|
6274 |
|
6275 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>centreY</code></td>
|
6276 |
|
6277 |
|
6278 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
6279 |
|
6280 |
|
6281 | <span class="param-type">number</span>
|
6282 |
|
6283 |
|
6284 |
|
6285 |
|
6286 | </td>
|
6287 |
|
6288 |
|
6289 |
|
6290 |
|
6291 |
|
6292 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "Y" coordinate of the center of the first circle.</p></td>
|
6293 | </tr>
|
6294 |
|
6295 |
|
6296 |
|
6297 | <tr>
|
6298 |
|
6299 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>radius</code></td>
|
6300 |
|
6301 |
|
6302 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
6303 |
|
6304 |
|
6305 | <span class="param-type">number</span>
|
6306 |
|
6307 |
|
6308 |
|
6309 |
|
6310 | </td>
|
6311 |
|
6312 |
|
6313 |
|
6314 |
|
6315 |
|
6316 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The radius of the first circle.</p></td>
|
6317 | </tr>
|
6318 |
|
6319 |
|
6320 | </tbody>
|
6321 | </table>
|
6322 |
|
6323 |
|
6324 |
|
6325 |
|
6326 | <dl class="details">
|
6327 |
|
6328 |
|
6329 |
|
6330 |
|
6331 |
|
6332 |
|
6333 |
|
6334 |
|
6335 |
|
6336 |
|
6337 |
|
6338 |
|
6339 |
|
6340 |
|
6341 |
|
6342 |
|
6343 |
|
6344 |
|
6345 |
|
6346 |
|
6347 |
|
6348 |
|
6349 |
|
6350 |
|
6351 |
|
6352 |
|
6353 |
|
6354 |
|
6355 |
|
6356 | <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
|
6357 | <dd class="tag-source">
|
6358 | <ul class="dummy">
|
6359 | <li>
|
6360 | <a href="CrossBase_general_CB_Collisions.js.html">CrossBase/general/CB_Collisions.js</a>,
|
6361 | <a href="CrossBase_general_CB_Collisions.js.html#sunlight-1-line-505">line 505</a>
|
6362 | </li>
|
6363 | </ul>
|
6364 | </dd>
|
6365 |
|
6366 |
|
6367 |
|
6368 |
|
6369 |
|
6370 |
|
6371 |
|
6372 | <dt class="tag-todo method-doc-label method-doc-details-label">To Do:</dt>
|
6373 | <dd class="tag-todo">
|
6374 | <ul>
|
6375 | <li>Think about using a "rotation" parameter to accept rotated rectangles.
|
6376 | //* Source (modified): markE at https://stackoverflow.com/questions/21089959/detecting-collision-of-rectangle-with-circle</li>
|
6377 | </ul>
|
6378 | </dd>
|
6379 |
|
6380 | </dl>
|
6381 |
|
6382 |
|
6383 |
|
6384 |
|
6385 |
|
6386 |
|
6387 |
|
6388 |
|
6389 |
|
6390 |
|
6391 |
|
6392 |
|
6393 |
|
6394 | <h5>Returns:</h5>
|
6395 |
|
6396 |
|
6397 | <div class="param-desc">
|
6398 | <p>Returns whether the circle is touching (maybe over) the rectangle. This will also return true if they are adjacent (next to each other).</p>
|
6399 | </div>
|
6400 |
|
6401 |
|
6402 |
|
6403 | <dl>
|
6404 | <dt>
|
6405 | Type
|
6406 | </dt>
|
6407 | <dd>
|
6408 |
|
6409 | <span class="param-type">boolean</span>
|
6410 |
|
6411 |
|
6412 |
|
6413 | </dd>
|
6414 | </dl>
|
6415 |
|
6416 |
|
6417 |
|
6418 |
|
6419 |
|
6420 | </dd>
|
6421 |
|
6422 |
|
6423 |
|
6424 | <hr>
|
6425 | <dt>
|
6426 | <h4 class="name" id=".isRectangleTouchingElement"><span class="type-signature"><static> </span>isRectangleTouchingElement<span class="signature">(rectangleX, rectangleY, rectangleWidth, rectangleHeight, element)</span><span class="type-signature"> → {boolean}</span></h4>
|
6427 |
|
6428 |
|
6429 | </dt>
|
6430 | <dd>
|
6431 |
|
6432 |
|
6433 | <div class="description">
|
6434 | <p>Tells whether a rectangle is touching (maybe over) a given DOM element (it will be considered a rectangle). This will also return true if they are adjacent (next to each other).</p>
|
6435 | </div>
|
6436 |
|
6437 |
|
6438 |
|
6439 |
|
6440 |
|
6441 |
|
6442 |
|
6443 |
|
6444 | <h5>Parameters:</h5>
|
6445 |
|
6446 |
|
6447 | <table class="params table table-striped">
|
6448 | <thead>
|
6449 | <tr>
|
6450 |
|
6451 | <th style="width:12%; min-width:110px;">Name</th>
|
6452 |
|
6453 |
|
6454 | <th style="width:12%; min-width:110px;">Type</th>
|
6455 |
|
6456 |
|
6457 |
|
6458 |
|
6459 |
|
6460 | <th class="last" style="min-width:310px;">Description</th>
|
6461 | </tr>
|
6462 | </thead>
|
6463 |
|
6464 | <tbody>
|
6465 |
|
6466 |
|
6467 | <tr>
|
6468 |
|
6469 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>rectangleX</code></td>
|
6470 |
|
6471 |
|
6472 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
6473 |
|
6474 |
|
6475 | <span class="param-type">number</span>
|
6476 |
|
6477 |
|
6478 |
|
6479 |
|
6480 | </td>
|
6481 |
|
6482 |
|
6483 |
|
6484 |
|
6485 |
|
6486 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "X" coordinate of the upper left corner of the first rectangle.</p></td>
|
6487 | </tr>
|
6488 |
|
6489 |
|
6490 |
|
6491 | <tr>
|
6492 |
|
6493 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>rectangleY</code></td>
|
6494 |
|
6495 |
|
6496 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
6497 |
|
6498 |
|
6499 | <span class="param-type">number</span>
|
6500 |
|
6501 |
|
6502 |
|
6503 |
|
6504 | </td>
|
6505 |
|
6506 |
|
6507 |
|
6508 |
|
6509 |
|
6510 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "Y" coordinate of the upper left corner of the first rectangle.</p></td>
|
6511 | </tr>
|
6512 |
|
6513 |
|
6514 |
|
6515 | <tr>
|
6516 |
|
6517 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>rectangleWidth</code></td>
|
6518 |
|
6519 |
|
6520 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
6521 |
|
6522 |
|
6523 | <span class="param-type">number</span>
|
6524 |
|
6525 |
|
6526 |
|
6527 |
|
6528 | </td>
|
6529 |
|
6530 |
|
6531 |
|
6532 |
|
6533 |
|
6534 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The width of the first rectangle.</p></td>
|
6535 | </tr>
|
6536 |
|
6537 |
|
6538 |
|
6539 | <tr>
|
6540 |
|
6541 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>rectangleHeight</code></td>
|
6542 |
|
6543 |
|
6544 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
6545 |
|
6546 |
|
6547 | <span class="param-type">number</span>
|
6548 |
|
6549 |
|
6550 |
|
6551 |
|
6552 | </td>
|
6553 |
|
6554 |
|
6555 |
|
6556 |
|
6557 |
|
6558 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The height of the first rectangle.</p></td>
|
6559 | </tr>
|
6560 |
|
6561 |
|
6562 |
|
6563 | <tr>
|
6564 |
|
6565 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>element</code></td>
|
6566 |
|
6567 |
|
6568 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
6569 |
|
6570 |
|
6571 | <span class="param-type">Element</span>
|
6572 |
|
6573 |
|
6574 |
|
6575 |
|
6576 | </td>
|
6577 |
|
6578 |
|
6579 |
|
6580 |
|
6581 |
|
6582 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The DOM element that we want to check (it will be considered a rectangle).</p></td>
|
6583 | </tr>
|
6584 |
|
6585 |
|
6586 | </tbody>
|
6587 | </table>
|
6588 |
|
6589 |
|
6590 |
|
6591 |
|
6592 | <dl class="details">
|
6593 |
|
6594 |
|
6595 |
|
6596 |
|
6597 |
|
6598 |
|
6599 |
|
6600 |
|
6601 |
|
6602 |
|
6603 |
|
6604 |
|
6605 |
|
6606 |
|
6607 |
|
6608 |
|
6609 |
|
6610 |
|
6611 |
|
6612 |
|
6613 |
|
6614 |
|
6615 |
|
6616 |
|
6617 |
|
6618 |
|
6619 |
|
6620 |
|
6621 |
|
6622 | <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
|
6623 | <dd class="tag-source">
|
6624 | <ul class="dummy">
|
6625 | <li>
|
6626 | <a href="CrossBase_general_CB_Collisions.js.html">CrossBase/general/CB_Collisions.js</a>,
|
6627 | <a href="CrossBase_general_CB_Collisions.js.html#sunlight-1-line-388">line 388</a>
|
6628 | </li>
|
6629 | </ul>
|
6630 | </dd>
|
6631 |
|
6632 |
|
6633 |
|
6634 |
|
6635 |
|
6636 |
|
6637 |
|
6638 | <dt class="tag-todo method-doc-label method-doc-details-label">To Do:</dt>
|
6639 | <dd class="tag-todo">
|
6640 | <ul>
|
6641 | <li>Think about using a "rotation" parameter to accept rotated rectangles.</li>
|
6642 | </ul>
|
6643 | </dd>
|
6644 |
|
6645 | </dl>
|
6646 |
|
6647 |
|
6648 |
|
6649 |
|
6650 |
|
6651 |
|
6652 |
|
6653 |
|
6654 |
|
6655 |
|
6656 |
|
6657 |
|
6658 |
|
6659 | <h5>Returns:</h5>
|
6660 |
|
6661 |
|
6662 | <div class="param-desc">
|
6663 | <p>Returns whether the rectangle is touching (maybe over) the given DOM element (it will be considered a rectangle). This will also return true if they are adjacent (next to each other).</p>
|
6664 | </div>
|
6665 |
|
6666 |
|
6667 |
|
6668 | <dl>
|
6669 | <dt>
|
6670 | Type
|
6671 | </dt>
|
6672 | <dd>
|
6673 |
|
6674 | <span class="param-type">boolean</span>
|
6675 |
|
6676 |
|
6677 |
|
6678 | </dd>
|
6679 | </dl>
|
6680 |
|
6681 |
|
6682 |
|
6683 |
|
6684 |
|
6685 | </dd>
|
6686 |
|
6687 |
|
6688 |
|
6689 | <hr>
|
6690 | <dt>
|
6691 | <h4 class="name" id=".isRectangleTouchingRectangle"><span class="type-signature"><static> </span>isRectangleTouchingRectangle<span class="signature">(rectangleX, rectangleY, rectangleWidth, rectangleHeight, rectangleX2, rectangleY2, rectangleWidth2, rectangleHeight2)</span><span class="type-signature"> → {boolean}</span></h4>
|
6692 |
|
6693 |
|
6694 | </dt>
|
6695 | <dd>
|
6696 |
|
6697 |
|
6698 | <div class="description">
|
6699 | <p>Tells whether a rectangle is touching (maybe over) another rectangle. This will also return true if they are adjacent (next to each other).</p>
|
6700 | </div>
|
6701 |
|
6702 |
|
6703 |
|
6704 |
|
6705 |
|
6706 |
|
6707 |
|
6708 |
|
6709 | <h5>Parameters:</h5>
|
6710 |
|
6711 |
|
6712 | <table class="params table table-striped">
|
6713 | <thead>
|
6714 | <tr>
|
6715 |
|
6716 | <th style="width:12%; min-width:110px;">Name</th>
|
6717 |
|
6718 |
|
6719 | <th style="width:12%; min-width:110px;">Type</th>
|
6720 |
|
6721 |
|
6722 |
|
6723 |
|
6724 |
|
6725 | <th class="last" style="min-width:310px;">Description</th>
|
6726 | </tr>
|
6727 | </thead>
|
6728 |
|
6729 | <tbody>
|
6730 |
|
6731 |
|
6732 | <tr>
|
6733 |
|
6734 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>rectangleX</code></td>
|
6735 |
|
6736 |
|
6737 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
6738 |
|
6739 |
|
6740 | <span class="param-type">number</span>
|
6741 |
|
6742 |
|
6743 |
|
6744 |
|
6745 | </td>
|
6746 |
|
6747 |
|
6748 |
|
6749 |
|
6750 |
|
6751 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "X" coordinate of the upper left corner of the first rectangle.</p></td>
|
6752 | </tr>
|
6753 |
|
6754 |
|
6755 |
|
6756 | <tr>
|
6757 |
|
6758 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>rectangleY</code></td>
|
6759 |
|
6760 |
|
6761 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
6762 |
|
6763 |
|
6764 | <span class="param-type">number</span>
|
6765 |
|
6766 |
|
6767 |
|
6768 |
|
6769 | </td>
|
6770 |
|
6771 |
|
6772 |
|
6773 |
|
6774 |
|
6775 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "Y" coordinate of the upper left corner of the first rectangle.</p></td>
|
6776 | </tr>
|
6777 |
|
6778 |
|
6779 |
|
6780 | <tr>
|
6781 |
|
6782 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>rectangleWidth</code></td>
|
6783 |
|
6784 |
|
6785 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
6786 |
|
6787 |
|
6788 | <span class="param-type">number</span>
|
6789 |
|
6790 |
|
6791 |
|
6792 |
|
6793 | </td>
|
6794 |
|
6795 |
|
6796 |
|
6797 |
|
6798 |
|
6799 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The width of the first rectangle.</p></td>
|
6800 | </tr>
|
6801 |
|
6802 |
|
6803 |
|
6804 | <tr>
|
6805 |
|
6806 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>rectangleHeight</code></td>
|
6807 |
|
6808 |
|
6809 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
6810 |
|
6811 |
|
6812 | <span class="param-type">number</span>
|
6813 |
|
6814 |
|
6815 |
|
6816 |
|
6817 | </td>
|
6818 |
|
6819 |
|
6820 |
|
6821 |
|
6822 |
|
6823 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The height of the first rectangle.</p></td>
|
6824 | </tr>
|
6825 |
|
6826 |
|
6827 |
|
6828 | <tr>
|
6829 |
|
6830 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>rectangleX2</code></td>
|
6831 |
|
6832 |
|
6833 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
6834 |
|
6835 |
|
6836 | <span class="param-type">number</span>
|
6837 |
|
6838 |
|
6839 |
|
6840 |
|
6841 | </td>
|
6842 |
|
6843 |
|
6844 |
|
6845 |
|
6846 |
|
6847 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "X" coordinate of the upper left corner of the second rectangle.</p></td>
|
6848 | </tr>
|
6849 |
|
6850 |
|
6851 |
|
6852 | <tr>
|
6853 |
|
6854 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>rectangleY2</code></td>
|
6855 |
|
6856 |
|
6857 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
6858 |
|
6859 |
|
6860 | <span class="param-type">number</span>
|
6861 |
|
6862 |
|
6863 |
|
6864 |
|
6865 | </td>
|
6866 |
|
6867 |
|
6868 |
|
6869 |
|
6870 |
|
6871 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The "Y" coordinate of the upper left corner of the second rectangle.</p></td>
|
6872 | </tr>
|
6873 |
|
6874 |
|
6875 |
|
6876 | <tr>
|
6877 |
|
6878 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>rectangleWidth2</code></td>
|
6879 |
|
6880 |
|
6881 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
6882 |
|
6883 |
|
6884 | <span class="param-type">number</span>
|
6885 |
|
6886 |
|
6887 |
|
6888 |
|
6889 | </td>
|
6890 |
|
6891 |
|
6892 |
|
6893 |
|
6894 |
|
6895 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The width of the second rectangle.</p></td>
|
6896 | </tr>
|
6897 |
|
6898 |
|
6899 |
|
6900 | <tr>
|
6901 |
|
6902 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>rectangleHeight2</code></td>
|
6903 |
|
6904 |
|
6905 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
6906 |
|
6907 |
|
6908 | <span class="param-type">number</span>
|
6909 |
|
6910 |
|
6911 |
|
6912 |
|
6913 | </td>
|
6914 |
|
6915 |
|
6916 |
|
6917 |
|
6918 |
|
6919 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The height of the second rectangle.</p></td>
|
6920 | </tr>
|
6921 |
|
6922 |
|
6923 | </tbody>
|
6924 | </table>
|
6925 |
|
6926 |
|
6927 |
|
6928 |
|
6929 | <dl class="details">
|
6930 |
|
6931 |
|
6932 |
|
6933 |
|
6934 |
|
6935 |
|
6936 |
|
6937 |
|
6938 |
|
6939 |
|
6940 |
|
6941 |
|
6942 |
|
6943 |
|
6944 |
|
6945 |
|
6946 |
|
6947 |
|
6948 |
|
6949 |
|
6950 |
|
6951 |
|
6952 |
|
6953 |
|
6954 |
|
6955 |
|
6956 |
|
6957 |
|
6958 |
|
6959 | <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
|
6960 | <dd class="tag-source">
|
6961 | <ul class="dummy">
|
6962 | <li>
|
6963 | <a href="CrossBase_general_CB_Collisions.js.html">CrossBase/general/CB_Collisions.js</a>,
|
6964 | <a href="CrossBase_general_CB_Collisions.js.html#sunlight-1-line-350">line 350</a>
|
6965 | </li>
|
6966 | </ul>
|
6967 | </dd>
|
6968 |
|
6969 |
|
6970 |
|
6971 |
|
6972 |
|
6973 |
|
6974 |
|
6975 | <dt class="tag-todo method-doc-label method-doc-details-label">To Do:</dt>
|
6976 | <dd class="tag-todo">
|
6977 | <ul>
|
6978 | <li>Think about using "rotation" and "rotation2" parameters to accept rotated rectangles.</li>
|
6979 | </ul>
|
6980 | </dd>
|
6981 |
|
6982 | </dl>
|
6983 |
|
6984 |
|
6985 |
|
6986 |
|
6987 |
|
6988 |
|
6989 |
|
6990 |
|
6991 |
|
6992 |
|
6993 |
|
6994 |
|
6995 |
|
6996 | <h5>Returns:</h5>
|
6997 |
|
6998 |
|
6999 | <div class="param-desc">
|
7000 | <p>Returns whether the rectangle is touching (maybe over) the other rectangle. This will also return true if they are adjacent (next to each other).</p>
|
7001 | </div>
|
7002 |
|
7003 |
|
7004 |
|
7005 | <dl>
|
7006 | <dt>
|
7007 | Type
|
7008 | </dt>
|
7009 | <dd>
|
7010 |
|
7011 | <span class="param-type">boolean</span>
|
7012 |
|
7013 |
|
7014 |
|
7015 | </dd>
|
7016 | </dl>
|
7017 |
|
7018 |
|
7019 |
|
7020 |
|
7021 |
|
7022 | </dd>
|
7023 |
|
7024 | </dl>
|
7025 |
|
7026 |
|
7027 |
|
7028 |
|
7029 |
|
7030 | </article>
|
7031 |
|
7032 | </section>
|
7033 |
|
7034 |
|
7035 |
|
7036 |
|
7037 | </div>
|
7038 | </div>
|
7039 |
|
7040 | <div class="clearfix"></div>
|
7041 |
|
7042 |
|
7043 | <div class="col-md-3">
|
7044 | <div id="toc" class="col-md-3 hidden-xs hidden-sm hidden-md"></div>
|
7045 | </div>
|
7046 |
|
7047 |
|
7048 | </div>
|
7049 | </div>
|
7050 |
|
7051 |
|
7052 | <div class="modal fade" id="searchResults">
|
7053 | <div class="modal-dialog">
|
7054 | <div class="modal-content">
|
7055 | <div class="modal-header">
|
7056 | <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
7057 | <h4 class="modal-title">Search results</h4>
|
7058 | </div>
|
7059 | <div class="modal-body"></div>
|
7060 | <div class="modal-footer">
|
7061 | <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
7062 | </div>
|
7063 | </div>
|
7064 | </div>
|
7065 | </div>
|
7066 |
|
7067 |
|
7068 | <footer>
|
7069 |
|
7070 |
|
7071 | <span class="copyright">
|
7072 | <a href="printable/" target="_blank">See a more printer-friendly version</a><hr /><span style="color:#000000">© <address style="display:inline; font-style:normal;"><a href="https://crossbrowdy.com/" target="_blank">CrossBrowdy</a> API documentation</address> by <a href="https://joanalbamaldonado.com/" target="_blank">Joan Alba Maldonado</a> - <a href="https://creativecommons.org/licenses/by/4.0/" target="_blank">Creative Commons Attribution 4.0 International</a><br />DocStrap Copyright © 2012-2015 The contributors to the JSDoc3 and DocStrap projects.</span>
|
7073 | </span>
|
7074 |
|
7075 | <span class="jsdoc-message">
|
7076 | Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
|
7077 |
|
7078 | on Mon Feb 3rd 2020
|
7079 |
|
7080 | using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
7081 | </span>
|
7082 | </footer>
|
7083 |
|
7084 | <script src="scripts/docstrap.lib.js"></script>
|
7085 | <script src="scripts/toc.js"></script>
|
7086 |
|
7087 | <script type="text/javascript" src="scripts/fulltext-search-ui.js"></script>
|
7088 |
|
7089 |
|
7090 | <script>
|
7091 | $( function () {
|
7092 | $( "[id*='$']" ).each( function () {
|
7093 | var $this = $( this );
|
7094 |
|
7095 | $this.attr( "id", $this.attr( "id" ).replace( "$", "__" ) );
|
7096 | } );
|
7097 |
|
7098 | $( ".tutorial-section pre, .readme-section pre, pre.prettyprint.source" ).each( function () {
|
7099 | var $this = $( this );
|
7100 |
|
7101 | var example = $this.find( "code" );
|
7102 | exampleText = example.html();
|
7103 | var lang = /{@lang (.*?)}/.exec( exampleText );
|
7104 | if ( lang && lang[1] ) {
|
7105 | exampleText = exampleText.replace( lang[0], "" );
|
7106 | example.html( exampleText );
|
7107 | lang = lang[1];
|
7108 | } else {
|
7109 | var langClassMatch = example.parent()[0].className.match(/lang\-(\S+)/);
|
7110 | lang = langClassMatch ? langClassMatch[1] : "javascript";
|
7111 | }
|
7112 |
|
7113 | if ( lang ) {
|
7114 |
|
7115 | $this
|
7116 | .addClass( "sunlight-highlight-" + lang )
|
7117 | .addClass( "linenums" )
|
7118 | .html( example.html() );
|
7119 |
|
7120 | }
|
7121 | } );
|
7122 |
|
7123 | Sunlight.highlightAll( {
|
7124 | lineNumbers : true,
|
7125 | showMenu : true,
|
7126 | enableDoclinks : true
|
7127 | } );
|
7128 |
|
7129 | $.catchAnchorLinks( {
|
7130 | navbarOffset: 10
|
7131 | } );
|
7132 | $( "#toc" ).toc( {
|
7133 | anchorName : function ( i, heading, prefix ) {
|
7134 | return $( heading ).attr( "id" ) || ( prefix + i );
|
7135 | },
|
7136 | selectors : "#toc-content h1,#toc-content h2,#toc-content h3,#toc-content h4",
|
7137 | showAndHide : false,
|
7138 | smoothScrolling: true
|
7139 | } );
|
7140 |
|
7141 | $( "#main span[id^='toc']" ).addClass( "toc-shim" );
|
7142 | $( '.dropdown-toggle' ).dropdown();
|
7143 |
|
7144 | $( "table" ).each( function () {
|
7145 | var $this = $( this );
|
7146 | $this.addClass('table');
|
7147 | } );
|
7148 |
|
7149 | } );
|
7150 | </script>
|
7151 |
|
7152 |
|
7153 |
|
7154 |
|
7155 |
|
7156 | <script>
|
7157 | $( function () {
|
7158 | $( '#main' ).localScroll( {
|
7159 | offset : { top : 60 }
|
7160 | } );
|
7161 | $( "dt.name" ).each( function () {
|
7162 | var $this = $( this ).find("h4");
|
7163 | var icon = $( "<i/>" ).addClass( "icon-plus-sign" ).addClass( "pull-right" ).addClass( "icon-white" );
|
7164 | var dt = $(this);
|
7165 | var children = dt.next( "dd" );
|
7166 |
|
7167 | dt.prepend( icon ).css( {cursor : "pointer"} );
|
7168 | dt.addClass( "member-collapsed" ).addClass( "member" );
|
7169 |
|
7170 |
|
7171 | children.hide();
|
7172 |
|
7173 | dt.children().on( "click", function () {
|
7174 | children = dt.next( "dd" );
|
7175 | children.slideToggle( "fast", function () {
|
7176 |
|
7177 | if ( children.is( ":visible" ) ) {
|
7178 | icon.addClass( "icon-minus-sign" ).removeClass( "icon-plus-sign" ).removeClass( "icon-white" );
|
7179 | dt.addClass( "member-open" ).animate( "member-collapsed" );
|
7180 | } else {
|
7181 | icon.addClass( "icon-plus-sign" ).removeClass( "icon-minus-sign" ).addClass( "icon-white" );
|
7182 | dt.addClass( "member-collapsed" ).removeClass( "member-open" );
|
7183 | }
|
7184 | } );
|
7185 | } );
|
7186 |
|
7187 | } );
|
7188 | } );
|
7189 | </script>
|
7190 |
|
7191 |
|
7192 |
|
7193 |
|
7194 |
|
7195 |
|
7196 | <script type="text/javascript">
|
7197 | $(document).ready(function() {
|
7198 | SearcherDisplay.init();
|
7199 | });
|
7200 | </script>
|
7201 |
|
7202 |
|
7203 | </body>
|
7204 | </html> |
\ | No newline at end of file |