1
0
mirror of https://github.com/psychopy/psychojs.git synced 2025-05-10 10:40:54 +00:00

changed version number to 2020.1.0

This commit is contained in:
Alain Pitiot 2021-02-20 12:18:07 +01:00
parent 6c293c1cbd
commit 92c4d1d0b9
111 changed files with 1992 additions and 7487 deletions

View File

@ -106,7 +106,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="visual_TextInput.js.html">visual/TextInput.js</a>, <a href="visual_TextInput.js.html#line14">line 14</a>
<a href="visual_TextInput.js.html">visual/TextInput.js</a>, <a href="visual_TextInput.js.html#line12">line 12</a>
</li></ul></dd>
@ -181,7 +181,7 @@
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:20 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -31,7 +31,7 @@
*
* @author Alain Pitiot
* @version 2020.2
* @copyright (c) 2018-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @copyright (c) 2017-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @license Distributed under the terms of the MIT License
*/
@ -705,7 +705,7 @@ export class BuilderKeyResponse
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:19 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -32,7 +32,7 @@
* @author Alain Pitiot
* @author Sijia Zhao - fine-grained resource loading
* @version 2020.2
* @copyright (c) 2018-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @copyright (c) 2017-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @license Distributed under the terms of the MIT License
*/
@ -161,63 +161,67 @@ export class GUI
// add a combobox or text areas for each entry in the dictionary:
htmlCode += '&lt;form>';
for (const key in dictionary)
{
const value = dictionary[key];
const keyId = CSS.escape(key) + '_id';
// only create an input if the key is not in the URL:
let inUrl = false;
const cleanedDictKey = key.trim().toLowerCase();
infoFromUrl.forEach((urlValue, urlKey) =>
// These may include Symbols as opposed to when using a for...in loop,
// but only strings are allowed in PsychoPy
Object.keys(dictionary).forEach((key, keyIdx) =>
{
const cleanedUrlKey = urlKey.trim().toLowerCase();
if (cleanedUrlKey === cleanedDictKey)
const value = dictionary[key];
const keyId = 'form-input-' + keyIdx;
// only create an input if the key is not in the URL:
let inUrl = false;
const cleanedDictKey = key.trim().toLowerCase();
infoFromUrl.forEach((urlValue, urlKey) =>
{
const cleanedUrlKey = urlKey.trim().toLowerCase();
if (cleanedUrlKey === cleanedDictKey)
{
inUrl = true;
// break;
}
});
if (!inUrl)
{
inUrl = true;
// break;
}
});
htmlCode += '&lt;label for="' + keyId + '">' + key + '&lt;/label>';
if (!inUrl)
{
htmlCode += '&lt;label for="' + keyId + '">' + key + '&lt;/label>';
// if the field is required:
if (key.slice(-1) === '*')
{
self._requiredKeys.push(key);
}
// if value is an array, we create a select drop-down menu:
if (Array.isArray(value))
{
htmlCode += '&lt;select name="' + key + '" id="' + keyId + '" class="text ui-widget-content' +
' ui-corner-all">';
// if the field is required, we add an empty option and select it:
// if the field is required:
if (key.slice(-1) === '*')
{
htmlCode += '&lt;option disabled selected>...&lt;/option>';
self._requiredKeys.push(keyId);
}
for (const option of value)
// if value is an array, we create a select drop-down menu:
if (Array.isArray(value))
{
htmlCode += '&lt;option>' + option + '&lt;/option>';
htmlCode += '&lt;select name="' + key + '" id="' + keyId + '" class="text ui-widget-content' +
' ui-corner-all">';
// if the field is required, we add an empty option and select it:
if (key.slice(-1) === '*')
{
htmlCode += '&lt;option disabled selected>...&lt;/option>';
}
for (const option of value)
{
htmlCode += '&lt;option>' + option + '&lt;/option>';
}
htmlCode += '&lt;/select>';
$('#' + keyId).selectmenu({classes: {}});
}
htmlCode += '&lt;/select>';
$('#' + keyId).selectmenu({classes: {}});
}
// otherwise we use a single string input:
else /*if (typeof value === 'string')*/
{
htmlCode += '&lt;input type="text" name="' + key + '" id="' + keyId;
htmlCode += '" value="' + value + '" class="text ui-widget-content ui-corner-all">';
// otherwise we use a single string input:
else /*if (typeof value === 'string')*/
{
htmlCode += '&lt;input type="text" name="' + key + '" id="' + keyId;
htmlCode += '" value="' + value + '" class="text ui-widget-content ui-corner-all">';
}
}
}
}
);
htmlCode += '&lt;/form>';
@ -243,15 +247,15 @@ export class GUI
// setup change event handlers for all required keys:
for (const key of this._requiredKeys)
{
const keyId = CSS.escape(key) + '_id';
const input = document.getElementById(keyId);
if (input)
this._requiredKeys.forEach((keyId) =>
{
input.oninput = (event) => GUI._onKeyChange(self, event);
const input = document.getElementById(keyId);
if (input)
{
input.oninput = (event) => GUI._onKeyChange(self, event);
}
}
}
);
// init and open the dialog box:
self._dialogComponent.button = 'Cancel';
@ -265,6 +269,7 @@ export class GUI
modal: true,
closeOnEscape: false,
resizable: false,
draggable: false,
buttons: [
{
@ -283,18 +288,23 @@ export class GUI
{
// update dictionary:
for (const key in dictionary)
{
const input = document.getElementById(CSS.escape(key) + "_id");
if (input)
Object.keys(dictionary).forEach((key, keyIdx) =>
{
dictionary[key] = input.value;
const input = document.getElementById('form-input-' + keyIdx);
if (input)
{
dictionary[key] = input.value;
}
}
}
);
self._dialogComponent.button = 'OK';
$("#expDialog").dialog('close');
// Tackle browser demands on having user action initiate audio context
Tone.start();
// switch to full screen if requested:
self._psychoJS.window.adjustScreenSize();
}
@ -418,6 +428,12 @@ export class GUI
}
else
{
// limit the size of the error:
if (error.length >= 1000)
{
error = error.substring(1, 1000);
}
stackCode += '&lt;li>&lt;b>' + error + '&lt;/b>&lt;/li>';
break;
}
@ -479,6 +495,8 @@ export class GUI
autoOpen: true,
modal: true,
closeOnEscape: false,
resizable: false,
draggable: false,
buttons: (!showOK) ? [] : [{
id: "buttonOk",
@ -647,14 +665,22 @@ export class GUI
* Update the status of the OK button.
*
* @name module:core.GUI#_updateOkButtonStatus
* @param [changeFocus = false] - whether or not to change the focus to the OK button
* @function
* @private
*/
_updateOkButtonStatus()
_updateOkButtonStatus(changeFocus = true)
{
if (this._psychoJS.getEnvironment() === ExperimentHandler.Environment.LOCAL || (this._allResourcesDownloaded &amp;&amp; this._setRequiredKeys.size >= this._requiredKeys.length))
if (this._psychoJS.getEnvironment() === ExperimentHandler.Environment.LOCAL || (this._allResourcesDownloaded &amp;&amp; this._setRequiredKeys &amp;&amp; this._setRequiredKeys.size >= this._requiredKeys.length))
{
$("#buttonOk").button("option", "disabled", false);
if (changeFocus)
{
$("#buttonOk").button("option", "disabled", false).focus();
}
else
{
$("#buttonOk").button("option", "disabled", false);
}
}
else
{
@ -748,7 +774,7 @@ export class GUI
gui._setRequiredKeys.delete(event.target);
}
gui._updateOkButtonStatus();
gui._updateOkButtonStatus(false);
}
@ -887,7 +913,7 @@ GUI.dialogMargin = [50, 50];
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:19 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -31,7 +31,7 @@
*
* @author Alain Pitiot
* @version 2020.2
* @copyright (c) 2018-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @copyright (c) 2017-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @license Distributed under the terms of the MIT License
*/
@ -98,7 +98,10 @@ export class Keyboard extends PsychObject
clock = new Clock();
} //this._psychoJS.monotonicClock;
this._addAttributes(Keyboard, bufferSize, waitForStart, clock, autoLog);
this._addAttribute('bufferSize', bufferSize);
this._addAttribute('waitForStart', waitForStart);
this._addAttribute('clock', clock);
this._addAttribute('autoLog', autoLog);
// start recording key events if need be:
this._addAttribute('status', (waitForStart) ? PsychoJS.Status.NOT_STARTED : PsychoJS.Status.STARTED);
@ -446,6 +449,7 @@ export class Keyboard extends PsychObject
self._psychoJS.logger.trace('keydown: ', event.key);
event.stopPropagation();
event.preventDefault();
});
@ -529,7 +533,7 @@ Keyboard.KeyStatus = {
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:19 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -31,14 +31,14 @@
*
* @author Alain Pitiot
* @version 2020.2
* @copyright (c) 2018-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @copyright (c) 2017-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @license Distributed under the terms of the MIT License
*/
import * as util from '../util/Util';
import {MonotonicClock} from '../util/Clock';
import {ExperimentHandler} from '../data/ExperimentHandler';
import {MonotonicClock} from '../util';
import {ExperimentHandler} from '../data';
/**
@ -71,29 +71,48 @@ export class Logger
// server logger:
this._serverLogs = [];
this._serverLevel = Logger.ServerLevel.WARNING;
this._serverLevelValue = this._getValue(this._serverLevel);
/**
* DEPRECATED: we are using our own approach.
*
// pavlovia.org server logger:
this.serverLogger = log4javascript.getLogger('pavlovia.org');
const serverAppender = new log4javascript.AjaxAppender('https://pavlovia.org/server?command=log');
serverAppender.setTimerInterval(1000); //1000*60*60); // 1h
serverAppender.setThreshold(threshold);
//serverAppender.setBatchSize(5);
//serverAppender.setSendAllOnUnload(true);
//serverAppender.setFailCallback();
const jsonLayout = new log4javascript.JsonLayout([false, false]);
serverAppender.setLayout(jsonLayout);
this.serverLogger.addAppender(serverAppender);
this.serverLogger.setLevel(threshold);
*
*/
// throttling of server logs
this._throttling = {
// period of time (in seconds) over which we consider the number of logged messages:
window: 1,
// threshold (i.e. number of messages over the throttling window) at which point
// we start throttling:
threshold: 20,
// throttling factor: 10 -> only 1 in 10 messages is logged
factor: 10,
// minimum duration (in seconds) of throttling
minimumDuration: 2,
// time at which throttling started:
startOfThrottling: 0,
// whether or not we are currently throttling:
isThrottling: false,
// throttling message index:
index: 0,
// whether or not the designer has already been warned:
designerWasWarned: false
};
}
/**
* Change the logging level.
*
* @name module:core.Logger#setLevel
* @public
* @param {module:core.Logger.ServerLevel} serverLevel - the new logging level
*/
setLevel(serverLevel)
{
this._serverLevel = serverLevel;
this._serverLevelValue = this._getValue(this._serverLevel);
}
/**
* Log a server message at the EXP level.
*
@ -109,6 +128,7 @@ export class Logger
}
/**
* Log a server message at the DATA level.
*
@ -124,6 +144,7 @@ export class Logger
}
/**
* Log a server message.
*
@ -136,26 +157,115 @@ export class Logger
*/
log(msg, level, time, obj)
{
// only log if the level is higher or equal to the previously defined server level:
const levelValue = this._getValue(level);
if (levelValue &lt; this._serverLevelValue)
{
return;
}
if (typeof time === 'undefined')
{
time = MonotonicClock.getReferenceTime();
}
/* [coming soon]
// check whether we need to throttle:
if (this._throttle(time))
{
return;
}
*/
this._serverLogs.push({
msg,
level,
time,
obj: util.toString(obj)
});
}
/**
* Check whether or not a log messages must be throttled.
*
* @name module:core.Logger#_throttle
* @protected
*
* @param {number} time - the time of the latest log message
* @return {boolean} whether or not to log the message
*/
_throttle(time)
{
// if more messages than this._throttling.threshold have been logged between
// time and the start of the throttling window, we need to throttle:
if (this._serverLogs.length > this._throttling.threshold)
{
const timeAtStartThrottlingWindow = this._serverLogs[this._serverLogs.length - 1 - this._throttling.threshold].time;
if (time - timeAtStartThrottlingWindow &lt; this._throttling.window)
{
// warn the designer if we are not already throttling:
if (!this._throttling.isThrottling)
{
const msg = `&lt;p>[time= ${time.toFixed(3)}] More than ${this._throttling.threshold} messages were logged in the past ${this._throttling.window}s.&lt;/p>` +
`&lt;p>We are now throttling: only 1 in ${this._throttling.factor} messages will be logged.&lt;/p>` +
`&lt;p>You may want to change your experiment's logging level. Please see &lt;a href="https://www.psychopy.org/api/logging.html">psychopy.org/api/logging.html&lt;/a> for details.&lt;/p>`;
// console warning:
this._psychoJS.logger.warn(msg);
// in PILOTING mode and locally, we also warn the experimenter with a dialog box,
// but only once:
if (!this._throttling.designerWasWarned &amp;&amp;
(this._psychoJS.getEnvironment() === ExperimentHandler.Environment.LOCAL ||
this._psychoJS.config.experiment.status === 'PILOTING'))
{
this._throttling.designerWasWarned = true;
this._psychoJS.gui.dialog({
warning: msg,
showOK: true
});
}
this._throttling.isThrottling = true;
this._throttling.startOfThrottling = time;
this._throttling.index = 0;
}
++ this._throttling.index;
if (this._throttling.index &lt; this._throttling.factor)
{
// no logging
return true;
}
else
{
this._throttling.index = 0;
}
}
else
{
if (this._throttling.isThrottling &amp;&amp;
(time - this._throttling.startOfThrottling) > this._throttling.minimumDuration)
{
this._psychoJS.logger.info(`[time= ${time.toFixed(3)}] Log messages are not throttled any longer.`);
this._throttling.isThrottling = false;
}
}
}
return false;
}
/**
* Flush all server logs to the server.
*
* &lt;p>Note: the logs are compressed using Pako's zlib algorithm. See https://github.com/nodeca/pako
* for details.&lt;/p>
* &lt;p>Note: the logs are compressed using Pako's zlib algorithm.
* See https://github.com/nodeca/pako for details.&lt;/p>
*
* @name module:core.Logger#flush
* @public
@ -169,7 +279,7 @@ export class Logger
this._psychoJS.logger.info('[PsychoJS] Flush server logs.');
// prepare formatted logs:
// prepare the formatted logs:
let formattedLogs = '';
for (const log of this._serverLogs)
{
@ -220,6 +330,7 @@ export class Logger
}
/**
* Create a custom console layout.
*
@ -292,9 +403,25 @@ export class Logger
return customLayout;
}
/**
* Get the integer value associated with a logging level.
*
* @name module:core.Logger#_getValue
* @protected
* @param {module:core.Logger.ServerLevel} level - the logging level
* @return {number} - the value associated with the logging level, or 30 is the logging level is unknown.
*/
_getValue(level)
{
const levelAsString = Symbol.keyFor(level);
return (levelAsString in Logger._ServerLevelValue) ? Logger._ServerLevelValue[levelAsString] : 30;
}
}
/**
* Server logging level.
*
@ -315,6 +442,28 @@ Logger.ServerLevel = {
DEBUG: Symbol.for('DEBUG'),
NOTSET: Symbol.for('NOTSET')
};
/**
* Server logging level values.
*
* &lt;p>We use those values to determine whether a log is to be sent to the server or not.&lt;/p>
*
* @name module:core.Logger#_ServerLevelValue
* @enum {number}
* @readonly
* @protected
*/
Logger._ServerLevelValue = {
'CRITICAL': 50,
'ERROR': 40,
'WARNING': 30,
'DATA': 25,
'EXP': 22,
'INFO': 20,
'DEBUG': 10,
'NOTSET': 0
};
</code></pre>
</article>
</section>
@ -331,7 +480,7 @@ Logger.ServerLevel = {
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:19 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -31,7 +31,7 @@
*
* @author Alain Pitiot
* @version 2020.2
* @copyright (c) 2018-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @copyright (c) 2017-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @license Distributed under the terms of the MIT License
*/
@ -266,7 +266,7 @@ export class MinimalStim extends PsychObject
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:19 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -32,7 +32,7 @@
* @author Alain Pitiot
* @author Sotiri Bakagiannis - isPressedIn
* @version 2020.2
* @copyright (c) 2018-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @copyright (c) 2017-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @license Distributed under the terms of the MIT License
*/
@ -73,7 +73,10 @@ export class Mouse extends PsychObject
const units = win.units;
const visible = 1;
this._addAttributes(Mouse, win, units, visible, autoLog);
this._addAttribute('win', win);
this._addAttribute('units', units);
this._addAttribute('visible', visible);
this._addAttribute('autoLog', autoLog);
this.status = PsychoJS.Status.NOT_STARTED;
}
@ -400,7 +403,7 @@ export class Mouse extends PsychObject
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:19 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -32,7 +32,7 @@
*
* @author Alain Pitiot
* @version 2020.2
* @copyright (c) 2018-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @copyright (c) 2017-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @license Distributed under the terms of the MIT License
*/
@ -145,6 +145,7 @@ export class PsychoJS
constructor({
debug = true,
collectIP = false,
hosts = [],
topLevelStatus = true
} = {})
{
@ -165,6 +166,10 @@ export class PsychoJS
psychoJS: this
});
// to be loading `configURL` files in `_configure` calls from
const hostsEvidently = new Set([...hosts, 'https://pavlovia.org/run/', 'https://run.pavlovia.org/']);
this._hosts = Array.from(hostsEvidently);
// GUI:
this._gui = new GUI(this);
@ -193,6 +198,9 @@ export class PsychoJS
this.logger.info('[PsychoJS] Initialised.');
this.logger.info('[PsychoJS] @version 2020.2');
// Hide #root::after
$('#root').addClass('is-ready');
}
@ -322,7 +330,7 @@ export class PsychoJS
*
* @todo: close session on window or tab close
*/
async start({configURL = 'config.json', expName = 'UNKNOWN', expInfo, resources = []} = {})
async start({configURL = 'config.json', expName = 'UNKNOWN', expInfo = {}, resources = []} = {})
{
this.logger.debug();
@ -378,8 +386,8 @@ export class PsychoJS
window.addEventListener('beforeunload', this.beforeunloadCallback);
// when the user closes the tab or browser, we attempt to close the session, optionally save the results,
// and release the WebGL context
// when the user closes the tab or browser, we attempt to close the session,
// optionally save the results, and release the WebGL context
// note: we communicate with the server using the Beacon API
const self = this;
window.addEventListener('unload', (event) =>
@ -510,8 +518,11 @@ export class PsychoJS
});
if (isCompleted || this._config.experiment.saveIncompleteResults)
{
await this._experiment.save();
await this._logger.flush();
if (!this._serverMsg.has('__noOutput'))
{
await this._experiment.save();
await this._logger.flush();
}
}
// close the session:
@ -571,7 +582,10 @@ export class PsychoJS
*/
async _configure(configURL, name)
{
const response = {origin: 'PsychoJS.configure', context: 'when configuring PsychoJS for the experiment'};
const response = {
origin: 'PsychoJS.configure',
context: 'when configuring PsychoJS for the experiment'
};
try
{
@ -579,13 +593,15 @@ export class PsychoJS
// if the experiment is running from the pavlovia.org server, we read the configuration file:
const experimentUrl = window.location.href;
if (experimentUrl.indexOf('https://run.pavlovia.org/') === 0 || experimentUrl.indexOf('https://pavlovia.org/run/') === 0)
// go through each url in allow list
const isHost = this._hosts.some(url => experimentUrl.indexOf(url) === 0);
if (isHost)
{
const serverResponse = await this._serverManager.getConfiguration(configURL);
this._config = serverResponse.config;
// legacy experiments had a psychoJsManager block instead of a pavlovia block, and the URL
// pointed to https://pavlovia.org/server
// legacy experiments had a psychoJsManager block instead of a pavlovia block,
// and the URL pointed to https://pavlovia.org/server
if ('psychoJsManager' in this._config)
{
delete this._config.psychoJsManager;
@ -624,7 +640,11 @@ export class PsychoJS
{
this._config = {
environment: ExperimentHandler.Environment.LOCAL,
experiment: {name, saveFormat: ExperimentHandler.SaveFormat.CSV}
experiment: {
name,
saveFormat: ExperimentHandler.SaveFormat.CSV,
saveIncompleteResults: true
}
};
}
@ -766,7 +786,7 @@ PsychoJS.Status = {
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:19 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -31,7 +31,7 @@
*
* @author Alain Pitiot
* @version 2020.2
* @copyright (c) 2018-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @copyright (c) 2017-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @license Distributed under the terms of the MIT License
*/
@ -74,7 +74,7 @@ export class ServerManager extends PsychObject
this._resources = new Map();
this._nbResources = -1;
this._addAttributes(ServerManager, autoLog);
this._addAttribute('autoLog', autoLog);
this._addAttribute('status', ServerManager.Status.READY);
}
@ -913,7 +913,7 @@ ServerManager.Status = {
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:19 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -31,13 +31,13 @@
*
* @author Alain Pitiot
* @version 2020.2
* @copyright (c) 2018-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @copyright (c) 2017-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @license Distributed under the terms of the MIT License
*/
import {Color} from '../util/Color';
import {PsychObject} from '../util/PsychObject';
import {MonotonicClock} from '../util/Clock';
import {Color} from '../util';
import {PsychObject} from '../util';
import {MonotonicClock} from '../util';
import {Logger} from "./Logger";
/**
@ -69,7 +69,7 @@ export class Window extends PsychObject
*/
get monitorFramePeriod()
{
return this._monitorFramePeriod;
return 1.0 / this.getActualFrameRate();
}
constructor({
@ -90,16 +90,17 @@ export class Window extends PsychObject
// list of all elements, in the order they are currently drawn:
this._drawList = [];
this._addAttributes(Window, fullscr, color, units, waitBlanking, autoLog);
this._addAttribute('fullscr', fullscr);
this._addAttribute('color', color);
this._addAttribute('units', units);
this._addAttribute('waitBlanking', waitBlanking);
this._addAttribute('autoLog', autoLog);
this._addAttribute('size', []);
// setup PIXI:
this._setupPixi();
// monitor frame period:
this._monitorFramePeriod = 1.0 / this.getActualFrameRate();
this._frameCount = 0;
this._flipCallbacks = [];
@ -173,14 +174,15 @@ export class Window extends PsychObject
* @name module:core.Window#getActualFrameRate
* @function
* @public
* @return {number} always returns 60.0 at the moment
*
* @todo estimate the actual frame rate.
* @return {number} rAF based delta time based approximation, 60.0 by default
*/
getActualFrameRate()
{
// TODO
return 60.0;
// gets updated frame by frame
const lastDelta = this.psychoJS.scheduler._lastDelta;
const fps = lastDelta === 0 ? 60.0 : 1000 / lastDelta;
return fps;
}
@ -453,7 +455,9 @@ export class Window extends PsychObject
this._size[1] = window.innerHeight;
// create a PIXI renderer and add it to the document:
this._renderer = PIXI.autoDetectRenderer(this._size[0], this._size[1], {
this._renderer = PIXI.autoDetectRenderer({
width: this._size[0],
height: this._size[1],
backgroundColor: this.color.int,
resolution: window.devicePixelRatio
});
@ -553,7 +557,7 @@ export class Window extends PsychObject
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:19 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -31,7 +31,7 @@
*
* @author Alain Pitiot
* @version 2020.2
* @copyright (c) 2018-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @copyright (c) 2017-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @license Distributed under the terms of the MIT License
*/
@ -235,7 +235,7 @@ export let WindowMixin = (superclass) => class extends superclass
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:19 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -31,7 +31,7 @@
*
* @author Alain Pitiot
* @version 2020.2
* @copyright (c) 2018-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @copyright (c) 2017-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @license Distributed under the terms of the MIT License
*/
@ -104,7 +104,7 @@ export class ExperimentHandler extends PsychObject
{
super(psychoJS, name);
this._addAttributes(ExperimentHandler, extraInfo);
this._addAttribute('extraInfo', extraInfo);
// loop handlers:
this._loops = [];
@ -133,11 +133,6 @@ export class ExperimentHandler extends PsychObject
return (Object.keys(this._currentTrialData).length > 0);
}
isEntryEmtpy()
{
return (Object.keys(this._currentTrialData).length > 0);
}
/**
* Add a loop.
@ -498,7 +493,7 @@ ExperimentHandler.Environment = {
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:19 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -33,7 +33,7 @@
* @author Alain Pitiot
* @author Hiroyuki Sogo &amp; Sotiri Bakagiannis - better support for BOM and accented characters
* @version 2020.2
* @copyright (c) 2018-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @copyright (c) 2017-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @license Distributed under the terms of the MIT License
*/
@ -103,7 +103,13 @@ export class TrialHandler extends PsychObject
{
super(psychoJS);
this._addAttributes(TrialHandler, trialList, nReps, method, extraInfo, seed, name, autoLog);
this._addAttribute('trialList', trialList);
this._addAttribute('nReps', nReps);
this._addAttribute('method', method);
this._addAttribute('extraInfo', extraInfo);
this._addAttribute('seed', seed);
this._addAttribute('name', name);
this._addAttribute('autoLog', autoLog);
this._prepareTrialList(trialList);
@ -495,10 +501,32 @@ export class TrialHandler extends PsychObject
{
let value = row[l];
// if value is a numerical string, convert it to a number:
if (typeof value === 'string' &amp;&amp; !isNaN(value))
// Look for string encoded arrays in the form of '[1, 2]'
const arrayMaybe = util.turnSquareBracketsIntoArrays(value);
if (Array.isArray(arrayMaybe))
{
value = Number.parseFloat(value);
// Keep the first match if more than one are found. If the
// input string looked like '[1, 2][3, 4]' for example,
// the resulting `value` would be [1, 2]. When `arrayMaybe` is
// empty, `value` turns `undefined`.
value = arrayMaybe;
}
if (typeof value === 'string')
{
const numberMaybe = Number.parseFloat(value);
// if value is a numerical string, convert it to a number:
if (!isNaN(numberMaybe) &amp;&amp; numberMaybe.toString().length === value.length)
{
value = numberMaybe;
}
else
{
// Parse doubly escaped line feeds
value = value.replace(/(\n)/g, '\n');
}
}
trial[fields[l]] = value;
@ -682,7 +710,12 @@ TrialHandler.Method = {
/**
* Conditions are fully randomised across all repeats.
*/
FULL_RANDOM: Symbol.for('FULL_RANDOM')
FULL_RANDOM: Symbol.for('FULL_RANDOM'),
/**
* Same as above, but named to reflect PsychoPy boileplate.
*/
FULLRANDOM: Symbol.for('FULL_RANDOM')
};
</code></pre>
</article>
@ -700,7 +733,7 @@ TrialHandler.Method = {
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:19 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -42,66 +42,6 @@
<section>
<article>
<p>PsychoJS is a JavaScript library that makes it possible to run neuroscience, psychology, and psychophysics experiments in a browser. It is the online counterpart of the <a href="http://www.psychopy.org/">PsychoPy</a> Python library.
It is also a git submodule: <a href="https://github.com/psychopy/psychojs">psychopy/psychojs</a></p>
<h2>Motivation</h2>
<p>Many studies in behavioural sciences (e.g. psychology, neuroscience, linguistics or mental health) use computers to present stimuli and record responses in a precise manner. These studies are still typically conducted on small numbers of people in laboratory environments equipped with dedicated hardware.</p>
<p>With high-speed broadband, improved web technologies and smart devices everywhere, studies can now go online without sacrificing too much temporal precision. This is a “game changer”. Data can be collected on larger, more varied, international populations. We can study people in environments they do not find intimidating. Experiments can be run multiple times per day, without data collection becoming impractical.</p>
<p>The idea behind PsychoJS is to make PsychoPy experiments available online, from a web page, so participants can run them on any device equipped with a web browser such as desktops, laptops, or tablets. In some circumstance, they can even use their phone!</p>
<h2>Getting Started</h2>
<p>Running PsychoPy experiments online requires the generation of an index.html file and of a javascript file that contains the code describing the experiment. Those files need to be hosted on a web server to which participants will point their browser in order to run the experiment. The server will also need to host the PsychoJS library.</p>
<h3>PsychoPy Builder</h3>
<p>Starting with PsychoPy version 3.0, <a href="http://www.psychopy.org/builder/builder.html">PsychoPy Builder</a> can automatically generate the javascript and html files. Many of the existing Builder experiments should &quot;just work&quot;, subject to the Components being currently supported by PsychoJS (see below).</p>
<h3>JavaScript Code</h3>
<p>We built the PsychoJS library to make the JavaScript experiment files look and behave in very much the same way as to the Builder-generated Python files. PsychoJS offers classes such as <code>Window</code> and <code>ImageStim</code>, with very similar attributes to their Python equivalents. Experiment designers familiar with the PsychoPy library should feel at home with PsychoJS, and can expect the same level of control they have with PsychoPy, from the the structure of the trials/loops all the way down to frame-by-frame updates.</p>
<p>There are however notable differences between the the PsychoJS and PsychoPy libraries, most of which have to do with the way a web browser interprets and runs JavaScript, deals with resources (such as images, sound or videos), or render stimuli. To manage those web-specific aspect, PsychoJS introduces the concept of Scheduler. As the name indicate, Scheduler's offer a way to organise various PsychoJS along a timeline, such as downloading resources, running a loop, checking for keyboard input, saving experiment results, etc. As an illustration, a Flow in PsychoPy can be conceptualised as a Schedule, with various tasks on it. Some of those tasks, such as trial loops, can also schedule further events (i.e. the individual trials to be run).</p>
<p>Under the hood PsychoJS relies on <a href="http://www.pixijs.com">PixiJs</a> to present stimuli and collect responses. PixiJs is a multi-platform, accelerated, 2-D renderer, that runs in most modern browsers. It uses WebGL wherever possible and silently falls back to HTML5 canvas where not. WebGL directly addresses the graphic card, thereby considerably improving the rendering performance.</p>
<h3>Hosting Experiments</h3>
<p>A convenient way to make experiment available to participants is to host them on <a href="https://www.pavlovia.org">pavlovia.org</a>, an open-science server under active development. PsychoPy Builder offers the possibility of uploading the experiment directly to pavlovia.org.</p>
<h2>Which PsychoPy Components are supported by PsychoJS?</h2>
<p>PsychoJS currently supports the following Components:</p>
<h3>Stimuli:</h3>
<ul>
<li>Form</li>
<li>ImageStim</li>
<li>Rect</li>
<li>ShapeStim (Polygon)</li>
<li>Slider</li>
<li>Sound (tones and tracks)</li>
<li>TextStim</li>
<li>TextBox</li>
</ul>
<h3>Events:</h3>
<ul>
<li>Keyboard</li>
<li>Mouse</li>
</ul>
<p>We are constantly adding new Components and are regularly updating this list.</p>
<h2>API</h2>
<p>The full documentation of the PsychoJS API is <a href="https://psychopy.github.io/psychojs/">here</a>.</p>
<h2>Maintainers</h2>
<p>Alain Pitiot - <a href="https://github.com/apitiot">@apitiot</a></p>
<h2>Contributors</h2>
<p>The PsychoJS library was initially written by <a href="http://www.ilixa.com">Ilixa</a> with support from the <a href="https://wellcome.ac.uk">Wellcome Trust</a>.
It is now a collaborative effort, supported by the <a href="https://chanzuckerberg.com/">Chan Zuckerberg Initiative</a> (2020-2021) and <a href="https://opensciencetools.org/">Open Science Tools</a> (2020-):</p>
<ul>
<li>Alain Pitiot - <a href="https://github.com/apitiot">@apitiot</a></li>
<li>Sotiri Bakagiannis - <a href="https://github.com/thewhodidthis">@thewhodidthis</a></li>
<li>Hiroyuki Sogo - <a href="https://github.com/hsogo">@hsogo</a></li>
<li>Sijia Zhao - <a href="https://github.com/sijiazhao">@sijiazhao</a></li>
</ul>
<p>The PsychoPy Builder's javascript code generator is built and maintained by the creators of PsychoPy at the <a href="https://www.nottingham.ac.uk">University of Nottingham</a>, with support from the <a href="https://wellcome.ac.uk">Wellcome Trust</a> (2018-2020), from the <a href="https://chanzuckerberg.com/">Chan Zuckerberg Initiative</a> (2020-2021), and from <a href="https://opensciencetools.org/">Open Science Tools</a> (2020-):</p>
<ul>
<li>Jonathan Peirce - <a href="https://github.com/peircej">@peircej</a></li>
<li>David Bridges - <a href="https://github.com/dvbridges">@dvbridges</a></li>
<li>Todd Parsons <a href="https://github.com/TEParsons">@TEParsons</a></li>
</ul>
<h2>License</h2>
<p>This project is licensed under the MIT License - see the <a href="LICENSE.md">LICENSE.md</a> file for details.</p></article>
</section>
@ -116,7 +56,7 @@ It is now a collaborative effort, supported by the <a href="https://chanzuckerbe
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:19 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -260,7 +260,7 @@
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:19 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -238,324 +238,10 @@
<h3 class="subsection-title">Members</h3>
<h4 class="name" id="_keycodeMap"><span class="type-signature">(private, readonly) </span>_keycodeMap<span class="type-signature"> :Object.&lt;number, String></span></h4>
<div class="description">
<p>This map provides support for browsers that have not yet
adopted the W3C KeyboardEvent.code standard for detecting key presses.
It maps the deprecated KeyboardEvent.keycode values to the W3C UI event codes.</p>
<p>Unfortunately, it is not very fine-grained: for instance, there is no difference between Alt Left and Alt
Right, or between Enter and Numpad Enter. Use at your own risk (or upgrade your browser...).</p>
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">Object.&lt;number, String></span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_EventManager.js.html">core/EventManager.js</a>, <a href="core_EventManager.js.html#line436">line 436</a>
</li></ul></dd>
</dl>
<h4 class="name" id="_pygletMap"><span class="type-signature">(private, readonly) </span>_pygletMap<span class="type-signature"> :Object.&lt;String, String></span></h4>
<div class="description">
This map associates pyglet key names to the corresponding W3C KeyboardEvent codes values.
<p>More information can be found <a href="https://www.w3.org/TR/uievents-code">here</a></p>
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">Object.&lt;String, String></span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_EventManager.js.html">core/EventManager.js</a>, <a href="core_EventManager.js.html#line529">line 529</a>
</li></ul></dd>
</dl>
<h4 class="name" id="_reversePygletMap"><span class="type-signature">(private, readonly) </span>_reversePygletMap<span class="type-signature"> :Object.&lt;String, String></span></h4>
<div class="description">
<p>This map associates W3C KeyboardEvent.codes to the corresponding pyglet key names.
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">Object.&lt;String, String></span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_EventManager.js.html">core/EventManager.js</a>, <a href="core_EventManager.js.html#line632">line 632</a>
</li></ul></dd>
</dl>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id="_addKeyListeners"><span class="type-signature">(private) </span>_addKeyListeners<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
Add key listeners to the document.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_EventManager.js.html">core/EventManager.js</a>, <a href="core_EventManager.js.html#line325">line 325</a>
</li></ul></dd>
</dl>
@ -2041,7 +1727,7 @@ Right, or between Enter and Numpad Enter. Use at your own risk (or upgrade your
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:19 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -193,68 +193,6 @@
<h4 class="name" id="_getDialogSize"><span class="type-signature">(private) </span>_getDialogSize<span class="type-signature"></span></h4>
<div class="description">
Get the size of the dialog.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_GUI.js.html">core/GUI.js</a>, <a href="core_GUI.js.html#line681">line 681</a>
</li></ul></dd>
</dl>
<h4 class="name" id="dialogMargin"><span class="type-signature">(readonly) </span>dialogMargin<span class="type-signature"> :Symbol</span></h4>
@ -309,7 +247,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_GUI.js.html">core/GUI.js</a>, <a href="core_GUI.js.html#line837">line 837</a>
<a href="core_GUI.js.html">core/GUI.js</a>, <a href="core_GUI.js.html#line863">line 863</a>
</li></ul></dd>
@ -381,7 +319,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_GUI.js.html">core/GUI.js</a>, <a href="core_GUI.js.html#line826">line 826</a>
<a href="core_GUI.js.html">core/GUI.js</a>, <a href="core_GUI.js.html#line852">line 852</a>
</li></ul></dd>
@ -403,797 +341,6 @@
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id="_dialogResize"><span class="type-signature">(private) </span>_dialogResize<span class="signature">(dialogId)</span><span class="type-signature"></span></h4>
<div class="description">
Ensure that the browser window's resize events redimension and reposition the dialog UI.
</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>dialogId</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">the dialog ID</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_GUI.js.html">core/GUI.js</a>, <a href="core_GUI.js.html#line516">line 516</a>
</li></ul></dd>
</dl>
<h4 class="name" id="_estimateDialogScalingFactor"><span class="type-signature">(private) </span>_estimateDialogScalingFactor<span class="signature">()</span><span class="type-signature"> &rarr; {boolean}</span></h4>
<div class="description">
Estimate the scaling factor for the dialog popup windows.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_GUI.js.html">core/GUI.js</a>, <a href="core_GUI.js.html#line645">line 645</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
whether or not the scaling factor is different from the previously estimated one
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">boolean</span>
</dd>
</dl>
<h4 class="name" id="_onDialogOpen"><span class="type-signature">(private) </span>_onDialogOpen<span class="signature">(dialogId)</span><span class="type-signature"> &rarr; {function}</span></h4>
<div class="description">
Callback triggered when the jQuery UI dialog box is open.
</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>dialogId</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">the dialog ID</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_GUI.js.html">core/GUI.js</a>, <a href="core_GUI.js.html#line483">line 483</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
function setting the dimension and position of the dialog box
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">function</span>
</dd>
</dl>
<h4 class="name" id="_onKeyChange"><span class="type-signature">(private) </span>_onKeyChange<span class="signature">(gui, event)</span><span class="type-signature"></span></h4>
<div class="description">
Listener for change event for required keys.
</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>gui</code></td>
<td class="type">
<span class="param-type"><a href="module-core.GUI.html">module:core.GUI</a></span>
</td>
<td class="description last">this GUI</td>
</tr>
<tr>
<td class="name"><code>event</code></td>
<td class="type">
<span class="param-type">Event</span>
</td>
<td class="description last">event</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_GUI.js.html">core/GUI.js</a>, <a href="core_GUI.js.html#line699">line 699</a>
</li></ul></dd>
</dl>
<h4 class="name" id="_onResourceEvents"><span class="type-signature">(private) </span>_onResourceEvents<span class="signature">(signal)</span><span class="type-signature"></span></h4>
<div class="description">
Listener for resource event from the <a href="ServerManager.html">Server Manager</a>.
</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>signal</code></td>
<td class="type">
<span class="param-type">Object.&lt;string, (string|Symbol)></span>
</td>
<td class="description last">the signal</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_GUI.js.html">core/GUI.js</a>, <a href="core_GUI.js.html#line559">line 559</a>
</li></ul></dd>
</dl>
<h4 class="name" id="_updateOkButtonStatus"><span class="type-signature">(private) </span>_updateOkButtonStatus<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
Update the status of the OK button.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_GUI.js.html">core/GUI.js</a>, <a href="core_GUI.js.html#line618">line 618</a>
</li></ul></dd>
</dl>
@ -1514,7 +661,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_GUI.js.html">core/GUI.js</a>, <a href="core_GUI.js.html#line324">line 324</a>
<a href="core_GUI.js.html">core/GUI.js</a>, <a href="core_GUI.js.html#line334">line 334</a>
</li></ul></dd>
@ -1870,7 +1017,7 @@ the dictionary remains unchanged.</p>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:19 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -256,7 +256,7 @@
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:19 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -467,7 +467,7 @@ before recording keyboard events</td>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_Keyboard.js.html">core/Keyboard.js</a>, <a href="core_Keyboard.js.html#line476">line 476</a>
<a href="core_Keyboard.js.html">core/Keyboard.js</a>, <a href="core_Keyboard.js.html#line480">line 480</a>
</li></ul></dd>
@ -489,94 +489,6 @@ before recording keyboard events</td>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id="_addKeyListeners"><span class="type-signature">(private) </span>_addKeyListeners<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
Add key listeners to the document.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_Keyboard.js.html">core/Keyboard.js</a>, <a href="core_Keyboard.js.html#line356">line 356</a>
</li></ul></dd>
</dl>
@ -635,7 +547,7 @@ before recording keyboard events</td>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_Keyboard.js.html">core/Keyboard.js</a>, <a href="core_Keyboard.js.html#line315">line 315</a>
<a href="core_Keyboard.js.html">core/Keyboard.js</a>, <a href="core_Keyboard.js.html#line318">line 318</a>
</li></ul></dd>
@ -724,7 +636,7 @@ previously cleared by calls to getKeys with clear = true.
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_Keyboard.js.html">core/Keyboard.js</a>, <a href="core_Keyboard.js.html#line123">line 123</a>
<a href="core_Keyboard.js.html">core/Keyboard.js</a>, <a href="core_Keyboard.js.html#line126">line 126</a>
</li></ul></dd>
@ -1032,7 +944,7 @@ waitRelease = false, key presses without a corresponding key release will have a
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_Keyboard.js.html">core/Keyboard.js</a>, <a href="core_Keyboard.js.html#line158">line 158</a>
<a href="core_Keyboard.js.html">core/Keyboard.js</a>, <a href="core_Keyboard.js.html#line161">line 161</a>
</li></ul></dd>
@ -1215,7 +1127,7 @@ waitRelease = false, key presses without a corresponding key release will have a
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_Keyboard.js.html">core/Keyboard.js</a>, <a href="core_Keyboard.js.html#line334">line 334</a>
<a href="core_Keyboard.js.html">core/Keyboard.js</a>, <a href="core_Keyboard.js.html#line337">line 337</a>
</li></ul></dd>
@ -1325,7 +1237,7 @@ waitRelease = false, key presses without a corresponding key release will have a
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_Keyboard.js.html">core/Keyboard.js</a>, <a href="core_Keyboard.js.html#line86">line 86</a>
<a href="core_Keyboard.js.html">core/Keyboard.js</a>, <a href="core_Keyboard.js.html#line89">line 89</a>
</li></ul></dd>
@ -1413,7 +1325,7 @@ waitRelease = false, key presses without a corresponding key release will have a
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_Keyboard.js.html">core/Keyboard.js</a>, <a href="core_Keyboard.js.html#line100">line 100</a>
<a href="core_Keyboard.js.html">core/Keyboard.js</a>, <a href="core_Keyboard.js.html#line103">line 103</a>
</li></ul></dd>
@ -1465,7 +1377,7 @@ waitRelease = false, key presses without a corresponding key release will have a
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:19 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -196,13 +196,13 @@ a remote one, etc.</p>
<h4 class="name" id="_customConsoleLayout"><span class="type-signature">(private) </span>_customConsoleLayout<span class="type-signature"></span></h4>
<h4 class="name" id="_getValue"><span class="type-signature">(protected) </span>_getValue<span class="type-signature"></span></h4>
<div class="description">
Create a custom console layout.
Get the integer value associated with a logging level.
</div>
@ -240,7 +240,143 @@ a remote one, etc.</p>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_Logger.js.html">core/Logger.js</a>, <a href="core_Logger.js.html#line195">line 195</a>
<a href="core_Logger.js.html">core/Logger.js</a>, <a href="core_Logger.js.html#line380">line 380</a>
</li></ul></dd>
</dl>
<h4 class="name" id="_ServerLevelValue"><span class="type-signature">(protected, readonly) </span>_ServerLevelValue<span class="type-signature"> :number</span></h4>
<div class="description">
Server logging level values.
<p>We use those values to determine whether a log is to be sent to the server or not.</p>
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">number</span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_Logger.js.html">core/Logger.js</a>, <a href="core_Logger.js.html#line419">line 419</a>
</li></ul></dd>
</dl>
<h4 class="name" id="_throttle"><span class="type-signature">(protected) </span>_throttle<span class="type-signature"></span></h4>
<div class="description">
Check whether or not a log messages must be throttled.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_Logger.js.html">core/Logger.js</a>, <a href="core_Logger.js.html#line162">line 162</a>
</li></ul></dd>
@ -302,7 +438,7 @@ a remote one, etc.</p>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_Logger.js.html">core/Logger.js</a>, <a href="core_Logger.js.html#line84">line 84</a>
<a href="core_Logger.js.html">core/Logger.js</a>, <a href="core_Logger.js.html#line104">line 104</a>
</li></ul></dd>
@ -364,7 +500,7 @@ a remote one, etc.</p>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_Logger.js.html">core/Logger.js</a>, <a href="core_Logger.js.html#line69">line 69</a>
<a href="core_Logger.js.html">core/Logger.js</a>, <a href="core_Logger.js.html#line88">line 88</a>
</li></ul></dd>
@ -390,8 +526,8 @@ a remote one, etc.</p>
<div class="description">
Flush all server logs to the server.
<p>Note: the logs are compressed using Pako's zlib algorithm. See https://github.com/nodeca/pako
for details.</p>
<p>Note: the logs are compressed using Pako's zlib algorithm.
See https://github.com/nodeca/pako for details.</p>
</div>
@ -429,7 +565,7 @@ for details.</p>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_Logger.js.html">core/Logger.js</a>, <a href="core_Logger.js.html#line126">line 126</a>
<a href="core_Logger.js.html">core/Logger.js</a>, <a href="core_Logger.js.html#line236">line 236</a>
</li></ul></dd>
@ -491,7 +627,7 @@ for details.</p>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_Logger.js.html">core/Logger.js</a>, <a href="core_Logger.js.html#line99">line 99</a>
<a href="core_Logger.js.html">core/Logger.js</a>, <a href="core_Logger.js.html#line120">line 120</a>
</li></ul></dd>
@ -563,7 +699,69 @@ for details.</p>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_Logger.js.html">core/Logger.js</a>, <a href="core_Logger.js.html#line270">line 270</a>
<a href="core_Logger.js.html">core/Logger.js</a>, <a href="core_Logger.js.html#line397">line 397</a>
</li></ul></dd>
</dl>
<h4 class="name" id="setLevel"><span class="type-signature"></span>setLevel<span class="type-signature"></span></h4>
<div class="description">
Change the logging level.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_Logger.js.html">core/Logger.js</a>, <a href="core_Logger.js.html#line73">line 73</a>
</li></ul></dd>
@ -603,7 +801,7 @@ for details.</p>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:19 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -382,96 +382,6 @@
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id="_updateIfNeeded"><span class="type-signature">(abstract, private) </span>_updateIfNeeded<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
Update the stimulus, if necessary.
Note: this is an abstract function, which should not be called.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_MinimalStim.js.html">core/MinimalStim.js</a>, <a href="core_MinimalStim.js.html#line206">line 206</a>
</li></ul></dd>
</dl>
@ -1179,7 +1089,7 @@ Note: this is an abstract function, which should not be called.
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:19 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -478,7 +478,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_Mouse.js.html">core/Mouse.js</a>, <a href="core_Mouse.js.html#line338">line 338</a>
<a href="core_Mouse.js.html">core/Mouse.js</a>, <a href="core_Mouse.js.html#line341">line 341</a>
</li></ul></dd>
@ -566,7 +566,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_Mouse.js.html">core/Mouse.js</a>, <a href="core_Mouse.js.html#line54">line 54</a>
<a href="core_Mouse.js.html">core/Mouse.js</a>, <a href="core_Mouse.js.html#line57">line 57</a>
</li></ul></dd>
@ -747,7 +747,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_Mouse.js.html">core/Mouse.js</a>, <a href="core_Mouse.js.html#line128">line 128</a>
<a href="core_Mouse.js.html">core/Mouse.js</a>, <a href="core_Mouse.js.html#line131">line 131</a>
</li></ul></dd>
@ -861,7 +861,7 @@ or getPos, in mouse/Window units.
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_Mouse.js.html">core/Mouse.js</a>, <a href="core_Mouse.js.html#line79">line 79</a>
<a href="core_Mouse.js.html">core/Mouse.js</a>, <a href="core_Mouse.js.html#line82">line 82</a>
</li></ul></dd>
@ -974,7 +974,7 @@ value that varies.</p>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_Mouse.js.html">core/Mouse.js</a>, <a href="core_Mouse.js.html#line104">line 104</a>
<a href="core_Mouse.js.html">core/Mouse.js</a>, <a href="core_Mouse.js.html#line107">line 107</a>
</li></ul></dd>
@ -1312,7 +1312,7 @@ value that varies.</p>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_Mouse.js.html">core/Mouse.js</a>, <a href="core_Mouse.js.html#line154">line 154</a>
<a href="core_Mouse.js.html">core/Mouse.js</a>, <a href="core_Mouse.js.html#line157">line 157</a>
</li></ul></dd>
@ -1555,7 +1555,7 @@ call to <a href="module-core.Mouse.html#getPos">getPos</a></li>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_Mouse.js.html">core/Mouse.js</a>, <a href="core_Mouse.js.html#line212">line 212</a>
<a href="core_Mouse.js.html">core/Mouse.js</a>, <a href="core_Mouse.js.html#line215">line 215</a>
</li></ul></dd>
@ -1665,7 +1665,7 @@ call to <a href="module-core.Mouse.html#getPos">getPos</a></li>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_Mouse.js.html">core/Mouse.js</a>, <a href="core_Mouse.js.html#line324">line 324</a>
<a href="core_Mouse.js.html">core/Mouse.js</a>, <a href="core_Mouse.js.html#line327">line 327</a>
</li></ul></dd>
@ -1739,7 +1739,7 @@ call to <a href="module-core.Mouse.html#getPos">getPos</a></li>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:19 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -251,7 +251,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_PsychoJS.js.html">core/PsychoJS.js</a>, <a href="core_PsychoJS.js.html#line117">line 117</a>
<a href="core_PsychoJS.js.html">core/PsychoJS.js</a>, <a href="core_PsychoJS.js.html#line31">line 31</a>
</li></ul></dd>
@ -545,7 +545,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_PsychoJS.js.html">core/PsychoJS.js</a>, <a href="core_PsychoJS.js.html#line714">line 714</a>
<a href="core_PsychoJS.js.html">core/PsychoJS.js</a>, <a href="core_PsychoJS.js.html#line734">line 734</a>
</li></ul></dd>
@ -687,7 +687,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_PsychoJS.js.html">core/PsychoJS.js</a>, <a href="core_PsychoJS.js.html#line666">line 666</a>
<a href="core_PsychoJS.js.html">core/PsychoJS.js</a>, <a href="core_PsychoJS.js.html#line686">line 686</a>
</li></ul></dd>
@ -847,7 +847,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_PsychoJS.js.html">core/PsychoJS.js</a>, <a href="core_PsychoJS.js.html#line544">line 544</a>
<a href="core_PsychoJS.js.html">core/PsychoJS.js</a>, <a href="core_PsychoJS.js.html#line555">line 555</a>
</li></ul></dd>
@ -937,95 +937,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_PsychoJS.js.html">core/PsychoJS.js</a>, <a href="core_PsychoJS.js.html#line631">line 631</a>
</li></ul></dd>
</dl>
<h4 class="name" id="_makeStatusTopLevel"><span class="type-signature">(private) </span>_makeStatusTopLevel<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
Make the various Status top level, in order to accommodate PsychoPy's Code Components.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_PsychoJS.js.html">core/PsychoJS.js</a>, <a href="core_PsychoJS.js.html#line692">line 692</a>
<a href="core_PsychoJS.js.html">core/PsychoJS.js</a>, <a href="core_PsychoJS.js.html#line651">line 651</a>
</li></ul></dd>
@ -1189,7 +1101,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_PsychoJS.js.html">core/PsychoJS.js</a>, <a href="core_PsychoJS.js.html#line409">line 409</a>
<a href="core_PsychoJS.js.html">core/PsychoJS.js</a>, <a href="core_PsychoJS.js.html#line417">line 417</a>
</li></ul></dd>
@ -1277,7 +1189,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_PsychoJS.js.html">core/PsychoJS.js</a>, <a href="core_PsychoJS.js.html#line176">line 176</a>
<a href="core_PsychoJS.js.html">core/PsychoJS.js</a>, <a href="core_PsychoJS.js.html#line184">line 184</a>
</li></ul></dd>
@ -1440,7 +1352,7 @@ the top level variable (e.g. window) as well.
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_PsychoJS.js.html">core/PsychoJS.js</a>, <a href="core_PsychoJS.js.html#line430">line 430</a>
<a href="core_PsychoJS.js.html">core/PsychoJS.js</a>, <a href="core_PsychoJS.js.html#line438">line 438</a>
</li></ul></dd>
@ -1807,7 +1719,7 @@ before flipping</td>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_PsychoJS.js.html">core/PsychoJS.js</a>, <a href="core_PsychoJS.js.html#line204">line 204</a>
<a href="core_PsychoJS.js.html">core/PsychoJS.js</a>, <a href="core_PsychoJS.js.html#line212">line 212</a>
</li></ul></dd>
@ -2083,7 +1995,7 @@ that he or she needs to wait for a bit.</p>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_PsychoJS.js.html">core/PsychoJS.js</a>, <a href="core_PsychoJS.js.html#line460">line 460</a>
<a href="core_PsychoJS.js.html">core/PsychoJS.js</a>, <a href="core_PsychoJS.js.html#line468">line 468</a>
</li></ul></dd>
@ -2233,7 +2145,7 @@ that he or she needs to wait for a bit.</p>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_PsychoJS.js.html">core/PsychoJS.js</a>, <a href="core_PsychoJS.js.html#line256">line 256</a>
<a href="core_PsychoJS.js.html">core/PsychoJS.js</a>, <a href="core_PsychoJS.js.html#line264">line 264</a>
</li></ul></dd>
@ -2416,7 +2328,7 @@ that he or she needs to wait for a bit.</p>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_PsychoJS.js.html">core/PsychoJS.js</a>, <a href="core_PsychoJS.js.html#line276">line 276</a>
<a href="core_PsychoJS.js.html">core/PsychoJS.js</a>, <a href="core_PsychoJS.js.html#line284">line 284</a>
</li></ul></dd>
@ -2576,7 +2488,7 @@ that he or she needs to wait for a bit.</p>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_PsychoJS.js.html">core/PsychoJS.js</a>, <a href="core_PsychoJS.js.html#line242">line 242</a>
<a href="core_PsychoJS.js.html">core/PsychoJS.js</a>, <a href="core_PsychoJS.js.html#line250">line 250</a>
</li></ul></dd>
@ -2913,7 +2825,7 @@ that he or she needs to wait for a bit.</p>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_PsychoJS.js.html">core/PsychoJS.js</a>, <a href="core_PsychoJS.js.html#line297">line 297</a>
<a href="core_PsychoJS.js.html">core/PsychoJS.js</a>, <a href="core_PsychoJS.js.html#line305">line 305</a>
</li></ul></dd>
@ -2965,7 +2877,7 @@ that he or she needs to wait for a bit.</p>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:19 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -438,7 +438,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="data_ExperimentHandler.js.html">data/ExperimentHandler.js</a>, <a href="data_ExperimentHandler.js.html#line425">line 425</a>
<a href="data_ExperimentHandler.js.html">data/ExperimentHandler.js</a>, <a href="data_ExperimentHandler.js.html#line420">line 420</a>
</li></ul></dd>
@ -532,184 +532,6 @@
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id="_downloadRegisteredResources"><span class="type-signature">(private) </span>_downloadRegisteredResources<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
Download the resources previously registered.
<p>Note: we use the <a href="https://www.createjs.com/preloadjs">preloadjs library</a>.</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_ServerManager.js.html">core/ServerManager.js</a>, <a href="core_ServerManager.js.html#line639">line 639</a>
</li></ul></dd>
</dl>
<h4 class="name" id="_listResources"><span class="type-signature">(private) </span>_listResources<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
List the resources available to the experiment.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_ServerManager.js.html">core/ServerManager.js</a>, <a href="core_ServerManager.js.html#line570">line 570</a>
</li></ul></dd>
</dl>
@ -2236,7 +2058,7 @@
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:19 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -503,605 +503,6 @@ before flipping</td>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id="_fullRefresh"><span class="type-signature">(private) </span>_fullRefresh<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
Force an update of all stimuli in this window's drawlist.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_Window.js.html">core/Window.js</a>, <a href="core_Window.js.html#line391">line 391</a>
</li></ul></dd>
</dl>
<h4 class="name" id="_refresh"><span class="type-signature">(private) </span>_refresh<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
Recompute this window's draw list and _container children for the next animation frame.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_Window.js.html">core/Window.js</a>, <a href="core_Window.js.html#line367">line 367</a>
</li></ul></dd>
</dl>
<h4 class="name" id="_resizePixiRenderer"><span class="type-signature">(private) </span>_resizePixiRenderer<span class="signature">(pjsWindow, event)</span><span class="type-signature"></span></h4>
<div class="description">
Adjust the size of the renderer and the position of the root container
in response to a change in the browser's size.
</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>pjsWindow</code></td>
<td class="type">
<span class="param-type"><a href="module-core.Window.html">module:core.Window</a></span>
</td>
<td class="description last">the PsychoJS Window</td>
</tr>
<tr>
<td class="name"><code>event</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="core_Window.js.html">core/Window.js</a>, <a href="core_Window.js.html#line460">line 460</a>
</li></ul></dd>
</dl>
<h4 class="name" id="_setupPixi"><span class="type-signature">(private) </span>_setupPixi<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
Setup PIXI.
<p>A new renderer is created and a container is added to it. The renderer's touch and mouse events
are handled by the <a href="EventManager.html">EventManager</a>.</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_Window.js.html">core/Window.js</a>, <a href="core_Window.js.html#line411">line 411</a>
</li></ul></dd>
</dl>
<h4 class="name" id="_updateIfNeeded"><span class="type-signature">(private) </span>_updateIfNeeded<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
Update this window, if need be.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_Window.js.html">core/Window.js</a>, <a href="core_Window.js.html#line343">line 343</a>
</li></ul></dd>
</dl>
<h4 class="name" id="_writeLogOnFlip"><span class="type-signature">(private) </span>_writeLogOnFlip<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
Send all logged messages to the Logger.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_Window.js.html">core/Window.js</a>, <a href="core_Window.js.html#line493">line 493</a>
</li></ul></dd>
</dl>
@ -1160,7 +561,7 @@ are handled by the <a href="EventManager.html">EventManager</a>.</p>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_Window.js.html">core/Window.js</a>, <a href="core_Window.js.html#line159">line 159</a>
<a href="core_Window.js.html">core/Window.js</a>, <a href="core_Window.js.html#line161">line 161</a>
</li></ul></dd>
@ -1343,7 +744,7 @@ Window.
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_Window.js.html">core/Window.js</a>, <a href="core_Window.js.html#line277">line 277</a>
<a href="core_Window.js.html">core/Window.js</a>, <a href="core_Window.js.html#line279">line 279</a>
</li></ul></dd>
@ -1433,7 +834,7 @@ Window.
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_Window.js.html">core/Window.js</a>, <a href="core_Window.js.html#line105">line 105</a>
<a href="core_Window.js.html">core/Window.js</a>, <a href="core_Window.js.html#line106">line 106</a>
</li></ul></dd>
@ -1521,95 +922,7 @@ Window.
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_Window.js.html">core/Window.js</a>, <a href="core_Window.js.html#line206">line 206</a>
</li></ul></dd>
</dl>
<h4 class="name" id="experimentEnded"><span class="type-signature"></span>experimentEnded<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
Setter for experimentEnded.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="data_ExperimentHandler.js.html">data/ExperimentHandler.js</a>, <a href="data_ExperimentHandler.js.html#line44">line 44</a>
<a href="core_Window.js.html">core/Window.js</a>, <a href="core_Window.js.html#line208">line 208</a>
</li></ul></dd>
@ -1733,7 +1046,7 @@ Window.
<h4 class="name" id="experimentHandler"><span class="type-signature"></span>experimentHandler<span class="signature">()</span><span class="type-signature"></span></h4>
<h4 class="name" id="experimentEnded"><span class="type-signature"></span>experimentEnded<span class="signature">()</span><span class="type-signature"></span></h4>
@ -1741,7 +1054,7 @@ Window.
<div class="description">
Setter for experimentHandler.
Setter for experimentEnded.
</div>
@ -1785,7 +1098,7 @@ Window.
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="data_TrialHandler.js.html">data/TrialHandler.js</a>, <a href="data_TrialHandler.js.html#line46">line 46</a>
<a href="data_ExperimentHandler.js.html">data/ExperimentHandler.js</a>, <a href="data_ExperimentHandler.js.html#line44">line 44</a>
</li></ul></dd>
@ -1903,6 +1216,94 @@ Window.
<h4 class="name" id="experimentHandler"><span class="type-signature"></span>experimentHandler<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
Setter for experimentHandler.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="data_TrialHandler.js.html">data/TrialHandler.js</a>, <a href="data_TrialHandler.js.html#line46">line 46</a>
</li></ul></dd>
</dl>
@ -1961,7 +1362,7 @@ Window.
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_Window.js.html">core/Window.js</a>, <a href="core_Window.js.html#line142">line 142</a>
<a href="core_Window.js.html">core/Window.js</a>, <a href="core_Window.js.html#line143">line 143</a>
</li></ul></dd>
@ -1970,13 +1371,6 @@ Window.
<dt class="tag-todo">To Do:</dt>
<dd class="tag-todo">
<ul>
<li>estimate the actual frame rate.</li>
</ul>
</dd>
</dl>
@ -1997,7 +1391,7 @@ Window.
<div class="param-desc">
always returns 60.0 at the moment
rAF based delta time based approximation, 60.0 by default
</div>
@ -2270,7 +1664,7 @@ Window.
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_Window.js.html">core/Window.js</a>, <a href="core_Window.js.html#line248">line 248</a>
<a href="core_Window.js.html">core/Window.js</a>, <a href="core_Window.js.html#line250">line 250</a>
</li></ul></dd>
@ -2446,7 +1840,7 @@ Window.
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_Window.js.html">core/Window.js</a>, <a href="core_Window.js.html#line295">line 295</a>
<a href="core_Window.js.html">core/Window.js</a>, <a href="core_Window.js.html#line297">line 297</a>
</li></ul></dd>
@ -2601,7 +1995,7 @@ Window.
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core_Window.js.html">core/Window.js</a>, <a href="core_Window.js.html#line271">line 271</a>
<a href="core_Window.js.html">core/Window.js</a>, <a href="core_Window.js.html#line273">line 273</a>
</li></ul></dd>
@ -2651,7 +2045,7 @@ Window.
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:19 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -823,7 +823,7 @@
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:19 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -120,7 +120,7 @@
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:19 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -409,7 +409,7 @@ staircases or loops within loops.</p>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="data_ExperimentHandler.js.html">data/ExperimentHandler.js</a>, <a href="data_ExperimentHandler.js.html#line360">line 360</a>
<a href="data_ExperimentHandler.js.html">data/ExperimentHandler.js</a>, <a href="data_ExperimentHandler.js.html#line355">line 355</a>
</li></ul></dd>
@ -572,7 +572,7 @@ considered part of the same entry until a call to nextEntry is made. </p>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="data_ExperimentHandler.js.html">data/ExperimentHandler.js</a>, <a href="data_ExperimentHandler.js.html#line151">line 151</a>
<a href="data_ExperimentHandler.js.html">data/ExperimentHandler.js</a>, <a href="data_ExperimentHandler.js.html#line146">line 146</a>
</li></ul></dd>
@ -712,7 +712,7 @@ considered part of the same entry until a call to nextEntry is made. </p>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="data_ExperimentHandler.js.html">data/ExperimentHandler.js</a>, <a href="data_ExperimentHandler.js.html#line114">line 114</a>
<a href="data_ExperimentHandler.js.html">data/ExperimentHandler.js</a>, <a href="data_ExperimentHandler.js.html#line109">line 109</a>
</li></ul></dd>
@ -961,7 +961,7 @@ will be associated with the next trial.
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="data_ExperimentHandler.js.html">data/ExperimentHandler.js</a>, <a href="data_ExperimentHandler.js.html#line180">line 180</a>
<a href="data_ExperimentHandler.js.html">data/ExperimentHandler.js</a>, <a href="data_ExperimentHandler.js.html#line175">line 175</a>
</li></ul></dd>
@ -1098,7 +1098,7 @@ will be associated with the next trial.
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="data_ExperimentHandler.js.html">data/ExperimentHandler.js</a>, <a href="data_ExperimentHandler.js.html#line133">line 133</a>
<a href="data_ExperimentHandler.js.html">data/ExperimentHandler.js</a>, <a href="data_ExperimentHandler.js.html#line128">line 128</a>
</li></ul></dd>
@ -1335,7 +1335,7 @@ will be associated with the next trial.
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="data_ExperimentHandler.js.html">data/ExperimentHandler.js</a>, <a href="data_ExperimentHandler.js.html#line244">line 244</a>
<a href="data_ExperimentHandler.js.html">data/ExperimentHandler.js</a>, <a href="data_ExperimentHandler.js.html#line239">line 239</a>
</li></ul></dd>
@ -1387,7 +1387,7 @@ will be associated with the next trial.
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:19 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -429,7 +429,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="data_TrialHandler.js.html">data/TrialHandler.js</a>, <a href="data_TrialHandler.js.html#line65">line 65</a>
<a href="data_TrialHandler.js.html">data/TrialHandler.js</a>, <a href="data_TrialHandler.js.html#line31">line 31</a>
</li></ul></dd>
@ -614,6 +614,29 @@
</tr>
<tr>
<td class="name"><code>FULLRANDOM</code></td>
<td class="type">
<span class="param-type">Symbol</span>
</td>
<td class="description last">Same as above, but named to reflect PsychoPy boileplate.</td>
</tr>
</tbody>
</table>
@ -649,7 +672,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="data_TrialHandler.js.html">data/TrialHandler.js</a>, <a href="data_TrialHandler.js.html#line643">line 643</a>
<a href="data_TrialHandler.js.html">data/TrialHandler.js</a>, <a href="data_TrialHandler.js.html#line671">line 671</a>
</li></ul></dd>
@ -711,7 +734,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="data_TrialHandler.js.html">data/TrialHandler.js</a>, <a href="data_TrialHandler.js.html#line249">line 249</a>
<a href="data_TrialHandler.js.html">data/TrialHandler.js</a>, <a href="data_TrialHandler.js.html#line255">line 255</a>
</li></ul></dd>
@ -954,7 +977,7 @@ It can be a single integer, an array of indices, or a string to be parsed, e.g.:
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="data_TrialHandler.js.html">data/TrialHandler.js</a>, <a href="data_TrialHandler.js.html#line422">line 422</a>
<a href="data_TrialHandler.js.html">data/TrialHandler.js</a>, <a href="data_TrialHandler.js.html#line428">line 428</a>
</li></ul></dd>
@ -1145,7 +1168,7 @@ It can be a single integer, an array of indices, or a string to be parsed, e.g.:
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="data_TrialHandler.js.html">data/TrialHandler.js</a>, <a href="data_TrialHandler.js.html#line506">line 506</a>
<a href="data_TrialHandler.js.html">data/TrialHandler.js</a>, <a href="data_TrialHandler.js.html#line534">line 534</a>
</li></ul></dd>
@ -1305,7 +1328,7 @@ It can be a single integer, an array of indices, or a string to be parsed, e.g.:
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="data_TrialHandler.js.html">data/TrialHandler.js</a>, <a href="data_TrialHandler.js.html#line378">line 378</a>
<a href="data_TrialHandler.js.html">data/TrialHandler.js</a>, <a href="data_TrialHandler.js.html#line384">line 384</a>
</li></ul></dd>
@ -1437,7 +1460,7 @@ It can be a single integer, an array of indices, or a string to be parsed, e.g.:
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="data_TrialHandler.js.html">data/TrialHandler.js</a>, <a href="data_TrialHandler.js.html#line178">line 178</a>
<a href="data_TrialHandler.js.html">data/TrialHandler.js</a>, <a href="data_TrialHandler.js.html#line184">line 184</a>
</li></ul></dd>
@ -1528,7 +1551,7 @@ and consequently consider only the attributes of the first trial.</p>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="data_TrialHandler.js.html">data/TrialHandler.js</a>, <a href="data_TrialHandler.js.html#line292">line 292</a>
<a href="data_TrialHandler.js.html">data/TrialHandler.js</a>, <a href="data_TrialHandler.js.html#line298">line 298</a>
</li></ul></dd>
@ -1638,7 +1661,7 @@ and consequently consider only the attributes of the first trial.</p>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="data_TrialHandler.js.html">data/TrialHandler.js</a>, <a href="data_TrialHandler.js.html#line315">line 315</a>
<a href="data_TrialHandler.js.html">data/TrialHandler.js</a>, <a href="data_TrialHandler.js.html#line321">line 321</a>
</li></ul></dd>
@ -1818,7 +1841,7 @@ and consequently consider only the attributes of the first trial.</p>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="data_TrialHandler.js.html">data/TrialHandler.js</a>, <a href="data_TrialHandler.js.html#line365">line 365</a>
<a href="data_TrialHandler.js.html">data/TrialHandler.js</a>, <a href="data_TrialHandler.js.html#line371">line 371</a>
</li></ul></dd>
@ -2000,7 +2023,7 @@ and consequently consider only the attributes of the first trial.</p>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="data_TrialHandler.js.html">data/TrialHandler.js</a>, <a href="data_TrialHandler.js.html#line346">line 346</a>
<a href="data_TrialHandler.js.html">data/TrialHandler.js</a>, <a href="data_TrialHandler.js.html#line352">line 352</a>
</li></ul></dd>
@ -2117,7 +2140,7 @@ number of trial remaining).
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="data_TrialHandler.js.html">data/TrialHandler.js</a>, <a href="data_TrialHandler.js.html#line218">line 218</a>
<a href="data_TrialHandler.js.html">data/TrialHandler.js</a>, <a href="data_TrialHandler.js.html#line224">line 224</a>
</li></ul></dd>
@ -2284,7 +2307,7 @@ number of trial remaining).
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="data_TrialHandler.js.html">data/TrialHandler.js</a>, <a href="data_TrialHandler.js.html#line327">line 327</a>
<a href="data_TrialHandler.js.html">data/TrialHandler.js</a>, <a href="data_TrialHandler.js.html#line333">line 333</a>
</li></ul></dd>
@ -2397,7 +2420,7 @@ number of trial remaining).
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="data_TrialHandler.js.html">data/TrialHandler.js</a>, <a href="data_TrialHandler.js.html#line266">line 266</a>
<a href="data_TrialHandler.js.html">data/TrialHandler.js</a>, <a href="data_TrialHandler.js.html#line272">line 272</a>
</li></ul></dd>
@ -2556,7 +2579,7 @@ number of trial remaining).
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="data_TrialHandler.js.html">data/TrialHandler.js</a>, <a href="data_TrialHandler.js.html#line277">line 277</a>
<a href="data_TrialHandler.js.html">data/TrialHandler.js</a>, <a href="data_TrialHandler.js.html#line283">line 283</a>
</li></ul></dd>
@ -2646,7 +2669,7 @@ number of trial remaining).
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="data_TrialHandler.js.html">data/TrialHandler.js</a>, <a href="data_TrialHandler.js.html#line127">line 127</a>
<a href="data_TrialHandler.js.html">data/TrialHandler.js</a>, <a href="data_TrialHandler.js.html#line133">line 133</a>
</li></ul></dd>
@ -2704,7 +2727,7 @@ for (const thisTrial of handler) { console.log(thisTrial); }</code></pre>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:19 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -381,7 +381,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="data_TrialHandler.js.html">data/TrialHandler.js</a>, <a href="data_TrialHandler.js.html#line195">line 195</a>
<a href="data_TrialHandler.js.html">data/TrialHandler.js</a>, <a href="data_TrialHandler.js.html#line201">line 201</a>
</li></ul></dd>
@ -417,7 +417,7 @@
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:19 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -605,7 +605,7 @@ Tone.js</p></div>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="sound_Sound.js.html">sound/Sound.js</a>, <a href="sound_Sound.js.html#line55">line 55</a>
<a href="sound_Sound.js.html">sound/Sound.js</a>, <a href="sound_Sound.js.html#line53">line 53</a>
</li></ul></dd>
@ -736,7 +736,7 @@ track.play(2);</code></pre>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="sound_Sound.js.html">sound/Sound.js</a>, <a href="sound_Sound.js.html#line191">line 191</a>
<a href="sound_Sound.js.html">sound/Sound.js</a>, <a href="sound_Sound.js.html#line200">line 200</a>
</li></ul></dd>
@ -875,7 +875,7 @@ track.play(2);</code></pre>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="sound_Sound.js.html">sound/Sound.js</a>, <a href="sound_Sound.js.html#line123">line 123</a>
<a href="sound_Sound.js.html">sound/Sound.js</a>, <a href="sound_Sound.js.html#line132">line 132</a>
</li></ul></dd>
@ -1092,7 +1092,7 @@ Repeat calls to play may results in the sounds being played on top of each other
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="sound_Sound.js.html">sound/Sound.js</a>, <a href="sound_Sound.js.html#line94">line 94</a>
<a href="sound_Sound.js.html">sound/Sound.js</a>, <a href="sound_Sound.js.html#line103">line 103</a>
</li></ul></dd>
@ -1288,7 +1288,7 @@ Repeat calls to play may results in the sounds being played on top of each other
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="sound_Sound.js.html">sound/Sound.js</a>, <a href="sound_Sound.js.html#line155">line 155</a>
<a href="sound_Sound.js.html">sound/Sound.js</a>, <a href="sound_Sound.js.html#line164">line 164</a>
</li></ul></dd>
@ -1443,7 +1443,7 @@ Repeat calls to play may results in the sounds being played on top of each other
</td>
<td class="description last">whether of not to log</td>
<td class="description last">whether or not to log</td>
</tr>
@ -1484,7 +1484,7 @@ Repeat calls to play may results in the sounds being played on top of each other
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="sound_Sound.js.html">sound/Sound.js</a>, <a href="sound_Sound.js.html#line173">line 173</a>
<a href="sound_Sound.js.html">sound/Sound.js</a>, <a href="sound_Sound.js.html#line182">line 182</a>
</li></ul></dd>
@ -1715,7 +1715,7 @@ Repeat calls to play may results in the sounds being played on top of each other
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="sound_Sound.js.html">sound/Sound.js</a>, <a href="sound_Sound.js.html#line137">line 137</a>
<a href="sound_Sound.js.html">sound/Sound.js</a>, <a href="sound_Sound.js.html#line146">line 146</a>
</li></ul></dd>
@ -1921,7 +1921,7 @@ Repeat calls to play may results in the sounds being played on top of each other
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="sound_Sound.js.html">sound/Sound.js</a>, <a href="sound_Sound.js.html#line108">line 108</a>
<a href="sound_Sound.js.html">sound/Sound.js</a>, <a href="sound_Sound.js.html#line117">line 117</a>
</li></ul></dd>
@ -1973,7 +1973,7 @@ Repeat calls to play may results in the sounds being played on top of each other
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:19 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -1039,7 +1039,7 @@
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:20 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -489,7 +489,7 @@ we throw an exception.</p>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="sound_TonePlayer.js.html">sound/TonePlayer.js</a>, <a href="sound_TonePlayer.js.html#line285">line 285</a>
<a href="sound_TonePlayer.js.html">sound/TonePlayer.js</a>, <a href="sound_TonePlayer.js.html#line290">line 290</a>
</li></ul></dd>
@ -629,7 +629,7 @@ we throw an exception.</p>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="sound_TonePlayer.js.html">sound/TonePlayer.js</a>, <a href="sound_TonePlayer.js.html#line55">line 55</a>
<a href="sound_TonePlayer.js.html">sound/TonePlayer.js</a>, <a href="sound_TonePlayer.js.html#line60">line 60</a>
</li></ul></dd>
@ -742,7 +742,7 @@ we throw an exception.</p>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="sound_TonePlayer.js.html">sound/TonePlayer.js</a>, <a href="sound_TonePlayer.js.html#line113">line 113</a>
<a href="sound_TonePlayer.js.html">sound/TonePlayer.js</a>, <a href="sound_TonePlayer.js.html#line118">line 118</a>
</li></ul></dd>
@ -913,7 +913,7 @@ we throw an exception.</p>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="sound_TonePlayer.js.html">sound/TonePlayer.js</a>, <a href="sound_TonePlayer.js.html#line188">line 188</a>
<a href="sound_TonePlayer.js.html">sound/TonePlayer.js</a>, <a href="sound_TonePlayer.js.html#line193">line 193</a>
</li></ul></dd>
@ -999,7 +999,7 @@ we throw an exception.</p>
<td class="type">
<span class="param-type">Integer</span>
<span class="param-type">number</span>
@ -1009,7 +1009,7 @@ we throw an exception.</p>
<td class="description last">dthe uration of the tone (in seconds) If duration_s == -1, the sound will play indefinitely.</td>
<td class="description last">the duration of the tone (in seconds) If duration_s == -1, the sound will play indefinitely.</td>
</tr>
@ -1050,7 +1050,7 @@ we throw an exception.</p>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="sound_TonePlayer.js.html">sound/TonePlayer.js</a>, <a href="sound_TonePlayer.js.html#line127">line 127</a>
<a href="sound_TonePlayer.js.html">sound/TonePlayer.js</a>, <a href="sound_TonePlayer.js.html#line132">line 132</a>
</li></ul></dd>
@ -1187,7 +1187,7 @@ we throw an exception.</p>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="sound_TonePlayer.js.html">sound/TonePlayer.js</a>, <a href="sound_TonePlayer.js.html#line141">line 141</a>
<a href="sound_TonePlayer.js.html">sound/TonePlayer.js</a>, <a href="sound_TonePlayer.js.html#line146">line 146</a>
</li></ul></dd>
@ -1379,7 +1379,7 @@ we throw an exception.</p>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="sound_TonePlayer.js.html">sound/TonePlayer.js</a>, <a href="sound_TonePlayer.js.html#line155">line 155</a>
<a href="sound_TonePlayer.js.html">sound/TonePlayer.js</a>, <a href="sound_TonePlayer.js.html#line160">line 160</a>
</li></ul></dd>
@ -1467,7 +1467,7 @@ we throw an exception.</p>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="sound_TonePlayer.js.html">sound/TonePlayer.js</a>, <a href="sound_TonePlayer.js.html#line257">line 257</a>
<a href="sound_TonePlayer.js.html">sound/TonePlayer.js</a>, <a href="sound_TonePlayer.js.html#line262">line 262</a>
</li></ul></dd>
@ -1519,7 +1519,7 @@ we throw an exception.</p>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:20 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -611,7 +611,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="sound_TrackPlayer.js.html">sound/TrackPlayer.js</a>, <a href="sound_TrackPlayer.js.html#line50">line 50</a>
<a href="sound_TrackPlayer.js.html">sound/TrackPlayer.js</a>, <a href="sound_TrackPlayer.js.html#line55">line 55</a>
</li></ul></dd>
@ -724,7 +724,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="sound_TrackPlayer.js.html">sound/TrackPlayer.js</a>, <a href="sound_TrackPlayer.js.html#line87">line 87</a>
<a href="sound_TrackPlayer.js.html">sound/TrackPlayer.js</a>, <a href="sound_TrackPlayer.js.html#line92">line 92</a>
</li></ul></dd>
@ -883,7 +883,144 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="sound_TrackPlayer.js.html">sound/TrackPlayer.js</a>, <a href="sound_TrackPlayer.js.html#line143">line 143</a>
<a href="sound_TrackPlayer.js.html">sound/TrackPlayer.js</a>, <a href="sound_TrackPlayer.js.html#line166">line 166</a>
</li></ul></dd>
</dl>
<h4 class="name" id="setDuration"><span class="type-signature"></span>setDuration<span class="signature">(duration_s)</span><span class="type-signature"></span></h4>
<div class="description">
Set the duration of the default sprite.
</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>duration_s</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last">the duration of the track in seconds</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="sound_TrackPlayer.js.html">sound/TrackPlayer.js</a>, <a href="sound_TrackPlayer.js.html#line106">line 106</a>
</li></ul></dd>
@ -1020,7 +1157,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="sound_TrackPlayer.js.html">sound/TrackPlayer.js</a>, <a href="sound_TrackPlayer.js.html#line119">line 119</a>
<a href="sound_TrackPlayer.js.html">sound/TrackPlayer.js</a>, <a href="sound_TrackPlayer.js.html#line142">line 142</a>
</li></ul></dd>
@ -1212,7 +1349,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="sound_TrackPlayer.js.html">sound/TrackPlayer.js</a>, <a href="sound_TrackPlayer.js.html#line101">line 101</a>
<a href="sound_TrackPlayer.js.html">sound/TrackPlayer.js</a>, <a href="sound_TrackPlayer.js.html#line124">line 124</a>
</li></ul></dd>
@ -1300,7 +1437,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="sound_TrackPlayer.js.html">sound/TrackPlayer.js</a>, <a href="sound_TrackPlayer.js.html#line182">line 182</a>
<a href="sound_TrackPlayer.js.html">sound/TrackPlayer.js</a>, <a href="sound_TrackPlayer.js.html#line205">line 205</a>
</li></ul></dd>
@ -1352,7 +1489,7 @@
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:20 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -96,7 +96,7 @@
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:19 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -486,7 +486,7 @@ smaller). As a consequence, getTime() may return a negative number.</p>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:20 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

File diff suppressed because it is too large Load Diff

View File

@ -242,7 +242,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="util_ColorMixin.js.html">util/ColorMixin.js</a>, <a href="util_ColorMixin.js.html#line62">line 62</a>
<a href="util_ColorMixin.js.html">util/ColorMixin.js</a>, <a href="util_ColorMixin.js.html#line64">line 64</a>
</li></ul></dd>
@ -626,7 +626,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="util_ColorMixin.js.html">util/ColorMixin.js</a>, <a href="util_ColorMixin.js.html#line45">line 45</a>
<a href="util_ColorMixin.js.html">util/ColorMixin.js</a>, <a href="util_ColorMixin.js.html#line46">line 46</a>
</li></ul></dd>
@ -678,7 +678,7 @@
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:20 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -658,7 +658,7 @@ to newTime</td>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:20 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -1000,7 +1000,7 @@ observable.emit("change", { a: 1 });</code></pre>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:20 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -221,7 +221,7 @@ class NewClass extends mix(BaseClass).with(Mixin1, Mixin2) { ... }</code></pre>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:20 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -209,82 +209,6 @@
<h3 class="subsection-title">Members</h3>
<h4 class="name" id="._referenceTime"><span class="type-signature">(private, static, readonly) </span>_referenceTime<span class="type-signature"> :number</span></h4>
<div class="description">
The clock's referenceTime is the time when the module was loaded (in seconds).
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">number</span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="util_Clock.js.html">util/Clock.js</a>, <a href="util_Clock.js.html#line88">line 88</a>
</li></ul></dd>
</dl>
<h3 class="subsection-title">Methods</h3>
@ -822,7 +746,7 @@
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:20 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -167,7 +167,7 @@ It is responsible for handling attributes.</p></div>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="util_PsychObject.js.html">util/PsychObject.js</a>, <a href="util_PsychObject.js.html#line27">line 27</a>
<a href="util_PsychObject.js.html">util/PsychObject.js</a>, <a href="util_PsychObject.js.html#line25">line 25</a>
</li></ul></dd>
@ -532,197 +532,7 @@ It is responsible for handling attributes.</p></div>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="util_PsychObject.js.html">util/PsychObject.js</a>, <a href="util_PsychObject.js.html#line376">line 376</a>
</li></ul></dd>
</dl>
<h4 class="name" id="_addAttributes"><span class="type-signature">(protected) </span>_addAttributes<span class="signature">(cls, &hellip;args<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
<div class="description">
Add attributes to this instance (e.g. define setters and getters) and affect values to them.
<p>Notes:
<ul>
<li> If the object already has a set<attributeName> method, we do not redefine it,
and the setter for this attribute calls that method instead of _setAttribute.</li>
<li> _addAttributes is typically called in the constructor of an object, after
the call to super (see module:visual.ImageStim for an illustration).</li>
</ul></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>cls</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="attributes">
</td>
<td class="description last">the class object of the subclass of PsychoObject whose attributes we will set</td>
</tr>
<tr>
<td class="name"><code>args</code></td>
<td class="type">
<span class="param-type">*</span>
</td>
<td class="attributes">
&lt;optional><br>
&lt;repeatable><br>
</td>
<td class="description last">the values for the attributes (this also determines which attributes will be set)</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="util_PsychObject.js.html">util/PsychObject.js</a>, <a href="util_PsychObject.js.html#line342">line 342</a>
<a href="util_PsychObject.js.html">util/PsychObject.js</a>, <a href="util_PsychObject.js.html#line355">line 355</a>
</li></ul></dd>
@ -1212,7 +1022,7 @@ was not previously set)
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:20 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -212,68 +212,6 @@ task would be by calling <a href="module-util.Scheduler.html#add">scheduler.add(
<h4 class="name" id="_runNextTasks"><span class="type-signature">(private) </span>_runNextTasks<span class="type-signature"></span></h4>
<div class="description">
Run the next scheduled tasks, in sequence, until a rendering of the scene is requested.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="util_Scheduler.js.html">util/Scheduler.js</a>, <a href="util_Scheduler.js.html#line185">line 185</a>
</li></ul></dd>
</dl>
<h4 class="name" id="add"><span class="type-signature"></span>add<span class="type-signature"></span></h4>
@ -454,7 +392,7 @@ task would be by calling <a href="module-util.Scheduler.html#add">scheduler.add(
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="util_Scheduler.js.html">util/Scheduler.js</a>, <a href="util_Scheduler.js.html#line265">line 265</a>
<a href="util_Scheduler.js.html">util/Scheduler.js</a>, <a href="util_Scheduler.js.html#line271">line 271</a>
</li></ul></dd>
@ -536,78 +474,6 @@ task would be by calling <a href="module-util.Scheduler.html#add">scheduler.add(
<h4 class="name" id="Status"><span class="type-signature">(readonly) </span>Status<span class="type-signature"> :Symbol</span></h4>
<div class="description">
Status.
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">Symbol</span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="util_Scheduler.js.html">util/Scheduler.js</a>, <a href="util_Scheduler.js.html#line296">line 296</a>
</li></ul></dd>
</dl>
<h4 class="name" id="status"><span class="type-signature"></span>status<span class="type-signature"></span></h4>
@ -670,6 +536,78 @@ task would be by calling <a href="module-util.Scheduler.html#add">scheduler.add(
<h4 class="name" id="Status"><span class="type-signature">(readonly) </span>Status<span class="type-signature"> :Symbol</span></h4>
<div class="description">
Status.
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">Symbol</span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="util_Scheduler.js.html">util/Scheduler.js</a>, <a href="util_Scheduler.js.html#line302">line 302</a>
</li></ul></dd>
</dl>
<h4 class="name" id="stop"><span class="type-signature"></span>stop<span class="type-signature"></span></h4>
@ -714,7 +652,7 @@ task would be by calling <a href="module-util.Scheduler.html#add">scheduler.add(
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="util_Scheduler.js.html">util/Scheduler.js</a>, <a href="util_Scheduler.js.html#line171">line 171</a>
<a href="util_Scheduler.js.html">util/Scheduler.js</a>, <a href="util_Scheduler.js.html#line177">line 177</a>
</li></ul></dd>
@ -1013,7 +951,7 @@ task would be by calling <a href="module-util.Scheduler.html#add">scheduler.add(
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:20 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -203,7 +203,7 @@ since those are reserved for client/server communication</p>
<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#line767">line 767</a>
<a href="util_Util.js.html">util/Util.js</a>, <a href="util_Util.js.html#line777">line 777</a>
</li></ul></dd>
@ -454,7 +454,7 @@ https://stackoverflow.com/a/9851769</p>
<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#line862">line 862</a>
<a href="util_Util.js.html">util/Util.js</a>, <a href="util_Util.js.html#line873">line 873</a>
</li></ul></dd>
@ -746,7 +746,7 @@ https://stackoverflow.com/a/9851769</p>
<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#line345">line 345</a>
<a href="util_Util.js.html">util/Util.js</a>, <a href="util_Util.js.html#line355">line 355</a>
</li></ul></dd>
@ -936,7 +936,7 @@ https://stackoverflow.com/a/9851769</p>
<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#line687">line 687</a>
<a href="util_Util.js.html">util/Util.js</a>, <a href="util_Util.js.html#line697">line 697</a>
</li></ul></dd>
@ -1024,7 +1024,7 @@ https://stackoverflow.com/a/9851769</p>
<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#line740">line 740</a>
<a href="util_Util.js.html">util/Util.js</a>, <a href="util_Util.js.html#line750">line 750</a>
</li></ul></dd>
@ -1350,7 +1350,7 @@ for (const [key, value] of urlParameters)
<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#line718">line 718</a>
<a href="util_Util.js.html">util/Util.js</a>, <a href="util_Util.js.html#line728">line 728</a>
</li></ul></dd>
@ -1533,7 +1533,7 @@ for (const [key, value] of urlParameters)
<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#line291">line 291</a>
<a href="util_Util.js.html">util/Util.js</a>, <a href="util_Util.js.html#line301">line 301</a>
</li></ul></dd>
@ -1849,7 +1849,7 @@ for (const [key, value] of urlParameters)
<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#line931">line 931</a>
<a href="util_Util.js.html">util/Util.js</a>, <a href="util_Util.js.html#line942">line 942</a>
</li></ul></dd>
@ -2201,7 +2201,7 @@ where error is null if there was no error
<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#line960">line 960</a>
<a href="util_Util.js.html">util/Util.js</a>, <a href="util_Util.js.html#line1022">line 1022</a>
</li></ul></dd>
@ -2385,7 +2385,7 @@ This is the Crib Sheet provided solution, but please note that as of 2020 the mo
<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#line994">line 994</a>
<a href="util_Util.js.html">util/Util.js</a>, <a href="util_Util.js.html#line1056">line 1056</a>
</li></ul></dd>
@ -2590,7 +2590,7 @@ This is the Crib Sheet provided solution, but please note that as of 2020 the mo
<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#line797">line 797</a>
<a href="util_Util.js.html">util/Util.js</a>, <a href="util_Util.js.html#line807">line 807</a>
</li></ul></dd>
@ -2753,7 +2753,7 @@ This is the Crib Sheet provided solution, but please note that as of 2020 the mo
<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#line323">line 323</a>
<a href="util_Util.js.html">util/Util.js</a>, <a href="util_Util.js.html#line333">line 333</a>
</li></ul></dd>
@ -3045,7 +3045,7 @@ This is the Crib Sheet provided solution, but please note that as of 2020 the mo
<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#line884">line 884</a>
<a href="util_Util.js.html">util/Util.js</a>, <a href="util_Util.js.html#line895">line 895</a>
</li></ul></dd>
@ -3204,7 +3204,7 @@ This is the Crib Sheet provided solution, but please note that as of 2020 the mo
<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#line1012">line 1012</a>
<a href="util_Util.js.html">util/Util.js</a>, <a href="util_Util.js.html#line1074">line 1074</a>
</li></ul></dd>
@ -3409,7 +3409,7 @@ This is the Crib Sheet provided solution, but please note that as of 2020 the mo
<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#line473">line 473</a>
<a href="util_Util.js.html">util/Util.js</a>, <a href="util_Util.js.html#line483">line 483</a>
</li></ul></dd>
@ -3614,7 +3614,7 @@ This is the Crib Sheet provided solution, but please note that as of 2020 the mo
<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#line440">line 440</a>
<a href="util_Util.js.html">util/Util.js</a>, <a href="util_Util.js.html#line450">line 450</a>
</li></ul></dd>
@ -3898,7 +3898,7 @@ This is the Crib Sheet provided solution, but please note that as of 2020 the mo
<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#line589">line 589</a>
<a href="util_Util.js.html">util/Util.js</a>, <a href="util_Util.js.html#line599">line 599</a>
</li></ul></dd>
@ -4182,7 +4182,7 @@ This is the Crib Sheet provided solution, but please note that as of 2020 the mo
<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#line390">line 390</a>
<a href="util_Util.js.html">util/Util.js</a>, <a href="util_Util.js.html#line400">line 400</a>
</li></ul></dd>
@ -4410,7 +4410,7 @@ This is the Crib Sheet provided solution, but please note that as of 2020 the mo
<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#line549">line 549</a>
<a href="util_Util.js.html">util/Util.js</a>, <a href="util_Util.js.html#line559">line 559</a>
</li></ul></dd>
@ -4615,7 +4615,7 @@ This is the Crib Sheet provided solution, but please note that as of 2020 the mo
<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#line510">line 510</a>
<a href="util_Util.js.html">util/Util.js</a>, <a href="util_Util.js.html#line520">line 520</a>
</li></ul></dd>
@ -4945,7 +4945,7 @@ This is the Crib Sheet provided solution, but please note that as of 2020 the mo
<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#line615">line 615</a>
<a href="util_Util.js.html">util/Util.js</a>, <a href="util_Util.js.html#line625">line 625</a>
</li></ul></dd>
@ -5003,6 +5003,190 @@ This is the Crib Sheet provided solution, but please note that as of 2020 the mo
<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#line971">line 971</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>
@ -5019,7 +5203,7 @@ This is the Crib Sheet provided solution, but please note that as of 2020 the mo
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:20 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -1297,94 +1297,6 @@ depends on the Form units: 14 for 'pix', 0.03 otherwise</td>
<h4 class="name" id="_importItems"><span class="type-signature">(private) </span>_importItems<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
Import the form items from either a spreadsheet resource files (.csv, .xlsx, etc.) or from an array.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="visual_Form.js.html">visual/Form.js</a>, <a href="visual_Form.js.html#line425">line 425</a>
</li></ul></dd>
</dl>
@ -1605,446 +1517,6 @@ This is typically called in the constructor of a stimulus, when attributes are a
<h4 class="name" id="_processItems"><span class="type-signature">(private) </span>_processItems<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
Import and process the form items from either a spreadsheet resource files (.csv, .xlsx, etc.) or from an array.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="visual_Form.js.html">visual/Form.js</a>, <a href="visual_Form.js.html#line382">line 382</a>
</li></ul></dd>
</dl>
<h4 class="name" id="_sanitizeItems"><span class="type-signature">(private) </span>_sanitizeItems<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
Sanitize the form items: check that the keys are valid, and fill in default values.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="visual_Form.js.html">visual/Form.js</a>, <a href="visual_Form.js.html#line477">line 477</a>
</li></ul></dd>
</dl>
<h4 class="name" id="_setupStimuli"><span class="type-signature">(private) </span>_setupStimuli<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
Setup the stimuli, and the scrollbar.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="visual_Form.js.html">visual/Form.js</a>, <a href="visual_Form.js.html#line630">line 630</a>
</li></ul></dd>
</dl>
<h4 class="name" id="_updateDecorations"><span class="type-signature">(private) </span>_updateDecorations<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
Update the form decorations (bounding box, lines between items, etc.)
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="visual_Form.js.html">visual/Form.js</a>, <a href="visual_Form.js.html#line1006">line 1006</a>
</li></ul></dd>
</dl>
<h4 class="name" id="_updateVisibleStimuli"><span class="type-signature">(private) </span>_updateVisibleStimuli<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
Update the visible stimuli.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="visual_Form.js.html">visual/Form.js</a>, <a href="visual_Form.js.html#line950">line 950</a>
</li></ul></dd>
</dl>
@ -2726,7 +2198,7 @@ This is typically called in the constructor of a stimulus, when attributes are a
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:20 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -971,194 +971,6 @@
<h4 class="name" id="_getDisplaySize"><span class="type-signature">(private) </span>_getDisplaySize<span class="type-signature"></span></h4>
<div class="description">
Get the size of the display image, which is either that of the ImageStim or that of the image
it contains.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="visual_MovieStim.js.html">visual/MovieStim.js</a>, <a href="visual_MovieStim.js.html#line392">line 392</a>
</li></ul></dd>
</dl>
<h4 class="name" id="_getDisplaySize"><span class="type-signature">(private) </span>_getDisplaySize<span class="type-signature"></span></h4>
<div class="description">
Get the size of the display image, which is either that of the ImageStim or that of the image
it contains.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="visual_ImageStim.js.html">visual/ImageStim.js</a>, <a href="visual_ImageStim.js.html#line326">line 326</a>
</li></ul></dd>
</dl>
<h4 class="name" id="_updateIfNeeded"><span class="type-signature">(private) </span>_updateIfNeeded<span class="type-signature"></span></h4>
<div class="description">
Update the stimulus, if necessary.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="visual_ImageStim.js.html">visual/ImageStim.js</a>, <a href="visual_ImageStim.js.html#line237">line 237</a>
</li></ul></dd>
</dl>
<h4 class="name" id="setImage"><span class="type-signature"></span>setImage<span class="type-signature"></span></h4>
@ -1345,7 +1157,7 @@ it contains.
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="visual_MovieStim.js.html">visual/MovieStim.js</a>, <a href="visual_MovieStim.js.html#line290">line 290</a>
<a href="visual_ImageStim.js.html">visual/ImageStim.js</a>, <a href="visual_ImageStim.js.html#line211">line 211</a>
</li></ul></dd>
@ -1433,7 +1245,7 @@ it contains.
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="visual_ImageStim.js.html">visual/ImageStim.js</a>, <a href="visual_ImageStim.js.html#line211">line 211</a>
<a href="visual_MovieStim.js.html">visual/MovieStim.js</a>, <a href="visual_MovieStim.js.html#line312">line 312</a>
</li></ul></dd>
@ -1485,7 +1297,7 @@ it contains.
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:20 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -1010,68 +1010,6 @@
<h4 class="name" id="_updateIfNeeded"><span class="type-signature">(private) </span>_updateIfNeeded<span class="type-signature"></span></h4>
<div class="description">
Update the stimulus, if necessary.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="visual_MovieStim.js.html">visual/MovieStim.js</a>, <a href="visual_MovieStim.js.html#line316">line 316</a>
</li></ul></dd>
</dl>
<h4 class="name" id="setMovie"><span class="type-signature"></span>setMovie<span class="type-signature"></span></h4>
@ -1116,7 +1054,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="visual_MovieStim.js.html">visual/MovieStim.js</a>, <a href="visual_MovieStim.js.html#line135">line 135</a>
<a href="visual_MovieStim.js.html">visual/MovieStim.js</a>, <a href="visual_MovieStim.js.html#line141">line 141</a>
</li></ul></dd>
@ -1156,7 +1094,7 @@
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:20 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -881,68 +881,6 @@
<h4 class="name" id="_updateVertices"><span class="type-signature">(private) </span>_updateVertices<span class="type-signature"></span></h4>
<div class="description">
Update the vertices.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="visual_Polygon.js.html">visual/Polygon.js</a>, <a href="visual_Polygon.js.html#line125">line 125</a>
</li></ul></dd>
</dl>
<h4 class="name" id="setEdges"><span class="type-signature"></span>setEdges<span class="type-signature"></span></h4>
@ -1089,7 +1027,7 @@
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:20 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -887,68 +887,6 @@
<h4 class="name" id="_updateVertices"><span class="type-signature">(private) </span>_updateVertices<span class="type-signature"></span></h4>
<div class="description">
Update the vertices.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="visual_Rect.js.html">visual/Rect.js</a>, <a href="visual_Rect.js.html#line129">line 129</a>
</li></ul></dd>
</dl>
<h4 class="name" id="setHeight"><span class="type-signature"></span>setHeight<span class="type-signature"></span></h4>
@ -1095,7 +1033,7 @@
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:20 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -824,7 +824,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="visual_ShapeStim.js.html">visual/ShapeStim.js</a>, <a href="visual_ShapeStim.js.html#line46">line 46</a>
<a href="visual_ShapeStim.js.html">visual/ShapeStim.js</a>, <a href="visual_ShapeStim.js.html#line44">line 44</a>
</li></ul></dd>
@ -929,69 +929,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="visual_ShapeStim.js.html">visual/ShapeStim.js</a>, <a href="visual_ShapeStim.js.html#line358">line 358</a>
</li></ul></dd>
</dl>
<h4 class="name" id="_getPolygon"><span class="type-signature">(private) </span>_getPolygon<span class="type-signature"></span></h4>
<div class="description">
Get the PIXI polygon (in pixel units) corresponding to the vertices.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="visual_ShapeStim.js.html">visual/ShapeStim.js</a>, <a href="visual_ShapeStim.js.html#line281">line 281</a>
<a href="visual_ShapeStim.js.html">visual/ShapeStim.js</a>, <a href="visual_ShapeStim.js.html#line360">line 360</a>
</li></ul></dd>
@ -1053,69 +991,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="visual_ShapeStim.js.html">visual/ShapeStim.js</a>, <a href="visual_ShapeStim.js.html#line319">line 319</a>
</li></ul></dd>
</dl>
<h4 class="name" id="_updateIfNeeded"><span class="type-signature">(private) </span>_updateIfNeeded<span class="type-signature"></span></h4>
<div class="description">
Update the stimulus, if necessary.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="visual_ShapeStim.js.html">visual/ShapeStim.js</a>, <a href="visual_ShapeStim.js.html#line232">line 232</a>
<a href="visual_ShapeStim.js.html">visual/ShapeStim.js</a>, <a href="visual_ShapeStim.js.html#line321">line 321</a>
</li></ul></dd>
@ -1373,7 +1249,7 @@ This is overridden in order to provide a finer inclusion test.
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:20 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

File diff suppressed because it is too large Load Diff

View File

@ -703,6 +703,84 @@
<tr>
<td class="name"><code>multiline</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 a textarea is used</td>
</tr>
<tr>
<td class="name"><code>autofocus</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
true
</td>
<td class="description last">whether or not the first input should receive focus by default</td>
</tr>
<tr>
<td class="name"><code>flipHoriz</code></td>
@ -744,7 +822,7 @@
<tr>
<td class="name"><code>lipVert</code></td>
<td class="name"><code>flipVert</code></td>
<td class="type">
@ -1010,130 +1088,6 @@
<h4 class="name" id="_defaultLetterHeightMap"><span class="type-signature">(private, readonly) </span>_defaultLetterHeightMap<span class="type-signature"></span></h4>
<div class="description">
<p>This map associates units to default letter height.</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="visual_TextBox.js.html">visual/TextBox.js</a>, <a href="visual_TextBox.js.html#line418">line 418</a>
</li></ul></dd>
</dl>
<h4 class="name" id="_defaultSizeMap"><span class="type-signature">(private, readonly) </span>_defaultSizeMap<span class="type-signature"></span></h4>
<div class="description">
<p>This map associates units to default sizes.</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="visual_TextBox.js.html">visual/TextBox.js</a>, <a href="visual_TextBox.js.html#line438">line 438</a>
</li></ul></dd>
</dl>
<h4 class="name" id="_getDefaultLetterHeight"><span class="type-signature">(protected) </span>_getDefaultLetterHeight<span class="type-signature"></span></h4>
@ -1178,7 +1132,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="visual_TextBox.js.html">visual/TextBox.js</a>, <a href="visual_TextBox.js.html#line213">line 213</a>
<a href="visual_TextBox.js.html">visual/TextBox.js</a>, <a href="visual_TextBox.js.html#line264">line 264</a>
</li></ul></dd>
@ -1196,13 +1150,13 @@
<h4 class="name" id="_getTextInputOptions"><span class="type-signature">(private) </span>_getTextInputOptions<span class="type-signature"></span></h4>
<h4 class="name" id="getText"><span class="type-signature"></span>getText<span class="type-signature"></span></h4>
<div class="description">
Get the TextInput options applied to the PIXI.TextInput.
For accessing the underlying input value.
</div>
@ -1240,7 +1194,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="visual_TextBox.js.html">visual/TextBox.js</a>, <a href="visual_TextBox.js.html#line238">line 238</a>
<a href="visual_TextBox.js.html">visual/TextBox.js</a>, <a href="visual_TextBox.js.html#line202">line 202</a>
</li></ul></dd>
@ -1258,13 +1212,13 @@
<h4 class="name" id="_updateIfNeeded"><span class="type-signature">(private) </span>_updateIfNeeded<span class="type-signature"></span></h4>
<h4 class="name" id="reset"><span class="type-signature"></span>reset<span class="type-signature"></span></h4>
<div class="description">
Update the stimulus, if necessary.
Clears the current text value.
</div>
@ -1302,7 +1256,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="visual_TextBox.js.html">visual/TextBox.js</a>, <a href="visual_TextBox.js.html#line326">line 326</a>
<a href="visual_TextBox.js.html">visual/TextBox.js</a>, <a href="visual_TextBox.js.html#line172">line 172</a>
</li></ul></dd>
@ -1311,13 +1265,6 @@
<dt class="tag-todo">To Do:</dt>
<dd class="tag-todo">
<ul>
<li>take size into account</li>
</ul>
</dd>
</dl>
@ -1371,7 +1318,69 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="visual_TextBox.js.html">visual/TextBox.js</a>, <a href="visual_TextBox.js.html#line169">line 169</a>
<a href="visual_TextBox.js.html">visual/TextBox.js</a>, <a href="visual_TextBox.js.html#line220">line 220</a>
</li></ul></dd>
</dl>
<h4 class="name" id="setText"><span class="type-signature"></span>setText<span class="type-signature"></span></h4>
<div class="description">
For tweaking the underlying input value.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="visual_TextBox.js.html">visual/TextBox.js</a>, <a href="visual_TextBox.js.html#line184">line 184</a>
</li></ul></dd>
@ -1451,7 +1460,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="visual_TextBox.js.html">visual/TextBox.js</a>, <a href="visual_TextBox.js.html#line299">line 299</a>
<a href="visual_TextBox.js.html">visual/TextBox.js</a>, <a href="visual_TextBox.js.html#line354">line 354</a>
</li></ul></dd>
@ -1539,7 +1548,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="visual_TextBox.js.html">visual/TextBox.js</a>, <a href="visual_TextBox.js.html#line382">line 382</a>
<a href="visual_TextBox.js.html">visual/TextBox.js</a>, <a href="visual_TextBox.js.html#line448">line 448</a>
</li></ul></dd>
@ -1613,7 +1622,7 @@
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:20 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -689,7 +689,7 @@
<td class="default">
'left'
'center'
</td>
@ -1087,130 +1087,6 @@
<h4 class="name" id="_defaultLetterHeightMap"><span class="type-signature">(private, readonly) </span>_defaultLetterHeightMap<span class="type-signature"></span></h4>
<div class="description">
<p>This map associates units to default letter height.</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="visual_TextStim.js.html">visual/TextStim.js</a>, <a href="visual_TextStim.js.html#line385">line 385</a>
</li></ul></dd>
</dl>
<h4 class="name" id="_defaultLetterHeightMap"><span class="type-signature">(private, readonly) </span>_defaultLetterHeightMap<span class="type-signature"></span></h4>
<div class="description">
<p>This map associates units to default wrap width.</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="visual_TextStim.js.html">visual/TextStim.js</a>, <a href="visual_TextStim.js.html#line406">line 406</a>
</li></ul></dd>
</dl>
<h4 class="name" id="_getDefaultLetterHeight"><span class="type-signature">(protected) </span>_getDefaultLetterHeight<span class="type-signature"></span></h4>
@ -1335,68 +1211,6 @@
<h4 class="name" id="_getTextStyle"><span class="type-signature">(private) </span>_getTextStyle<span class="type-signature"></span></h4>
<div class="description">
Get the PIXI Text Style applied to the PIXI.Text
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="visual_TextStim.js.html">visual/TextStim.js</a>, <a href="visual_TextStim.js.html#line260">line 260</a>
</li></ul></dd>
</dl>
<h4 class="name" id="getTextMetrics"><span class="type-signature"></span>getTextMetrics<span class="type-signature"></span></h4>
@ -1554,204 +1368,6 @@ unlike getSize().
<h4 class="name" id="_getAnchor"><span class="type-signature">(private) </span>_getAnchor<span class="signature">()</span><span class="type-signature"> &rarr; {Array.&lt;number>}</span></h4>
<div class="description">
Convert the alignment attributes into an anchor.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="visual_TextStim.js.html">visual/TextStim.js</a>, <a href="visual_TextStim.js.html#line341">line 341</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
- the anchor
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Array.&lt;number></span>
</dd>
</dl>
<h4 class="name" id="_updateIfNeeded"><span class="type-signature">(private) </span>_updateIfNeeded<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
Update the stimulus, if necessary.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="visual_TextStim.js.html">visual/TextStim.js</a>, <a href="visual_TextStim.js.html#line282">line 282</a>
</li></ul></dd>
</dl>
@ -1774,7 +1390,7 @@ unlike getSize().
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:20 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -1414,7 +1414,7 @@ This is typically called in the constructor of a stimulus, when attributes are a
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:20 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -110,7 +110,7 @@
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:20 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -32,7 +32,7 @@
*
* @author Alain Pitiot
* @version 2020.2
* @copyright (c) 2018-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @copyright (c) 2017-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @license Distributed under the terms of the MIT License
*/
@ -100,7 +100,16 @@ export class Sound extends PsychObject
// the SoundPlayer, e.g. TonePlayer:
this._player = undefined;
this._addAttributes(Sound, win, value, octave, secs, startTime, stopTime, stereo, volume, loops, /*hamming,*/ autoLog);
this._addAttribute('win', win);
this._addAttribute('value', value);
this._addAttribute('octave', octave);
this._addAttribute('secs', secs);
this._addAttribute('startTime', startTime);
this._addAttribute('stopTime', stopTime);
this._addAttribute('stereo', stereo);
this._addAttribute('volume', volume);
this._addAttribute('loops', loops);
this._addAttribute('autoLog', autoLog);
// identify an appropriate player:
this._getPlayer();
@ -196,7 +205,7 @@ export class Sound extends PsychObject
*
* @public
* @param {number} [secs=0.5] - duration of the tone (in seconds) If secs == -1, the sound will play indefinitely.
* @param {boolean} [log=true] - whether of not to log
* @param {boolean} [log=true] - whether or not to log
*/
setSecs(secs = 0.5, log = true)
{
@ -257,7 +266,7 @@ export class Sound extends PsychObject
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:19 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -31,7 +31,7 @@
*
* @author Alain Pitiot
* @version 2020.2
* @copyright (c) 2018-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @copyright (c) 2017-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @license Distributed under the terms of the MIT License
*/
@ -203,7 +203,7 @@ export class SoundPlayer extends PsychObject
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:19 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -31,7 +31,7 @@
*
* @author Alain Pitiot
* @version 2020.2
* @copyright (c) 2018-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @copyright (c) 2017-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @license Distributed under the terms of the MIT License
*/
@ -65,7 +65,12 @@ export class TonePlayer extends SoundPlayer
{
super(psychoJS);
this._addAttributes(TonePlayer, note, duration_s, volume, loops, soundLibrary, autoLog);
this._addAttribute('note', note);
this._addAttribute('duration_s', duration_s);
this._addAttribute('volume', volume);
this._addAttribute('loops', loops);
this._addAttribute('soundLibrary', soundLibrary);
this._addAttribute('autoLog', autoLog);
// initialise the sound library:
this._initSoundLibrary();
@ -158,7 +163,7 @@ export class TonePlayer extends SoundPlayer
* @name module:sound.TonePlayer#setDuration
* @function
* @public
* @param {Integer} duration_s - dthe uration of the tone (in seconds) If duration_s == -1, the sound will play indefinitely.
* @param {number} duration_s - the duration of the tone (in seconds) If duration_s == -1, the sound will play indefinitely.
*/
setDuration(duration_s)
{
@ -367,8 +372,14 @@ export class TonePlayer extends SoundPlayer
this._synth.connect(this._volumeNode);
// connect the volume node to the master output:
this._volumeNode.toMaster();
if (typeof this._volumeNode.toDestination === 'function')
{
this._volumeNode.toDestination();
}
else
{
this._volumeNode.toMaster();
}
}
else
{
@ -417,7 +428,7 @@ TonePlayer.SoundLibrary = {
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:19 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -31,7 +31,7 @@
*
* @author Alain Pitiot
* @version 2020.2
* @copyright (c) 2018-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @copyright (c) 2017-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @license Distributed under the terms of the MIT License
*/
@ -69,7 +69,12 @@ export class TrackPlayer extends SoundPlayer
{
super(psychoJS);
this._addAttributes(TrackPlayer, howl, startTime, stopTime, stereo, loops, volume);
this._addAttribute('howl', howl);
this._addAttribute('startTime', startTime);
this._addAttribute('stopTime', stopTime);
this._addAttribute('stereo', stereo);
this._addAttribute('loops', loops);
this._addAttribute('volume', volume);
this._currentLoopIndex = -1;
}
@ -126,6 +131,24 @@ export class TrackPlayer extends SoundPlayer
}
/**
* Set the duration of the default sprite.
*
* @name module:sound.TrackPlayer#setDuration
* @function
* @public
* @param {number} duration_s - the duration of the track in seconds
*/
setDuration(duration_s)
{
if (typeof this._howl !== 'undefined')
{
// Unfortunately Howler.js provides duration setting method
this._howl._duration = duration_s;
}
}
/**
* Set the volume of the tone.
*
@ -237,7 +260,7 @@ export class TrackPlayer extends SoundPlayer
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:19 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -31,7 +31,7 @@
*
* @author Alain Pitiot
* @version 2020.2
* @copyright (c) 2018-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @copyright (c) 2017-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @license Distributed under the terms of the MIT License
*/
@ -266,7 +266,7 @@ export class CountdownTimer extends Clock
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:19 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -31,7 +31,7 @@
*
* @author Alain Pitiot
* @version 2020.2
* @copyright (c) 2018-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @copyright (c) 2017-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @license Distributed under the terms of the MIT License
*/
@ -590,7 +590,7 @@ Color.COLOR_SPACE = {
* Named colors.
*
* @name module:util.Color#NAMED_COLORS
* @enum {Symbol}
* @enum {string}
* @readonly
* @public
*/
@ -759,7 +759,7 @@ Color.NAMED_COLORS = {
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:19 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -31,7 +31,7 @@
*
* @author Alain Pitiot
* @version 2020.2
* @copyright (c) 2018-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @copyright (c) 2017-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @license Distributed under the terms of the MIT License
*/
@ -67,6 +67,7 @@ export let ColorMixin = (superclass) => class extends superclass
this._setAttribute('color', color, log);
this._needUpdate = true;
this._needPixiUpdate = true;
}
@ -84,6 +85,7 @@ export let ColorMixin = (superclass) => class extends superclass
this._setAttribute('contrast', contrast, log);
this._needUpdate = true;
this._needPixiUpdate = true;
}
@ -119,7 +121,7 @@ export let ColorMixin = (superclass) => class extends superclass
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:19 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -31,7 +31,7 @@
*
* @author Alain Pitiot
* @version 2020.2
* @copyright (c) 2018-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @copyright (c) 2017-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @license Distributed under the terms of the MIT License
*/
@ -199,7 +199,7 @@ export class EventEmitter
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:19 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -32,7 +32,7 @@
*
* @author Alain Pitiot
* @version 2020.2
* @copyright (c) 2018-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @copyright (c) 2017-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @license Distributed under the terms of the MIT License
*/
@ -347,48 +347,27 @@ export class PsychObject extends EventEmitter
const previousAttributeValue = this['_' + attributeName];
this['_' + attributeName] = attributeValue;
return (typeof previousAttributeValue !== 'undefined' &amp;&amp; attributeValue !== previousAttributeValue);
}
/**
* Add attributes to this instance (e.g. define setters and getters) and affect values to them.
*
* &lt;p>Notes:
* &lt;ul>
* &lt;li> If the object already has a set&lt;attributeName> method, we do not redefine it,
* and the setter for this attribute calls that method instead of _setAttribute.&lt;/li>
* &lt;li> _addAttributes is typically called in the constructor of an object, after
* the call to super (see module:visual.ImageStim for an illustration).&lt;/li>
* &lt;/ul>&lt;/p>
*
* @protected
* @param {Object} cls - the class object of the subclass of PsychoObject whose attributes we will set
* @param {...*} [args] - the values for the attributes (this also determines which attributes will be set)
*
*/
_addAttributes(cls, ...args)
{
// (*) look for the line in the subclass constructor where addAttributes is called
// and extract its arguments:
const callLine = cls.toString().match(/this.*\._addAttributes\(.*\;/)[0];
const startIndex = callLine.indexOf('._addAttributes(') + 16;
const endIndex = callLine.indexOf(');');
const callArgs = callLine.substr(startIndex, endIndex - startIndex).split(',').map((s) => s.trim());
// (*) add (argument name, argument value) pairs to the attribute map:
const attributeMap = new Map();
for (let i = 1; i &lt; callArgs.length; ++i)
// Things seem OK without this check except for 'vertices'
if (typeof previousAttributeValue === 'undefined')
{
attributeMap.set(callArgs[i], args[i - 1]);
// Not that any of the following lines should throw, but evaluating
// `this._vertices.map` on `ShapeStim._getVertices_px()` seems to
return false;
}
// (*) set the value, define the get/set&lt;attributeName> properties and define the getter and setter:
for (let [name, value] of attributeMap.entries())
{
this._addAttribute(name, value);
}
// Need check for equality differently for each type of attribute somehow,
// Lodash has an example of what an all encompassing solution looks like below,
// https://github.com/lodash/lodash/blob/master/.internal/baseIsEqualDeep.js
const prev = util.toString(previousAttributeValue);
const next = util.toString(attributeValue);
// The following check comes in handy when figuring out a `hasChanged` predicate
// in a `ShapeStim.setPos()` call for example. Objects that belong to us, such as
// colors, feature a `toString()` method of their own. The types of input that
// `Util.toString()` might try, but fail to stringify in a meaningful way are assigned
// an 'Object (circular)' string representation. For being opaque as to their raw
// value, those types of input are liable to produce PIXI updates.
return prev === 'Object (circular)' || next === 'Object (circular)' || prev !== next;
}
@ -472,7 +451,7 @@ export class PsychObject extends EventEmitter
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:19 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -31,7 +31,7 @@
*
* @author Alain Pitiot
* @version 2020.2
* @copyright (c) 2018-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @copyright (c) 2017-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @license Distributed under the terms of the MIT License
*/
@ -165,7 +165,7 @@ export class Scheduler
start()
{
const self = this;
let update = () =>
let update = (timestamp) =>
{
// stop the animation if need be:
if (self._stopAtNextUpdate)
@ -184,6 +184,12 @@ export class Scheduler
return;
}
// store frame delta for `Window.getActualFrameRate()`
const lastTimestamp = self._lastTimestamp === undefined ? timestamp : self._lastTimestamp;
self._lastDelta = timestamp - lastTimestamp;
self._lastTimestamp = timestamp;
// render the scene in the window:
self._psychoJS.window.render();
@ -356,7 +362,7 @@ Scheduler.Status = {
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:19 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -31,7 +31,7 @@
*
* @author Alain Pitiot
* @version 2020.2
* @copyright (c) 2018-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @copyright (c) 2017-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @license Distributed under the terms of the MIT License
*/
@ -287,30 +287,40 @@ export function toNumerical(obj)
return obj;
}
if (typeof obj === 'string')
const convertToNumber = (input) =>
{
obj = [obj];
}
const n = Number.parseFloat(input);
if (Number.isNaN(n))
{
throw `unable to convert ${input} to a number`;
}
return n;
};
if (Array.isArray(obj))
{
return obj.map(e =>
{
let n = Number.parseFloat(e);
if (Number.isNaN(n))
{
throw `unable to convert ${e} to a number`;
}
return n;
});
return obj.map(convertToNumber);
}
const arrayMaybe = turnSquareBracketsIntoArrays(obj);
if (Array.isArray(arrayMaybe))
{
return arrayMaybe.map(convertToNumber);
}
if (typeof obj === 'string')
{
return convertToNumber(obj);
}
throw 'unable to convert the object to a number';
}
catch (error)
{
// this._gui.dialog({ error: { ...response, error } });
this._gui.dialog({ error: Object.assign(response, { error }) });
throw Object.assign(response, { error });
}
}
@ -849,12 +859,13 @@ export function selectFromArray(array, selection)
// and return that entry:
if (isInt(selection))
{
return array[parseInt(selection)];
return [array[parseInt(selection)]];
}// if selection is an array, we treat it as a list of indices
// and return an array with the entries corresponding to those indices:
else if (Array.isArray(selection))
{
return array.filter((e, i) => (selection.includes(i)));
// Pick out `array` items matching indices contained in `selection` in order
return selection.map(i => array[i]);
}// if selection is a string, we decode it:
else if (typeof selection === 'string')
{
@ -985,6 +996,57 @@ export function offerDataForDownload(filename, data, type)
}
/**
* 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]".
*
* @name module:util.turnSquareBracketsIntoArrays
* @function
* @public
* @param {string} input - string potentially containing JSON arrays
* @param {string} max - how many matches to return, unwrap resulting array if less than two
* @returns {array} an array if arrays were found, undefined otherwise
*/
export function turnSquareBracketsIntoArrays(input, max = 1)
{
// Only interested in strings
// https://stackoverflow.com/questions/4059147
if (String(input) !== input)
{
return;
}
// Matches content within square brackets (using literal
// form is MDN's advice for patterns unlikely to change)
const matchesMaybe = input.match(/\[(.*?)\]/g);
// Exit if no array-like matches found
if (matchesMaybe === null)
{
return;
}
// Reformat content for each match
const matches = matchesMaybe.map((data) =>
{
return data
// Remove the square brackets
.replace(/[\[\]]+/g, '')
// Eat up space after comma
.split(/[, ]+/);
}
);
if (max &lt; 2)
{
return matches[0];
}
return matches;
}
/**
* 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.
*
@ -1076,7 +1138,7 @@ export function sum(inputMaybe = [])
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:19 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -31,7 +31,7 @@
*
* @author Alain Pitiot
* @version 2020.2
* @copyright (c) 2020 Ilixa Ltd. ({@link http://ilixa.com})
* @copyright (c) 2017-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @license Distributed under the terms of the MIT License
*/
@ -1175,7 +1175,7 @@ Form._defaultItems = {
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:19 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -31,7 +31,7 @@
*
* @author Alain Pitiot
* @version 2020.2
* @copyright (c) 2020 Ilixa Ltd. ({@link http://ilixa.com})
* @copyright (c) 2017-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @license Distributed under the terms of the MIT License
*/
@ -250,10 +250,10 @@ export class ImageStim extends util.mix(VisualStim).with(ColorMixin)
if (typeof size !== 'undefined')
{
this._boundingBox = new PIXI.Rectangle(
this._pos[0] - this._size[0] / 2,
this._pos[1] - this._size[1] / 2,
this._size[0],
this._size[1]
this._pos[0] - size[0] / 2,
this._pos[1] - size[1] / 2,
size[0],
size[1]
);
}
@ -283,7 +283,11 @@ export class ImageStim extends util.mix(VisualStim).with(ColorMixin)
if (typeof this._pixi !== 'undefined')
{
this._pixi.destroy(true);
this._pixi.destroy({
children: true,
texture: true,
baseTexture: false
});
}
this._pixi = undefined;
@ -293,14 +297,13 @@ export class ImageStim extends util.mix(VisualStim).with(ColorMixin)
return;
}
this._texture = new PIXI.Texture(new PIXI.BaseTexture(this._image));
this._pixi = new PIXI.Sprite(this._texture);
this._texture = PIXI.Texture.from(this._image);
this._pixi = PIXI.Sprite.from(this._texture);
// add a mask if need be:
if (typeof this._mask !== 'undefined')
{
this._maskTexture = new PIXI.Texture(new PIXI.BaseTexture(this._mask));
this._pixi.mask = new PIXI.Sprite(this._maskTexture);
this._pixi.mask = PIXI.Sprite.from(this._mask);
// a 0.5, 0.5 anchor is required for the mask to be aligned with the image
this._pixi.mask.anchor.x = 0.5;
@ -394,7 +397,7 @@ export class ImageStim extends util.mix(VisualStim).with(ColorMixin)
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:19 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -31,7 +31,7 @@
*
* @author Alain Pitiot
* @version 2020.2
* @copyright (c) 2018-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @copyright (c) 2017-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @license Distributed under the terms of the MIT License
*/
@ -75,7 +75,7 @@ import {PsychoJS} from "../core/PsychoJS";
*/
export class MovieStim extends VisualStim
{
constructor({name, win, movie, pos, units, ori, size, color, opacity, contrast, flipHoriz, flipVert, loop, volume, noAudio, autoPlay, autoDraw, autoLog} = {})
constructor({name, win, movie, pos, units, ori, size, color, opacity, contrast, interpolate, flipHoriz, flipVert, loop, volume, noAudio, autoPlay, autoDraw, autoLog} = {})
{
super({name, win, units, ori, opacity, pos, size, autoDraw, autoLog});
@ -143,6 +143,12 @@ export class MovieStim extends VisualStim
1.0,
this._onChange(false, false)
);
this._addAttribute(
'loop',
loop,
false,
this._onChange(false, false)
);
// estimate the bounding box:
@ -200,14 +206,17 @@ export class MovieStim extends VisualStim
this.psychoJS.logger.debug(`set the movie of MovieStim: ${this._name} as: src= ${movie.src}, size= ${movie.videoWidth}x${movie.videoHeight}, duration= ${movie.duration}s`);
}
this._setAttribute('movie', movie, log);
// change status of stimulus when movie finish playing:
this._movie.onended = () =>
// Make sure just one listener attached across instances
// https://stackoverflow.com/questions/11455515
if (!movie.onended)
{
this.status = PsychoJS.Status.FINISHED;
};
movie.onended = () =>
{
this.status = PsychoJS.Status.FINISHED;
};
}
this._setAttribute('movie', movie, log);
this._needUpdate = true;
this._needPixiUpdate = true;
}
@ -241,7 +250,20 @@ export class MovieStim extends VisualStim
play(log = false)
{
this.status = PsychoJS.Status.STARTED;
this._movie.play();
// As found on https://goo.gl/LdLk22
const playPromise = this._movie.play();
if (playPromise !== undefined)
{
playPromise.catch((error) => {
throw {
origin: 'MovieStim.play',
context: `when attempting to play MovieStim: ${this._name}`,
error
};
});
}
}
@ -329,10 +351,10 @@ export class MovieStim extends VisualStim
if (typeof size !== 'undefined')
{
this._boundingBox = new PIXI.Rectangle(
this._pos[0] - this._size[0] / 2,
this._pos[1] - this._size[1] / 2,
this._size[0],
this._size[1]
this._pos[0] - size[0] / 2,
this._pos[1] - size[1] / 2,
size[0],
size[1]
);
}
@ -362,7 +384,13 @@ export class MovieStim extends VisualStim
if (typeof this._pixi !== 'undefined')
{
this._pixi.destroy(true);
// Leave original video in place
// https://pixijs.download/dev/docs/PIXI.Sprite.html#destroy
this._pixi.destroy({
children: true,
texture: true,
baseTexture: false
});
}
this._pixi = undefined;
@ -373,7 +401,7 @@ export class MovieStim extends VisualStim
}
// create a PixiJS video sprite:
this._texture = PIXI.Texture.fromVideo(this._movie);
this._texture = PIXI.Texture.from(this._movie, { resourceOptions: { autoPlay: this.autoPlay } });
this._pixi = new PIXI.Sprite(this._texture);
// since _texture.width may not be immedialy available but the rest of the code needs its value
@ -390,8 +418,7 @@ export class MovieStim extends VisualStim
this._movie.muted = this._noAudio;
this._movie.volume = this._volume;
// autoplay and loop:
this._texture.baseTexture.autoPlay = this.autoPlay;
// loop:
this._movie.loop = this._loop;
// opacity:
@ -460,7 +487,7 @@ export class MovieStim extends VisualStim
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:19 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -31,7 +31,7 @@
*
* @author Alain Pitiot
* @version 2020.2
* @copyright (c) 2020 Ilixa Ltd. ({@link http://ilixa.com})
* @copyright (c) 2017-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @license Distributed under the terms of the MIT License
*/
@ -187,7 +187,7 @@ export class Polygon extends ShapeStim
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:19 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -31,7 +31,7 @@
*
* @author Alain Pitiot
* @version 2020.2
* @copyright (c) 2018-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @copyright (c) 2017-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @license Distributed under the terms of the MIT License
*/
@ -192,7 +192,7 @@ export class Rect extends ShapeStim
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:19 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -32,7 +32,7 @@
*
* @author Alain Pitiot
* @version 2020.2
* @copyright (c) 2018-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @copyright (c) 2017-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @license Distributed under the terms of the MIT License
*/
@ -290,7 +290,8 @@ export class ShapeStim extends util.mix(VisualStim).with(ColorMixin, WindowMixin
this._pixi.lineStyle(this._lineWidth, this._lineColor.int, this._opacity, 0.5);
if (typeof this._fillColor !== 'undefined' &amp;&amp; this._fillColor !== null)
{
this._pixi.beginFill(this._fillColor.int, this._opacity);
const contrastedColor = this.getContrastedColor(new Color(this._fillColor), this._contrast);
this._pixi.beginFill(contrastedColor.int, this._opacity);
}
this._pixi.drawPolygon(this._pixiPolygon_px);
if (typeof this._fillColor !== 'undefined' &amp;&amp; this._fillColor !== null)
@ -339,6 +340,7 @@ export class ShapeStim extends util.mix(VisualStim).with(ColorMixin, WindowMixin
// destroy the previous PIXI polygon and create a new one:
this._pixiPolygon_px = new PIXI.Polygon(coords_px);
this._pixiPolygon_px.closeStroke = this._closeShape;
return this._pixiPolygon_px;
}
@ -433,7 +435,7 @@ ShapeStim.KnownShapes = {
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:19 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -31,7 +31,7 @@
*
* @author Alain Pitiot
* @version 2020.2
* @copyright (c) 2018-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @copyright (c) 2017-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @license Distributed under the terms of the MIT License
*/
@ -89,16 +89,19 @@ import {PsychoJS} from "../core/PsychoJS";
* @todo check that parameters are valid, e.g. ticks are an array of numbers, etc.
* @todo readOnly
* @todo complete setters, for instance setTicks should change this._isCategorical
* @todo consider using a proper UI delegate architecture (a la Java Swing, for instance).
* @todo flesh out the skin approach
*/
export class Slider extends util.mix(VisualStim).with(ColorMixin, WindowMixin)
{
constructor({name, win, pos, size, ori, units, color, contrast, opacity, style, ticks, labels, labelHeight, granularity, flip, readOnly, font, bold, italic, fontSize, compact, clipMask, autoDraw, autoLog} = {})
constructor({name, win, pos, size, ori, units, color, contrast, opacity, style, ticks, labels, granularity, flip, readOnly, font, bold, italic, fontSize, compact, clipMask, autoDraw, autoLog} = {})
{
super({name, win, units, ori, opacity, pos, size, clipMask, autoDraw, autoLog});
this._needMarkerUpdate = false;
// slider skin:
this._skin = {};
Object.assign(this._skin, Slider.Skin);
// callback to deal with input sanitising:
const onChange = (withPixi = false, withBoundingBox = false, withSanitize = false) =>
@ -106,11 +109,12 @@ export class Slider extends util.mix(VisualStim).with(ColorMixin, WindowMixin)
const visualOnChange = this._onChange(withPixi, withBoundingBox);
return () =>
{
visualOnChange();
if (withSanitize)
{
this._sanitizeAttributes();
}
visualOnChange();
};
};
@ -124,7 +128,7 @@ export class Slider extends util.mix(VisualStim).with(ColorMixin, WindowMixin)
'ticks',
ticks,
[1, 2, 3, 4, 5],
onChange(true, false, true)
onChange(true, true, true)
);
this._addAttribute(
'labels',
@ -175,12 +179,6 @@ export class Slider extends util.mix(VisualStim).with(ColorMixin, WindowMixin)
false,
this._onChange(true, true)
);
this._addAttribute(
'labelHeight',
labelHeight,
undefined,
this._onChange(true, true)
);
this._addAttribute(
'flip',
flip,
@ -424,17 +422,16 @@ export class Slider extends util.mix(VisualStim).with(ColorMixin, WindowMixin)
this._fontSize_px = this._getLengthPix(this._fontSize);
this._barSize_px = util.to_px(this._barSize, this._units, this._win, true).map(v => Math.max(1, v));
this._markerSize_px = util.to_px(this._markerSize, this._units, this._win, true);
const tickPositions = this._ratingToPos(this._ticks);
this._tickPositions_px = tickPositions.map(p => util.to_px(p, this._units, this._win));
const pos_px = util.to_px(this._pos, this._units, this._win);
const size_px = util.to_px(this._size, this._units, this._win);
// calculate the position of the ticks:
const tickPositions = this._ratingToPos(this._ticks);
this._tickPositions_px = tickPositions.map(p => util.to_px(p, this._units, this._win));
// left, top, right, bottom limits:
const limits_px = [
Number.POSITIVE_INFINITY,
Number.POSITIVE_INFINITY,
Number.NEGATIVE_INFINITY,
Number.NEGATIVE_INFINITY
];
const limits_px = [0, 0, size_px[0], size_px[1]];
// Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY, Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY
// estimate the position of the labels:
this._labelPositions_px = new Array(this._labels.length);
@ -448,7 +445,7 @@ export class Slider extends util.mix(VisualStim).with(ColorMixin, WindowMixin)
{
const tickPositionIndex = Math.round( l / (this._labels.length - 1) * (this._ticks.length - 1) );
this._labelPositions_px[l] = this._tickPositions_px[tickPositionIndex];
const labelBounds = PIXI.TextMetrics.measureText(this._labels[l], labelTextStyle);
const labelBounds = PIXI.TextMetrics.measureText(this._labels[l].toString(), labelTextStyle);
// horizontal slider:
if (this._isHorizontal())
@ -526,11 +523,11 @@ export class Slider extends util.mix(VisualStim).with(ColorMixin, WindowMixin)
// TODO vertical
}
// calculate the bounding box:
const position = this._getPosition();
// calculate the bounding box, in the Slider's coordinates:
const position_px = this._getPosition_px();
this._boundingBox = new PIXI.Rectangle(
position[0] + this._getLengthUnits(limits_px[0]),
position[1] + this._getLengthUnits(limits_px[1]),
this._getLengthUnits(position_px.x + limits_px[0]),
this._getLengthUnits(position_px.y + limits_px[1]),
this._getLengthUnits(limits_px[2] - limits_px[0]),
this._getLengthUnits(limits_px[3] - limits_px[1])
);
@ -575,14 +572,14 @@ export class Slider extends util.mix(VisualStim).with(ColorMixin, WindowMixin)
*
* &lt;p>Setting the rating does also change the visible position of the marker.&lt;/p>
*
* @name module:visual.Slider#_recordRating
* @name module:visual.Slider#recordRating
* @function
* @private
* @public
* @param {number} rating - the rating
* @param {number} [responseTime] - the reaction time
* @param {boolean} [log= false] - whether of not to log
*/
_recordRating(rating, responseTime = undefined, log = false)
recordRating(rating, responseTime = undefined, log = false)
{
// get response time:
if (typeof responseTime === 'undefined')
@ -626,7 +623,7 @@ export class Slider extends util.mix(VisualStim).with(ColorMixin, WindowMixin)
this._pixi.scale.y = -1;
this._pixi.rotation = this._ori * Math.PI / 180;
this._pixi.position = this._getPosition();
this._pixi.position = this._getPosition_px();
this._pixi.alpha = this._opacity;
}
@ -635,10 +632,11 @@ export class Slider extends util.mix(VisualStim).with(ColorMixin, WindowMixin)
/**
* Estimate the position of the slider, taking the compactness into account.
*
* @return {number[]} - the position of the slider
* @name module:visual.Slider#_getPosition_px
* @return {number[]} - the position of the slider, in pixels
* @private
*/
_getPosition()
_getPosition_px()
{
const position = util.to_pixiPoint(this.pos, this.units, this.win, true);
if (this._compact &amp;&amp;
@ -659,7 +657,7 @@ export class Slider extends util.mix(VisualStim).with(ColorMixin, WindowMixin)
/**
/**
* Update the position of the marker if necessary.
*
* @name module:visual.Slider#_updateMarker
@ -731,6 +729,26 @@ export class Slider extends util.mix(VisualStim).with(ColorMixin, WindowMixin)
this._pixi.addChild(this._body);
// ensure that pointer events will be captured along the slider body, even outside of
// marker and labels:
if (this._tickType === Slider.Shape.DISC)
{
const maxTickSize_px = Math.max(this._tickSize_px[0], this._tickSize_px[1]);
this._body.hitArea = new PIXI.Rectangle(
-this._barSize_px[0] / 2 - maxTickSize_px,
-this._barSize_px[1] / 2 - maxTickSize_px,
this._barSize_px[0] + maxTickSize_px * 2,
this._barSize_px[1] + maxTickSize_px * 2);
}
else
{
this._body.hitArea = new PIXI.Rectangle(
-this._barSize_px[0] / 2 - this._tickSize_px[0] / 2,
-this._barSize_px[1] / 2 - this._tickSize_px[1] / 2,
this._barSize_px[0] + this._tickSize_px[0],
this._barSize_px[1] + this._tickSize_px[1]);
}
// central bar:
this._setupBar();
@ -786,6 +804,7 @@ export class Slider extends util.mix(VisualStim).with(ColorMixin, WindowMixin)
*/
_setupMarker()
{
/* this is now deprecated and replaced by _body.hitArea
// transparent rectangle necessary to capture pointer events outside of marker and labels:
const eventCaptureRectangle = new PIXI.Graphics();
eventCaptureRectangle.beginFill(0, 0);
@ -797,6 +816,7 @@ export class Slider extends util.mix(VisualStim).with(ColorMixin, WindowMixin)
);
eventCaptureRectangle.endFill();
this._pixi.addChild(eventCaptureRectangle);
*/
// marker:
this._marker = new PIXI.Graphics();
@ -893,7 +913,7 @@ export class Slider extends util.mix(VisualStim).with(ColorMixin, WindowMixin)
const mouseLocalPos_px = event.data.getLocalPosition(self._pixi);
const rating = self._posToRating([mouseLocalPos_px.x, mouseLocalPos_px.y]);
self._recordRating(rating);
self.recordRating(rating);
event.stopPropagation();
}
@ -906,7 +926,7 @@ export class Slider extends util.mix(VisualStim).with(ColorMixin, WindowMixin)
{
const mouseLocalPos_px = event.data.getLocalPosition(self._pixi);
const rating = self._posToRating([mouseLocalPos_px.x, mouseLocalPos_px.y]);
self._recordRating(rating);
self.recordRating(rating);
self._markerDragging = false;
@ -955,7 +975,7 @@ export class Slider extends util.mix(VisualStim).with(ColorMixin, WindowMixin)
{
const mouseLocalPos_px = event.data.getLocalPosition(self._body);
const rating = self._posToRating([mouseLocalPos_px.x, mouseLocalPos_px.y]);
self._recordRating(rating);
self.recordRating(rating);
event.stopPropagation();
};
@ -1060,6 +1080,9 @@ export class Slider extends util.mix(VisualStim).with(ColorMixin, WindowMixin)
*/
_setupStyle()
{
const isWhiteOnBlack = (this._style.indexOf(Slider.Style.WHITE_ON_BLACK) > -1);
const skin = (isWhiteOnBlack) ? this._skin.WHITE_ON_BLACK : this._skin.STANDARD;
// default style:
if (this._isHorizontal())
{
@ -1071,22 +1094,22 @@ export class Slider extends util.mix(VisualStim).with(ColorMixin, WindowMixin)
{
this._barSize = [0, this._size[1]];
this._tickSize = [this._size[0], 0];
this._labelAnchor = new PIXI.Point(0, 0); // 0, 0.5
this._labelAnchor = new PIXI.Point(0, 0);
}
this._barLineWidth_px = 1;
this._barLineColor = new Color(this._color); //new Color('lightgray');
this._barFillColor = undefined; //new Color('darkgray');
this._barLineColor = (!skin.BAR_LINE_COLOR) ? new Color(this._color) : skin.BAR_LINE_COLOR;
this._barFillColor = undefined;
this._tickType = Slider.Shape.LINE;
this._tickColor = new Color(this._color);
this._tickColor = (!skin.TICK_COLOR) ? new Color(this._color) : skin.TICK_COLOR;
// this._markerColor = this.getContrastedColor(this._color, 0.3);
this._markerColor = new Color('red');
this._markerColor = skin.MARKER_COLOR;
this._markerType = Slider.Shape.DISC;
this._markerSize = this._tickSize;
this._markerSize = (!this._skin.MARKER_SIZE) ? this._tickSize : this._skin.MARKER_SIZE;
this._labelColor = new Color(this._color);
this._labelColor = (!skin.LABEL_COLOR) ? new Color(this._color) : skin.LABEL_COLOR;
this._labelOri = 0;
@ -1101,30 +1124,36 @@ export class Slider extends util.mix(VisualStim).with(ColorMixin, WindowMixin)
if (this._style.indexOf(Slider.Style.TRIANGLE_MARKER) > -1)
{
this._markerType = Slider.Shape.TRIANGLE;
if (!this._skin.MARKER_SIZE)
{
this._markerSize = this._markerSize.map(s => s * 2);
}
}
// slider:
if (this._style.indexOf(Slider.Style.SLIDER) > -1)
{
this._markerType = Slider.Shape.BOX;
if (!this._skin.MARKER_SIZE)
{
this._markerSize = (this._isHorizontal()) ?
[this._size[0] / (this._ticks[1] - this._ticks[0]), this._size[1]] :
[this._size[0], this._size[1] / (this._ticks[1] - this._ticks[0])];
[this._size[0] / (this._ticks[this._ticks.length - 1] - this._ticks[0]), this._size[1]] :
[this._size[0], this._size[1] / (this._ticks[this._ticks.length - 1] - this._ticks[0])];
}
this._barSize = [this._size[0], this._size[1]];
this._barFillColor = this.getContrastedColor(new Color(this.color), 0.5);
}
/*
// whiteOnBlack:
if (this._style.indexOf(Slider.Style.WHITE_ON_BLACK) > -1)
if (isWhiteOnBlack)
{
this._barLineColor = new Color('black');
// this._barFillColor = new Color('black');
this._tickColor = new Color('black');
this._markerColor = new Color('white');
this._labelColor = new Color('black');
this._barLineColor = skin.BAR_LINE_COLOR;
this._tickColor = skin.TICK_COLOR;
this._markerColor = skin.MARKER_COLOR;
this._labelColor = skin.LABEL_COLOR;
}
*/
// labels45:
if (this._style.indexOf(Slider.Style.LABELS45) > -1)
@ -1146,9 +1175,12 @@ export class Slider extends util.mix(VisualStim).with(ColorMixin, WindowMixin)
this._barLineWidth_px = 0;
this._tickType = Slider.Shape.DISC;
if (!this._skin.MARKER_SIZE)
{
this._markerSize = this._markerSize.map(s => s * 0.7);
}
}
}
@ -1178,7 +1210,7 @@ export class Slider extends util.mix(VisualStim).with(ColorMixin, WindowMixin)
else if (this._style.indexOf(Slider.Style.SLIDER) > -1)
{
return ratings.map(v => [
(1.0 - ((v - this._ticks[0]) / range - 0.5)) * (this._size[0] - this._markerSize[0]),
((v - this._ticks[0]) / range - 0.5) * (this._size[0] - this._markerSize[0]),
0]);
}
else
@ -1223,11 +1255,13 @@ export class Slider extends util.mix(VisualStim).with(ColorMixin, WindowMixin)
{
const range = this._ticks[this._ticks.length - 1] - this._ticks[0];
const size_px = util.to_px(this._size, this._units, this._win);
const markerSize_px = util.to_px(this._markerSize, this._units, this._win);
if (this._isHorizontal())
{
if (this._style.indexOf(Slider.Style.SLIDER) > -1)
{
return (1.0 - (pos_px[0] / size_px[0] + 0.5)) * range;
return (pos_px[0] / (size_px[0] - markerSize_px[0]) + 0.5) * range + this._ticks[0];
}
else
{
@ -1238,8 +1272,7 @@ export class Slider extends util.mix(VisualStim).with(ColorMixin, WindowMixin)
{
if (this._style.indexOf(Slider.Style.SLIDER) > -1)
{
const markerSize_px = util.to_px(this._markerSize, this._units, this._win);
return (pos_px[1] / (size_px[1] - markerSize_px[1]) + 0.5) * range;
return (pos_px[1] / (size_px[1] - markerSize_px[1]) + 0.5) * range + this._ticks[0];
}
else
{
@ -1327,6 +1360,33 @@ Slider.Style = {
LABELS45: Symbol.for('LABELS45'),
RADIO: Symbol.for('RADIO')
};
/**
* Skin.
*
* @name module:visual.Slider#Skin
* @enum {any}
* @readonly
* @public
*
* @note a null value indicates that the value is calculated when the style is setup, rather than simply assigned.
*/
Slider.Skin = {
MARKER_SIZE: null,
STANDARD: {
MARKER_COLOR: new Color('red'),
BAR_LINE_COLOR: null,
TICK_COLOR: null,
LABEL_COLOR: null
},
WHITE_ON_BLACK: {
MARKER_COLOR: new Color('white'),
BAR_LINE_COLOR: new Color('black'),
TICK_COLOR: new Color('black'),
LABEL_COLOR: new Color('black')
}
};
</code></pre>
</article>
</section>
@ -1343,7 +1403,7 @@ Slider.Style = {
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:19 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -31,7 +31,7 @@
*
* @author Alain Pitiot
* @version 2020.2
* @copyright (c) 2020 Ilixa Ltd. ({@link http://ilixa.com})
* @copyright (c) 2017-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @license Distributed under the terms of the MIT License
*/
@ -66,15 +66,17 @@ import * as util from '../util/Util';
* @param {boolean} [options.italic= false] - whether or not the text is italic
* @param {string} [options.anchor = 'left'] - horizontal alignment
*
* @param {boolean} [options.multiline= false] - whether or not a textarea is used
* @param {boolean} [options.autofocus= true] - whether or not the first input should receive focus by default
* @param {boolean} [options.flipHoriz= false] - whether or not to flip the text horizontally
* @param {boolean} [options.lipVert= false] - whether or not to flip the text vertically
* @param {boolean} [options.flipVert= false] - whether or not to flip the text vertically
* @param {PIXI.Graphics} [options.clipMask= null] - the clip mask
* @param {boolean} [options.autoDraw= false] - whether or not the stimulus should be automatically drawn on every frame flip
* @param {boolean} [options.autoLog= false] - whether or not to log
*/
export class TextBox extends util.mix(VisualStim).with(ColorMixin)
{
constructor({name, win, pos, anchor, size, units, ori, opacity, depth, text, font, letterHeight, bold, italic, alignment, color, contrast, flipHoriz, flipVert, fillColor, borderColor, borderWidth, padding, editable, clipMask, autoDraw, autoLog} = {})
constructor({name, win, pos, anchor, size, units, ori, opacity, depth, text, font, letterHeight, bold, italic, alignment, color, contrast, flipHoriz, flipVert, fillColor, borderColor, borderWidth, padding, editable, multiline, autofocus, clipMask, autoDraw, autoLog} = {})
{
super({name, win, pos, size, units, ori, opacity, depth, clipMask, autoDraw, autoLog});
@ -176,7 +178,9 @@ export class TextBox extends util.mix(VisualStim).with(ColorMixin)
this._onChange(true, true)
);
this._addAttribute('multiline', multiline, false, this._onChange(true, true));
this._addAttribute('editable', editable, false, this._onChange(true, true));
this._addAttribute('autofocus', autofocus, true, this._onChange(true, false));
// this._setAttribute({
// name: 'vertices',
// value: vertices,
@ -193,6 +197,53 @@ export class TextBox extends util.mix(VisualStim).with(ColorMixin)
}
/**
* Clears the current text value.
*
* @name module:visual.TextBox#reset
* @public
*/
reset()
{
this.setText();
}
/**
* For tweaking the underlying input value.
*
* @name module:visual.TextBox#setText
* @public
* @param {string} text
*/
setText(text = '')
{
if (typeof this._pixi !== 'undefined')
{
this._pixi.text = text;
}
this._text = text;
}
/**
* For accessing the underlying input value.
*
* @name module:visual.TextBox#getText
* @public
* @return {string} - the current text value of the underlying input element.
*/
getText()
{
if (typeof this._pixi !== 'undefined')
{
return this._pixi.text;
}
return this._text;
}
/**
* Setter for the size attribute.
@ -275,6 +326,8 @@ export class TextBox extends util.mix(VisualStim).with(ColorMixin)
const padding_px = Math.round(this._getLengthPix(this._padding));
const width_px = Math.round(this._getLengthPix(this._size[0]));
const borderWidth_px = Math.round(this._getLengthPix(this._borderWidth));
const height_px = Math.round(this._getLengthPix(this._size[1]));
const multiline = this._multiline;
return {
input: {
@ -285,6 +338,8 @@ export class TextBox extends util.mix(VisualStim).with(ColorMixin)
fontStyle: (this._italic) ? 'italic' : 'normal',
padding: padding_px + 'px',
multiline,
height: multiline ? (height_px - 2 * padding_px) + 'px' : undefined,
width: (width_px - 2 * padding_px) + 'px'
},
box: {
@ -377,6 +432,17 @@ export class TextBox extends util.mix(VisualStim).with(ColorMixin)
this._pixi.destroy(true);
}
this._pixi = new TextInput(this._getTextInputOptions());
// check if other TextBox instances are already in focus
const { _drawList = [] } = this.psychoJS.window;
const otherTextBoxWithFocus = _drawList.some(item => item instanceof TextBox &amp;&amp; item._pixi &amp;&amp; item._pixi._hasFocus());
if (this._autofocus &amp;&amp; !otherTextBoxWithFocus)
{
this._pixi._onSurrogateFocus();
}
if (this._multiline)
{
this._pixi._multiline = this._multiline;
}
if (this._editable)
{
this._pixi.placeholder = this._text;
@ -497,7 +563,7 @@ TextBox._defaultSizeMap = new Map([
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:19 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -210,14 +210,14 @@ export class TextInput extends PIXI.Container
return this._dom_input;
}
focus()
focus(options = { preventScroll: true })
{
if (this._substituted &amp;&amp; !this.dom_visible)
{
this._setDOMInputVisible(true);
}
this._dom_input.focus();
this._dom_input.focus(options);
}
@ -702,14 +702,15 @@ export class TextInput extends PIXI.Container
let states = ['DEFAULT', 'FOCUSED', 'DISABLED'];
let input_bounds = this._getDOMInputBounds();
for (let i in states)
{
this._box_cache[states[i]] = this._box_generator(
input_bounds.width,
input_bounds.height,
states[i]
);
}
states.forEach((state) =>
{
this._box_cache[state] = this._box_generator(
input_bounds.width,
input_bounds.height,
state
);
}
);
this._previous.input_bounds = input_bounds;
}
@ -894,7 +895,7 @@ function DefaultBoxGenerator(styles)
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:19 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -31,7 +31,7 @@
*
* @author Alain Pitiot
* @version 2020.2
* @copyright (c) 2020 Ilixa Ltd. ({@link http://ilixa.com})
* @copyright (c) 2017-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @license Distributed under the terms of the MIT License
*/
@ -62,7 +62,7 @@ import * as util from '../util/Util';
* @param {number} [options.height= 0.1] - the height of the text
* @param {boolean} [options.bold= false] - whether or not the text is bold
* @param {boolean} [options.italic= false] - whether or not the text is italic
* @param {string} [options.alignHoriz = 'left'] - horizontal alignment
* @param {string} [options.alignHoriz = 'center'] - horizontal alignment
* @param {string} [options.alignVert = 'center'] - vertical alignment
* @param {boolean} options.wrapWidth - whether or not to wrap the text horizontally
* @param {boolean} [options.flipHoriz= false] - whether or not to flip the text horizontally
@ -465,7 +465,7 @@ TextStim._defaultWrapWidthMap = new Map([
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:19 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -31,7 +31,7 @@
*
* @author Alain Pitiot
* @version 2020.2
* @copyright (c) 2018-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @copyright (c) 2017-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @license Distributed under the terms of the MIT License
*/
@ -347,7 +347,7 @@ export class VisualStim extends util.mix(MinimalStim).with(WindowMixin)
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Thu Aug 20 2020 12:03:43 GMT+0200 (Central European Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Feb 20 2021 10:19:19 GMT+0100 (Central European Standard Time)
</footer>
<script> prettyPrint(); </script>

View File

@ -2,7 +2,7 @@
* Manager handling the keyboard and mouse/touch events.
*
* @author Alain Pitiot
* @version 2020.2
* @version 2021.1.0
* @copyright (c) 2017-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @license Distributed under the terms of the MIT License
*/

View File

@ -3,7 +3,7 @@
*
* @author Alain Pitiot
* @author Sijia Zhao - fine-grained resource loading
* @version 2020.2
* @version 2021.1.0
* @copyright (c) 2017-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @license Distributed under the terms of the MIT License
*/

View File

@ -2,7 +2,7 @@
* Manager handling the keyboard events.
*
* @author Alain Pitiot
* @version 2020.2
* @version 2021.1.0
* @copyright (c) 2017-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @license Distributed under the terms of the MIT License
*/

View File

@ -2,7 +2,7 @@
* Logger
*
* @author Alain Pitiot
* @version 2020.2
* @version 2021.1.0
* @copyright (c) 2017-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @license Distributed under the terms of the MIT License
*/

View File

@ -2,7 +2,7 @@
* Base class for all stimuli.
*
* @author Alain Pitiot
* @version 2020.2
* @version 2021.1.0
* @copyright (c) 2017-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @license Distributed under the terms of the MIT License
*/

View File

@ -3,7 +3,7 @@
*
* @author Alain Pitiot
* @author Sotiri Bakagiannis - isPressedIn
* @version 2020.2
* @version 2021.1.0
* @copyright (c) 2017-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @license Distributed under the terms of the MIT License
*/

View File

@ -3,7 +3,7 @@
* Main component of the PsychoJS library.
*
* @author Alain Pitiot
* @version 2020.2
* @version 2021.1.0
* @copyright (c) 2017-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @license Distributed under the terms of the MIT License
*/
@ -169,7 +169,7 @@ export class PsychoJS
}
this.logger.info('[PsychoJS] Initialised.');
this.logger.info('[PsychoJS] @version 2020.2');
this.logger.info('[PsychoJS] @version 2021.1.0');
// Hide #root::after
$('#root').addClass('is-ready');

View File

@ -2,7 +2,7 @@
* Manager responsible for the communication between the experiment running in the participant's browser and the remote PsychoJS manager running on the remote https://pavlovia.org server.
*
* @author Alain Pitiot
* @version 2020.2
* @version 2021.1.0
* @copyright (c) 2017-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @license Distributed under the terms of the MIT License
*/

View File

@ -2,7 +2,7 @@
* Window responsible for displaying the experiment stimuli
*
* @author Alain Pitiot
* @version 2020.2
* @version 2021.1.0
* @copyright (c) 2017-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @license Distributed under the terms of the MIT License
*/

View File

@ -2,7 +2,7 @@
* Mixin implementing various unit-handling measurement methods.
*
* @author Alain Pitiot
* @version 2020.2
* @version 2021.1.0
* @copyright (c) 2017-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @license Distributed under the terms of the MIT License
*/

View File

@ -2,7 +2,7 @@
* Experiment Handler
*
* @author Alain Pitiot
* @version 2020.2
* @version 2021.1.0
* @copyright (c) 2017-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @license Distributed under the terms of the MIT License
*/

View File

@ -4,7 +4,7 @@
*
* @author Alain Pitiot
* @author Hiroyuki Sogo & Sotiri Bakagiannis - better support for BOM and accented characters
* @version 2020.2
* @version 2021.1.0
* @copyright (c) 2017-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @license Distributed under the terms of the MIT License
*/

View File

@ -3,7 +3,7 @@
* Sound stimulus.
*
* @author Alain Pitiot
* @version 2020.2
* @version 2021.1.0
* @copyright (c) 2017-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @license Distributed under the terms of the MIT License
*/

View File

@ -2,7 +2,7 @@
* Sound player interface
*
* @author Alain Pitiot
* @version 2020.2
* @version 2021.1.0
* @copyright (c) 2017-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @license Distributed under the terms of the MIT License
*/

View File

@ -2,7 +2,7 @@
* Tone Player.
*
* @author Alain Pitiot
* @version 2020.2
* @version 2021.1.0
* @copyright (c) 2017-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @license Distributed under the terms of the MIT License
*/

View File

@ -2,7 +2,7 @@
* Track Player.
*
* @author Alain Pitiot
* @version 2020.2
* @version 2021.1.0
* @copyright (c) 2017-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @license Distributed under the terms of the MIT License
*/

View File

@ -2,7 +2,7 @@
* Clock component.
*
* @author Alain Pitiot
* @version 2020.2
* @version 2021.1.0
* @copyright (c) 2017-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @license Distributed under the terms of the MIT License
*/

View File

@ -2,7 +2,7 @@
* Color management.
*
* @author Alain Pitiot
* @version 2020.2
* @version 2021.1.0
* @copyright (c) 2017-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @license Distributed under the terms of the MIT License
*/

View File

@ -2,7 +2,7 @@
* Color Mixin.
*
* @author Alain Pitiot
* @version 2020.2
* @version 2021.1.0
* @copyright (c) 2017-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @license Distributed under the terms of the MIT License
*/

View File

@ -2,7 +2,7 @@
* Event Emitter.
*
* @author Alain Pitiot
* @version 2020.2
* @version 2021.1.0
* @copyright (c) 2017-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @license Distributed under the terms of the MIT License
*/

View File

@ -3,7 +3,7 @@
* Core Object.
*
* @author Alain Pitiot
* @version 2020.2
* @version 2021.1.0
* @copyright (c) 2017-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @license Distributed under the terms of the MIT License
*/

View File

@ -2,7 +2,7 @@
* Scheduler.
*
* @author Alain Pitiot
* @version 2020.2
* @version 2021.1.0
* @copyright (c) 2017-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org)
* @license Distributed under the terms of the MIT License
*/

Some files were not shown because too many files have changed in this diff Show More