mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-10 11:10:54 +00:00
update readme
This commit is contained in:
parent
dd46c7e017
commit
5551a996b0
23
README.md
23
README.md
@ -7,9 +7,8 @@ Examples
|
||||
|
||||
These examples are intended to illustrate what jsPsych code and experiments look like. There is a larger set of example code in the [examples folder](/examples).
|
||||
|
||||
#### #1: Displaying instructions [(code)](https://github.com/jspsych/jsPsych/tree/master/examples/demos/demo_1.html)
|
||||
|
||||
<div>
|
||||
#### #1: [Displaying instructions](https://github.com/jspsych/jsPsych/tree/master/examples/demos/demo_1.html)
|
||||
<div display="flex">
|
||||
<img src="https://user-images.githubusercontent.com/14092539/28126774-801ea42e-66f8-11e7-9b6a-c8bad0026bec.gif" align="right" width=50% />
|
||||
<div markdown="1" style="width: 50%;">
|
||||
<sub>
|
||||
@ -32,11 +31,9 @@ var trial = {
|
||||
type: 'instructions',
|
||||
pages: [
|
||||
'Welcome to the experiment. Click next to begin.',
|
||||
|
||||
'<div>In this experiment, you will view a ' +
|
||||
'series of images and answer questions.<br>' +
|
||||
'Answer with the keys "y" or "n".',
|
||||
|
||||
'Here is an example:<br><br> ' +
|
||||
'<img src="img/age/of2.jpg"></img><br><br>' +
|
||||
'Is this person OLD or YOUNG?'
|
||||
@ -64,7 +61,7 @@ jsPsych.init({
|
||||
</div>
|
||||
|
||||
|
||||
#### #2: Displaying images and recording a response [(code)](https://github.com/jspsych/jsPsych/tree/master/examples/demos/demo_2.html)
|
||||
#### #2: [Displaying images and recording a response](https://github.com/jspsych/jsPsych/tree/master/examples/demos/demo_2.html)
|
||||
<div display="flex">
|
||||
<img src="https://user-images.githubusercontent.com/14092539/28125911-0504cca2-66f6-11e7-8f5b-c9686f63aaa8.gif" align="right" width=50% />
|
||||
|
||||
@ -117,8 +114,7 @@ jsPsych.init({
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
#### #3: A flanker task showing a few advanced features of the library [(code)](https://github.com/jspsych/jsPsych/tree/master/examples/demos/demo_3.html)
|
||||
#### #3: [A flanker task](https://github.com/jspsych/jsPsych/tree/master/examples/demos/demo_3.html) showing a few advanced features of the library
|
||||
|
||||
<div display="flex">
|
||||
<img src="https://user-images.githubusercontent.com/14092539/28126802-97b50d08-66f8-11e7-9a45-46561ab51a5f.gif" align="right" width=50% />
|
||||
@ -130,7 +126,8 @@ var test_stimuli = [
|
||||
{ stimulus: "<<<<<", data: {stim_type: 'congruent'} },
|
||||
{ stimulus: ">>>>>", data: {stim_type: 'congruent'} },
|
||||
{ stimulus: "<<><<", data: {stim_type: 'incongruent'} },
|
||||
{ stimulus: ">><>>", data: { stim_type: 'incongruent'} } ];
|
||||
{ stimulus: ">><>>", data: {stim_type: 'incongruent'} }
|
||||
];
|
||||
|
||||
var test = {
|
||||
timeline: [{
|
||||
@ -139,7 +136,8 @@ var test = {
|
||||
stimulus: jsPsych.timelineVariable('stimulus'),
|
||||
data: jsPsych.timelineVariable('data'),
|
||||
post_trial_gap: 1500,
|
||||
response_ends_trial: true }],
|
||||
response_ends_trial: true
|
||||
}],
|
||||
timeline_variables: test_stimuli,
|
||||
sample: {type: 'fixed-repetitions', size: 2}
|
||||
};
|
||||
@ -160,11 +158,8 @@ var debrief = {
|
||||
}
|
||||
};
|
||||
|
||||
var timeline = [];
|
||||
timeline.push(test);
|
||||
timeline.push(debrief);
|
||||
jsPsych.init({
|
||||
timeline: timeline,
|
||||
timeline: [test, debrief],
|
||||
});
|
||||
```
|
||||
</sub>
|
||||
|
Loading…
Reference in New Issue
Block a user