mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-10 11:10:54 +00:00
a few more links to fix
This commit is contained in:
parent
110420932c
commit
452936dca5
@ -1,11 +1,11 @@
|
|||||||
# Plugins
|
# Plugins
|
||||||
|
|
||||||
In jsPsych, plugins define the kinds of trials or events that should occur during the experiment.
|
In jsPsych, plugins define the kinds of trials or events that should occur during the experiment.
|
||||||
Some plugins define very general events, like [displaying a set of instructions pages](../plugins/jspsych-instructions/), [displaying an image and recording a keyboard response](../plugins/jspsych-image-keyboard-response/), or [playing a sound file and recording a button response](../plugins/audio-button-response/).
|
Some plugins define very general events, like [displaying a set of instructions pages](../plugins/instructions/), [displaying an image and recording a keyboard response](../plugins/image-keyboard-response/), or [playing a sound file and recording a button response](../plugins/audio-button-response/).
|
||||||
Other plugins are more specific, like those that display particular kinds of stimuli (e.g., a [circular visual search array](../plugins/jspsych-visual-search-circle/)), or run a specific version of particular kind of task (e.g., the [Implicit Association Test](../plugins/jspsych-iat-image/)).
|
Other plugins are more specific, like those that display particular kinds of stimuli (e.g., a [circular visual search array](../plugins/visual-search-circle/)), or run a specific version of particular kind of task (e.g., the [Implicit Association Test](../plugins/iat-image/)).
|
||||||
Part of creating an experiment with jsPsych involves figuring out which plugins are needed to create the tasks you want your participants to perform.
|
Part of creating an experiment with jsPsych involves figuring out which plugins are needed to create the tasks you want your participants to perform.
|
||||||
|
|
||||||
Plugins provide a structure for a particular trial or task, but often allow for significant customization and flexibility. For example, the [image-keyboard-response plugin](../plugins/jspsych-image-keyboard-response/) defines a simple structure for showing an image and collecting a keyboard response. You can specify the what the stimulus is, what keys the subject is allowed to press, how long the stimulus should be on the screen, how long the subject has to respond, and so on. Many of these options have reasonable default values; even though the image plugin has many different parameters, you only *need* to specify the image stimulus in order to use it. Each plugin has its own documentation page, which describes what the plugin does, what options are available, and what kind of data it collects.
|
Plugins provide a structure for a particular trial or task, but often allow for significant customization and flexibility. For example, the [image-keyboard-response plugin](../plugins/image-keyboard-response/) defines a simple structure for showing an image and collecting a keyboard response. You can specify the what the stimulus is, what keys the subject is allowed to press, how long the stimulus should be on the screen, how long the subject has to respond, and so on. Many of these options have reasonable default values; even though the image plugin has many different parameters, you only *need* to specify the image stimulus in order to use it. Each plugin has its own documentation page, which describes what the plugin does, what options are available, and what kind of data it collects.
|
||||||
|
|
||||||
## Using a plugin
|
## Using a plugin
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ To create an experiment using jsPsych, you need to specify a timeline that descr
|
|||||||
|
|
||||||
## A single trial
|
## A single trial
|
||||||
|
|
||||||
To create a trial, you need to create an object that describes the trial. The most important feature of this object is the `type` parameter. This tells jsPsych which plugin to use to run the trial. For example, if you want to use the [html-keyboard-response plugin](../plugins/jspsych-html-keyboard-response) to display a short message, the trial object would look like this:
|
To create a trial, you need to create an object that describes the trial. The most important feature of this object is the `type` parameter. This tells jsPsych which plugin to use to run the trial. For example, if you want to use the [html-keyboard-response plugin](../plugins/html-keyboard-response) to display a short message, the trial object would look like this:
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
var trial = {
|
var trial = {
|
||||||
@ -55,7 +55,7 @@ timeline.push(trial_3);
|
|||||||
|
|
||||||
## Nested timelines
|
## Nested timelines
|
||||||
|
|
||||||
Each object on the timeline can also have it's own timeline. This is useful for many reasons. One is that it allows you to define common parameters across trials once and have them apply to all the trials on the nested timeline. The example below creates a series of trials using the [image-keyboard-response plugin](../plugins/jspsych-image-keyboard-response/), where the only thing that changes from trial-to-trial is the image file being displayed on the screen.
|
Each object on the timeline can also have it's own timeline. This is useful for many reasons. One is that it allows you to define common parameters across trials once and have them apply to all the trials on the nested timeline. The example below creates a series of trials using the [image-keyboard-response plugin](../plugins/image-keyboard-response/), where the only thing that changes from trial-to-trial is the image file being displayed on the screen.
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
var judgment_trials = {
|
var judgment_trials = {
|
||||||
|
@ -145,7 +145,7 @@ Returns a DataCollection object with all of the interaction events.
|
|||||||
|
|
||||||
### Description
|
### Description
|
||||||
|
|
||||||
jsPsych automatically records a few different kinds of user interaction events. `blur` events occur when the user clicks on another window or tab during the experiment, indicating that they are no longer interacting with the experiment. `focus` events occur when the user clicks on the experiment window after having clicked somewhere else first (i.e., generated a `blur` event). `fullscreenenter` and `fullscreenexit` events are triggered by the browser entering and exiting fullscreen mode. However, `fullscreenenter` events only occur when the script switches the browser to fullscreen mode, e.g., with the jspsych-fullscreen plugin. Manually entering fullscreen mode does not trigger this event. `fullscreenexit` events occur whether the user manually exits fullscreen mode or the script exits fullscreen mode. This method returns the DataCollection containing all interaction events. This is useful for tracking whether the participant completed the task without diverting attention to other windows. Events are in the form:
|
jsPsych automatically records a few different kinds of user interaction events. `blur` events occur when the user clicks on another window or tab during the experiment, indicating that they are no longer interacting with the experiment. `focus` events occur when the user clicks on the experiment window after having clicked somewhere else first (i.e., generated a `blur` event). `fullscreenenter` and `fullscreenexit` events are triggered by the browser entering and exiting fullscreen mode. However, `fullscreenenter` events only occur when the script switches the browser to fullscreen mode, e.g., with the [fullscreen plugin](../plugins/fullscreen.md). Manually entering fullscreen mode does not trigger this event. `fullscreenexit` events occur whether the user manually exits fullscreen mode or the script exits fullscreen mode. This method returns the DataCollection containing all interaction events. This is useful for tracking whether the participant completed the task without diverting attention to other windows. Events are in the form:
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user