diff --git a/docs/plugins/animation.md b/docs/plugins/animation.md index f60b1001..75adfbe2 100644 --- a/docs/plugins/animation.md +++ b/docs/plugins/animation.md @@ -1,5 +1,7 @@ # 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. ## Parameters diff --git a/docs/plugins/audio-button-response.md b/docs/plugins/audio-button-response.md index fde24a66..9fe0a721 100644 --- a/docs/plugins/audio-button-response.md +++ b/docs/plugins/audio-button-response.md @@ -1,5 +1,7 @@ # 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. 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 may change in a future version as we improve the simulation modes. +## Install + +Using the CDN-hosted JavaScript file: + +```js + +``` + +Using the JavaScript file downloaded from a GitHub release dist archive: + +```js + +``` + +Using NPM: + +``` +npm install @jspsych/plugin-audio-button-response +``` +```js +import audioButtonResponse from '@jspsych/plugin-audio-button-response'; + ## Examples ???+ example "Displaying question until subject gives a response" diff --git a/docs/plugins/audio-keyboard-response.md b/docs/plugins/audio-keyboard-response.md index 8d281841..4765c289 100644 --- a/docs/plugins/audio-keyboard-response.md +++ b/docs/plugins/audio-keyboard-response.md @@ -1,5 +1,7 @@ # 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. 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 may change in a future version as we improve the simulation modes. +## Install + +Using the CDN-hosted JavaScript file: + +```js + +``` + +Using the JavaScript file downloaded from a GitHub release dist archive: + +```js + +``` + +Using NPM: + +``` +npm install @jspsych/plugin-audio-keyboard-response +``` +```js +import audioKeyboardResponse from '@jspsych/plugin-audio-keyboard-response'; + ## Examples ???+ example "Trial continues until subject gives a response" diff --git a/docs/plugins/audio-slider-response.md b/docs/plugins/audio-slider-response.md index dc121896..eef53b6f 100644 --- a/docs/plugins/audio-slider-response.md +++ b/docs/plugins/audio-slider-response.md @@ -1,5 +1,7 @@ # 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. 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 may change in a future version as we improve the simulation modes. +## Install + +Using the CDN-hosted JavaScript file: + +```js + +``` + +Using the JavaScript file downloaded from a GitHub release dist archive: + +```js + +``` + +Using NPM: + +``` +npm install @jspsych/plugin-audio-slider-response +``` +```js +import audioSliderResponse from '@jspsych/plugin-audio-slider-response'; + ## Examples ???+ example "A simple rating scale" diff --git a/docs/plugins/browser-check.md b/docs/plugins/browser-check.md index 6f67d088..59a19198 100644 --- a/docs/plugins/browser-check.md +++ b/docs/plugins/browser-check.md @@ -1,5 +1,7 @@ # 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. 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. +## Install + +Using the CDN-hosted JavaScript file: + +```js + +``` + +Using the JavaScript file downloaded from a GitHub release dist archive: + +```js + +``` + +Using NPM: + +``` +npm install @jspsych/plugin-browser-check +``` +```js +import browserCheck from '@jspsych/plugin-browser-check'; + ## Examples ???+ example "Recording all of the available features, no exclusions" diff --git a/docs/plugins/call-function.md b/docs/plugins/call-function.md index 96c43df9..77f6a4a9 100644 --- a/docs/plugins/call-function.md +++ b/docs/plugins/call-function.md @@ -1,5 +1,7 @@ # 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. 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. +## Install + +Using the CDN-hosted JavaScript file: + +```js + +``` + +Using the JavaScript file downloaded from a GitHub release dist archive: + +```js + +``` + +Using NPM: + +``` +npm install @jspsych/plugin-call-function +``` +```js +import callFunction from '@jspsych/plugin-call-function'; + ## Examples ???+ example "Calling a simple function" diff --git a/docs/plugins/canvas-button-response.md b/docs/plugins/canvas-button-response.md index 00d5d837..017007b8 100644 --- a/docs/plugins/canvas-button-response.md +++ b/docs/plugins/canvas-button-response.md @@ -1,5 +1,7 @@ # 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. ## 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. +## Install + +Using the CDN-hosted JavaScript file: + +```js + +``` + +Using the JavaScript file downloaded from a GitHub release dist archive: + +```js + +``` + +Using NPM: + +``` +npm install @jspsych/plugin-canvas-button-response +``` +```js +import canvasButtonResponse from '@jspsych/plugin-canvas-button-response'; + ## Examples ???+ example "Drawing circles based on parameters" diff --git a/docs/plugins/canvas-keyboard-response.md b/docs/plugins/canvas-keyboard-response.md index b84a93d8..af0b8235 100644 --- a/docs/plugins/canvas-keyboard-response.md +++ b/docs/plugins/canvas-keyboard-response.md @@ -1,5 +1,7 @@ # 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. ## 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. +## Install + +Using the CDN-hosted JavaScript file: + +```js + +``` + +Using the JavaScript file downloaded from a GitHub release dist archive: + +```js + +``` + +Using NPM: + +``` +npm install @jspsych/plugin-canvas-keyboard-response +``` +```js +import canvasKeyboardResponse from '@jspsych/plugin-canvas-keyboard-response'; + ## Examples ???+ example "Draw rectangle and wait for response" diff --git a/docs/plugins/canvas-slider-response.md b/docs/plugins/canvas-slider-response.md index c309c3e4..4878e344 100644 --- a/docs/plugins/canvas-slider-response.md +++ b/docs/plugins/canvas-slider-response.md @@ -1,5 +1,7 @@ # 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. ## 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. +## Install + +Using the CDN-hosted JavaScript file: + +```js + +``` + +Using the JavaScript file downloaded from a GitHub release dist archive: + +```js + +``` + +Using NPM: + +``` +npm install @jspsych/plugin-canvas-slider-response +``` +```js +import canvasSliderResponse from '@jspsych/plugin-canvas-slider-response'; + ## Examples ???+ example "Draw two squares" diff --git a/docs/plugins/categorize-animation.md b/docs/plugins/categorize-animation.md index aac6f05f..c51d337c 100644 --- a/docs/plugins/categorize-animation.md +++ b/docs/plugins/categorize-animation.md @@ -1,5 +1,7 @@ # 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. ## 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. | | correct | boolean | `true` if the subject got the correct answer, `false` otherwise. | +## Install + +Using the CDN-hosted JavaScript file: + +```js + +``` + +Using the JavaScript file downloaded from a GitHub release dist archive: + +```js + +``` + +Using NPM: + +``` +npm install @jspsych/plugin-categorize-animation +``` +```js +import categorizeAnimation from '@jspsych/plugin-categorize-animation'; +``` + ## Examples ???+ example "Basic example" diff --git a/docs/plugins/categorize-html.md b/docs/plugins/categorize-html.md index 8f68ed16..2977f6b4 100644 --- a/docs/plugins/categorize-html.md +++ b/docs/plugins/categorize-html.md @@ -1,5 +1,7 @@ # 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. ## 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. | | correct | boolean | `true` if the subject got the correct answer, `false` otherwise. | +## Install + +Using the CDN-hosted JavaScript file: + +```js + +``` + +Using the JavaScript file downloaded from a GitHub release dist archive: + +```js + +``` + +Using NPM: + +``` +npm install @jspsych/plugin-categorize-html +``` +```js +import categorizeHtml from '@jspsych/plugin-categorize-html'; +``` + ## Examples ???+ example "Categorizing HTML content" diff --git a/docs/plugins/categorize-image.md b/docs/plugins/categorize-image.md index a00b8a3d..0a4b53d6 100644 --- a/docs/plugins/categorize-image.md +++ b/docs/plugins/categorize-image.md @@ -1,5 +1,7 @@ # 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. ## 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. | | correct | boolean | `true` if the subject got the correct answer, `false` otherwise. | +## Install + +Using the CDN-hosted JavaScript file: + +```js + +``` + +Using the JavaScript file downloaded from a GitHub release dist archive: + +```js + +``` + +Using NPM: + +``` +npm install @jspsych/plugin-categorize-image +``` +```js +import categorizeImage from '@jspsych/plugin-categorize-image'; +``` + + ## Examples ???+ example "Categorizing an image" diff --git a/docs/plugins/cloze.md b/docs/plugins/cloze.md index 50610fe9..6438530d 100644 --- a/docs/plugins/cloze.md +++ b/docs/plugins/cloze.md @@ -1,5 +1,7 @@ # 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. ## 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 | +## Install + +Using the CDN-hosted JavaScript file: + +```js + +``` + +Using the JavaScript file downloaded from a GitHub release dist archive: + +```js + +``` + +Using NPM: + +``` +npm install @jspsych/plugin-cloze +``` +```js +import cloze from '@jspsych/plugin-cloze'; +``` + ## Examples ???+ example "Simple cloze using default settings (no check against correct solution, no custom button text)" diff --git a/docs/plugins/external-html.md b/docs/plugins/external-html.md index 40f0f294..e141475f 100644 --- a/docs/plugins/external-html.md +++ b/docs/plugins/external-html.md @@ -1,5 +1,7 @@ # 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. ## 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. +## Install + +Using the CDN-hosted JavaScript file: + +```js + +``` + +Using the JavaScript file downloaded from a GitHub release dist archive: + +```js + +``` + +Using NPM: + +``` +npm install @jspsych/plugin-external-html +``` +```js +import externalHtml from '@jspsych/plugin-external-html'; +``` + ## Examples ### Loading a consent form diff --git a/docs/plugins/free-sort.md b/docs/plugins/free-sort.md index 725846d2..eab6d8e6 100644 --- a/docs/plugins/free-sort.md +++ b/docs/plugins/free-sort.md @@ -1,5 +1,7 @@ # 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. ## 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). +## Install + +Using the CDN-hosted JavaScript file: + +```js + +``` + +Using the JavaScript file downloaded from a GitHub release dist archive: + +```js + +``` + +Using NPM: + +``` +npm install @jspsych/plugin-free-sort +``` +```js +import freeSort from '@jspsych/plugin-free-sort'; +``` + ## Examples ???+ example "Basic example" diff --git a/docs/plugins/fullscreen.md b/docs/plugins/fullscreen.md index 07891c87..17a52314 100644 --- a/docs/plugins/fullscreen.md +++ b/docs/plugins/fullscreen.md @@ -1,5 +1,7 @@ # 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. !!! 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. 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 + +``` + +Using the JavaScript file downloaded from a GitHub release dist archive: + +```js + +``` + +Using NPM: + +``` +npm install @jspsych/plugin-fullscreen +``` +```js +import fullscreen from '@jspsych/plugin-fullscreen'; +``` + ## Examples diff --git a/docs/plugins/html-audio-response.md b/docs/plugins/html-audio-response.md index 52609a1f..ad0fd8ba 100644 --- a/docs/plugins/html-audio-response.md +++ b/docs/plugins/html-audio-response.md @@ -1,5 +1,7 @@ # 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. 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). +## Install + +Using the CDN-hosted JavaScript file: + +```js + +``` + +Using the JavaScript file downloaded from a GitHub release dist archive: + +```js + +``` + +Using NPM: + +``` +npm install @jspsych/plugin-html-audio-response +``` +```js +import htmlAudioResponse from '@jspsych/plugin-html-audio-response'; +``` + ## Examples ???+ example "Simple spoken response to a stimulus" diff --git a/docs/plugins/html-button-response.md b/docs/plugins/html-button-response.md index efb37860..32f8676e 100644 --- a/docs/plugins/html-button-response.md +++ b/docs/plugins/html-button-response.md @@ -1,5 +1,7 @@ # 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. ## 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. stimulus | string | The HTML content that was displayed on the screen. +## Install + +Using the CDN-hosted JavaScript file: + +```js + +``` + +Using the JavaScript file downloaded from a GitHub release dist archive: + +```js + +``` + +Using NPM: + +``` +npm install @jspsych/plugin-html-button-response +``` +```js +import htmlButtonResponse from '@jspsych/plugin-html-button-response'; +``` + ## Examples ???+ example "Displaying question until subject gives a response" diff --git a/docs/plugins/html-keyboard-response.md b/docs/plugins/html-keyboard-response.md index 8fe16f94..ff217e20 100644 --- a/docs/plugins/html-keyboard-response.md +++ b/docs/plugins/html-keyboard-response.md @@ -1,5 +1,7 @@ # 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. @@ -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. | | stimulus | string | The HTML content that was displayed on the screen. | +## Install + +Using the CDN-hosted JavaScript file: + +```js + +``` + +Using the JavaScript file downloaded from a GitHub release dist archive: + +```js + +``` + +Using NPM: + +``` +npm install @jspsych/plugin-html-keyboard-response +``` +```js +import htmlKeyboardResponse from '@jspsych/plugin-html-keyboard-response'; +``` + ## Examples ???+ example "Displaying trial until subject gives a response" diff --git a/docs/plugins/html-slider-response.md b/docs/plugins/html-slider-response.md index d4500c5d..2cfbe408 100644 --- a/docs/plugins/html-slider-response.md +++ b/docs/plugins/html-slider-response.md @@ -1,5 +1,7 @@ # 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. ## 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. slider_start | numeric | The starting value of the slider. +## Install + +Using the CDN-hosted JavaScript file: + +```js + +``` + +Using the JavaScript file downloaded from a GitHub release dist archive: + +```js + +``` + +Using NPM: + +``` +npm install @jspsych/plugin-html-slider-response +``` +```js +import htmlSliderResponse from '@jspsych/plugin-html-slider-response'; +``` + ## Examples ???+ example "Displaying question until subject move the slider" diff --git a/docs/plugins/iat-html.md b/docs/plugins/iat-html.md index ad5af201..c9679f74 100644 --- a/docs/plugins/iat-html.md +++ b/docs/plugins/iat-html.md @@ -1,5 +1,7 @@ # 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. ## 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. | | 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 + +``` + +Using the JavaScript file downloaded from a GitHub release dist archive: + +```js + +``` + +Using NPM: + +``` +npm install @jspsych/plugin-iat-html +``` +```js +import iatHtml from '@jspsych/plugin-iat-html'; +``` + ## Examples ???+ example "Displaying IAT question using html" diff --git a/docs/plugins/iat-image.md b/docs/plugins/iat-image.md index 2987cecb..4971ba16 100644 --- a/docs/plugins/iat-image.md +++ b/docs/plugins/iat-image.md @@ -1,5 +1,7 @@ # 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. ## 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. | | 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 + +``` + +Using the JavaScript file downloaded from a GitHub release dist archive: + +```js + +``` + +Using NPM: + +``` +npm install @jspsych/plugin-iat-image +``` +```js +import iatImage from '@jspsych/plugin-iat-image'; +``` + ## Examples ???+ example "Displaying IAT question using image files" diff --git a/docs/plugins/image-button-response.md b/docs/plugins/image-button-response.md index 9898c7d8..5499bd80 100644 --- a/docs/plugins/image-button-response.md +++ b/docs/plugins/image-button-response.md @@ -1,5 +1,7 @@ # 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. 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. stimulus | string | The path of the image that was displayed. +## Install + +Using the CDN-hosted JavaScript file: + +```js + +``` + +Using the JavaScript file downloaded from a GitHub release dist archive: + +```js + +``` + +Using NPM: + +``` +npm install @jspsych/plugin-image-button-response +``` +```js +import imageButtonResponse from '@jspsych/plugin-image-button-response'; +``` + ## Examples ???+ example "Displaying question until subject gives a response" diff --git a/docs/plugins/image-keyboard-response.md b/docs/plugins/image-keyboard-response.md index e67fe62c..4a055417 100644 --- a/docs/plugins/image-keyboard-response.md +++ b/docs/plugins/image-keyboard-response.md @@ -1,5 +1,7 @@ # 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. 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. | | stimulus | string | The path of the image that was displayed. | +## Install + +Using the CDN-hosted JavaScript file: + +```js + +``` + +Using the JavaScript file downloaded from a GitHub release dist archive: + +```js + +``` + +Using NPM: + +``` +npm install @jspsych/plugin-image-keyboard-response +``` +```js +import imageKeyboardResponse from '@jspsych/plugin-image-keyboard-response'; +``` + ## Examples ???+ example "Displaying trial until subject gives a response" diff --git a/docs/plugins/image-slider-response.md b/docs/plugins/image-slider-response.md index c4aabefe..b02cca3a 100644 --- a/docs/plugins/image-slider-response.md +++ b/docs/plugins/image-slider-response.md @@ -1,5 +1,7 @@ # 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. 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. slider_start | numeric | The starting value of the slider. +## Install + +Using the CDN-hosted JavaScript file: + +```js + +``` + +Using the JavaScript file downloaded from a GitHub release dist archive: + +```js + +``` + +Using NPM: + +``` +npm install @jspsych/plugin-image-slider-response +``` +```js +import imageSliderResponse from '@jspsych/plugin-image-slider-response'; +``` + ## Examples ???+ example "Displaying trial until subject gives a response" diff --git a/docs/plugins/initialize-microphone.md b/docs/plugins/initialize-microphone.md index 91bb5087..499e5bec 100644 --- a/docs/plugins/initialize-microphone.md +++ b/docs/plugins/initialize-microphone.md @@ -1,5 +1,7 @@ # 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. 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. @@ -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). +## Install + +Using the CDN-hosted JavaScript file: + +```js + +``` + +Using the JavaScript file downloaded from a GitHub release dist archive: + +```js + +``` + +Using NPM: + +``` +npm install @jspsych/plugin-initialize-microphone +``` +```js +import initializeMicrophone from '@jspsych/plugin-initialize-microphone'; +``` + ## Examples ???+ example "Ask for microphone permission" diff --git a/docs/plugins/instructions.md b/docs/plugins/instructions.md index 76caf208..900435f9 100644 --- a/docs/plugins/instructions.md +++ b/docs/plugins/instructions.md @@ -1,5 +1,7 @@ # 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. ## 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. | | rt | numeric | The response time in milliseconds for the subject to view all of the pages. | +## Install + +Using the CDN-hosted JavaScript file: + +```js + +``` + +Using the JavaScript file downloaded from a GitHub release dist archive: + +```js + +``` + +Using NPM: + +``` +npm install @jspsych/plugin-instructions +``` +```js +import instructions from '@jspsych/plugin-instructions'; +``` + ## Examples #### Showing simple text instructions diff --git a/docs/plugins/maxdiff.md b/docs/plugins/maxdiff.md index 8cf8b1b8..dc7f7311 100644 --- a/docs/plugins/maxdiff.md +++ b/docs/plugins/maxdiff.md @@ -1,5 +1,7 @@ # 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. ## 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. 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 + +``` + +Using the JavaScript file downloaded from a GitHub release dist archive: + +```js + +``` + +Using NPM: + +``` +npm install @jspsych/plugin-maxdiff +``` +```js +import maxdiff from '@jspsych/plugin-maxdiff'; +``` ## Examples diff --git a/docs/plugins/preload.md b/docs/plugins/preload.md index 8ff11796..066a113d 100644 --- a/docs/plugins/preload.md +++ b/docs/plugins/preload.md @@ -1,5 +1,7 @@ # 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. 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. +## Install + +Using the CDN-hosted JavaScript file: + +```js + +``` + +Using the JavaScript file downloaded from a GitHub release dist archive: + +```js + +``` + +Using NPM: + +``` +npm install @jspsych/plugin-preload +``` +```js +import preload from '@jspsych/plugin-preload'; +``` + + ## Examples ???+ example "Automatically preloading based on other trials" diff --git a/docs/plugins/reconstruction.md b/docs/plugins/reconstruction.md index 4f685bb9..6ae47248 100644 --- a/docs/plugins/reconstruction.md +++ b/docs/plugins/reconstruction.md @@ -1,5 +1,7 @@ # 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. 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. rt | numeric | The length of time, in milliseconds, that the trial lasted. +## Install + +Using the CDN-hosted JavaScript file: + +```js + +``` + +Using the JavaScript file downloaded from a GitHub release dist archive: + +```js + +``` + +Using NPM: + +``` +npm install @jspsych/plugin-reconstruction +``` +```js +import reconstruction from '@jspsych/plugin-reconstruction'; +``` + ## Examples ???+ example "Make a block larger and smaller" diff --git a/docs/plugins/resize.md b/docs/plugins/resize.md index 57476d3e..01671009 100644 --- a/docs/plugins/resize.md +++ b/docs/plugins/resize.md @@ -1,5 +1,7 @@ # 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. ## 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). +## Install + +Using the CDN-hosted JavaScript file: + +```js + +``` + +Using the JavaScript file downloaded from a GitHub release dist archive: + +```js + +``` + +Using NPM: + +``` +npm install @jspsych/plugin-resize +``` +```js +import resize from '@jspsych/plugin-resize'; +``` + ## Examples ???+ example "Measuring a credit card and resizing the display to have 150 pixels equal an inch." diff --git a/docs/plugins/same-different-html.md b/docs/plugins/same-different-html.md index a2e150d8..ca17a2b2 100644 --- a/docs/plugins/same-different-html.md +++ b/docs/plugins/same-different-html.md @@ -1,5 +1,7 @@ # 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. ## 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. | | response_stim1 | string | Indicates which key the subject pressed to continue. | +## Install + +Using the CDN-hosted JavaScript file: + +```js + +``` + +Using the JavaScript file downloaded from a GitHub release dist archive: + +```js + +``` + +Using NPM: + +``` +npm install @jspsych/plugin-same-different-html +``` +```js +import sameDifferentHtml from '@jspsych/plugin-same-different-html'; +``` + + ## Examples ???+ example "Two text choices" diff --git a/docs/plugins/same-different-image.md b/docs/plugins/same-different-image.md index a2f4d0c9..c5d3fbbd 100644 --- a/docs/plugins/same-different-image.md +++ b/docs/plugins/same-different-image.md @@ -1,5 +1,7 @@ # 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. ## 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. | | response_stim1 | string | Indicates which key the subject pressed to continue. | +## Install + +Using the CDN-hosted JavaScript file: + +```js + +``` + +Using the JavaScript file downloaded from a GitHub release dist archive: + +```js + +``` + +Using NPM: + +``` +npm install @jspsych/plugin-same-different-image +``` +```js +import sameDifferentImage from '@jspsych/plugin-same-different-image'; +``` + ## Examples ???+ example "Identifying emotional expressions" diff --git a/docs/plugins/serial-reaction-time-mouse.md b/docs/plugins/serial-reaction-time-mouse.md index d9677b4d..967bb89c 100644 --- a/docs/plugins/serial-reaction-time-mouse.md +++ b/docs/plugins/serial-reaction-time-mouse.md @@ -1,5 +1,7 @@ # 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. ## 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. | | 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. | -| 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 + +``` + +Using the JavaScript file downloaded from a GitHub release dist archive: + +```js + +``` + +Using NPM: + +``` +npm install @jspsych/plugin-serial-reaction-time-mouse +``` +```js +import serialReactionTimeMouse from '@jspsych/plugin-serial-reaction-time-mouse'; +``` ## Examples diff --git a/docs/plugins/serial-reaction-time.md b/docs/plugins/serial-reaction-time.md index bf375af0..9bcbee5d 100644 --- a/docs/plugins/serial-reaction-time.md +++ b/docs/plugins/serial-reaction-time.md @@ -1,5 +1,7 @@ # 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. ## 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. | | correct | boolean | `true` if the subject's response matched the target. | +## Install + +Using the CDN-hosted JavaScript file: + +```js + +``` + +Using the JavaScript file downloaded from a GitHub release dist archive: + +```js + +``` + +Using NPM: + +``` +npm install @jspsych/plugin-serial-reaction-time +``` +```js +import serialReactionTime from '@jspsych/plugin-serial-reaction-time'; +``` + ## Examples ???+ example "A classic SRT" diff --git a/docs/plugins/sketchpad.md b/docs/plugins/sketchpad.md index b6e8f43b..ee39d661 100644 --- a/docs/plugins/sketchpad.md +++ b/docs/plugins/sketchpad.md @@ -1,5 +1,7 @@ # 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. 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. @@ -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). +## Install + +Using the CDN-hosted JavaScript file: + +```js + +``` + +Using the JavaScript file downloaded from a GitHub release dist archive: + +```js + +``` + +Using NPM: + +``` +npm install @jspsych/plugin-sketchpad +``` +```js +import sketchpad from '@jspsych/plugin-sketchpad'; +``` + ## Examples ???+ example "Basic sketchpad with a prompt" diff --git a/docs/plugins/survey-html-form.md b/docs/plugins/survey-html-form.md index 44fe112c..19cf6378 100644 --- a/docs/plugins/survey-html-form.md +++ b/docs/plugins/survey-html-form.md @@ -1,5 +1,7 @@ # 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 `` 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 @@ -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). +## Install + +Using the CDN-hosted JavaScript file: + +```js + +``` + +Using the JavaScript file downloaded from a GitHub release dist archive: + +```js + +``` + +Using NPM: + +``` +npm install @jspsych/plugin-survey-html-form +``` +```js +import surveyHtmlForm from '@jspsych/plugin-survey-html-form'; +``` + ## Examples ???+ example "Fill in the blanks" diff --git a/docs/plugins/survey-likert.md b/docs/plugins/survey-likert.md index 055de72f..2b8e0e5c 100644 --- a/docs/plugins/survey-likert.md +++ b/docs/plugins/survey-likert.md @@ -1,5 +1,7 @@ # 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. ## 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. | 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 + +``` + +Using the JavaScript file downloaded from a GitHub release dist archive: + +```js + +``` + +Using NPM: + +``` +npm install @jspsych/plugin-survey-likert +``` +```js +import surveyLikert from '@jspsych/plugin-survey-likert'; +``` + ## Examples ???+ example "Single Question" diff --git a/docs/plugins/survey-multi-choice.md b/docs/plugins/survey-multi-choice.md index a960f6f5..4ce4f734 100644 --- a/docs/plugins/survey-multi-choice.md +++ b/docs/plugins/survey-multi-choice.md @@ -1,5 +1,7 @@ # 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. ## 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. | 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 + +``` + +Using the JavaScript file downloaded from a GitHub release dist archive: + +```js + +``` + +Using NPM: + +``` +npm install @jspsych/plugin-survey-multi-choice +``` +```js +import surveyMultiChoice from '@jspsych/plugin-survey-multi-choice'; +``` + ## Examples ???+ example "Vertical Question Alignment" diff --git a/docs/plugins/survey-multi-select.md b/docs/plugins/survey-multi-select.md index 94e687e6..386cba38 100644 --- a/docs/plugins/survey-multi-select.md +++ b/docs/plugins/survey-multi-select.md @@ -1,5 +1,7 @@ # 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. ## 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. | 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 + +``` + +Using the JavaScript file downloaded from a GitHub release dist archive: + +```js + +``` + +Using NPM: + +``` +npm install @jspsych/plugin-survey-multi-select +``` +```js +import surveyMultiSelect from '@jspsych/plugin-survey-multi-select'; +``` + ## Examples ???+ example "Multiple Questions on a Page" diff --git a/docs/plugins/survey-text.md b/docs/plugins/survey-text.md index 0d6639cf..077b0a59 100644 --- a/docs/plugins/survey-text.md +++ b/docs/plugins/survey-text.md @@ -1,5 +1,7 @@ # 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. ## 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. | 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 + +``` + +Using the JavaScript file downloaded from a GitHub release dist archive: + +```js + +``` + +Using NPM: + +``` +npm install @jspsych/plugin-survey-text +``` +```js +import surveyText from '@jspsych/plugin-survey-text'; +``` + ## Examples ???+ example "Single question and response" diff --git a/docs/plugins/survey.md b/docs/plugins/survey.md index dcca48e6..69e53b50 100644 --- a/docs/plugins/survey.md +++ b/docs/plugins/survey.md @@ -1,5 +1,7 @@ # 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 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). +## Install + +Using the CDN-hosted JavaScript file: + +```js + +``` + +Using the JavaScript file downloaded from a GitHub release dist archive: + +```js + +``` + +Using NPM: + +``` +npm install @jspsych/plugin-survey +``` +```js +import survey from '@jspsych/plugin-survey'; +``` + ## Examples ???+ example "Basic single page" diff --git a/docs/plugins/video-button-response.md b/docs/plugins/video-button-response.md index 566274e8..597277e1 100644 --- a/docs/plugins/video-button-response.md +++ b/docs/plugins/video-button-response.md @@ -1,5 +1,7 @@ # 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. 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 may change in a future version as we improve the simulation modes. +## Install + +Using the CDN-hosted JavaScript file: + +```js + +``` + +Using the JavaScript file downloaded from a GitHub release dist archive: + +```js + +``` + +Using NPM: + +``` +npm install @jspsych/plugin-video-button-response +``` +```js +import videoButtonResponse from '@jspsych/plugin-video-button-response'; +``` + ## Example ???+ example "Responses disabled until the video is complete" diff --git a/docs/plugins/video-keyboard-response.md b/docs/plugins/video-keyboard-response.md index 033fc33b..3cc9c1d7 100644 --- a/docs/plugins/video-keyboard-response.md +++ b/docs/plugins/video-keyboard-response.md @@ -1,5 +1,7 @@ # 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. 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 may change in a future version as we improve the simulation modes. +## Install + +Using the CDN-hosted JavaScript file: + +```js + +``` + +Using the JavaScript file downloaded from a GitHub release dist archive: + +```js + +``` + +Using NPM: + +``` +npm install @jspsych/plugin-video-keyboard-response +``` +```js +import videoKeyboardResponse from '@jspsych/plugin-video-keyboard-response'; +``` + ## Examples ???+ example "Show a video and advance to next trial automatically" diff --git a/docs/plugins/video-slider-response.md b/docs/plugins/video-slider-response.md index 39631f47..63f6ab7e 100644 --- a/docs/plugins/video-slider-response.md +++ b/docs/plugins/video-slider-response.md @@ -1,5 +1,7 @@ # 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. 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 may change in a future version as we improve the simulation modes. +## Install + +Using the CDN-hosted JavaScript file: + +```js + +``` + +Using the JavaScript file downloaded from a GitHub release dist archive: + +```js + +``` + +Using NPM: + +``` +npm install @jspsych/plugin-video-slider-response +``` +```js +import videoSliderResponse from '@jspsych/plugin-video-slider-response'; +``` + ## Example ???+ example "Rate enjoyment of a video clip" diff --git a/docs/plugins/virtual-chinrest.md b/docs/plugins/virtual-chinrest.md index 1ac64de9..68f892ec 100644 --- a/docs/plugins/virtual-chinrest.md +++ b/docs/plugins/virtual-chinrest.md @@ -1,5 +1,7 @@ # 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. !!! 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). +## Install + +Using the CDN-hosted JavaScript file: + +```js + +``` + +Using the JavaScript file downloaded from a GitHub release dist archive: + +```js + +``` + +Using NPM: + +``` +npm install @jspsych/plugin-virtual-chinrest +``` +```js +import virtualChinrest from '@jspsych/plugin-virtual-chinrest'; +``` + ## Example ???+ example "Measure distance to screen and pixel ratio; no resizing" diff --git a/docs/plugins/visual-search-circle.md b/docs/plugins/visual-search-circle.md index fa8d769b..3fdab7bd 100644 --- a/docs/plugins/visual-search-circle.md +++ b/docs/plugins/visual-search-circle.md @@ -1,5 +1,7 @@ # 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: ![Sample Visual Search Stimulus](../img/visual_search_example.jpg) @@ -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 | | 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 + +``` + +Using the JavaScript file downloaded from a GitHub release dist archive: + +```js + +``` + +Using NPM: + +``` +npm install @jspsych/plugin-visual-search-circle +``` +```js +import visualSearchCircle from '@jspsych/plugin-visual-search-circle'; +``` + ## Examples ???+ example "Identical distractors" diff --git a/docs/plugins/webgazer-calibrate.md b/docs/plugins/webgazer-calibrate.md index ba218fd1..2f158755 100644 --- a/docs/plugins/webgazer-calibrate.md +++ b/docs/plugins/webgazer-calibrate.md @@ -1,5 +1,7 @@ # 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). ## 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). +## Install + +Using the CDN-hosted JavaScript file: + +```js + +``` + +Using the JavaScript file downloaded from a GitHub release dist archive: + +```js + +``` + +Using NPM: + +``` +npm install @jspsych/plugin-webgazer-calibrate +``` +```js +import webgazerCalibrate from '@jspsych/plugin-webgazer-calibrate'; +``` + ## 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. diff --git a/docs/plugins/webgazer-init-camera.md b/docs/plugins/webgazer-init-camera.md index 7c85cddb..7fe345c1 100644 --- a/docs/plugins/webgazer-init-camera.md +++ b/docs/plugins/webgazer-init-camera.md @@ -1,5 +1,7 @@ # 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). ## 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). +## Install + +Using the CDN-hosted JavaScript file: + +```js + +``` + +Using the JavaScript file downloaded from a GitHub release dist archive: + +```js + +``` + +Using NPM: + +``` +npm install @jspsych/plugin-webgazer-init-camera +``` +```js +import webgazerInitCamera from '@jspsych/plugin-webgazer-init-camera'; +``` + ## 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. diff --git a/docs/plugins/webgazer-validate.md b/docs/plugins/webgazer-validate.md index f392d364..cddb93f7 100644 --- a/docs/plugins/webgazer-validate.md +++ b/docs/plugins/webgazer-validate.md @@ -1,5 +1,7 @@ # 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). ## 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). +## Install + +Using the CDN-hosted JavaScript file: + +```js + +``` + +Using the JavaScript file downloaded from a GitHub release dist archive: + +```js + +``` + +Using NPM: + +``` +npm install @jspsych/plugin-webgazer-validate +``` +```js +import webgazerValidate from '@jspsych/plugin-webgazer-validate'; +``` + ## 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.