mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-10 11:10:54 +00:00
add install section, current version and version history link
This commit is contained in:
parent
d7f1ed5838
commit
8a29d49b2e
@ -1,5 +1,7 @@
|
|||||||
# animation
|
# animation
|
||||||
|
|
||||||
|
Current version: current-plugin-version. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-animation/CHANGELOG.md).
|
||||||
|
|
||||||
This plugin displays a sequence of images at a fixed frame rate. The sequence can be looped a specified number of times. The subject is free to respond at any point during the animation, and the time of the response is recorded.
|
This plugin displays a sequence of images at a fixed frame rate. The sequence can be looped a specified number of times. The subject is free to respond at any point during the animation, and the time of the response is recorded.
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# audio-button-response
|
# audio-button-response
|
||||||
|
|
||||||
|
Current version: current-plugin-version. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-audio-button-response/CHANGELOG.md).
|
||||||
|
|
||||||
This plugin plays audio files and records responses generated with a button click.
|
This plugin plays audio files and records responses generated with a button click.
|
||||||
|
|
||||||
If the browser supports it, audio files are played using the WebAudio API. This allows for reasonably precise timing of the playback. The timing of responses generated is measured against the WebAudio specific clock, improving the measurement of response times. If the browser does not support the WebAudio API, then the audio file is played with HTML5 audio.
|
If the browser supports it, audio files are played using the WebAudio API. This allows for reasonably precise timing of the playback. The timing of responses generated is measured against the WebAudio specific clock, improving the measurement of response times. If the browser does not support the WebAudio API, then the audio file is played with HTML5 audio.
|
||||||
@ -40,6 +42,28 @@ In `data-only` simulation mode, the `response_allowed_while_playing` parameter d
|
|||||||
This is because the audio file is not loaded in `data-only` mode and therefore the length is unknown.
|
This is because the audio file is not loaded in `data-only` mode and therefore the length is unknown.
|
||||||
This may change in a future version as we improve the simulation modes.
|
This may change in a future version as we improve the simulation modes.
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
Using the CDN-hosted JavaScript file:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="https://unpkg.com/@jspsych/plugin-audio-button-response@1.1.0"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using the JavaScript file downloaded from a GitHub release dist archive:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="jspsych/plugin-audio-button-response.js"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using NPM:
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install @jspsych/plugin-audio-button-response
|
||||||
|
```
|
||||||
|
```js
|
||||||
|
import audioButtonResponse from '@jspsych/plugin-audio-button-response';
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
???+ example "Displaying question until subject gives a response"
|
???+ example "Displaying question until subject gives a response"
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# audio-keyboard-response
|
# audio-keyboard-response
|
||||||
|
|
||||||
|
Current version: current-plugin-version. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-audio-keyboard-response/CHANGELOG.md).
|
||||||
|
|
||||||
This plugin plays audio files and records responses generated with the keyboard.
|
This plugin plays audio files and records responses generated with the keyboard.
|
||||||
|
|
||||||
If the browser supports it, audio files are played using the WebAudio API. This allows for reasonably precise timing of the playback. The timing of responses generated is measured against the WebAudio specific clock, improving the measurement of response times. If the browser does not support the WebAudio API, then the audio file is played with HTML5 audio.
|
If the browser supports it, audio files are played using the WebAudio API. This allows for reasonably precise timing of the playback. The timing of responses generated is measured against the WebAudio specific clock, improving the measurement of response times. If the browser does not support the WebAudio API, then the audio file is played with HTML5 audio.
|
||||||
@ -38,6 +40,28 @@ In `data-only` simulation mode, the `response_allowed_while_playing` parameter d
|
|||||||
This is because the audio file is not loaded in `data-only` mode and therefore the length is unknown.
|
This is because the audio file is not loaded in `data-only` mode and therefore the length is unknown.
|
||||||
This may change in a future version as we improve the simulation modes.
|
This may change in a future version as we improve the simulation modes.
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
Using the CDN-hosted JavaScript file:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="https://unpkg.com/@jspsych/plugin-audio-keyboard-response@1.1.0"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using the JavaScript file downloaded from a GitHub release dist archive:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="jspsych/plugin-audio-keyboard-response.js"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using NPM:
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install @jspsych/plugin-audio-keyboard-response
|
||||||
|
```
|
||||||
|
```js
|
||||||
|
import audioKeyboardResponse from '@jspsych/plugin-audio-keyboard-response';
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
???+ example "Trial continues until subject gives a response"
|
???+ example "Trial continues until subject gives a response"
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# audio-slider-response
|
# audio-slider-response
|
||||||
|
|
||||||
|
Current version: current-plugin-version. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-audio-slider-response/CHANGELOG.md).
|
||||||
|
|
||||||
This plugin plays an audio file and allows the subject to respond by dragging a slider.
|
This plugin plays an audio file and allows the subject to respond by dragging a slider.
|
||||||
|
|
||||||
If the browser supports it, audio files are played using the WebAudio API. This allows for reasonably precise timing of the playback. The timing of responses generated is measured against the WebAudio specific clock, improving the measurement of response times. If the browser does not support the WebAudio API, then the audio file is played with HTML5 audio.
|
If the browser supports it, audio files are played using the WebAudio API. This allows for reasonably precise timing of the playback. The timing of responses generated is measured against the WebAudio specific clock, improving the measurement of response times. If the browser does not support the WebAudio API, then the audio file is played with HTML5 audio.
|
||||||
@ -45,6 +47,28 @@ In `data-only` simulation mode, the `response_allowed_while_playing` parameter d
|
|||||||
This is because the audio file is not loaded in `data-only` mode and therefore the length is unknown.
|
This is because the audio file is not loaded in `data-only` mode and therefore the length is unknown.
|
||||||
This may change in a future version as we improve the simulation modes.
|
This may change in a future version as we improve the simulation modes.
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
Using the CDN-hosted JavaScript file:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="https://unpkg.com/@jspsych/plugin-audio-slider-response@1.1.0"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using the JavaScript file downloaded from a GitHub release dist archive:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="jspsych/plugin-audio-slider-response.js"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using NPM:
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install @jspsych/plugin-audio-slider-response
|
||||||
|
```
|
||||||
|
```js
|
||||||
|
import audioSliderResponse from '@jspsych/plugin-audio-slider-response';
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
???+ example "A simple rating scale"
|
???+ example "A simple rating scale"
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# browser-check
|
# browser-check
|
||||||
|
|
||||||
|
Current version: current-plugin-version. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-browser-check/CHANGELOG.md).
|
||||||
|
|
||||||
This plugin measures and records various features of the participant's browser and can end the experiment if defined inclusion criteria are not met.
|
This plugin measures and records various features of the participant's browser and can end the experiment if defined inclusion criteria are not met.
|
||||||
|
|
||||||
The plugin currently can record the following features:
|
The plugin currently can record the following features:
|
||||||
@ -73,6 +75,28 @@ In `visual` mode, if `allow_window_resize` is true and the browser's width and h
|
|||||||
|
|
||||||
As with all simulated plugins, you can override the default (actual) data with fake data using `simulation_options`. This allows you to test your exclusion criteria by simulating other configurations.
|
As with all simulated plugins, you can override the default (actual) data with fake data using `simulation_options`. This allows you to test your exclusion criteria by simulating other configurations.
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
Using the CDN-hosted JavaScript file:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="https://unpkg.com/@jspsych/plugin-browser-check@1.0.0"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using the JavaScript file downloaded from a GitHub release dist archive:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="jspsych/plugin-browser-check.js"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using NPM:
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install @jspsych/plugin-browser-check
|
||||||
|
```
|
||||||
|
```js
|
||||||
|
import browserCheck from '@jspsych/plugin-browser-check';
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
???+ example "Recording all of the available features, no exclusions"
|
???+ example "Recording all of the available features, no exclusions"
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# call-function
|
# call-function
|
||||||
|
|
||||||
|
Current version: current-plugin-version. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-call-function/CHANGELOG.md).
|
||||||
|
|
||||||
This plugin executes a specified function. This allows the experimenter to run arbitrary code at any point during the experiment.
|
This plugin executes a specified function. This allows the experimenter to run arbitrary code at any point during the experiment.
|
||||||
|
|
||||||
The function cannot take any arguments. If arguments are needed, then an anonymous function should be used to wrap the function call (see examples below).
|
The function cannot take any arguments. If arguments are needed, then an anonymous function should be used to wrap the function call (see examples below).
|
||||||
@ -22,6 +24,28 @@ Name | Type | Value
|
|||||||
-----|------|------
|
-----|------|------
|
||||||
value | any | The return value of the called function.
|
value | any | The return value of the called function.
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
Using the CDN-hosted JavaScript file:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="https://unpkg.com/@jspsych/plugin-call-function@1.1.0"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using the JavaScript file downloaded from a GitHub release dist archive:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="jspsych/plugin-call-function.js"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using NPM:
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install @jspsych/plugin-call-function
|
||||||
|
```
|
||||||
|
```js
|
||||||
|
import callFunction from '@jspsych/plugin-call-function';
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
???+ example "Calling a simple function"
|
???+ example "Calling a simple function"
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# canvas-button-response
|
# canvas-button-response
|
||||||
|
|
||||||
|
Current version: current-plugin-version. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-canvas-button-response/CHANGELOG.md).
|
||||||
|
|
||||||
This plugin can be used to draw a stimulus on a [HTML canvas element](https://www.w3schools.com/html/html5_canvas.asp), and record a button click response and response time. The canvas stimulus can be useful for displaying dynamic, parametrically-defined graphics, and for controlling the positioning of multiple graphical elements (shapes, text, images). The stimulus can be displayed until a response is given, or for a pre-determined amount of time. The trial can be ended automatically if the subject has failed to respond within a fixed length of time. One or more button choices will be displayed under the canvas, and the button style can be customized using HTML formatting.
|
This plugin can be used to draw a stimulus on a [HTML canvas element](https://www.w3schools.com/html/html5_canvas.asp), and record a button click response and response time. The canvas stimulus can be useful for displaying dynamic, parametrically-defined graphics, and for controlling the positioning of multiple graphical elements (shapes, text, images). The stimulus can be displayed until a response is given, or for a pre-determined amount of time. The trial can be ended automatically if the subject has failed to respond within a fixed length of time. One or more button choices will be displayed under the canvas, and the button style can be customized using HTML formatting.
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
@ -30,6 +32,28 @@ response | numeric | Indicates which button the subject pressed. The first butto
|
|||||||
|
|
||||||
Note: the canvas stimulus is *not* included in the trial data because it is a function. Any stimulus information that should be saved in the trial data can be added via the `data` parameter.
|
Note: the canvas stimulus is *not* included in the trial data because it is a function. Any stimulus information that should be saved in the trial data can be added via the `data` parameter.
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
Using the CDN-hosted JavaScript file:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="https://unpkg.com/@jspsych/plugin-canvas-button-response@1.1.0"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using the JavaScript file downloaded from a GitHub release dist archive:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="jspsych/plugin-canvas-button-response.js"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using NPM:
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install @jspsych/plugin-canvas-button-response
|
||||||
|
```
|
||||||
|
```js
|
||||||
|
import canvasButtonResponse from '@jspsych/plugin-canvas-button-response';
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
???+ example "Drawing circles based on parameters"
|
???+ example "Drawing circles based on parameters"
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# canvas-keyboard-response
|
# canvas-keyboard-response
|
||||||
|
|
||||||
|
Current version: current-plugin-version. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-canvas-keyboard-response/CHANGELOG.md).
|
||||||
|
|
||||||
This plugin can be used to draw a stimulus on a [HTML canvas element](https://www.w3schools.com/html/html5_canvas.asp) and record a keyboard response. The canvas stimulus can be useful for displaying dynamic, parametrically-defined graphics, and for controlling the positioning of multiple graphical elements (shapes, text, images). The stimulus can be displayed until a response is given, or for a pre-determined amount of time. The trial can be ended automatically if the subject has failed to respond within a fixed length of time.
|
This plugin can be used to draw a stimulus on a [HTML canvas element](https://www.w3schools.com/html/html5_canvas.asp) and record a keyboard response. The canvas stimulus can be useful for displaying dynamic, parametrically-defined graphics, and for controlling the positioning of multiple graphical elements (shapes, text, images). The stimulus can be displayed until a response is given, or for a pre-determined amount of time. The trial can be ended automatically if the subject has failed to respond within a fixed length of time.
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
@ -27,6 +29,28 @@ In addition to the [default data collected by all plugins](../overview/plugins.m
|
|||||||
|
|
||||||
Note: the canvas stimulus is *not* included in the trial data because it is a function. Any stimulus information that should be saved in the trial data can be added via the `data` parameter.
|
Note: the canvas stimulus is *not* included in the trial data because it is a function. Any stimulus information that should be saved in the trial data can be added via the `data` parameter.
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
Using the CDN-hosted JavaScript file:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="https://unpkg.com/@jspsych/plugin-canvas-keyboard-response@1.1.0"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using the JavaScript file downloaded from a GitHub release dist archive:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="jspsych/plugin-canvas-keyboard-response.js"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using NPM:
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install @jspsych/plugin-canvas-keyboard-response
|
||||||
|
```
|
||||||
|
```js
|
||||||
|
import canvasKeyboardResponse from '@jspsych/plugin-canvas-keyboard-response';
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
???+ example "Draw rectangle and wait for response"
|
???+ example "Draw rectangle and wait for response"
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# canvas-slider-response
|
# canvas-slider-response
|
||||||
|
|
||||||
|
Current version: current-plugin-version. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-canvas-slider-response/CHANGELOG.md).
|
||||||
|
|
||||||
This plugin can be used to draw a stimulus on a [HTML canvas element](https://www.w3schools.com/html/html5_canvas.asp) and collect a response within a range of values, which is made by dragging a slider. The canvas stimulus can be useful for displaying dynamic, parametrically-defined graphics, and for controlling the positioning of multiple graphical elements (shapes, text, images). The stimulus can be displayed until a response is given, or for a pre-determined amount of time. The trial can be ended automatically if the subject has failed to respond within a fixed length of time.
|
This plugin can be used to draw a stimulus on a [HTML canvas element](https://www.w3schools.com/html/html5_canvas.asp) and collect a response within a range of values, which is made by dragging a slider. The canvas stimulus can be useful for displaying dynamic, parametrically-defined graphics, and for controlling the positioning of multiple graphical elements (shapes, text, images). The stimulus can be displayed until a response is given, or for a pre-determined amount of time. The trial can be ended automatically if the subject has failed to respond within a fixed length of time.
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
@ -34,6 +36,28 @@ rt | numeric | The time in milliseconds for the subject to make a response. The
|
|||||||
|
|
||||||
Note: the canvas stimulus is *not* included in the trial data because it is a function. Any stimulus information that should be saved in the trial data can be added via the `data` parameter.
|
Note: the canvas stimulus is *not* included in the trial data because it is a function. Any stimulus information that should be saved in the trial data can be added via the `data` parameter.
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
Using the CDN-hosted JavaScript file:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="https://unpkg.com/@jspsych/plugin-canvas-slider-response@1.1.0"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using the JavaScript file downloaded from a GitHub release dist archive:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="jspsych/plugin-canvas-slider-response.js"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using NPM:
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install @jspsych/plugin-canvas-slider-response
|
||||||
|
```
|
||||||
|
```js
|
||||||
|
import canvasSliderResponse from '@jspsych/plugin-canvas-slider-response';
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
???+ example "Draw two squares"
|
???+ example "Draw two squares"
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# categorize-animation
|
# categorize-animation
|
||||||
|
|
||||||
|
Current version: current-plugin-version. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-categorize-animation/CHANGELOG.md).
|
||||||
|
|
||||||
The categorize animation plugin shows a sequence of images at a specified frame rate. The subject responds by pressing a key. Feedback indicating the correctness of the response is given.
|
The categorize animation plugin shows a sequence of images at a specified frame rate. The subject responds by pressing a key. Feedback indicating the correctness of the response is given.
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
@ -32,6 +34,29 @@ In addition to the [default data collected by all plugins](../overview/plugins.m
|
|||||||
| rt | numeric | The response time in milliseconds for the subject to make a response. The time is measured from when the stimulus first appears on the screen until the subject's response. |
|
| rt | numeric | The response time in milliseconds for the subject to make a response. The time is measured from when the stimulus first appears on the screen until the subject's response. |
|
||||||
| correct | boolean | `true` if the subject got the correct answer, `false` otherwise. |
|
| correct | boolean | `true` if the subject got the correct answer, `false` otherwise. |
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
Using the CDN-hosted JavaScript file:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="https://unpkg.com/@jspsych/plugin-categorize-animation@1.1.0"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using the JavaScript file downloaded from a GitHub release dist archive:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="jspsych/plugin-categorize-animation.js"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using NPM:
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install @jspsych/plugin-categorize-animation
|
||||||
|
```
|
||||||
|
```js
|
||||||
|
import categorizeAnimation from '@jspsych/plugin-categorize-animation';
|
||||||
|
```
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
???+ example "Basic example"
|
???+ example "Basic example"
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# categorize-html
|
# categorize-html
|
||||||
|
|
||||||
|
Current version: current-plugin-version. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-categorize-html/CHANGELOG.md).
|
||||||
|
|
||||||
The categorize html plugin shows an HTML object on the screen. The subject responds by pressing a key. Feedback indicating the correctness of the response is given.
|
The categorize html plugin shows an HTML object on the screen. The subject responds by pressing a key. Feedback indicating the correctness of the response is given.
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
@ -34,6 +36,29 @@ In addition to the [default data collected by all plugins](../overview/plugins.m
|
|||||||
| rt | numeric | The response time in milliseconds for the subject to make a response. The time is measured from when the stimulus first appears on the screen until the subject's response. |
|
| rt | numeric | The response time in milliseconds for the subject to make a response. The time is measured from when the stimulus first appears on the screen until the subject's response. |
|
||||||
| correct | boolean | `true` if the subject got the correct answer, `false` otherwise. |
|
| correct | boolean | `true` if the subject got the correct answer, `false` otherwise. |
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
Using the CDN-hosted JavaScript file:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="https://unpkg.com/@jspsych/plugin-categorize-html@1.1.0"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using the JavaScript file downloaded from a GitHub release dist archive:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="jspsych/plugin-categorize-html.js"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using NPM:
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install @jspsych/plugin-categorize-html
|
||||||
|
```
|
||||||
|
```js
|
||||||
|
import categorizeHtml from '@jspsych/plugin-categorize-html';
|
||||||
|
```
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
???+ example "Categorizing HTML content"
|
???+ example "Categorizing HTML content"
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# categorize-image
|
# categorize-image
|
||||||
|
|
||||||
|
Current version: current-plugin-version. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-categorize-image/CHANGELOG.md).
|
||||||
|
|
||||||
The categorize image plugin shows an image object on the screen. The subject responds by pressing a key. Feedback indicating the correctness of the response is given.
|
The categorize image plugin shows an image object on the screen. The subject responds by pressing a key. Feedback indicating the correctness of the response is given.
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
@ -35,6 +37,30 @@ In addition to the [default data collected by all plugins](../overview/plugins.m
|
|||||||
| rt | numeric | The response time in milliseconds for the subject to make a response. The time is measured from when the stimulus first appears on the screen until the subject's response. |
|
| rt | numeric | The response time in milliseconds for the subject to make a response. The time is measured from when the stimulus first appears on the screen until the subject's response. |
|
||||||
| correct | boolean | `true` if the subject got the correct answer, `false` otherwise. |
|
| correct | boolean | `true` if the subject got the correct answer, `false` otherwise. |
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
Using the CDN-hosted JavaScript file:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="https://unpkg.com/@jspsych/plugin-categorize-image@1.1.0"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using the JavaScript file downloaded from a GitHub release dist archive:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="jspsych/plugin-categorize-image.js"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using NPM:
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install @jspsych/plugin-categorize-image
|
||||||
|
```
|
||||||
|
```js
|
||||||
|
import categorizeImage from '@jspsych/plugin-categorize-image';
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
???+ example "Categorizing an image"
|
???+ example "Categorizing an image"
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# cloze
|
# cloze
|
||||||
|
|
||||||
|
Current version: current-plugin-version. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-cloze/CHANGELOG.md).
|
||||||
|
|
||||||
This plugin displays a text with certain words removed. Participants are asked to replace the missing items. Responses are recorded when clicking a button. Optionally, responses are evaluated and a function is called in case of differences, making it possible to inform participants about mistakes.
|
This plugin displays a text with certain words removed. Participants are asked to replace the missing items. Responses are recorded when clicking a button. Optionally, responses are evaluated and a function is called in case of differences, making it possible to inform participants about mistakes.
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
@ -21,6 +23,29 @@ In addition to the [default data collected by all plugins](../overview/plugins.m
|
|||||||
| -------- | ---------------- | --------------------------- |
|
| -------- | ---------------- | --------------------------- |
|
||||||
| response | array of strings | Answers the partcipant gave |
|
| response | array of strings | Answers the partcipant gave |
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
Using the CDN-hosted JavaScript file:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="https://unpkg.com/@jspsych/plugin-cloze@1.1.0"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using the JavaScript file downloaded from a GitHub release dist archive:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="jspsych/plugin-cloze.js"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using NPM:
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install @jspsych/plugin-cloze
|
||||||
|
```
|
||||||
|
```js
|
||||||
|
import cloze from '@jspsych/plugin-cloze';
|
||||||
|
```
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
???+ example "Simple cloze using default settings (no check against correct solution, no custom button text)"
|
???+ example "Simple cloze using default settings (no check against correct solution, no custom button text)"
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# external-html plugin
|
# external-html plugin
|
||||||
|
|
||||||
|
Current version: current-plugin-version. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-external-html/CHANGELOG.md).
|
||||||
|
|
||||||
The HTML plugin displays an external HTML document (often a consent form). Either a keyboard response or a button press can be used to continue to the next trial. It allows the experimenter to check if conditions are met (such as indicating informed consent) before continuing.
|
The HTML plugin displays an external HTML document (often a consent form). Either a keyboard response or a button press can be used to continue to the next trial. It allows the experimenter to check if conditions are met (such as indicating informed consent) before continuing.
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
@ -28,6 +30,29 @@ In addition to the [default data collected by all plugins](../overview/plugins.m
|
|||||||
|
|
||||||
In `visual` simulation mode, the plugin cannot interact with any form elements on the screen other than the `cont_btn` specified in the trial parameters. If your `check_fn` requires other user interaction, for example, clicking a checkbox, then you'll need to disable simulation for the trial and complete the interaction manually.
|
In `visual` simulation mode, the plugin cannot interact with any form elements on the screen other than the `cont_btn` specified in the trial parameters. If your `check_fn` requires other user interaction, for example, clicking a checkbox, then you'll need to disable simulation for the trial and complete the interaction manually.
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
Using the CDN-hosted JavaScript file:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="https://unpkg.com/@jspsych/plugin-external-html@1.1.0"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using the JavaScript file downloaded from a GitHub release dist archive:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="jspsych/plugin-external-html.js"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using NPM:
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install @jspsych/plugin-external-html
|
||||||
|
```
|
||||||
|
```js
|
||||||
|
import externalHtml from '@jspsych/plugin-external-html';
|
||||||
|
```
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
### Loading a consent form
|
### Loading a consent form
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# free-sort plugin
|
# free-sort plugin
|
||||||
|
|
||||||
|
Current version: current-plugin-version. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-free-sort/CHANGELOG.md).
|
||||||
|
|
||||||
The free-sort plugin displays one or more images on the screen that the participant can interact with by clicking and dragging with a mouse, or touching and dragging with a touchscreen device. When the trial starts, the images can be positioned outside or inside the sort area. All images must be moved into the sorting area before the participant can click a button to end the trial. All of the moves that the participant performs are recorded, as well as the final positions of all images. This plugin could be useful when asking participants to position images based on similarity to one another, or to recall image spatial locations.
|
The free-sort plugin displays one or more images on the screen that the participant can interact with by clicking and dragging with a mouse, or touching and dragging with a touchscreen device. When the trial starts, the images can be positioned outside or inside the sort area. All images must be moved into the sorting area before the participant can click a button to end the trial. All of the moves that the participant performs are recorded, as well as the final positions of all images. This plugin could be useful when asking participants to position images based on similarity to one another, or to recall image spatial locations.
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
@ -42,6 +44,29 @@ rt | numeric | The response time in milliseconds for the participant to finish a
|
|||||||
|
|
||||||
This plugin does not yet support [simulation mode](../overview/simulation.md).
|
This plugin does not yet support [simulation mode](../overview/simulation.md).
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
Using the CDN-hosted JavaScript file:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="https://unpkg.com/@jspsych/plugin-free-sort@1.0.0"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using the JavaScript file downloaded from a GitHub release dist archive:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="jspsych/plugin-free-sort.js"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using NPM:
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install @jspsych/plugin-free-sort
|
||||||
|
```
|
||||||
|
```js
|
||||||
|
import freeSort from '@jspsych/plugin-free-sort';
|
||||||
|
```
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
???+ example "Basic example"
|
???+ example "Basic example"
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# fullscreen plugin
|
# fullscreen plugin
|
||||||
|
|
||||||
|
Current version: current-plugin-version. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-fullscreen/CHANGELOG.md).
|
||||||
|
|
||||||
The fullscreen plugin allows the experiment to enter or exit fullscreen mode. For security reasons, all browsers require that entry into fullscreen mode is triggered by a user action. To enter fullscreen mode, this plugin has the user click a button. Exiting fullscreen mode can be done without user input.
|
The fullscreen plugin allows the experiment to enter or exit fullscreen mode. For security reasons, all browsers require that entry into fullscreen mode is triggered by a user action. To enter fullscreen mode, this plugin has the user click a button. Exiting fullscreen mode can be done without user input.
|
||||||
|
|
||||||
!!! warning
|
!!! warning
|
||||||
@ -30,6 +32,29 @@ Web browsers do not allow fullscreen mode to be triggered by a script to avoid m
|
|||||||
In `visual` simulation mode, the trial will run normally and the button will get a simulated click, but the display will not change.
|
In `visual` simulation mode, the trial will run normally and the button will get a simulated click, but the display will not change.
|
||||||
If you want the display to actually enter fullscreen mode during the simulation, you should disable simulation for the fullscreen trial and manually click the button.
|
If you want the display to actually enter fullscreen mode during the simulation, you should disable simulation for the fullscreen trial and manually click the button.
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
Using the CDN-hosted JavaScript file:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="https://unpkg.com/@jspsych/plugin-fullscreen@1.1.0"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using the JavaScript file downloaded from a GitHub release dist archive:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="jspsych/plugin-fullscreen.js"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using NPM:
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install @jspsych/plugin-fullscreen
|
||||||
|
```
|
||||||
|
```js
|
||||||
|
import fullscreen from '@jspsych/plugin-fullscreen';
|
||||||
|
```
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# html-audio-response
|
# html-audio-response
|
||||||
|
|
||||||
|
Current version: current-plugin-version. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-html-audio-response/CHANGELOG.md).
|
||||||
|
|
||||||
This plugin displays HTML content and records audio from the participant via a microphone.
|
This plugin displays HTML content and records audio from the participant via a microphone.
|
||||||
|
|
||||||
In order to get access to the microphone, you need to use the [initialize-microphone plugin](initialize-microphone.md) on your timeline prior to using this plugin.
|
In order to get access to the microphone, you need to use the [initialize-microphone plugin](initialize-microphone.md) on your timeline prior to using this plugin.
|
||||||
@ -56,6 +58,29 @@ audio_url | string | A URL to a copy of the audio data.
|
|||||||
|
|
||||||
This plugin does not yet support [simulation mode](../overview/simulation.md).
|
This plugin does not yet support [simulation mode](../overview/simulation.md).
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
Using the CDN-hosted JavaScript file:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="https://unpkg.com/@jspsych/plugin-html-audio-response@1.0.0"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using the JavaScript file downloaded from a GitHub release dist archive:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="jspsych/plugin-html-audio-response.js"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using NPM:
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install @jspsych/plugin-html-audio-response
|
||||||
|
```
|
||||||
|
```js
|
||||||
|
import htmlAudioResponse from '@jspsych/plugin-html-audio-response';
|
||||||
|
```
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
???+ example "Simple spoken response to a stimulus"
|
???+ example "Simple spoken response to a stimulus"
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# html-button-response
|
# html-button-response
|
||||||
|
|
||||||
|
Current version: current-plugin-version. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-html-button-response/CHANGELOG.md).
|
||||||
|
|
||||||
This plugin displays HTML content and records responses generated by button click. The stimulus can be displayed until a response is given, or for a pre-determined amount of time. The trial can be ended automatically if the subject has failed to respond within a fixed length of time. The button itself can be customized using HTML formatting.
|
This plugin displays HTML content and records responses generated by button click. The stimulus can be displayed until a response is given, or for a pre-determined amount of time. The trial can be ended automatically if the subject has failed to respond within a fixed length of time. The button itself can be customized using HTML formatting.
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
@ -28,6 +30,29 @@ rt | numeric | The response time in milliseconds for the subject to make a respo
|
|||||||
response | numeric | Indicates which button the subject pressed. The first button in the `choices` array is 0, the second is 1, and so on.
|
response | numeric | Indicates which button the subject pressed. The first button in the `choices` array is 0, the second is 1, and so on.
|
||||||
stimulus | string | The HTML content that was displayed on the screen.
|
stimulus | string | The HTML content that was displayed on the screen.
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
Using the CDN-hosted JavaScript file:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="https://unpkg.com/@jspsych/plugin-html-button-response@1.1.0"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using the JavaScript file downloaded from a GitHub release dist archive:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="jspsych/plugin-html-button-response.js"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using NPM:
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install @jspsych/plugin-html-button-response
|
||||||
|
```
|
||||||
|
```js
|
||||||
|
import htmlButtonResponse from '@jspsych/plugin-html-button-response';
|
||||||
|
```
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
???+ example "Displaying question until subject gives a response"
|
???+ example "Displaying question until subject gives a response"
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# html-keyboard-response
|
# html-keyboard-response
|
||||||
|
|
||||||
|
Current version: current-plugin-version. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-html-keyboard-response/CHANGELOG.md).
|
||||||
|
|
||||||
This plugin displays HTML content and records responses generated with the keyboard.The stimulus can be displayed until a response is given, or for a pre-determined amount of time. The trial can be ended automatically if the subject has failed to respond within a fixed length of time.
|
This plugin displays HTML content and records responses generated with the keyboard.The stimulus can be displayed until a response is given, or for a pre-determined amount of time. The trial can be ended automatically if the subject has failed to respond within a fixed length of time.
|
||||||
|
|
||||||
|
|
||||||
@ -26,6 +28,29 @@ In addition to the [default data collected by all plugins](../overview/plugins.m
|
|||||||
| rt | numeric | The response time in milliseconds for the subject to make a response. The time is measured from when the stimulus first appears on the screen until the subject's response. |
|
| rt | numeric | The response time in milliseconds for the subject to make a response. The time is measured from when the stimulus first appears on the screen until the subject's response. |
|
||||||
| stimulus | string | The HTML content that was displayed on the screen. |
|
| stimulus | string | The HTML content that was displayed on the screen. |
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
Using the CDN-hosted JavaScript file:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="https://unpkg.com/@jspsych/plugin-html-keyboard-response@1.1.0"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using the JavaScript file downloaded from a GitHub release dist archive:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="jspsych/plugin-html-keyboard-response.js"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using NPM:
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install @jspsych/plugin-html-keyboard-response
|
||||||
|
```
|
||||||
|
```js
|
||||||
|
import htmlKeyboardResponse from '@jspsych/plugin-html-keyboard-response';
|
||||||
|
```
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
???+ example "Displaying trial until subject gives a response"
|
???+ example "Displaying trial until subject gives a response"
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# html-slider-response
|
# html-slider-response
|
||||||
|
|
||||||
|
Current version: current-plugin-version. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-html-slider-response/CHANGELOG.md).
|
||||||
|
|
||||||
This plugin displays HTML content and allows the subject to respond by dragging a slider.
|
This plugin displays HTML content and allows the subject to respond by dragging a slider.
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
@ -33,6 +35,29 @@ rt | numeric | The time in milliseconds for the subject to make a response. The
|
|||||||
stimulus | string | The HTML content that was displayed on the screen.
|
stimulus | string | The HTML content that was displayed on the screen.
|
||||||
slider_start | numeric | The starting value of the slider.
|
slider_start | numeric | The starting value of the slider.
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
Using the CDN-hosted JavaScript file:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="https://unpkg.com/@jspsych/plugin-html-slider-response@1.1.0"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using the JavaScript file downloaded from a GitHub release dist archive:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="jspsych/plugin-html-slider-response.js"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using NPM:
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install @jspsych/plugin-html-slider-response
|
||||||
|
```
|
||||||
|
```js
|
||||||
|
import htmlSliderResponse from '@jspsych/plugin-html-slider-response';
|
||||||
|
```
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
???+ example "Displaying question until subject move the slider"
|
???+ example "Displaying question until subject move the slider"
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# iat-html plugin
|
# iat-html plugin
|
||||||
|
|
||||||
|
Current version: current-plugin-version. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-iat-html/CHANGELOG.md).
|
||||||
|
|
||||||
This plugin runs a single trial of the [implicit association test (IAT)](https://implicit.harvard.edu/implicit/iatdetails.html), using HTML content as the stimulus.
|
This plugin runs a single trial of the [implicit association test (IAT)](https://implicit.harvard.edu/implicit/iatdetails.html), using HTML content as the stimulus.
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
@ -33,6 +35,29 @@ In addition to the [default data collected by all plugins](../overview/plugins.m
|
|||||||
| rt | numeric | The response time in milliseconds for the subject to make a response. The time is measured from when the stimulus first appears on the screen until the subject's response. |
|
| rt | numeric | The response time in milliseconds for the subject to make a response. The time is measured from when the stimulus first appears on the screen until the subject's response. |
|
||||||
| correct | boolean | Boolean indicating whether the user's key press was correct or incorrect for the given stimulus. |
|
| correct | boolean | Boolean indicating whether the user's key press was correct or incorrect for the given stimulus. |
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
Using the CDN-hosted JavaScript file:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="https://unpkg.com/@jspsych/plugin-iat-html@1.1.0"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using the JavaScript file downloaded from a GitHub release dist archive:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="jspsych/plugin-iat-html.js"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using NPM:
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install @jspsych/plugin-iat-html
|
||||||
|
```
|
||||||
|
```js
|
||||||
|
import iatHtml from '@jspsych/plugin-iat-html';
|
||||||
|
```
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
???+ example "Displaying IAT question using html"
|
???+ example "Displaying IAT question using html"
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# iat-image
|
# iat-image
|
||||||
|
|
||||||
|
Current version: current-plugin-version. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-iat-image/CHANGELOG.md).
|
||||||
|
|
||||||
This plugin runs a single trial of the [implicit association test (IAT)](https://implicit.harvard.edu/implicit/iatdetails.html), using an image as the stimulus.
|
This plugin runs a single trial of the [implicit association test (IAT)](https://implicit.harvard.edu/implicit/iatdetails.html), using an image as the stimulus.
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
@ -33,6 +35,29 @@ In addition to the [default data collected by all plugins](../overview/plugins.m
|
|||||||
| rt | numeric | The response time in milliseconds for the subject to make a response. The time is measured from when the stimulus first appears on the screen until the subject's response. |
|
| rt | numeric | The response time in milliseconds for the subject to make a response. The time is measured from when the stimulus first appears on the screen until the subject's response. |
|
||||||
| correct | boolean | Boolean indicating whether the user's key press was correct or incorrect for the given image. |
|
| correct | boolean | Boolean indicating whether the user's key press was correct or incorrect for the given image. |
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
Using the CDN-hosted JavaScript file:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="https://unpkg.com/@jspsych/plugin-iat-image@1.1.0"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using the JavaScript file downloaded from a GitHub release dist archive:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="jspsych/plugin-iat-image.js"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using NPM:
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install @jspsych/plugin-iat-image
|
||||||
|
```
|
||||||
|
```js
|
||||||
|
import iatImage from '@jspsych/plugin-iat-image';
|
||||||
|
```
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
???+ example "Displaying IAT question using image files"
|
???+ example "Displaying IAT question using image files"
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# image-button-response
|
# image-button-response
|
||||||
|
|
||||||
|
Current version: current-plugin-version. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-image-button-response/CHANGELOG.md).
|
||||||
|
|
||||||
This plugin displays an image and records responses generated with a button click. The stimulus can be displayed until a response is given, or for a pre-determined amount of time. The trial can be ended automatically if the subject has failed to respond within a fixed length of time. The button itself can be customized using HTML formatting.
|
This plugin displays an image and records responses generated with a button click. The stimulus can be displayed until a response is given, or for a pre-determined amount of time. The trial can be ended automatically if the subject has failed to respond within a fixed length of time. The button itself can be customized using HTML formatting.
|
||||||
|
|
||||||
Image files can be automatically preloaded by jsPsych using the [`preload` plugin](preload.md). However, if you are using timeline variables or another dynamic method to specify the image stimulus, you will need to [manually preload](../overview/media-preloading.md#manual-preloading) the images.
|
Image files can be automatically preloaded by jsPsych using the [`preload` plugin](preload.md). However, if you are using timeline variables or another dynamic method to specify the image stimulus, you will need to [manually preload](../overview/media-preloading.md#manual-preloading) the images.
|
||||||
@ -34,6 +36,29 @@ rt | numeric | The response time in milliseconds for the subject to make a respo
|
|||||||
response | numeric | Indicates which button the subject pressed. The first button in the `choices` array is 0, the second is 1, and so on.
|
response | numeric | Indicates which button the subject pressed. The first button in the `choices` array is 0, the second is 1, and so on.
|
||||||
stimulus | string | The path of the image that was displayed.
|
stimulus | string | The path of the image that was displayed.
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
Using the CDN-hosted JavaScript file:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="https://unpkg.com/@jspsych/plugin-image-button-response@1.1.0"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using the JavaScript file downloaded from a GitHub release dist archive:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="jspsych/plugin-image-button-response.js"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using NPM:
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install @jspsych/plugin-image-button-response
|
||||||
|
```
|
||||||
|
```js
|
||||||
|
import imageButtonResponse from '@jspsych/plugin-image-button-response';
|
||||||
|
```
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
???+ example "Displaying question until subject gives a response"
|
???+ example "Displaying question until subject gives a response"
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# image-keyboard-response
|
# image-keyboard-response
|
||||||
|
|
||||||
|
Current version: current-plugin-version. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-image-keyboard-response/CHANGELOG.md).
|
||||||
|
|
||||||
This plugin displays and image and records responses generated with the keyboard. The stimulus can be displayed until a response is given, or for a pre-determined amount of time. The trial can be ended automatically if the subject has failed to respond within a fixed length of time.
|
This plugin displays and image and records responses generated with the keyboard. The stimulus can be displayed until a response is given, or for a pre-determined amount of time. The trial can be ended automatically if the subject has failed to respond within a fixed length of time.
|
||||||
|
|
||||||
Image files can be automatically preloaded by jsPsych using the [`preload` plugin](preload.md). However, if you are using timeline variables or another dynamic method to specify the image stimulus, you will need to [manually preload](../overview/media-preloading.md#manual-preloading) the images.
|
Image files can be automatically preloaded by jsPsych using the [`preload` plugin](preload.md). However, if you are using timeline variables or another dynamic method to specify the image stimulus, you will need to [manually preload](../overview/media-preloading.md#manual-preloading) the images.
|
||||||
@ -31,6 +33,29 @@ In addition to the [default data collected by all plugins](../overview/plugins.m
|
|||||||
| rt | numeric | The response time in milliseconds for the subject to make a response. The time is measured from when the stimulus first appears on the screen until the subject's response. |
|
| rt | numeric | The response time in milliseconds for the subject to make a response. The time is measured from when the stimulus first appears on the screen until the subject's response. |
|
||||||
| stimulus | string | The path of the image that was displayed. |
|
| stimulus | string | The path of the image that was displayed. |
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
Using the CDN-hosted JavaScript file:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="https://unpkg.com/@jspsych/plugin-image-keyboard-response@1.1.0"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using the JavaScript file downloaded from a GitHub release dist archive:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="jspsych/plugin-image-keyboard-response.js"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using NPM:
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install @jspsych/plugin-image-keyboard-response
|
||||||
|
```
|
||||||
|
```js
|
||||||
|
import imageKeyboardResponse from '@jspsych/plugin-image-keyboard-response';
|
||||||
|
```
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
???+ example "Displaying trial until subject gives a response"
|
???+ example "Displaying trial until subject gives a response"
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# image-slider-response
|
# image-slider-response
|
||||||
|
|
||||||
|
Current version: current-plugin-version. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-image-slider-response/CHANGELOG.md).
|
||||||
|
|
||||||
This plugin displays and image and allows the subject to respond by dragging a slider.
|
This plugin displays and image and allows the subject to respond by dragging a slider.
|
||||||
|
|
||||||
Image files can be automatically preloaded by jsPsych using the [`preload` plugin](preload.md). However, if you are using timeline variables or another dynamic method to specify the image stimulus, you will need to [manually preload](../overview/media-preloading.md#manual-preloading) the images.
|
Image files can be automatically preloaded by jsPsych using the [`preload` plugin](preload.md). However, if you are using timeline variables or another dynamic method to specify the image stimulus, you will need to [manually preload](../overview/media-preloading.md#manual-preloading) the images.
|
||||||
@ -39,6 +41,29 @@ rt | numeric | The time in milliseconds for the subject to make a response. The
|
|||||||
stimulus | string | The path of the image that was displayed.
|
stimulus | string | The path of the image that was displayed.
|
||||||
slider_start | numeric | The starting value of the slider.
|
slider_start | numeric | The starting value of the slider.
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
Using the CDN-hosted JavaScript file:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="https://unpkg.com/@jspsych/plugin-image-slider-response@1.1.0"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using the JavaScript file downloaded from a GitHub release dist archive:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="jspsych/plugin-image-slider-response.js"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using NPM:
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install @jspsych/plugin-image-slider-response
|
||||||
|
```
|
||||||
|
```js
|
||||||
|
import imageSliderResponse from '@jspsych/plugin-image-slider-response';
|
||||||
|
```
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
???+ example "Displaying trial until subject gives a response"
|
???+ example "Displaying trial until subject gives a response"
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# initialize-microphone
|
# initialize-microphone
|
||||||
|
|
||||||
|
Current version: current-plugin-version. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-initialize-microphone/CHANGELOG.md).
|
||||||
|
|
||||||
This plugin asks the participant to grant permission to access a microphone.
|
This plugin asks the participant to grant permission to access a microphone.
|
||||||
If multiple microphones are connected to the participant's device, then it allows the participant to pick which device to use.
|
If multiple microphones are connected to the participant's device, then it allows the participant to pick which device to use.
|
||||||
Once access is granted for an experiment you do not need to get permission again.
|
Once access is granted for an experiment you do not need to get permission again.
|
||||||
@ -31,6 +33,29 @@ device_id | string | The [device ID](https://developer.mozilla.org/en-US/docs/We
|
|||||||
|
|
||||||
This plugin does not yet support [simulation mode](../overview/simulation.md).
|
This plugin does not yet support [simulation mode](../overview/simulation.md).
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
Using the CDN-hosted JavaScript file:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="https://unpkg.com/@jspsych/plugin-initialize-microphone@1.0.0"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using the JavaScript file downloaded from a GitHub release dist archive:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="jspsych/plugin-initialize-microphone.js"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using NPM:
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install @jspsych/plugin-initialize-microphone
|
||||||
|
```
|
||||||
|
```js
|
||||||
|
import initializeMicrophone from '@jspsych/plugin-initialize-microphone';
|
||||||
|
```
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
???+ example "Ask for microphone permission"
|
???+ example "Ask for microphone permission"
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# instructions plugin
|
# instructions plugin
|
||||||
|
|
||||||
|
Current version: current-plugin-version. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-instructions/CHANGELOG.md).
|
||||||
|
|
||||||
This plugin is for showing instructions to the subject. It allows subjects to navigate through multiple pages of instructions at their own pace, recording how long the subject spends on each page. Navigation can be done using the mouse or keyboard. Subjects can be allowed to navigate forwards and backwards through pages, if desired.
|
This plugin is for showing instructions to the subject. It allows subjects to navigate through multiple pages of instructions at their own pace, recording how long the subject spends on each page. Navigation can be done using the mouse or keyboard. Subjects can be allowed to navigate forwards and backwards through pages, if desired.
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
@ -28,6 +30,29 @@ In addition to the [default data collected by all plugins](../overview/plugins.m
|
|||||||
| view_history | array | An array containing the order of pages the subject viewed (including when the subject returned to previous pages) and the time spent viewing each page. Each object in the array represents a single page view, and contains keys called `page_index` (the page number, starting with 0) and `viewing_time` (duration of the page view). This will be encoded as a JSON string when data is saved using the `.json()` or `.csv()` functions. |
|
| view_history | array | An array containing the order of pages the subject viewed (including when the subject returned to previous pages) and the time spent viewing each page. Each object in the array represents a single page view, and contains keys called `page_index` (the page number, starting with 0) and `viewing_time` (duration of the page view). This will be encoded as a JSON string when data is saved using the `.json()` or `.csv()` functions. |
|
||||||
| rt | numeric | The response time in milliseconds for the subject to view all of the pages. |
|
| rt | numeric | The response time in milliseconds for the subject to view all of the pages. |
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
Using the CDN-hosted JavaScript file:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="https://unpkg.com/@jspsych/plugin-instructions@1.1.0"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using the JavaScript file downloaded from a GitHub release dist archive:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="jspsych/plugin-instructions.js"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using NPM:
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install @jspsych/plugin-instructions
|
||||||
|
```
|
||||||
|
```js
|
||||||
|
import instructions from '@jspsych/plugin-instructions';
|
||||||
|
```
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
#### Showing simple text instructions
|
#### Showing simple text instructions
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# maxdiff plugin
|
# maxdiff plugin
|
||||||
|
|
||||||
|
Current version: current-plugin-version. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-maxdiff/CHANGELOG.md).
|
||||||
|
|
||||||
The maxdiff plugin displays a table with rows of alternatives to be selected for two mutually-exclusive categories, typically as 'most' or 'least' on a particular criteria (e.g. importance, preference, similarity). The participant responds by selecting one radio button corresponding to an alternative in both the left and right response columns. The same alternative cannot be endorsed on both the left and right response columns (e.g. 'most' and 'least') simultaneously.
|
The maxdiff plugin displays a table with rows of alternatives to be selected for two mutually-exclusive categories, typically as 'most' or 'least' on a particular criteria (e.g. importance, preference, similarity). The participant responds by selecting one radio button corresponding to an alternative in both the left and right response columns. The same alternative cannot be endorsed on both the left and right response columns (e.g. 'most' and 'least') simultaneously.
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
@ -26,6 +28,28 @@ rt | numeric | The response time in milliseconds for the subject to make a respo
|
|||||||
labels | object | An object with two keys, `left` and `right`, containing the labels (strings) corresponding to the left and right response columns. This will be encoded as a JSON string when data is saved using the `.json()` or `.csv()` functions.
|
labels | object | An object with two keys, `left` and `right`, containing the labels (strings) corresponding to the left and right response columns. This will be encoded as a JSON string when data is saved using the `.json()` or `.csv()` functions.
|
||||||
response | object | An object with two keys, `left` and `right`, containing the alternatives selected on the left and right columns. This will be encoded as a JSON string when data is saved using the `.json()` or `.csv()` functions.
|
response | object | An object with two keys, `left` and `right`, containing the alternatives selected on the left and right columns. This will be encoded as a JSON string when data is saved using the `.json()` or `.csv()` functions.
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
Using the CDN-hosted JavaScript file:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="https://unpkg.com/@jspsych/plugin-maxdiff@1.1.0"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using the JavaScript file downloaded from a GitHub release dist archive:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="jspsych/plugin-maxdiff.js"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using NPM:
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install @jspsych/plugin-maxdiff
|
||||||
|
```
|
||||||
|
```js
|
||||||
|
import maxdiff from '@jspsych/plugin-maxdiff';
|
||||||
|
```
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# preload
|
# preload
|
||||||
|
|
||||||
|
Current version: current-plugin-version. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-preload/CHANGELOG.md).
|
||||||
|
|
||||||
This plugin loads images, audio, and video files. It is used for loading files into the browser's memory before they are needed in the experiment, in order to improve stimulus and response timing, and avoid disruption to the experiment flow. We recommend using this plugin anytime you are loading media files, and especially when your experiment requires large and/or many media files. See the [Media Preloading page](../overview/media-preloading/) for more information.
|
This plugin loads images, audio, and video files. It is used for loading files into the browser's memory before they are needed in the experiment, in order to improve stimulus and response timing, and avoid disruption to the experiment flow. We recommend using this plugin anytime you are loading media files, and especially when your experiment requires large and/or many media files. See the [Media Preloading page](../overview/media-preloading/) for more information.
|
||||||
|
|
||||||
The preload trial will end as soon as all files have loaded successfully. The trial will end or stop with an error message when one of these two scenarios occurs (whichever comes first): (a) all files have not finished loading when the `max_load_time` duration is reached, or (b) all file requests have responded with either a load or fail event, and one or more files has failed to load. The `continue_after_error` parameter determines whether the trial will stop with an error message or end (allowing the experiment to continue) when preloading is not successful.
|
The preload trial will end as soon as all files have loaded successfully. The trial will end or stop with an error message when one of these two scenarios occurs (whichever comes first): (a) all files have not finished loading when the `max_load_time` duration is reached, or (b) all file requests have responded with either a load or fail event, and one or more files has failed to load. The `continue_after_error` parameter determines whether the trial will stop with an error message or end (allowing the experiment to continue) when preloading is not successful.
|
||||||
@ -42,6 +44,30 @@ In addition to the [default data collected by all plugins](../overview/plugins.m
|
|||||||
|
|
||||||
In `visual` simulation mode, the plugin will run the trial as if the experiment was running normally. Specifying `simulation_options.data` will not work in `visual` mode.
|
In `visual` simulation mode, the plugin will run the trial as if the experiment was running normally. Specifying `simulation_options.data` will not work in `visual` mode.
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
Using the CDN-hosted JavaScript file:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="https://unpkg.com/@jspsych/plugin-preload@1.1.0"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using the JavaScript file downloaded from a GitHub release dist archive:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="jspsych/plugin-preload.js"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using NPM:
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install @jspsych/plugin-preload
|
||||||
|
```
|
||||||
|
```js
|
||||||
|
import preload from '@jspsych/plugin-preload';
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
???+ example "Automatically preloading based on other trials"
|
???+ example "Automatically preloading based on other trials"
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# reconstruction plugin
|
# reconstruction plugin
|
||||||
|
|
||||||
|
Current version: current-plugin-version. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-reconstruction/CHANGELOG.md).
|
||||||
|
|
||||||
This plugin allows a subject to interact with a stimulus by modifying a parameter of the stimulus and observing the change in the stimulus in real-time.
|
This plugin allows a subject to interact with a stimulus by modifying a parameter of the stimulus and observing the change in the stimulus in real-time.
|
||||||
|
|
||||||
The stimulus must be defined through a function that returns an HTML-formatted string. The function should take a single value, which is the parameter that can be modified by the subject. The value can only range from 0 to 1. See the example at the bottom of the page for a sample function.
|
The stimulus must be defined through a function that returns an HTML-formatted string. The function should take a single value, which is the parameter that can be modified by the subject. The value can only range from 0 to 1. See the example at the bottom of the page for a sample function.
|
||||||
@ -27,6 +29,29 @@ start_value | numeric | The starting value of the stimulus parameter.
|
|||||||
final_value | numeric | The final value of the stimulus parameter.
|
final_value | numeric | The final value of the stimulus parameter.
|
||||||
rt | numeric | The length of time, in milliseconds, that the trial lasted.
|
rt | numeric | The length of time, in milliseconds, that the trial lasted.
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
Using the CDN-hosted JavaScript file:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="https://unpkg.com/@jspsych/plugin-reconstruction@1.1.0"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using the JavaScript file downloaded from a GitHub release dist archive:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="jspsych/plugin-reconstruction.js"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using NPM:
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install @jspsych/plugin-reconstruction
|
||||||
|
```
|
||||||
|
```js
|
||||||
|
import reconstruction from '@jspsych/plugin-reconstruction';
|
||||||
|
```
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
???+ example "Make a block larger and smaller"
|
???+ example "Make a block larger and smaller"
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# resize
|
# resize
|
||||||
|
|
||||||
|
Current version: current-plugin-version. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-resize/CHANGELOG.md).
|
||||||
|
|
||||||
This plugin displays a resizable div container that allows the user to drag until the container is the same size as the item being measured. Once the user measures the item as close as possible, clicking the button sets a scaling factor for the div containing jsPsych content. This causes the stimuli that follow to have a known size, independent of monitor resolution.
|
This plugin displays a resizable div container that allows the user to drag until the container is the same size as the item being measured. Once the user measures the item as close as possible, clicking the button sets a scaling factor for the div containing jsPsych content. This causes the stimuli that follow to have a known size, independent of monitor resolution.
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
@ -28,6 +30,29 @@ scale_factor | numeric | Scaling factor that will be applied to the div containi
|
|||||||
|
|
||||||
This plugin does not yet support [simulation mode](../overview/simulation.md).
|
This plugin does not yet support [simulation mode](../overview/simulation.md).
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
Using the CDN-hosted JavaScript file:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="https://unpkg.com/@jspsych/plugin-resize@1.0.0"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using the JavaScript file downloaded from a GitHub release dist archive:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="jspsych/plugin-resize.js"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using NPM:
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install @jspsych/plugin-resize
|
||||||
|
```
|
||||||
|
```js
|
||||||
|
import resize from '@jspsych/plugin-resize';
|
||||||
|
```
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
???+ example "Measuring a credit card and resizing the display to have 150 pixels equal an inch."
|
???+ example "Measuring a credit card and resizing the display to have 150 pixels equal an inch."
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# same-different-html plugin
|
# same-different-html plugin
|
||||||
|
|
||||||
|
Current version: current-plugin-version. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-same-different-html/CHANGELOG.md).
|
||||||
|
|
||||||
The same-different-html plugin displays two stimuli sequentially. Stimuli are HTML objects. The subject responds using the keyboard, and indicates whether the stimuli were the same or different. Same does not necessarily mean identical; a category judgment could be made, for example.
|
The same-different-html plugin displays two stimuli sequentially. Stimuli are HTML objects. The subject responds using the keyboard, and indicates whether the stimuli were the same or different. Same does not necessarily mean identical; a category judgment could be made, for example.
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
@ -37,6 +39,30 @@ Additionally, if `first_stim_duration` is null, then the following data is also
|
|||||||
| rt_stim1 | numeric | The response time in milliseconds for the subject to continue after the first stimulus. The time is measured from when the first stimulus appears on the screen until the subject's response. |
|
| rt_stim1 | numeric | The response time in milliseconds for the subject to continue after the first stimulus. The time is measured from when the first stimulus appears on the screen until the subject's response. |
|
||||||
| response_stim1 | string | Indicates which key the subject pressed to continue. |
|
| response_stim1 | string | Indicates which key the subject pressed to continue. |
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
Using the CDN-hosted JavaScript file:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="https://unpkg.com/@jspsych/plugin-same-different-html@1.1.0"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using the JavaScript file downloaded from a GitHub release dist archive:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="jspsych/plugin-same-different-html.js"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using NPM:
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install @jspsych/plugin-same-different-html
|
||||||
|
```
|
||||||
|
```js
|
||||||
|
import sameDifferentHtml from '@jspsych/plugin-same-different-html';
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
???+ example "Two text choices"
|
???+ example "Two text choices"
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# same-different-image plugin
|
# same-different-image plugin
|
||||||
|
|
||||||
|
Current version: current-plugin-version. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-same-different-image/CHANGELOG.md).
|
||||||
|
|
||||||
The same-different-image plugin displays two stimuli sequentially. Stimuli are images. The subject responds using the keyboard, and indicates whether the stimuli were the same or different. Same does not necessarily mean identical; a category judgment could be made, for example.
|
The same-different-image plugin displays two stimuli sequentially. Stimuli are images. The subject responds using the keyboard, and indicates whether the stimuli were the same or different. Same does not necessarily mean identical; a category judgment could be made, for example.
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
@ -37,6 +39,29 @@ Additionally, if `first_stim_duration` is null, then the following data is also
|
|||||||
| rt_stim1 | numeric | The response time in milliseconds for the subject to continue after the first stimulus. The time is measured from when the first stimulus appears on the screen until the subject's response. |
|
| rt_stim1 | numeric | The response time in milliseconds for the subject to continue after the first stimulus. The time is measured from when the first stimulus appears on the screen until the subject's response. |
|
||||||
| response_stim1 | string | Indicates which key the subject pressed to continue. |
|
| response_stim1 | string | Indicates which key the subject pressed to continue. |
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
Using the CDN-hosted JavaScript file:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="https://unpkg.com/@jspsych/plugin-same-different-image@1.1.0"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using the JavaScript file downloaded from a GitHub release dist archive:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="jspsych/plugin-same-different-image.js"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using NPM:
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install @jspsych/plugin-same-different-image
|
||||||
|
```
|
||||||
|
```js
|
||||||
|
import sameDifferentImage from '@jspsych/plugin-same-different-image';
|
||||||
|
```
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
???+ example "Identifying emotional expressions"
|
???+ example "Identifying emotional expressions"
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# serial-reaction-time-mouse plugin
|
# serial-reaction-time-mouse plugin
|
||||||
|
|
||||||
|
Current version: current-plugin-version. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-serial-reaction-time-mouse/CHANGELOG.md).
|
||||||
|
|
||||||
The serial reaction time mouse plugin implements a generalized version of the SRT task [(Nissen & Bullmer, 1987)](https://doi.org/10.1016%2F0010-0285%2887%2990002-8). Squares are displayed in a grid-based system on the screen, and one square changes color. The participant must click on the square that changes color.
|
The serial reaction time mouse plugin implements a generalized version of the SRT task [(Nissen & Bullmer, 1987)](https://doi.org/10.1016%2F0010-0285%2887%2990002-8). Squares are displayed in a grid-based system on the screen, and one square changes color. The participant must click on the square that changes color.
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
@ -29,7 +31,30 @@ In addition to the [default data collected by all plugins](../overview/plugins.m
|
|||||||
| target | array | The `[row, column]` target location on the grid. This will be encoded as a JSON string when data is saved using the `.json()` or `.csv()` functions. |
|
| target | array | The `[row, column]` target location on the grid. This will be encoded as a JSON string when data is saved using the `.json()` or `.csv()` functions. |
|
||||||
| rt | numeric | The response time in milliseconds for the subject to make a response. The time is measured from when the second stimulus first appears on the screen until the subject's response. |
|
| rt | numeric | The response time in milliseconds for the subject to make a response. The time is measured from when the second stimulus first appears on the screen until the subject's response. |
|
||||||
| response | array | The `[row, column]` response location on the grid. This will be encoded as a JSON string when data is saved using the `.json()` or `.csv()` functions. |
|
| response | array | The `[row, column]` response location on the grid. This will be encoded as a JSON string when data is saved using the `.json()` or `.csv()` functions. |
|
||||||
| correct | boolean | Whether the response location matches the target location (`true`) or not (`false`)l
|
| correct | boolean | Whether the response location matches the target location (`true`) or not (`false`). |
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
Using the CDN-hosted JavaScript file:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="https://unpkg.com/@jspsych/plugin-serial-reaction-time-mouse@1.1.0"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using the JavaScript file downloaded from a GitHub release dist archive:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="jspsych/plugin-serial-reaction-time-mouse.js"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using NPM:
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install @jspsych/plugin-serial-reaction-time-mouse
|
||||||
|
```
|
||||||
|
```js
|
||||||
|
import serialReactionTimeMouse from '@jspsych/plugin-serial-reaction-time-mouse';
|
||||||
|
```
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# serial-reaction-time plugin
|
# serial-reaction-time plugin
|
||||||
|
|
||||||
|
Current version: current-plugin-version. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-serial-reaction-time/CHANGELOG.md).
|
||||||
|
|
||||||
The serial reaction time plugin implements a generalized version of the SRT task [(Nissen & Bullemer, 1987)](https://doi.org/10.1016%2F0010-0285%2887%2990002-8). Squares are displayed in a grid-based system on the screen, and one square changes color. The participant presses a key that corresponds to the darkened key. Feedback is optionally displayed, showing the participant which square the key they pressed matches.
|
The serial reaction time plugin implements a generalized version of the SRT task [(Nissen & Bullemer, 1987)](https://doi.org/10.1016%2F0010-0285%2887%2990002-8). Squares are displayed in a grid-based system on the screen, and one square changes color. The participant presses a key that corresponds to the darkened key. Feedback is optionally displayed, showing the participant which square the key they pressed matches.
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
@ -33,6 +35,29 @@ In addition to the [default data collected by all plugins](../overview/plugins.m
|
|||||||
| rt | numeric | The response time in milliseconds for the subject to make a response. The time is measured from when the second stimulus first appears on the screen until the subject's response. |
|
| rt | numeric | The response time in milliseconds for the subject to make a response. The time is measured from when the second stimulus first appears on the screen until the subject's response. |
|
||||||
| correct | boolean | `true` if the subject's response matched the target. |
|
| correct | boolean | `true` if the subject's response matched the target. |
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
Using the CDN-hosted JavaScript file:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="https://unpkg.com/@jspsych/plugin-serial-reaction-time@1.1.0"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using the JavaScript file downloaded from a GitHub release dist archive:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="jspsych/plugin-serial-reaction-time.js"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using NPM:
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install @jspsych/plugin-serial-reaction-time
|
||||||
|
```
|
||||||
|
```js
|
||||||
|
import serialReactionTime from '@jspsych/plugin-serial-reaction-time';
|
||||||
|
```
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
???+ example "A classic SRT"
|
???+ example "A classic SRT"
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# sketchpad plugin
|
# sketchpad plugin
|
||||||
|
|
||||||
|
Current version: current-plugin-version. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-sketchpad/CHANGELOG.md).
|
||||||
|
|
||||||
This plugin creates an interactive canvas that the participant can draw on using their mouse or touchscreen.
|
This plugin creates an interactive canvas that the participant can draw on using their mouse or touchscreen.
|
||||||
It can be used for sketching tasks, like asking the participant to draw a particular object.
|
It can be used for sketching tasks, like asking the participant to draw a particular object.
|
||||||
It can also be used for some image segmentation or annotation tasks by setting the `background_image` parameter to render an image on the canvas.
|
It can also be used for some image segmentation or annotation tasks by setting the `background_image` parameter to render an image on the canvas.
|
||||||
@ -65,6 +67,29 @@ In addition to the [default data collected by all plugins](../overview/plugins.m
|
|||||||
|
|
||||||
This plugin does not yet support [simulation mode](../overview/simulation.md).
|
This plugin does not yet support [simulation mode](../overview/simulation.md).
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
Using the CDN-hosted JavaScript file:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="https://unpkg.com/@jspsych/plugin-sketchpad@1.0.1"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using the JavaScript file downloaded from a GitHub release dist archive:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="jspsych/plugin-sketchpad.js"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using NPM:
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install @jspsych/plugin-sketchpad
|
||||||
|
```
|
||||||
|
```js
|
||||||
|
import sketchpad from '@jspsych/plugin-sketchpad';
|
||||||
|
```
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
???+ example "Basic sketchpad with a prompt"
|
???+ example "Basic sketchpad with a prompt"
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# survey-html-form plugin
|
# survey-html-form plugin
|
||||||
|
|
||||||
|
Current version: current-plugin-version. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-survey-html-form/CHANGELOG.md).
|
||||||
|
|
||||||
The survey-html-form plugin displays a set of `<inputs>` from a HTML string. The type of input can be freely chosen, for a list of possible input types see the [MDN page on inputs](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input). The subject provides answers to the input fields.
|
The survey-html-form plugin displays a set of `<inputs>` from a HTML string. The type of input can be freely chosen, for a list of possible input types see the [MDN page on inputs](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input). The subject provides answers to the input fields.
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
@ -28,6 +30,29 @@ rt | numeric | The response time in milliseconds for the subject to make a respo
|
|||||||
|
|
||||||
This plugin does not yet support [simulation mode](../overview/simulation.md).
|
This plugin does not yet support [simulation mode](../overview/simulation.md).
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
Using the CDN-hosted JavaScript file:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="https://unpkg.com/@jspsych/plugin-survey-html-form@1.0.0"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using the JavaScript file downloaded from a GitHub release dist archive:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="jspsych/plugin-survey-html-form.js"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using NPM:
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install @jspsych/plugin-survey-html-form
|
||||||
|
```
|
||||||
|
```js
|
||||||
|
import surveyHtmlForm from '@jspsych/plugin-survey-html-form';
|
||||||
|
```
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
???+ example "Fill in the blanks"
|
???+ example "Fill in the blanks"
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# survey-likert plugin
|
# survey-likert plugin
|
||||||
|
|
||||||
|
Current version: current-plugin-version. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-survey-likert/CHANGELOG.md).
|
||||||
|
|
||||||
The survey-likert plugin displays a set of questions with Likert scale responses. The subject responds by selecting a radio button.
|
The survey-likert plugin displays a set of questions with Likert scale responses. The subject responds by selecting a radio button.
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
@ -25,6 +27,29 @@ response | object | An object containing the response for each question. The obj
|
|||||||
rt | numeric | The response time in milliseconds for the subject to make a response. The time is measured from when the questions first appear on the screen until the subject's response(s) are submitted. |
|
rt | numeric | The response time in milliseconds for the subject to make a response. The time is measured from when the questions first appear on the screen until the subject's response(s) are submitted. |
|
||||||
question_order | array | An array with the order of questions. For example `[2,0,1]` would indicate that the first question was `trial.questions[2]` (the third item in the `questions` parameter), the second question was `trial.questions[0]`, and the final question was `trial.questions[1]`. This will be encoded as a JSON string when data is saved using the `.json()` or `.csv()` functions. |
|
question_order | array | An array with the order of questions. For example `[2,0,1]` would indicate that the first question was `trial.questions[2]` (the third item in the `questions` parameter), the second question was `trial.questions[0]`, and the final question was `trial.questions[1]`. This will be encoded as a JSON string when data is saved using the `.json()` or `.csv()` functions. |
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
Using the CDN-hosted JavaScript file:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="https://unpkg.com/@jspsych/plugin-survey-likert@1.1.0"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using the JavaScript file downloaded from a GitHub release dist archive:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="jspsych/plugin-survey-likert.js"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using NPM:
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install @jspsych/plugin-survey-likert
|
||||||
|
```
|
||||||
|
```js
|
||||||
|
import surveyLikert from '@jspsych/plugin-survey-likert';
|
||||||
|
```
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
???+ example "Single Question"
|
???+ example "Single Question"
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# survey-multi-choice plugin
|
# survey-multi-choice plugin
|
||||||
|
|
||||||
|
Current version: current-plugin-version. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-survey-multi-choice/CHANGELOG.md).
|
||||||
|
|
||||||
The survey-multi-choice plugin displays a set of questions with multiple choice response fields. The subject selects a single answer.
|
The survey-multi-choice plugin displays a set of questions with multiple choice response fields. The subject selects a single answer.
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
@ -24,6 +26,29 @@ response | object | An object containing the response for each question. The obj
|
|||||||
rt | numeric | The response time in milliseconds for the subject to make a response. The time is measured from when the questions first appear on the screen until the subject's response(s) are submitted. |
|
rt | numeric | The response time in milliseconds for the subject to make a response. The time is measured from when the questions first appear on the screen until the subject's response(s) are submitted. |
|
||||||
question_order | array | An array with the order of questions. For example `[2,0,1]` would indicate that the first question was `trial.questions[2]` (the third item in the `questions` parameter), the second question was `trial.questions[0]`, and the final question was `trial.questions[1]`. This will be encoded as a JSON string when data is saved using the `.json()` or `.csv()` functions. |
|
question_order | array | An array with the order of questions. For example `[2,0,1]` would indicate that the first question was `trial.questions[2]` (the third item in the `questions` parameter), the second question was `trial.questions[0]`, and the final question was `trial.questions[1]`. This will be encoded as a JSON string when data is saved using the `.json()` or `.csv()` functions. |
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
Using the CDN-hosted JavaScript file:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="https://unpkg.com/@jspsych/plugin-survey-multi-choice@1.1.0"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using the JavaScript file downloaded from a GitHub release dist archive:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="jspsych/plugin-survey-multi-choice.js"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using NPM:
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install @jspsych/plugin-survey-multi-choice
|
||||||
|
```
|
||||||
|
```js
|
||||||
|
import surveyMultiChoice from '@jspsych/plugin-survey-multi-choice';
|
||||||
|
```
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
???+ example "Vertical Question Alignment"
|
???+ example "Vertical Question Alignment"
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# survey-multi-select plugin
|
# survey-multi-select plugin
|
||||||
|
|
||||||
|
Current version: current-plugin-version. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-survey-multi-select/CHANGELOG.md).
|
||||||
|
|
||||||
The survey-multi-select plugin displays a set of questions with multiple select response fields. The subject could select multiple answers.
|
The survey-multi-select plugin displays a set of questions with multiple select response fields. The subject could select multiple answers.
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
@ -25,6 +27,29 @@ response | object | An object containing the response for each question. The obj
|
|||||||
rt | numeric | The response time in milliseconds for the subject to make a response. The time is measured from when the questions first appear on the screen until the subject's response(s) were submitted. |
|
rt | numeric | The response time in milliseconds for the subject to make a response. The time is measured from when the questions first appear on the screen until the subject's response(s) were submitted. |
|
||||||
question_order | array | An array with the order of questions. For example `[2,0,1]` would indicate that the first question was `trial.questions[2]` (the third item in the `questions` parameter), the second question was `trial.questions[0]`, and the final question was `trial.questions[1]`. This will be encoded as a JSON string when data is saved using the `.json()` or `.csv()` functions. |
|
question_order | array | An array with the order of questions. For example `[2,0,1]` would indicate that the first question was `trial.questions[2]` (the third item in the `questions` parameter), the second question was `trial.questions[0]`, and the final question was `trial.questions[1]`. This will be encoded as a JSON string when data is saved using the `.json()` or `.csv()` functions. |
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
Using the CDN-hosted JavaScript file:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="https://unpkg.com/@jspsych/plugin-survey-multi-select@1.1.0"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using the JavaScript file downloaded from a GitHub release dist archive:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="jspsych/plugin-survey-multi-select.js"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using NPM:
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install @jspsych/plugin-survey-multi-select
|
||||||
|
```
|
||||||
|
```js
|
||||||
|
import surveyMultiSelect from '@jspsych/plugin-survey-multi-select';
|
||||||
|
```
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
???+ example "Multiple Questions on a Page"
|
???+ example "Multiple Questions on a Page"
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# survey-text plugin
|
# survey-text plugin
|
||||||
|
|
||||||
|
Current version: current-plugin-version. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-survey-text/CHANGELOG.md).
|
||||||
|
|
||||||
The survey-text plugin displays a set of questions with free response text fields. The subject types in answers.
|
The survey-text plugin displays a set of questions with free response text fields. The subject types in answers.
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
@ -24,6 +26,29 @@ response | object | An object containing the response for each question. The obj
|
|||||||
rt | numeric | The response time in milliseconds for the subject to make a response. The time is measured from when the questions first appear on the screen until the subject's response(s) were submitted. |
|
rt | numeric | The response time in milliseconds for the subject to make a response. The time is measured from when the questions first appear on the screen until the subject's response(s) were submitted. |
|
||||||
question_order | array | An array with the order of questions. For example `[2,0,1]` would indicate that the first question was `trial.questions[2]` (the third item in the `questions` parameter), the second question was `trial.questions[0]`, and the final question was `trial.questions[1]`. This will be encoded as a JSON string when data is saved using the `.json()` or `.csv()` functions. |
|
question_order | array | An array with the order of questions. For example `[2,0,1]` would indicate that the first question was `trial.questions[2]` (the third item in the `questions` parameter), the second question was `trial.questions[0]`, and the final question was `trial.questions[1]`. This will be encoded as a JSON string when data is saved using the `.json()` or `.csv()` functions. |
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
Using the CDN-hosted JavaScript file:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="https://unpkg.com/@jspsych/plugin-survey-text@1.1.0"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using the JavaScript file downloaded from a GitHub release dist archive:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="jspsych/plugin-survey-text.js"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using NPM:
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install @jspsych/plugin-survey-text
|
||||||
|
```
|
||||||
|
```js
|
||||||
|
import surveyText from '@jspsych/plugin-survey-text';
|
||||||
|
```
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
???+ example "Single question and response"
|
???+ example "Single question and response"
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# survey
|
# survey
|
||||||
|
|
||||||
|
Current version: current-plugin-version. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-survey/CHANGELOG.md).
|
||||||
|
|
||||||
The survey plugin displays one or more questions of different types, on one or more pages that the participant can navigate. This plugin is built on top of the [SurveyJS](https://surveyjs.io/) library.
|
The survey plugin displays one or more questions of different types, on one or more pages that the participant can navigate. This plugin is built on top of the [SurveyJS](https://surveyjs.io/) library.
|
||||||
|
|
||||||
The supported question types are:
|
The supported question types are:
|
||||||
@ -185,6 +187,29 @@ rt | numeric | The response time in milliseconds for the subject to make a respo
|
|||||||
|
|
||||||
This plugin does not yet support [simulation mode](../overview/simulation.md).
|
This plugin does not yet support [simulation mode](../overview/simulation.md).
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
Using the CDN-hosted JavaScript file:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="https://unpkg.com/@jspsych/plugin-survey@0.1.1"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using the JavaScript file downloaded from a GitHub release dist archive:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="jspsych/plugin-survey.js"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using NPM:
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install @jspsych/plugin-survey
|
||||||
|
```
|
||||||
|
```js
|
||||||
|
import survey from '@jspsych/plugin-survey';
|
||||||
|
```
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
???+ example "Basic single page"
|
???+ example "Basic single page"
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# video-button-response plugin
|
# video-button-response plugin
|
||||||
|
|
||||||
|
Current version: current-plugin-version. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-video-button-response/CHANGELOG.md).
|
||||||
|
|
||||||
This plugin plays a video and records responses generated by button click. The stimulus can be displayed until a response is given, or for a pre-determined amount of time. The trial can be ended automatically when the subject responds, when the video file has finished playing, or if the subject has failed to respond within a fixed length of time. You can also prevent a button response from being made before the video has finished playing. The button itself can be customized using HTML formatting.
|
This plugin plays a video and records responses generated by button click. The stimulus can be displayed until a response is given, or for a pre-determined amount of time. The trial can be ended automatically when the subject responds, when the video file has finished playing, or if the subject has failed to respond within a fixed length of time. You can also prevent a button response from being made before the video has finished playing. The button itself can be customized using HTML formatting.
|
||||||
|
|
||||||
Video files can be automatically preloaded by jsPsych using the [`preload` plugin](preload.md). However, if you are using timeline variables or another dynamic method to specify the video stimulus, you will need to [manually preload](../overview/media-preloading.md#manual-preloading) the videos. Also note that video preloading is disabled when the experiment is running as a file (i.e. opened directly in the browser, rather than through a server), in order to prevent CORS errors - see the section on [Running Experiments](../overview/running-experiments.md) for more information.
|
Video files can be automatically preloaded by jsPsych using the [`preload` plugin](preload.md). However, if you are using timeline variables or another dynamic method to specify the video stimulus, you will need to [manually preload](../overview/media-preloading.md#manual-preloading) the videos. Also note that video preloading is disabled when the experiment is running as a file (i.e. opened directly in the browser, rather than through a server), in order to prevent CORS errors - see the section on [Running Experiments](../overview/running-experiments.md) for more information.
|
||||||
@ -45,6 +47,29 @@ In `data-only` simulation mode, the `response_allowed_while_playing` parameter d
|
|||||||
This is because the audio file is not loaded in `data-only` mode and therefore the length is unknown.
|
This is because the audio file is not loaded in `data-only` mode and therefore the length is unknown.
|
||||||
This may change in a future version as we improve the simulation modes.
|
This may change in a future version as we improve the simulation modes.
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
Using the CDN-hosted JavaScript file:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="https://unpkg.com/@jspsych/plugin-video-button-response@1.1.0"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using the JavaScript file downloaded from a GitHub release dist archive:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="jspsych/plugin-video-button-response.js"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using NPM:
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install @jspsych/plugin-video-button-response
|
||||||
|
```
|
||||||
|
```js
|
||||||
|
import videoButtonResponse from '@jspsych/plugin-video-button-response';
|
||||||
|
```
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
|
|
||||||
???+ example "Responses disabled until the video is complete"
|
???+ example "Responses disabled until the video is complete"
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# video-keyboard-response plugin
|
# video-keyboard-response plugin
|
||||||
|
|
||||||
|
Current version: current-plugin-version. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-video-keyboard-response/CHANGELOG.md).
|
||||||
|
|
||||||
This plugin plays a video file and records a keyboard response. The stimulus can be displayed until a response is given, or for a pre-determined amount of time. The trial can be ended automatically when the subject responds, when the video file has finished playing, or if the subject has failed to respond within a fixed length of time. You can also prevent a keyboard response from being recorded before the video has finished playing.
|
This plugin plays a video file and records a keyboard response. The stimulus can be displayed until a response is given, or for a pre-determined amount of time. The trial can be ended automatically when the subject responds, when the video file has finished playing, or if the subject has failed to respond within a fixed length of time. You can also prevent a keyboard response from being recorded before the video has finished playing.
|
||||||
|
|
||||||
Video files can be automatically preloaded by jsPsych using the [`preload` plugin](preload.md). However, if you are using timeline variables or another dynamic method to specify the video stimulus, you will need to [manually preload](../overview/media-preloading.md#manual-preloading) the videos. Also note that video preloading is disabled when the experiment is running as a file (i.e. opened directly in the browser, rather than through a server), in order to prevent CORS errors - see the section on [Running Experiments](../overview/running-experiments.md) for more information.
|
Video files can be automatically preloaded by jsPsych using the [`preload` plugin](preload.md). However, if you are using timeline variables or another dynamic method to specify the video stimulus, you will need to [manually preload](../overview/media-preloading.md#manual-preloading) the videos. Also note that video preloading is disabled when the experiment is running as a file (i.e. opened directly in the browser, rather than through a server), in order to prevent CORS errors - see the section on [Running Experiments](../overview/running-experiments.md) for more information.
|
||||||
@ -41,6 +43,29 @@ In `data-only` simulation mode, the `response_allowed_while_playing` parameter d
|
|||||||
This is because the audio file is not loaded in `data-only` mode and therefore the length is unknown.
|
This is because the audio file is not loaded in `data-only` mode and therefore the length is unknown.
|
||||||
This may change in a future version as we improve the simulation modes.
|
This may change in a future version as we improve the simulation modes.
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
Using the CDN-hosted JavaScript file:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="https://unpkg.com/@jspsych/plugin-video-keyboard-response@1.1.0"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using the JavaScript file downloaded from a GitHub release dist archive:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="jspsych/plugin-video-keyboard-response.js"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using NPM:
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install @jspsych/plugin-video-keyboard-response
|
||||||
|
```
|
||||||
|
```js
|
||||||
|
import videoKeyboardResponse from '@jspsych/plugin-video-keyboard-response';
|
||||||
|
```
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
???+ example "Show a video and advance to next trial automatically"
|
???+ example "Show a video and advance to next trial automatically"
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# video-slider-response plugin
|
# video-slider-response plugin
|
||||||
|
|
||||||
|
Current version: current-plugin-version. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-video-slider-response/CHANGELOG.md).
|
||||||
|
|
||||||
This plugin plays a video and allows the subject to respond by dragging a slider. The stimulus can be displayed until a response is given, or for a pre-determined amount of time. The trial can be ended automatically when the subject responds, when the video file has finished playing, or if the subject has failed to respond within a fixed length of time. You can also prevent the slider response from being made before the video has finished playing.
|
This plugin plays a video and allows the subject to respond by dragging a slider. The stimulus can be displayed until a response is given, or for a pre-determined amount of time. The trial can be ended automatically when the subject responds, when the video file has finished playing, or if the subject has failed to respond within a fixed length of time. You can also prevent the slider response from being made before the video has finished playing.
|
||||||
|
|
||||||
Video files can be automatically preloaded by jsPsych using the [`preload` plugin](preload.md). However, if you are using timeline variables or another dynamic method to specify the video stimulus, you will need to [manually preload](../overview/media-preloading.md#manual-preloading) the videos. Also note that video preloading is disabled when the experiment is running as a file (i.e. opened directly in the browser, rather than through a server), in order to prevent CORS errors - see the section on [Running Experiments](../overview/running-experiments.md) for more information.
|
Video files can be automatically preloaded by jsPsych using the [`preload` plugin](preload.md). However, if you are using timeline variables or another dynamic method to specify the video stimulus, you will need to [manually preload](../overview/media-preloading.md#manual-preloading) the videos. Also note that video preloading is disabled when the experiment is running as a file (i.e. opened directly in the browser, rather than through a server), in order to prevent CORS errors - see the section on [Running Experiments](../overview/running-experiments.md) for more information.
|
||||||
@ -51,6 +53,29 @@ In `data-only` simulation mode, the `response_allowed_while_playing` parameter d
|
|||||||
This is because the audio file is not loaded in `data-only` mode and therefore the length is unknown.
|
This is because the audio file is not loaded in `data-only` mode and therefore the length is unknown.
|
||||||
This may change in a future version as we improve the simulation modes.
|
This may change in a future version as we improve the simulation modes.
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
Using the CDN-hosted JavaScript file:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="https://unpkg.com/@jspsych/plugin-video-slider-response@1.1.0"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using the JavaScript file downloaded from a GitHub release dist archive:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="jspsych/plugin-video-slider-response.js"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using NPM:
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install @jspsych/plugin-video-slider-response
|
||||||
|
```
|
||||||
|
```js
|
||||||
|
import videoSliderResponse from '@jspsych/plugin-video-slider-response';
|
||||||
|
```
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
|
|
||||||
???+ example "Rate enjoyment of a video clip"
|
???+ example "Rate enjoyment of a video clip"
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# virtual-chinrest
|
# virtual-chinrest
|
||||||
|
|
||||||
|
Current version: current-plugin-version. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-virtual-chinrest/CHANGELOG.md).
|
||||||
|
|
||||||
This plugin provides a "virtual chinrest" that can measure the distance between the participant and the screen. It can also standardize the jsPsych page content to a known physical dimension (e.g., ensuring that a 200px wide stimulus is 2.2cm wide on the participant's monitor). This is based on the work of [Li, Joo, Yeatman, and Reinecke (2020)](https://doi.org/10.1038/s41598-019-57204-1), and the plugin code is a modified version of [their implementation](https://github.com/QishengLi/virtual_chinrest). We recommend citing their work in any paper that makes use of this plugin.
|
This plugin provides a "virtual chinrest" that can measure the distance between the participant and the screen. It can also standardize the jsPsych page content to a known physical dimension (e.g., ensuring that a 200px wide stimulus is 2.2cm wide on the participant's monitor). This is based on the work of [Li, Joo, Yeatman, and Reinecke (2020)](https://doi.org/10.1038/s41598-019-57204-1), and the plugin code is a modified version of [their implementation](https://github.com/QishengLi/virtual_chinrest). We recommend citing their work in any paper that makes use of this plugin.
|
||||||
|
|
||||||
!!! note "Citation"
|
!!! note "Citation"
|
||||||
@ -57,6 +59,29 @@ _Note: The deg data are **only** returned if viewing distance is estimated with
|
|||||||
|
|
||||||
This plugin does not yet support [simulation mode](../overview/simulation.md).
|
This plugin does not yet support [simulation mode](../overview/simulation.md).
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
Using the CDN-hosted JavaScript file:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="https://unpkg.com/@jspsych/plugin-virtual-chinrest@2.0.0"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using the JavaScript file downloaded from a GitHub release dist archive:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="jspsych/plugin-virtual-chinrest.js"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using NPM:
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install @jspsych/plugin-virtual-chinrest
|
||||||
|
```
|
||||||
|
```js
|
||||||
|
import virtualChinrest from '@jspsych/plugin-virtual-chinrest';
|
||||||
|
```
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
|
|
||||||
???+ example "Measure distance to screen and pixel ratio; no resizing"
|
???+ example "Measure distance to screen and pixel ratio; no resizing"
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# visual-search-circle plugin
|
# visual-search-circle plugin
|
||||||
|
|
||||||
|
Current version: current-plugin-version. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-visual-search-circle/CHANGELOG.md).
|
||||||
|
|
||||||
This plugin presents a customizable visual-search task modelled after [Wang, Cavanagh, & Green (1994)](http://dx.doi.org/10.3758/BF03206946). The subject indicates whether or not a target is present among a set of distractors. The stimuli are displayed in a circle, evenly-spaced, equidistant from a fixation point. Here is an example using normal and backward Ns:
|
This plugin presents a customizable visual-search task modelled after [Wang, Cavanagh, & Green (1994)](http://dx.doi.org/10.3758/BF03206946). The subject indicates whether or not a target is present among a set of distractors. The stimuli are displayed in a circle, evenly-spaced, equidistant from a fixation point. Here is an example using normal and backward Ns:
|
||||||
|
|
||||||

|

|
||||||
@ -44,6 +46,29 @@ In addition to the [default data collected by all plugins](../overview/plugins.m
|
|||||||
| target_present | boolean | True if the target is present in the search array |
|
| target_present | boolean | True if the target is present in the search array |
|
||||||
| locations | array | Array where each element is the pixel value of the center of an image in the search array. If the target is present, then the first element will represent the location of the target. This will be encoded as a JSON string when data is saved using the `.json()` or `.csv()` functions. |
|
| locations | array | Array where each element is the pixel value of the center of an image in the search array. If the target is present, then the first element will represent the location of the target. This will be encoded as a JSON string when data is saved using the `.json()` or `.csv()` functions. |
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
Using the CDN-hosted JavaScript file:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="https://unpkg.com/@jspsych/plugin-visual-search-circle@1.1.0"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using the JavaScript file downloaded from a GitHub release dist archive:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="jspsych/plugin-visual-search-circle.js"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using NPM:
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install @jspsych/plugin-visual-search-circle
|
||||||
|
```
|
||||||
|
```js
|
||||||
|
import visualSearchCircle from '@jspsych/plugin-visual-search-circle';
|
||||||
|
```
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
???+ example "Identical distractors"
|
???+ example "Identical distractors"
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# webgazer-calibrate
|
# webgazer-calibrate
|
||||||
|
|
||||||
|
Current version: current-plugin-version. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-webgazer-calibrate/CHANGELOG.md).
|
||||||
|
|
||||||
This plugin can be used to calibrate the [WebGazer extension](../extensions/webgazer.md). For a narrative description of eye tracking with jsPsych, see the [eye tracking overview](../overview/eye-tracking.md).
|
This plugin can be used to calibrate the [WebGazer extension](../extensions/webgazer.md). For a narrative description of eye tracking with jsPsych, see the [eye tracking overview](../overview/eye-tracking.md).
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
@ -29,6 +31,29 @@ No data currently added by this plugin. Use the [webgazer-validate](../webgazer-
|
|||||||
|
|
||||||
This plugin does not yet support [simulation mode](../overview/simulation.md).
|
This plugin does not yet support [simulation mode](../overview/simulation.md).
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
Using the CDN-hosted JavaScript file:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="https://unpkg.com/@jspsych/plugin-webgazer-calibrate@1.0.0"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using the JavaScript file downloaded from a GitHub release dist archive:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="jspsych/plugin-webgazer-calibrate.js"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using NPM:
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install @jspsych/plugin-webgazer-calibrate
|
||||||
|
```
|
||||||
|
```js
|
||||||
|
import webgazerCalibrate from '@jspsych/plugin-webgazer-calibrate';
|
||||||
|
```
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
|
|
||||||
Because the eye tracking plugins need to be used in conjunction with each other, please see the [example on the eye tracking overview page](../overview/eye-tracking.md#example) for an integrated example.
|
Because the eye tracking plugins need to be used in conjunction with each other, please see the [example on the eye tracking overview page](../overview/eye-tracking.md#example) for an integrated example.
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# webgazer-init-camera
|
# webgazer-init-camera
|
||||||
|
|
||||||
|
Current version: current-plugin-version. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-webgazer-init-camera/CHANGELOG.md).
|
||||||
|
|
||||||
This plugin initializes the camera and helps the participant center their face in the camera view for using the the [WebGazer extension](../extensions/webgazer.md). For a narrative description of eye tracking with jsPsych, see the [eye tracking overview](../overview/eye-tracking.md).
|
This plugin initializes the camera and helps the participant center their face in the camera view for using the the [WebGazer extension](../extensions/webgazer.md). For a narrative description of eye tracking with jsPsych, see the [eye tracking overview](../overview/eye-tracking.md).
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
@ -23,6 +25,29 @@ load_time | numeric | The time it took for webgazer to initialize. This can be a
|
|||||||
|
|
||||||
This plugin does not yet support [simulation mode](../overview/simulation.md).
|
This plugin does not yet support [simulation mode](../overview/simulation.md).
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
Using the CDN-hosted JavaScript file:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="https://unpkg.com/@jspsych/plugin-webgazer-init-camera@1.0.0"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using the JavaScript file downloaded from a GitHub release dist archive:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="jspsych/plugin-webgazer-init-camera.js"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using NPM:
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install @jspsych/plugin-webgazer-init-camera
|
||||||
|
```
|
||||||
|
```js
|
||||||
|
import webgazerInitCamera from '@jspsych/plugin-webgazer-init-camera';
|
||||||
|
```
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
|
|
||||||
Because the eye tracking plugins need to be used in conjunction with each other, please see the [example on the eye tracking overview page](../overview/eye-tracking.md#example) for an integrated example.
|
Because the eye tracking plugins need to be used in conjunction with each other, please see the [example on the eye tracking overview page](../overview/eye-tracking.md#example) for an integrated example.
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# webgazer-validate
|
# webgazer-validate
|
||||||
|
|
||||||
|
Current version: current-plugin-version. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-webgazer-validate/CHANGELOG.md).
|
||||||
|
|
||||||
This plugin can be used to measure the accuracy and precision of gaze predictions made by the [WebGazer extension](../extensions/webgazer.md). For a narrative description of eye tracking with jsPsych, see the [eye tracking overview](../overview/eye-tracking.md).
|
This plugin can be used to measure the accuracy and precision of gaze predictions made by the [WebGazer extension](../extensions/webgazer.md). For a narrative description of eye tracking with jsPsych, see the [eye tracking overview](../overview/eye-tracking.md).
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
@ -33,6 +35,29 @@ validation_points | array | The list of validation points, in the order that the
|
|||||||
|
|
||||||
This plugin does not yet support [simulation mode](../overview/simulation.md).
|
This plugin does not yet support [simulation mode](../overview/simulation.md).
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
Using the CDN-hosted JavaScript file:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="https://unpkg.com/@jspsych/plugin-webgazer-validate@1.1.0"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using the JavaScript file downloaded from a GitHub release dist archive:
|
||||||
|
|
||||||
|
```js
|
||||||
|
<script src="jspsych/plugin-webgazer-validate.js"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Using NPM:
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install @jspsych/plugin-webgazer-validate
|
||||||
|
```
|
||||||
|
```js
|
||||||
|
import webgazerValidate from '@jspsych/plugin-webgazer-validate';
|
||||||
|
```
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
|
|
||||||
Because the eye tracking plugins need to be used in conjunction with each other, please see the [example on the eye tracking overview page](../overview/eye-tracking.md#example) for an integrated example.
|
Because the eye tracking plugins need to be used in conjunction with each other, please see the [example on the eye tracking overview page](../overview/eye-tracking.md#example) for an integrated example.
|
||||||
|
Loading…
Reference in New Issue
Block a user