first draft of plugin docs install section

This commit is contained in:
Becky Gilbert 2022-04-27 12:48:17 -07:00
parent 5cf4e5bc09
commit 110bb291fa

View File

@ -25,6 +25,29 @@ Name | Type | Value
animation_sequence | array | An array, where each element is an object that represents a stimulus in the animation sequence. Each object has a `stimulus` property, which is the image that was displayed, and a `time` property, which is the time in ms, measured from when the sequence began, that the stimulus was displayed. The array will be encoded in JSON format when data is saved using either the `.json()` or `.csv()` functions.
response | array | An array, where each element is an object representing a response given by the subject. Each object has a `stimulus` property, indicating which image was displayed when the key was pressed, an `rt` property, indicating the time of the key press relative to the start of the animation, and a `key_press` property, indicating which key was pressed. The array will be encoded in JSON format when data is saved using either the `.json()` or `.csv()` functions.
## Install
Using the CDN-hosted JavaScript file:
```js
<script src="https://unpkg.com/@jspsych/plugin-animatione@1.1.0"></script>
```
Using the JavaScript file downloaded from a GitHub release dist archive:
```js
<script src="jspsych/plugin-animation.js"></script>
```
Using NPM:
```
npm install @jspsych/plugin-animation
```
```js
import animation from '@jspsych/plugin-animation';
```
## Examples
???+ example "Displaying a single sequence multiple times"