1
0
mirror of https://github.com/psychopy/psychojs.git synced 2025-05-10 18:50:54 +00:00
psychojs/docs/module-util.html

6405 lines
74 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Module: util</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Module: util</h1>
<section>
<header>
</header>
<article>
<div class="container-overview">
</div>
<h3 class="subsection-title">Classes</h3>
<dl>
<dt><a href="module-util.Clock.html">Clock</a></dt>
<dd></dd>
<dt><a href="module-util.Color.html">Color</a></dt>
<dd></dd>
<dt><a href="module-util.CountdownTimer.html">CountdownTimer</a></dt>
<dd></dd>
<dt><a href="module-util.EventEmitter.html">EventEmitter</a></dt>
<dd></dd>
<dt><a href="module-util.MixinBuilder.html">MixinBuilder</a></dt>
<dd></dd>
<dt><a href="module-util.MonotonicClock.html">MonotonicClock</a></dt>
<dd></dd>
<dt><a href="module-util.PsychObject.html">PsychObject</a></dt>
<dd></dd>
<dt><a href="module-util.Scheduler.html">Scheduler</a></dt>
<dd></dd>
</dl>
<h3 class="subsection-title">Mixins</h3>
<dl>
<dt><a href="module-util.ColorMixin.html">ColorMixin</a></dt>
<dd></dd>
</dl>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id=".addInfoFromUrl"><span class="type-signature">(static) </span>addInfoFromUrl<span class="signature">(info)</span><span class="type-signature"></span></h4>
<div class="description">
Add info extracted from the URL to the given dictionary.
<p>We exclude all URL parameters starting with a double underscore
since those are reserved for client/server communication</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>info</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">the dictionary</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="util_Util.js.html">util/Util.js</a>, <a href="util_Util.js.html#line783">line 783</a>
</li></ul></dd>
</dl>
<h4 class="name" id=".average"><span class="type-signature">(static) </span>average<span class="signature">(input)</span><span class="type-signature"> &rarr; {number}</span></h4>
<div class="description">
Calculate the average of the elements in the input array.
If 'input' is not an array, or if it is an empty array, then we return 0.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>input</code></td>
<td class="type">
<span class="param-type">array</span>
</td>
<td class="description last">an array of numbers, or of objects that can be cast into a number, e.g. ['1', 2.5, 3e1]</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="util_Util.js.html">util/Util.js</a>, <a href="util_Util.js.html#line1112">line 1112</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
the average of the elements in the array
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">number</span>
</dd>
</dl>
<h4 class="name" id=".count"><span class="type-signature">(static) </span>count<span class="signature">(input, value)</span><span class="type-signature"></span></h4>
<div class="description">
Count the number of elements in the input array that match the given value.
<p> Note: count is able to handle NaN, null, as well as any value convertible to a JSON string.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>input</code></td>
<td class="type">
<span class="param-type">array</span>
</td>
<td class="description last">the input array</td>
</tr>
<tr>
<td class="name"><code>value</code></td>
<td class="type">
<span class="param-type">Number</span>
|
<span class="param-type">string</span>
|
<span class="param-type">object</span>
|
<span class="param-type">null</span>
</td>
<td class="description last">the matching value</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="util_Util.js.html">util/Util.js</a>, <a href="util_Util.js.html#line1334">line 1334</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
the number of matching elements
</div>
<h4 class="name" id=".detectBrowser"><span class="type-signature">(static) </span>detectBrowser<span class="signature">()</span><span class="type-signature"> &rarr; {string}</span></h4>
<div class="description">
Detect the user's browser.
<p> Note: since user agent is easily spoofed, we use a more sophisticated approach, as described here:
https://stackoverflow.com/a/9851769</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="util_Util.js.html">util/Util.js</a>, <a href="util_Util.js.html#line143">line 143</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
the detected browser, one of 'Opera', 'Firefox', 'Safari',
'IE', 'Edge', 'EdgeChromium', 'Chrome', 'unknown'
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">string</span>
</dd>
</dl>
<h4 class="name" id=".extensionFromMimeType"><span class="type-signature">(static) </span>extensionFromMimeType<span class="signature">(mimeType)</span><span class="type-signature"> &rarr; {string}</span></h4>
<div class="description">
Return the file extension corresponding to an audio mime type.
If the provided mimeType is not a string (e.g. null, undefined, an array)
or unknown, then '.dat' is returned, instead of throwing an exception.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>mimeType</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last">the MIME type, e.g. 'audio/webm;codecs=opus'</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="util_Util.js.html">util/Util.js</a>, <a href="util_Util.js.html#line1424">line 1424</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
the corresponding file extension, e.g. '.webm'
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">string</span>
</dd>
</dl>
<h4 class="name" id=".flattenArray"><span class="type-signature">(static) </span>flattenArray<span class="signature">(array)</span><span class="type-signature"> &rarr; {Array.&lt;Object>}</span></h4>
<div class="description">
Recursively flatten an array of arrays.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>array</code></td>
<td class="type">
<span class="param-type">Array.&lt;Object></span>
</td>
<td class="description last">the input array of arrays</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="util_Util.js.html">util/Util.js</a>, <a href="util_Util.js.html#line879">line 879</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
the flatten array
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Array.&lt;Object></span>
</dd>
</dl>
<h4 class="name" id=".getErrorStack"><span class="type-signature">(static) </span>getErrorStack<span class="signature">()</span><span class="type-signature"> &rarr; {string}</span></h4>
<div class="description">
Get the error stack of the calling, exception-throwing function.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="util_Util.js.html">util/Util.js</a>, <a href="util_Util.js.html#line86">line 86</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
the error stack as a string
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">string</span>
</dd>
</dl>
<h4 class="name" id=".getPositionFromObject"><span class="type-signature">(static) </span>getPositionFromObject<span class="signature">(object, units)</span><span class="type-signature"> &rarr; {Array.&lt;number>}</span></h4>
<div class="description">
Get the position of the object, in pixel units
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>object</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">the input object</td>
</tr>
<tr>
<td class="name"><code>units</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last">the units</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="util_Util.js.html">util/Util.js</a>, <a href="util_Util.js.html#line361">line 361</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
the position of the object, in pixel units
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Array.&lt;number></span>
</dd>
</dl>
<h4 class="name" id=".getRequestError"><span class="type-signature">(static) </span>getRequestError<span class="signature">(jqXHR, textStatus, errorThrown)</span><span class="type-signature"></span></h4>
<div class="description">
Get the most informative error from the server response from a jquery server request.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>jqXHR</code></td>
<td class="type">
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>textStatus</code></td>
<td class="type">
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>errorThrown</code></td>
<td class="type">
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="util_Util.js.html">util/Util.js</a>, <a href="util_Util.js.html#line703">line 703</a>
</li></ul></dd>
</dl>
<h4 class="name" id=".getUrlParameters"><span class="type-signature">(static) </span>getUrlParameters<span class="signature">()</span><span class="type-signature"> &rarr; {URLSearchParams}</span></h4>
<div class="description">
Get the URL parameters.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="util_Util.js.html">util/Util.js</a>, <a href="util_Util.js.html#line756">line 756</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
the iterable URLSearchParams
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">URLSearchParams</span>
</dd>
</dl>
<h5>Example</h5>
<pre class="prettyprint"><code>const urlParameters = util.getUrlParameters();
for (const [key, value] of urlParameters)
console.log(key + ' = ' + value);</code></pre>
<h4 class="name" id=".index"><span class="type-signature">(static) </span>index<span class="signature">(input, value)</span><span class="type-signature"></span></h4>
<div class="description">
Get the index in the input array of the first element that matches the given value.
<p> Note: index is able to handle NaN, null, as well as any value convertible to a JSON string.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>input</code></td>
<td class="type">
<span class="param-type">array</span>
</td>
<td class="description last">the input array</td>
</tr>
<tr>
<td class="name"><code>value</code></td>
<td class="type">
<span class="param-type">Number</span>
|
<span class="param-type">string</span>
|
<span class="param-type">object</span>
|
<span class="param-type">null</span>
</td>
<td class="description last">the matching value</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="util_Util.js.html">util/Util.js</a>, <a href="util_Util.js.html#line1379">line 1379</a>
</li></ul></dd>
</dl>
<h5>Throws:</h5>
<div class="param-desc">
if the input array does not contain any matching element
</div>
<h5>Returns:</h5>
<div class="param-desc">
the index of the first element that matches the value
</div>
<h4 class="name" id=".isEmpty"><span class="type-signature">(static) </span>isEmpty<span class="signature">(x)</span><span class="type-signature"> &rarr; {boolean}</span></h4>
<div class="description">
Test if x is an 'empty' value.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>x</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">the value to test</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="util_Util.js.html">util/Util.js</a>, <a href="util_Util.js.html#line111">line 111</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
true if x is one of the following: undefined, [], [undefined]
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">boolean</span>
</dd>
</dl>
<h4 class="name" id=".isInt"><span class="type-signature">(static) </span>isInt<span class="signature">(obj)</span><span class="type-signature"> &rarr; {boolean}</span></h4>
<div class="description">
Test whether an object is either an integer or the string representation of an integer.
<p>This is adapted from: https://stackoverflow.com/a/14794066</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>obj</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">the input object</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="util_Util.js.html">util/Util.js</a>, <a href="util_Util.js.html#line734">line 734</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
whether or not the object is an integer or the string representation of an integer
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">boolean</span>
</dd>
</dl>
<h4 class="name" id=".IsPointInsidePolygon"><span class="type-signature">(static) </span>IsPointInsidePolygon<span class="signature">(point, vertices)</span><span class="type-signature"> &rarr; {boolean}</span></h4>
<div class="description">
Check whether a point lies within a polygon
<p>We are using the algorithm described here: https://wrf.ecse.rpi.edu//Research/Short_Notes/pnpoly.html</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>point</code></td>
<td class="type">
<span class="param-type">Array.&lt;number></span>
</td>
<td class="description last">the point</td>
</tr>
<tr>
<td class="name"><code>vertices</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">the vertices defining the polygon</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="util_Util.js.html">util/Util.js</a>, <a href="util_Util.js.html#line303">line 303</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
whether or not the point lies within the polygon
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">boolean</span>
</dd>
</dl>
<h4 class="name" id=".makeUuid"><span class="type-signature">(static) </span>makeUuid<span class="signature">()</span><span class="type-signature"> &rarr; {string}</span></h4>
<div class="description">
Get a Universally Unique Identifier (RFC4122 version 4)
<p> See details here: https://www.ietf.org/rfc/rfc4122.txt</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="util_Util.js.html">util/Util.js</a>, <a href="util_Util.js.html#line67">line 67</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
the uuid
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">string</span>
</dd>
</dl>
<h4 class="name" id=".offerDataForDownload"><span class="type-signature">(static) </span>offerDataForDownload<span class="signature">(filename, data, type)</span><span class="type-signature"></span></h4>
<div class="description">
Offer data as download in the browser.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>filename</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last">the name of the file to be downloaded</td>
</tr>
<tr>
<td class="name"><code>data</code></td>
<td class="type">
<span class="param-type">*</span>
</td>
<td class="description last">the data</td>
</tr>
<tr>
<td class="name"><code>type</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last">the MIME type of the data, e.g. 'text/csv' or 'application/json'</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="util_Util.js.html">util/Util.js</a>, <a href="util_Util.js.html#line948">line 948</a>
</li></ul></dd>
</dl>
<h4 class="name" id=".promiseToTupple"><span class="type-signature">(static) </span>promiseToTupple<span class="signature">(promise)</span><span class="type-signature"> &rarr; {Array.&lt;Object>}</span></h4>
<div class="description">
Convert the resulting value of a promise into a tupple.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>promise</code></td>
<td class="type">
<span class="param-type">Promise</span>
</td>
<td class="description last">the promise</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="util_Util.js.html">util/Util.js</a>, <a href="util_Util.js.html#line49">line 49</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
the resulting value in the format [error, return data]
where error is null if there was no error
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Array.&lt;Object></span>
</dd>
</dl>
<h4 class="name" id=".randint"><span class="type-signature">(static) </span>randint<span class="signature">(min<span class="signature-attributes">opt</span>, max)</span><span class="type-signature"> &rarr; {number}</span></h4>
<div class="description">
Generates random integers a-la NumPy's in the "half-open" interval [min, max). In other words, from min inclusive to max exclusive. When max is undefined, as is the case by default, results are chosen from [0, min). An error is thrown if max is less than min.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>min</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
0
</td>
<td class="description last">lowest integer to be drawn, or highest plus one if max is undefined (default)</td>
</tr>
<tr>
<td class="name"><code>max</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last">one above the largest integer to be drawn</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="util_Util.js.html">util/Util.js</a>, <a href="util_Util.js.html#line1028">line 1028</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
a random integer in the requested range (signed)
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">number</span>
</dd>
</dl>
<h4 class="name" id=".range"><span class="type-signature">(static) </span>range<span class="signature">(start<span class="signature-attributes">opt</span>, stop, step<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Array.&lt;Number>}</span></h4>
<div class="description">
Create a sequence of integers.
The sequence is such that the integer at index i is: start + step * i, with i >= 0 and start + step * i < stop
<p> Note: this is a JavaScript implement of the Python range function, which explains the unusual management of arguments.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>start</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
0
</td>
<td class="description last">the value of start</td>
</tr>
<tr>
<td class="name"><code>stop</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last">the value of stop</td>
</tr>
<tr>
<td class="name"><code>step</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
1
</td>
<td class="description last">the value of step</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="util_Util.js.html">util/Util.js</a>, <a href="util_Util.js.html#line1186">line 1186</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
the range as an array of numbers
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Array.&lt;Number></span>
</dd>
</dl>
<h4 class="name" id=".round"><span class="type-signature">(static) </span>round<span class="signature">(input, places)</span><span class="type-signature"> &rarr; {number}</span></h4>
<div class="description">
Round to a certain number of decimal places.
This is the Crib Sheet provided solution, but please note that as of 2020 the most popular SO answer is different.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>input</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last">the number to be rounded</td>
</tr>
<tr>
<td class="name"><code>places</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last">the max number of decimals desired</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="util_Util.js.html">util/Util.js</a>, <a href="util_Util.js.html#line1062">line 1062</a>
</li></ul></dd>
<dt class="tag-see">See:</dt>
<dd class="tag-see">
<ul>
<li><a href="https://stackoverflow.com/questions/11832914">Stack Overflow</a></li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
input rounded to the specified number of decimal places at most
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">number</span>
</dd>
</dl>
<h4 class="name" id=".selectFromArray"><span class="type-signature">(static) </span>selectFromArray<span class="signature">(array, selection)</span><span class="type-signature"> &rarr; {Object|Array.&lt;Object>}</span></h4>
<div class="description">
Select values from an array.
<p> 'selection' can be a single integer, an array of indices, or a string to be parsed, e.g.:
<ul>
<li>5</li>
<li>[1,2,3,10]</li>
<li>'1,5,10'</li>
<li>'1:2:5'</li>
<li>'5:'</li>
<li>'-5:-2, 9, 11:5:22'</li>
</ul></p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>array</code></td>
<td class="type">
<span class="param-type">Array.&lt;Object></span>
</td>
<td class="description last">the input array</td>
</tr>
<tr>
<td class="name"><code>selection</code></td>
<td class="type">
<span class="param-type">number</span>
|
<span class="param-type">Array.&lt;number></span>
|
<span class="param-type">string</span>
</td>
<td class="description last">the selection</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="util_Util.js.html">util/Util.js</a>, <a href="util_Util.js.html#line813">line 813</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
the array of selected items
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Object</span>
|
<span class="param-type">Array.&lt;Object></span>
</dd>
</dl>
<h4 class="name" id=".shuffle"><span class="type-signature">(static) </span>shuffle<span class="signature">(array, randomNumberGenerator<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Array.&lt;Object>}</span></h4>
<div class="description">
Shuffle an array in place using the Fisher-Yastes's modern algorithm
<p>See details here: https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle#The_modern_algorithm</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>array</code></td>
<td class="type">
<span class="param-type">Array.&lt;Object></span>
</td>
<td class="attributes">
</td>
<td class="description last">the input 1-D array</td>
</tr>
<tr>
<td class="name"><code>randomNumberGenerator</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="description last">A function used to generated random numbers in the interal [0, 1). Defaults to Math.random</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="util_Util.js.html">util/Util.js</a>, <a href="util_Util.js.html#line335">line 335</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
the shuffled array
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Array.&lt;Object></span>
</dd>
</dl>
<h4 class="name" id=".sliceArray"><span class="type-signature">(static) </span>sliceArray<span class="signature">(array, from<span class="signature-attributes">opt</span>, to<span class="signature-attributes">opt</span>, step<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Array.&lt;Object>}</span></h4>
<div class="description">
Slice an array.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>array</code></td>
<td class="type">
<span class="param-type">Array.&lt;Object></span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last">the input array</td>
</tr>
<tr>
<td class="name"><code>from</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
NaN
</td>
<td class="description last">the start of the slice</td>
</tr>
<tr>
<td class="name"><code>to</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
NaN
</td>
<td class="description last">the end of the slice</td>
</tr>
<tr>
<td class="name"><code>step</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
NaN
</td>
<td class="description last">the step of the slice</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="util_Util.js.html">util/Util.js</a>, <a href="util_Util.js.html#line901">line 901</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
the array slice
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Array.&lt;Object></span>
</dd>
</dl>
<h4 class="name" id=".sort"><span class="type-signature">(static) </span>sort<span class="signature">(input)</span><span class="type-signature"> &rarr; {array}</span></h4>
<div class="description">
Sort the elements of the input array, in increasing alphabetical or numerical order.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>input</code></td>
<td class="type">
<span class="param-type">array</span>
</td>
<td class="description last">an array of numbers or of strings</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="util_Util.js.html">util/Util.js</a>, <a href="util_Util.js.html#line1139">line 1139</a>
</li></ul></dd>
</dl>
<h5>Throws:</h5>
<div class="param-desc">
if 'input' is not an array, or if its elements are not consistent in types, or if they are not all either numbers or
strings
</div>
<h5>Returns:</h5>
<div class="param-desc">
the sorted array
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">array</span>
</dd>
</dl>
<h4 class="name" id=".sum"><span class="type-signature">(static) </span>sum<span class="signature">(input, start)</span><span class="type-signature"> &rarr; {number}</span></h4>
<div class="description">
Calculate the sum of the elements in the input array.
If 'input' is not an array, then we return start.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>input</code></td>
<td class="type">
<span class="param-type">array</span>
</td>
<td class="description last">an array of numbers, or of objects that can be cast into a number, e.g. ['1', 2.5, 3e1]</td>
</tr>
<tr>
<td class="name"><code>start</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last">value added to the sum of numbers (a la Python)</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="util_Util.js.html">util/Util.js</a>, <a href="util_Util.js.html#line1081">line 1081</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
the sum of the elements in the array + start
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">number</span>
</dd>
</dl>
<h4 class="name" id=".to_height"><span class="type-signature">(static) </span>to_height<span class="signature">(pos, posUnit, win)</span><span class="type-signature"> &rarr; {Array.&lt;number>}</span></h4>
<div class="description">
Convert the position to height units.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>pos</code></td>
<td class="type">
<span class="param-type">Array.&lt;number></span>
</td>
<td class="description last">the input position</td>
</tr>
<tr>
<td class="name"><code>posUnit</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last">the position units</td>
</tr>
<tr>
<td class="name"><code>win</code></td>
<td class="type">
<span class="param-type">Window</span>
</td>
<td class="description last">the associated Window</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="util_Util.js.html">util/Util.js</a>, <a href="util_Util.js.html#line489">line 489</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
the position in height units
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Array.&lt;number></span>
</dd>
</dl>
<h4 class="name" id=".to_norm"><span class="type-signature">(static) </span>to_norm<span class="signature">(pos, posUnit, win)</span><span class="type-signature"> &rarr; {Array.&lt;number>}</span></h4>
<div class="description">
Convert the position to norm units.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>pos</code></td>
<td class="type">
<span class="param-type">Array.&lt;number></span>
</td>
<td class="description last">the input position</td>
</tr>
<tr>
<td class="name"><code>posUnit</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last">the position units</td>
</tr>
<tr>
<td class="name"><code>win</code></td>
<td class="type">
<span class="param-type">Window</span>
</td>
<td class="description last">the associated Window</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="util_Util.js.html">util/Util.js</a>, <a href="util_Util.js.html#line456">line 456</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
the position in norm units
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Array.&lt;number></span>
</dd>
</dl>
<h4 class="name" id=".to_pixiPoint"><span class="type-signature">(static) </span>to_pixiPoint<span class="signature">(pos, posUnit, win, integerCoordinates<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Array.&lt;number>}</span></h4>
<div class="description">
Convert a position to a PIXI Point.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>pos</code></td>
<td class="type">
<span class="param-type">Array.&lt;number></span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last">the input position</td>
</tr>
<tr>
<td class="name"><code>posUnit</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last">the position units</td>
</tr>
<tr>
<td class="name"><code>win</code></td>
<td class="type">
<span class="param-type">Window</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last">the associated Window</td>
</tr>
<tr>
<td class="name"><code>integerCoordinates</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
false
</td>
<td class="description last">whether or not to round the PIXI Point coordinates.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="util_Util.js.html">util/Util.js</a>, <a href="util_Util.js.html#line605">line 605</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
the position as a PIXI Point
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Array.&lt;number></span>
</dd>
</dl>
<h4 class="name" id=".to_px"><span class="type-signature">(static) </span>to_px<span class="signature">(pos, posUnit, win, integerCoordinates<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Array.&lt;number>}</span></h4>
<div class="description">
Convert the position to pixel units.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>pos</code></td>
<td class="type">
<span class="param-type">Array.&lt;number></span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last">the input position</td>
</tr>
<tr>
<td class="name"><code>posUnit</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last">the position units</td>
</tr>
<tr>
<td class="name"><code>win</code></td>
<td class="type">
<span class="param-type">Window</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last">the associated Window</td>
</tr>
<tr>
<td class="name"><code>integerCoordinates</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
false
</td>
<td class="description last">whether or not to round the position coordinates.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="util_Util.js.html">util/Util.js</a>, <a href="util_Util.js.html#line406">line 406</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
the position in pixel units
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Array.&lt;number></span>
</dd>
</dl>
<h4 class="name" id=".to_unit"><span class="type-signature">(static) </span>to_unit<span class="signature">(pos, posUnit, win, targetUnit)</span><span class="type-signature"> &rarr; {Array.&lt;number>}</span></h4>
<div class="description">
Convert the position to given units.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>pos</code></td>
<td class="type">
<span class="param-type">Array.&lt;number></span>
</td>
<td class="description last">the input position</td>
</tr>
<tr>
<td class="name"><code>posUnit</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last">the position units</td>
</tr>
<tr>
<td class="name"><code>win</code></td>
<td class="type">
<span class="param-type">Window</span>
</td>
<td class="description last">the associated Window</td>
</tr>
<tr>
<td class="name"><code>targetUnit</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last">the target units</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="util_Util.js.html">util/Util.js</a>, <a href="util_Util.js.html#line565">line 565</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
the position in target units
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Array.&lt;number></span>
</dd>
</dl>
<h4 class="name" id=".to_win"><span class="type-signature">(static) </span>to_win<span class="signature">(pos, posUnit, win)</span><span class="type-signature"> &rarr; {Array.&lt;number>}</span></h4>
<div class="description">
Convert the position to window units.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>pos</code></td>
<td class="type">
<span class="param-type">Array.&lt;number></span>
</td>
<td class="description last">the input position</td>
</tr>
<tr>
<td class="name"><code>posUnit</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last">the position units</td>
</tr>
<tr>
<td class="name"><code>win</code></td>
<td class="type">
<span class="param-type">Window</span>
</td>
<td class="description last">the associated Window</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="util_Util.js.html">util/Util.js</a>, <a href="util_Util.js.html#line526">line 526</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
the position in window units
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Array.&lt;number></span>
</dd>
</dl>
<h4 class="name" id=".toNumerical"><span class="type-signature">(static) </span>toNumerical<span class="signature">(obj)</span><span class="type-signature"> &rarr; {number|Array.&lt;number>}</span></h4>
<div class="description">
Convert obj to its numerical form.
<ul>
<li>number -> number, e.g. 2 -> 2</li>
<li>[number] -> [number], e.g. [1,2,3] -> [1,2,3]</li>
<li>numeral string -> number, e.g. "8" -> 8</li>
<li>[number | numeral string] -> [number], e.g. [1, 2, "3"] -> [1,2,3]</li>
</ul>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>obj</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">the input object</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="util_Util.js.html">util/Util.js</a>, <a href="util_Util.js.html#line223">line 223</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
the numerical form of the input object
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">number</span>
|
<span class="param-type">Array.&lt;number></span>
</dd>
</dl>
<h4 class="name" id=".toString"><span class="type-signature">(static) </span>toString<span class="signature">(object)</span><span class="type-signature"> &rarr; {string}</span></h4>
<div class="description">
Convert an object to its string representation, taking care of symbols.
<p>Note: if the object is not already a string, we JSON stringify it and detect circularity.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>object</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">the input object</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="util_Util.js.html">util/Util.js</a>, <a href="util_Util.js.html#line631">line 631</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
a string representation of the object or 'Object (circular)'
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">string</span>
</dd>
</dl>
<h4 class="name" id=".turnSquareBracketsIntoArrays"><span class="type-signature">(static) </span>turnSquareBracketsIntoArrays<span class="signature">(input, max)</span><span class="type-signature"> &rarr; {array}</span></h4>
<div class="description">
Convert a string representing a JSON array, e.g. "[1, 2]" into an array, e.g. ["1","2"].
This approach overcomes the built-in JSON parsing limitations when it comes to eg. floats
missing the naught prefix, and is able to process several arrays, e.g. "[1,2][3,4]".
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>input</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last">string potentially containing JSON arrays</td>
</tr>
<tr>
<td class="name"><code>max</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last">how many matches to return, unwrap resulting array if less than two</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="util_Util.js.html">util/Util.js</a>, <a href="util_Util.js.html#line977">line 977</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
an array if arrays were found, undefined otherwise
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">array</span>
</dd>
</dl>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-core.html">core</a></li><li><a href="module-data.html">data</a></li><li><a href="module-sound.html">sound</a></li><li><a href="module-util.html">util</a></li><li><a href="module-visual.html">visual</a></li></ul><h3>Classes</h3><ul><li><a href="module-core.BuilderKeyResponse.html">BuilderKeyResponse</a></li><li><a href="module-core.EventManager.html">EventManager</a></li><li><a href="module-core.GUI.html">GUI</a></li><li><a href="module-core.Keyboard.html">Keyboard</a></li><li><a href="module-core.KeyPress.html">KeyPress</a></li><li><a href="module-core.Logger.html">Logger</a></li><li><a href="module-core.MinimalStim.html">MinimalStim</a></li><li><a href="module-core.Mouse.html">Mouse</a></li><li><a href="module-core.PsychoJS.html">PsychoJS</a></li><li><a href="module-core.ServerManager.html">ServerManager</a></li><li><a href="module-core.Window.html">Window</a></li><li><a href="module-data.ExperimentHandler.html">ExperimentHandler</a></li><li><a href="module-data.TrialHandler.html">TrialHandler</a></li><li><a href="module-sound.AudioClip.html">AudioClip</a></li><li><a href="module-sound.AudioClipPlayer.html">AudioClipPlayer</a></li><li><a href="module-sound.Microphone.html">Microphone</a></li><li><a href="module-sound.Sound.html">Sound</a></li><li><a href="module-sound.TonePlayer.html">TonePlayer</a></li><li><a href="module-sound.TrackPlayer.html">TrackPlayer</a></li><li><a href="module-util.Clock.html">Clock</a></li><li><a href="module-util.Color.html">Color</a></li><li><a href="module-util.CountdownTimer.html">CountdownTimer</a></li><li><a href="module-util.EventEmitter.html">EventEmitter</a></li><li><a href="module-util.MixinBuilder.html">MixinBuilder</a></li><li><a href="module-util.MonotonicClock.html">MonotonicClock</a></li><li><a href="module-util.PsychObject.html">PsychObject</a></li><li><a href="module-util.Scheduler.html">Scheduler</a></li><li><a href="module-visual.ButtonStim.html">ButtonStim</a></li><li><a href="module-visual.Form.html">Form</a></li><li><a href="module-visual.ImageStim.html">ImageStim</a></li><li><a href="module-visual.MovieStim.html">MovieStim</a></li><li><a href="module-visual.Polygon.html">Polygon</a></li><li><a href="module-visual.Rect.html">Rect</a></li><li><a href="module-visual.ShapeStim.html">ShapeStim</a></li><li><a href="module-visual.Slider.html">Slider</a></li><li><a href="module-visual.TextBox.html">TextBox</a></li><li><a href="module-visual.TextStim.html">TextStim</a></li><li><a href="module-visual.VisualStim.html">VisualStim</a></li></ul><h3>Interfaces</h3><ul><li><a href="module-sound.SoundPlayer.html">SoundPlayer</a></li></ul><h3>Mixins</h3><ul><li><a href="module-core.WindowMixin.html">WindowMixin</a></li><li><a href="module-util.ColorMixin.html">ColorMixin</a></li></ul>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.7</a> on Mon Jun 21 2021 07:34:20 GMT+0200 (Central European Summer Time)
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>