diff --git a/docs/demos/jspsych-rdk-demo1.html b/docs/demos/jspsych-rdk-demo1.html deleted file mode 100644 index 37c7e62c..00000000 --- a/docs/demos/jspsych-rdk-demo1.html +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - diff --git a/docs/demos/jspsych-rdk-demo2.html b/docs/demos/jspsych-rdk-demo2.html deleted file mode 100644 index 358ad2d6..00000000 --- a/docs/demos/jspsych-rdk-demo2.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - diff --git a/docs/demos/jspsych-rdk-demo3.html b/docs/demos/jspsych-rdk-demo3.html deleted file mode 100644 index 5a485667..00000000 --- a/docs/demos/jspsych-rdk-demo3.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - diff --git a/docs/demos/jspsych-vsl-animate-occlusion-demo1.html b/docs/demos/jspsych-vsl-animate-occlusion-demo1.html deleted file mode 100644 index 37600988..00000000 --- a/docs/demos/jspsych-vsl-animate-occlusion-demo1.html +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - - - - - - diff --git a/docs/demos/jspsych-vsl-grid-scene-demo1.html b/docs/demos/jspsych-vsl-grid-scene-demo1.html deleted file mode 100644 index 8ee0624e..00000000 --- a/docs/demos/jspsych-vsl-grid-scene-demo1.html +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - - - - - - diff --git a/docs/plugins/jspsych-rdk.md b/docs/plugins/jspsych-rdk.md deleted file mode 100644 index 61bbb692..00000000 --- a/docs/plugins/jspsych-rdk.md +++ /dev/null @@ -1,132 +0,0 @@ -# jspsych-rdk plugin - -This plugin displays a Random Dot Kinematogram (RDK) and allows the subject to report the primary direction of motion by pressing a key on the keyboard. The stimulus can be displayed until a keyboard response is given or until a certain duration of time has passed. The RDK is fully customizable (see documentation below) and can display multiple apertures at the same time, each with its own parameters. - -!!! citation - We would appreciate it if you cited this paper when you use the RDK plugin - - Rajananda, S., Lau, H. & Odegaard, B., (2018). A Random-Dot Kinematogram for Web-Based Vision Research. *Journal of Open Research Software. 6*(1), p.6. doi:[10.5334/jors.194](http://doi.org/10.5334/jors.194) - -For optimal performance, fullscreen mode should be manually triggered by the user (e.g. F11 key in Chrome for Windows). Usage of the default Fullscreen trigger from the jsPsych API library with this plugin might result in the stimuli being displayed incorrectly. - -## Parameters - -In addition to the [parameters available in all plugins](/overview/plugins#parameters-available-in-all-plugins), this plugin accepts the following parameters. Parameters with a default value of *undefined* must be specified. Parameters can be left unspecified if the default value is acceptable. - -| Parameter | Type | Default Value | Descripton | -| ------------------------ | ---------------- | -------------------- | ---------------------------------------- | -| choices | array of strings | jsPsych.ALL_KEYS | The valid keys that the subject can press as a response. Must be an array of strings. If left unspecified, any key is a valid key. | -| correct_choice | array or string | *undefined* | The keys that are considered the correct response for that particular trial. Can be a single string or an array of strings. This needs to be linked with the `coherent_direction` parameter (see Examples section below for an illustration). This is used to determine whether the subject chose the correct response. The boolean indicating whether or not the subject chose the correct response is returned in the `correct` key of the data object. | -| trial_duration | numeric | 500 | The amount of time that the stimulus is displayed on the screen in ms. If -1, the stimulus will be displayed until the subject keys in a valid response. (`choices` parameter must contain valid keys or else the stimuli will run indefinitely). | -| response_ends_trial | boolean | true | If `true`, then the subject's response will end the trial. If `false`, the stimuli will be presented for the full `trial_duration` (the response will be recorded as long as the subject responds within the trial duration). | -| number_of_apertures | numeric | 1 | The number of apertures or RDKs on the screen. If set to more than one, remember to set the location (i.e., aperture_center_x and aperture_center_y) parameters to separate them.
In addition, each aperture can be customized individually by passing in an array of values as the parameter (see example below). If a single value (not an array) is passed as the parameter, then all apertures will have the same parameter. | -| number_of_dots | numeric | 300 | Number of dots per set. Equivalent to number of dots per frame. | -| number_of_sets | numeric | 1 | Number of sets to cycle through. Each frame displays one set of dots. (E.g. If 2 sets of dots, frame 1 will display dots from set 1, frame 2 will display dots from set 2, frame 3 will display sets from set 1, etc.) | -| coherent_direction | numeric | 0 | The direction of movement for coherent dots in degrees. 0 degrees is in the 3 o'clock direction, and increasing this number moves counterclockwise. (E.g. 12 o'clock is 90, 9 o'clock is 180, etc.) Range is 0 - 360. | -| coherence | numeric | 0.5 | The proportion of dots that move together in the coherent direction. Range is 0 to 1. | -| opposite_coherence | numeric | 0 | The proportion of moving in the direction opposite of the coherent direction. Range is 0 to (1-coherence). | -| dot_radius | numeric | 2 | The radius of each individual dot in pixels. | -| dot_life | numeric | -1 | The number of frames that pass before a dot disappears and reappears in a new frame. -1 denotes that the dot life is infinite (i.e., a dot will only disappear and reappear if it moves out of the aperture). | -| move_distance | numeric | 1 | The number of pixel lengths the dot will move in each frame (analogous to speed of dots). | -| aperture_width | numeric | 600 | The width of the aperture in pixels. For a square aperture, this will determine both the width and height. For circular aperture, this will determine the diameter. | -| aperture_height | numeric | 400 | The height of the aperture in pixels. For square and circle apertures, this will be ignored. | -| dot_color | string | "white" | The color of the dots. | -| background_color | string | "gray" | The color of the background. | -| RDK_type | numeric | 3 | The Signal Selection Rule (Same/Different) and Noise Type (Random Position/Walk/Direction):

1 - Same && Random Position
2 - Same && Random Walk
3 - Same && Random Direction
4 - Different && Random Position
5 - Different && Random Walk
6 - Different && Random Direction

(See 'RDK parameter' below for more detailed information)
| -| aperture_type | numeric | 2 | The shape of the aperture.

1 - Circle
2 - Ellipse
3 - Square
4 - Rectangle
| -| reinsert_type | numeric | 2 | The type of reinsertion of a dot that has gone out of bounds

1 - Randomly appear anywhere in the aperture
2 - Appear on the opposite edge of the aperture. For squares and rectangles, a random point on the opposite edge is chosen as the reinsertion point. For circles and ellipses, the exit point is reflected about center to become the reinsertion point.
| -| aperture_center_x | numeric | window.innerWidth/2 | The x-coordinate of the center of the aperture, in pixels.
| -| aperture_center_y | numeric | window.innerHeight/2 | The y-coordinate of the center of the aperture, in pixels.
| -| fixation_cross | boolean | false | Whether or not a fixation cross is presented in the middle of the screen.
| -| fixation_cross_width | numeric | 20 | The width of the fixation cross in pixels.
| -| fixation_cross_height | numeric | 20 | The height of the fixation cross in pixels.
| -| fixation_cross_color | string | "black" | The color of the fixation cross.
| -| fixation_cross_thickness | numeric | 1 | The thickness of the fixation cross in pixels.
| -| border | boolean | false | The presence of a border around the aperture.
| -| border_thickness | numeric | 1 | The thickness of the border in pixels.
| -| border_color | string | "black" | The color of the border.
| - -### RDK type parameter -*See Fig. 1 in [Scase, Braddick, and Raymond (1996)](https://doi.org/10.1016/0042-6989(95)00325-8) for a visual depiction of these different signal selection rules and noise types.* - -#### Signal Selection rule: -- **Same**: Each dot is designated to be either a coherent dot (signal) or incoherent dot (noise) and will remain so throughout all frames in the display. Coherent dots will always move in the direction of coherent motion in all frames. -- **Different**: Each dot can be either a coherent dot (signal) or incoherent dot (noise) and will be designated randomly (weighted based on the coherence level) at each frame. Only the dots that are designated to be coherent dots will move in the direction of coherent motion, but only in that frame. In the next frame, each dot will be designated randomly again on whether it is a coherent or incoherent dot. - -#### Noise Type: -- **Random position**: The incoherent dots appear in a random location in the aperture in each frame.
-- **Random walk**: The incoherent dots will move in a random direction (designated randomly in each frame) in each frame.
-- **Random direction**: Each incoherent dot has its own alternative direction of motion (designated randomly at the beginning of the trial), and moves in that direction in each frame.
- - -## Data Generated - -In addition to the [default data collected by all plugins](/overview/plugins#data-collected-by-all-plugins), this plugin collects all parameter data described above and the following data for each trial. - -| Name | Type | Value | -| ---------------- | ----------- | ---------------------------------------- | -| rt | numeric | The response time in ms for the subject to make a response. | -| response | string | The key that the subject pressed. | -| correct | boolean | Whether or not the subject's key press corresponded to those provided in correct_choice. | -| frame_rate | numeric | The average frame rate for the trial. 0 denotes that the subject responded before the appearance of the second frame. | -| number_of_frames | numeric | The number of frames that was shown in this trial. | -| frame_rate_array | array | The array that holds the number of miliseconds for each frame in this trial. This will be encoded as a JSON string when data is saved using the `.json()` or `.csv()` functions. | -| canvas_width | numeric | The width of the canvas in pixels. | -| canvas_height | numeric | The height of the canvas in pixels. | - -## Example - -???+ example "Setting the correct_choice parameter by linking it to the coherent_direction parameter" - === "Code" - - ```javascript - var trial = { - type: jsPsychRdk, - coherent_direction: 0, - correct_choice: "p" - }; - ``` - === "Demo" - This demo requires a larger viewing area to complete. Please open the demo in a new tab - - Open demo in new tab - -???+ example "Displaying a trial with 2 choices and 1 correct choice" - === "Code" - - ```javascript - var trial = { - type: jsPsychRdk, - post_trial_gap: 0, - number_of_dots: 200, - RDK_type: 3, - choices: ["a", "l"], - correct_choice: "a", - coherent_direction: 180, - trial_duration: 1000 - }; - ``` - === "Demo" - This demo requires a larger viewing area to complete. Please open the demo in a new tab - - Open demo in new tab - -???+ example "Displaying a trial with multiple apertures" - === "Code" - - ```javascript - var trial = { - type: jsPsychRdk, - number_of_apertures: 3, //This needs to be set if more than one aperture - trial_duration: 10000, - correct_choice: "a", - RDK_type: 3, //Applied to all apertures if only one value - aperture_width: 200, //Applied to all apertures if only one value - number_of_dots: [50, 200, 100], //Different parameter for each aperture. Array length must equal number_of_apertures - aperture_center_x: [(window.innerWidth/2)-300,window.innerWidth/2,(window.innerWidth/2)+300] //Separate the apertures on the screen (window.innerWidth/2 is the middle of the screen) - }; - ``` - === "Demo" - This demo requires a larger viewing area to complete. Please open the demo in a new tab - - Open demo in new tab diff --git a/docs/plugins/jspsych-vsl-animate-occlusion.md b/docs/plugins/jspsych-vsl-animate-occlusion.md deleted file mode 100644 index c378f2c7..00000000 --- a/docs/plugins/jspsych-vsl-animate-occlusion.md +++ /dev/null @@ -1,57 +0,0 @@ -# jspsych-vsl-animate-occlusion plugin - -The VSL (visual statistical learning) animate occlusion plugin displays an animated sequence of shapes that disappear behind an occluding rectangle while they change from one shape to another. This plugin can be used to replicate the experiments described in: - -Fiser, J., & Aslin, R. N. (2002). Statistical learning of higher-order temporal structure from visual shape sequences. *Journal of Experimental Psychology: Learning, Memory, and Cognition, 28*(3), 458. - -## Dependency - -This plugin requires the Snap.svg library, available at [http://www.snapsvg.io](http://www.snapsvg.io). You must include the library in the `` section of your experiment page. - -## Parameters - -In addition to the [parameters available in all plugins](/overview/plugins#parameters-available-in-all-plugins), this plugin accepts the following parameters. Parameters with a default value of *undefined* must be specified. Other parameters can be left unspecified if the default value is acceptable. - -| Parameter | Type | Default Value | Description | -| --------------------- | ---------------- | ------------------ | ---------------------------------------- | -| stimuli | array | *undefined* | Each element of the array is a stimulus. A stimulus is a path to an image file. The order of stimuli in the array determines the order of the animation sequence. | -| canvas_size | array | `[400, 400]` | Array specifying the width and height of the area that the animation will display in. Stimuli will move to the edges of this area, so increasing the width without increasing the `timing_cycle` parameter will speed up the images. | -| image_size | array | `[100, 100]` | Array specifying the width and height of the images to show. The occluding rectangle will have a width equal to the width of image_size. | -| initial_direction | string | "left" | Which direction the stimulus should move first (subsequent directions will alternate). Choices are "left" or "right". | -| occlude_center | boolean | true | If true, display a rectangle in the center of the screen that is just wide enough to occlude the image completely as it passes behind. | -| choices | array of strings | `jsPsych.ALL_KEYS` | This array contains the key(s) that the subject is allowed to press in order to respond to the stimulus. Keys should be specified as characters (e.g., `'a'`, `'q'`, `' '`, `'Enter'`, `'ArrowDown'`) - see [this page](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values) and [this page (event.key column)](https://www.freecodecamp.org/news/javascript-keycode-list-keypress-event-key-codes/) for more examples. Any key presses that are not listed in the array will be ignored. The default value of `jsPsych.ALL_KEYS` means that all keys will be accepted as valid responses. Specifying `jsPsych.NO_KEYS` will mean that no responses are allowed. | -| cycle_duration | numeric | 1000 | How long it takes for a stimulus in the sequence to make a complete cycle (move to the edge and back to the center) in milliseconds. | -| pre_movement_duration | numeric | 500 | How long to wait before the stimuli starts moving from behind the center rectangle. | - -## Data Generated - -In addition to the [default data collected by all plugins](/overview/plugins#data-collected-by-all-plugins), this plugin collects the following data for each trial. - -| Name | Type | Value | -| --------- | ----------- | ---------------------------------------- | -| stimulus | array | Array where each element is a stimulus from the sequence, in the order that they were shown. This will be encoded as a JSON string when data is saved using the `.json()` or `.csv()` functions. | -| response | array | Array containing all response information. Each element in the array is an object representing each valid response. Each response item has three properties: `key` the key that was pressed, `stimulus` the index of the stimulus that was displayed when the response was made, and `rt` the response time measured since the start of the sequence. This will be encoded as a JSON string when data is saved using the `.json()` or `.csv()` functions. | - -## Examples - -???+ example "Displaying a short sequence with default options" - === "Code" - - ```javascript - var trial = { - type: jsPsychVslAnimateOcclusion, - stimuli: [ - "img/1.gif", - "img/2.gif", - "img/3.gif", - "img/4.gif" - ] - } - ``` - - === "Demo" -
- -
- - Open demo in new tab diff --git a/docs/plugins/jspsych-vsl-grid-scene.md b/docs/plugins/jspsych-vsl-grid-scene.md deleted file mode 100644 index 6d6f18f1..00000000 --- a/docs/plugins/jspsych-vsl-grid-scene.md +++ /dev/null @@ -1,70 +0,0 @@ -# jspsych-vsl-grid-scene plugin - -The VSL (visual statistical learning) grid scene plugin displays images arranged in a grid. This plugin can be used to replicate the experiments described in: - -Fiser, J., & Aslin, R. N. (2001). Unsupervised statistical learning of higher-order spatial structures from visual scenes. *Psychological Science, 12*(6), 499-504. - -## Parameters - -In addition to the [parameters available in all plugins](/overview/plugins#parameters-available-in-all-plugins), this plugin accepts the following parameters. Parameters with a default value of *undefined* must be specified. Other parameters can be left unspecified if the default value is acceptable. - -| Parameter | Type | Default Value | Description | -| -------------- | ------- | ------------- | ---------------------------------------- | -| stimuli | array | *undefined* | An array that defines a grid. Grids should be declared as two dimensional arrays in `[row][col]` order, with paths to image files in the locations where images are displayed, and 0 in blank spaces. See example below. | -| image_size | array | `[100, 100]` | Array specifying the width and height of the images to show. Grid cells will also be this size, with 10% padding. | -| trial_duration | numeric | 2000 | How long to show the stimulus for in milliseconds. | - -## Data Generated - -In addition to the [default data collected by all plugins](/overview/plugins#data-collected-by-all-plugins), this plugin collects the following data for each trial. - -| Name | Type | Value | -| -------- | ----------- | ---------------------------------------- | -| stimulus | array | Two dimensional array representing the stimulus shown on the trial. This will be encoded as a JSON string when data is saved using the `.json()` or `.csv()` functions. | - -### Stimulus Creation Method - -The plugin also includes a public method for generating the grid scene stimuli that the plugin uses. You can use this method to create HTML strings that produce the stimuli, and then incorporate the stimuli in other plugins. To use this method, include the plugin script on the page and then call the method like this: - -```javascript - -var pattern = [ - ["img/1.gif", "img/2.gif", 0], - [ 0, "img/3.gif", 0], - ["img/5.gif", "img/4.gif", 0] -]; - -var image_size = 100; // pixels - -var grid_stimulus = jsPsychVslGridScene.generate_stimulus(pattern, image_size); - -// grid_stimulus will now contain a string (NOT an HTML DOM object) that you can -// pass into other plugins that accept HTML stimuli as input, such as html-keyboard-response. - -``` - -## Example - -???+ example "Displaying a scene" - === "Code" - - ```javascript - var scene = [ - ["img/1.gif", "img/2.gif", 0], - [ 0, "img/3.gif", 0], - ["img/5.gif", "img/4.gif", 0] - ] - - var trial = { - type: jsPsychVslGridScene, - stimuli: scene, - trial_duration: 1500 - }; - ``` - - === "Demo" -
- -
- - Open demo in new tab diff --git a/docs/plugins/list-of-plugins.md b/docs/plugins/list-of-plugins.md index 108df54a..ffe0b605 100644 --- a/docs/plugins/list-of-plugins.md +++ b/docs/plugins/list-of-plugins.md @@ -34,7 +34,6 @@ Plugin | Description [jspsych‑instructions](/plugins/jspsych-instructions) | For displaying instructions to the subject. Allows the subject to navigate between pages of instructions using keys or buttons. [jspsych‑maxdiff](/plugins/jspsych-maxdiff) | Displays 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. [jspsych‑preload](/plugins/jspsych-preload) | This plugin loads images, audio, and video files into the browser's memory before they are needed in the experiment, in order to improve stimulus and response timing, and to avoid disrupting the flow of the experiment. -[jspsych‑rdk](/plugins/jspsych-rdk) | This plugin displays a Random Dot Kinematogram (RDK) and allows the subject to report the primary direction of motion by pressing a key on the keyboard. [jspsych‑reconstruction](/plugins/jspsych-reconstruction) | The subject interacts with a stimulus by modifying a parameter of the stimulus and observing the change in the stimulus in real-time. [jspsych‑resize](/plugins/jspsych-resize) | Calibrate the display so that materials display with a known physical size. [jspsych‑same‑different‑html](/plugins/jspsych-same-different-html) | A same-different judgment task. An HTML-formatted stimulus is shown, followed by a brief gap, and then another stimulus is shown. The subject indicates whether the stimuli are the same or different. @@ -51,8 +50,6 @@ Plugin | Description [jspsych‑video‑slider‑response](/plugins/jspsych-video-slider-response) | Displays a video file with many options for customizing playback. Subject responds to the video by moving a slider. [jspsych‑virtual‑chinrest](/plugins/jspsych-virtual-chinrest) | An implementation of the "virutal chinrest" procedure developed by [Li, Joo, Yeatman, and Reinecke (2020)](https://doi.org/10.1038/s41598-019-57204-1). Calibrates the monitor to display items at a known physical size by having participants scale an image to be the same size as a physical credit card. Then uses a blind spot task to estimate the distance between the participant and the display. [jspsych‑visual‑search‑circle](/plugins/jspsych-visual-search-circle) | 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. -[jspsych‑vsl‑animate‑occlusion](/plugins/jspsych-vsl-animate-occlusion) | A visual statistical learning paradigm based on [Fiser & Aslin (2002)](http://dx.doi.org/10.1037//0278-7393.28.3.458). A sequence of stimuli are shown in an oscillatory motion. An occluding rectangle is in the center of the display, and the stimuli change when they are behind the rectangle. -[jspsych‑vsl‑grid‑scene](/plugins/jspsych-vsl-grid-scene) | A visual statistical learning paradigm based on [Fiser & Aslin (2001)](http://dx.doi.org/10.1111/1467-9280.00392). A scene made up of individual stimuli arranged in a grid is shown. This plugin can also generate the HTML code to render the stimuli for use in other plugins. [jspsych‑webgazer‑calibrate](/plugins/jspsych-webgazer-calibrate) | Calibrates the WebGazer extension for eye tracking. [jspsych‑webgazer‑init‑camera](/plugins/jspsych-webgazer-init-camera) | Initializes the camera and helps the participant center their face for eye tracking. [jspsych‑webgazer‑validate](/plugins/jspsych-webgazer-validate) | Performs validation to measure precision and accuracy of WebGazer eye tracking predictions. diff --git a/mkdocs.yml b/mkdocs.yml index ff5d4bd7..56b5723f 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -95,7 +95,6 @@ nav: - 'jspsych-instructions': 'plugins/jspsych-instructions.md' - 'jspsych-maxdiff': 'plugins/jspsych-maxdiff.md' - 'jspsych-preload': 'plugins/jspsych-preload.md' - - 'jspsych-rdk': 'plugins/jspsych-rdk.md' - 'jspsych-reconstruction': 'plugins/jspsych-reconstruction.md' - 'jspsych-resize': 'plugins/jspsych-resize.md' - 'jspsych-same-different-html': 'plugins/jspsych-same-different-html.md' @@ -112,8 +111,6 @@ nav: - 'jspsych-video-slider-response': 'plugins/jspsych-video-slider-response.md' - 'jspsych-virtual-chinrest' : 'plugins/jspsych-virtual-chinrest.md' - 'jspsych-visual-search-circle': 'plugins/jspsych-visual-search-circle.md' - - 'jspsych-vsl-animate-occlusion': 'plugins/jspsych-vsl-animate-occlusion.md' - - 'jspsych-vsl-grid-scene': 'plugins/jspsych-vsl-grid-scene.md' - 'jspsych-webgazer-calibrate': 'plugins/jspsych-webgazer-calibrate.md' - 'jspsych-webgazer-init-camera': 'plugins/jspsych-webgazer-init-camera.md' - 'jspsych-webgazer-validate': 'plugins/jspsych-webgazer-validate.md'