mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-10 11:10:54 +00:00
use lower case letters in prompts and param values, fix image sizing/preloading
This commit is contained in:
parent
b2fc3a0a77
commit
94bfef73ab
@ -17,7 +17,8 @@
|
||||
jsPsych.addNodeToEndOfTimeline({
|
||||
timeline: [{
|
||||
type: 'image-keyboard-response',
|
||||
stimulus: 'img/happy_face_4.jpg'
|
||||
stimulus: 'img/happy_face_4.jpg',
|
||||
stimulus_width: 300
|
||||
}]
|
||||
}, jsPsych.resumeExperiment)
|
||||
}
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
var trial = {
|
||||
type: 'html-keyboard-response',
|
||||
stimulus: 'Hello. This is in a loop. Press R to repeat this trial, or C to continue.',
|
||||
stimulus: 'Hello. This is in a loop. Press "r" to repeat this trial, or "c" to continue.',
|
||||
choices: ['r','c']
|
||||
}
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
|
||||
var pre_if_trial = {
|
||||
type: 'html-keyboard-response',
|
||||
stimulus: 'The next trial is in a conditional statement. Press S to skip it, or V to view it.',
|
||||
stimulus: 'The next trial is in a conditional statement. Press "s" to skip it, or V"vto view it.',
|
||||
choices: ['s','v']
|
||||
}
|
||||
|
||||
|
@ -5,11 +5,6 @@
|
||||
<script src="../jspsych.js"></script>
|
||||
<script src="../plugins/jspsych-image-keyboard-response.js"></script>
|
||||
<link rel="stylesheet" href="../css/jspsych.css">
|
||||
<style>
|
||||
img {
|
||||
width: 300px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body></body>
|
||||
<script>
|
||||
@ -17,7 +12,9 @@
|
||||
type: 'image-keyboard-response',
|
||||
stimulus: 'img/happy_face_1.jpg',
|
||||
choices: ['y','n'],
|
||||
prompt: '<p>The data displayed on the next page should have a subject and completed property. Press Y or N.</p>'
|
||||
render_on_canvas: false,
|
||||
stimulus_width: 300,
|
||||
prompt: '<p>The data displayed on the next page should have a subject and completed property. Press "y" or "n".</p>'
|
||||
}
|
||||
|
||||
jsPsych.data.addProperties({
|
||||
|
@ -5,11 +5,6 @@
|
||||
<script src="../jspsych.js"></script>
|
||||
<script src="../plugins/jspsych-image-keyboard-response.js"></script>
|
||||
<link rel="stylesheet" href="../css/jspsych.css">
|
||||
<style>
|
||||
img {
|
||||
width: 300px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body></body>
|
||||
<script>
|
||||
@ -17,7 +12,8 @@
|
||||
type: 'image-keyboard-response',
|
||||
stimulus: 'img/happy_face_1.jpg',
|
||||
choices: ['y','n'],
|
||||
prompt: '<p>Data should have a random int 0-19 on next page. Y or N.</p>',
|
||||
prompt: '<p>Data should have a random int 0-19 on next page. Press "y" or "n".</p>',
|
||||
stimulus_width: 300,
|
||||
data: function() {
|
||||
return {
|
||||
random_number: Math.floor(Math.random() * 20)
|
||||
|
@ -23,7 +23,7 @@
|
||||
type: 'image-keyboard-response',
|
||||
timeline: [trial_1, trial_2, trial_3],
|
||||
choices: ['y','n'],
|
||||
prompt: '<p>Have you seen this face before? Y or N.</p>',
|
||||
prompt: '<p>Have you seen this face before? Press "y" or "n".</p>',
|
||||
stimulus_width: 300,
|
||||
data: {
|
||||
node_data: true
|
||||
|
@ -100,6 +100,7 @@
|
||||
/*start experiment*/
|
||||
jsPsych.init({
|
||||
timeline: timeline,
|
||||
preload_images: ["img/con1.png","img/con2.png","img/inc1.png","img/inc2.png"],
|
||||
on_finish: function() {
|
||||
jsPsych.data.displayData();
|
||||
}
|
||||
|
@ -25,14 +25,14 @@
|
||||
type: "html-keyboard-response",
|
||||
stimulus: "<p>In this experiment, a circle will appear in the center " +
|
||||
"of the screen.</p><p>If the circle is <strong>blue</strong>, " +
|
||||
"press the letter F on the keyboard as fast as you can.</p>" +
|
||||
"<p>If the circle is <strong>orange</strong>, press the letter J " +
|
||||
"press the letter f on the keyboard as fast as you can.</p>" +
|
||||
"<p>If the circle is <strong>orange</strong>, press the letter j " +
|
||||
"as fast as you can.</p>" +
|
||||
"<div style='width: 700px;'>"+
|
||||
"<div style='float: left;'><img src='img/blue.png'></img>" +
|
||||
"<p class='small'><strong>Press the F key</strong></p></div>" +
|
||||
"<p class='small'><strong>Press the f key</strong></p></div>" +
|
||||
"<div class='float: right;'><img src='img/orange.png'></img>" +
|
||||
"<p class='small'><strong>Press the J key</strong></p></div>" +
|
||||
"<p class='small'><strong>Press the j key</strong></p></div>" +
|
||||
"</div>"+
|
||||
"<p>Press any key to begin.</p>",
|
||||
post_trial_gap: 2000
|
||||
|
@ -4,11 +4,6 @@
|
||||
<script src="../../jspsych.js"></script>
|
||||
<script src="../../plugins/jspsych-image-keyboard-response.js"></script>
|
||||
<link rel="stylesheet" href="../../css/jspsych.css">
|
||||
<style>
|
||||
img {
|
||||
width: 300px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
@ -18,6 +13,7 @@
|
||||
stimulus: '../img/happy_face_1.jpg',
|
||||
choices: ['y','n'],
|
||||
render_on_canvas: false,
|
||||
stimulus_width: 300,
|
||||
prompt: '<p>Is this face happy? Press "y" or "n".</p>'
|
||||
}
|
||||
|
||||
@ -26,6 +22,7 @@
|
||||
stimulus: '../img/sad_face_2.jpg',
|
||||
choices: ['y','n'],
|
||||
render_on_canvas: false,
|
||||
stimulus_width: 300,
|
||||
prompt: '<p>Is this face happy? Press "y" or "n".</p>'
|
||||
}
|
||||
|
||||
@ -34,6 +31,7 @@
|
||||
stimulus: '../img/happy_face_2.jpg',
|
||||
choices: ['y','n'],
|
||||
render_on_canvas: false,
|
||||
stimulus_width: 300,
|
||||
prompt: '<p>Is this face happy? Press "y" or "n".</p>',
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@
|
||||
type: 'image-keyboard-response',
|
||||
stimulus: 'img/happy_face_1.jpg',
|
||||
choices: ['y','n'],
|
||||
prompt: '<p>Have you seen this face before? Y or N.</p>',
|
||||
prompt: '<p>Have you seen this face before? Press "y" or "n".</p>',
|
||||
stimulus_width: 300,
|
||||
render_on_canvas: false
|
||||
}
|
||||
@ -42,7 +42,7 @@
|
||||
stimulus: 'img/happy_face_2.jpg',
|
||||
choices: ['y','n'],
|
||||
trial_duration: 5000,
|
||||
prompt: '<p>Have you seen this face before? Y or N. (5s time limit).</p>',
|
||||
prompt: '<p>Have you seen this face before? Press "y" or "n". (5s time limit).</p>',
|
||||
stimulus_width: 300,
|
||||
render_on_canvas: false
|
||||
}
|
||||
@ -56,11 +56,9 @@
|
||||
}
|
||||
|
||||
var node = {
|
||||
type: 'html-keyboard-response',
|
||||
timeline: [trial_1, trial_2, trial_3],
|
||||
}
|
||||
|
||||
|
||||
jsPsych.init({
|
||||
timeline: [node],
|
||||
display_element: 'jspsych-experiment',
|
||||
|
@ -22,7 +22,7 @@
|
||||
stimulus: 'sound/speech_blue.mp3',
|
||||
choices: ['y', 'n'],
|
||||
prompt: '<div style="width: 300px; height: 300px; background-color: #0000ff; display: inline-block;"></div>'+
|
||||
'<p>Does the color match the word? (Y or N)</p>'
|
||||
'<p>Does the color match the word? (y or n)</p>'
|
||||
}
|
||||
|
||||
var trial_2 = {
|
||||
@ -31,7 +31,7 @@
|
||||
choices: ['y', 'n'],
|
||||
trial_duration: 5000,
|
||||
prompt: '<div style="width: 300px; height: 300px; background-color: #ff0000; display: inline-block;"></div>'+
|
||||
'<p>Does the color match the word? (Y or N; 5s time limit)</p>'
|
||||
'<p>Does the color match the word? (y or n; 5s time limit)</p>'
|
||||
}
|
||||
|
||||
var trial_3 = {
|
||||
|
@ -23,7 +23,7 @@ var welcome_block = {
|
||||
|
||||
var category_block = {
|
||||
type: 'html-keyboard-response',
|
||||
stimulus: '<p>Next, you will use the "E" and "I" computer keys ' + 'to categorize items into groups as fast as you can. ' +
|
||||
stimulus: '<p>Next, you will use the "e" and "i" computer keys ' + 'to categorize items into groups as fast as you can. ' +
|
||||
'These are the four groups and the items that belong to each:<br><br>' +
|
||||
'<strong>Good</strong>:<br>' + 'Fabulous, Excitement, Glorious, Cheerful, Cherish, ' +
|
||||
'Enjoy, Delightful, Joyous<br><br>' + '<strong>Bad</strong>:<br>' + 'Humiliate, ' +
|
||||
@ -41,10 +41,10 @@ var category_block = {
|
||||
|
||||
var instructions_block = {
|
||||
type: 'html-keyboard-response',
|
||||
stimulus: "<div style='position: absolute; top: 18%; left: 20%'><p>Press E for:<br><strong>OLD</strong></p></div>" +
|
||||
"<div style='position: absolute; top: 18%; right: 20%'><p>Press I for:<br><strong>YOUNG</strong></p></div>" +
|
||||
"<div style='position: relative; top: 42%; margin-left: auto; margin-right: auto'>Put a left finger on the <strong>E</strong> key for items that belong to the Old People category. Put a right finger on the " +
|
||||
"<strong>I</strong> key for items that belong to the Young People " +
|
||||
stimulus: "<div style='position: absolute; top: 18%; left: 20%'><p>Press e for:<br><strong>OLD</strong></p></div>" +
|
||||
"<div style='position: absolute; top: 18%; right: 20%'><p>Press i for:<br><strong>YOUNG</strong></p></div>" +
|
||||
"<div style='position: relative; top: 42%; margin-left: auto; margin-right: auto'>Put a left finger on the <strong>e</strong> key for items that belong to the Old People category. Put a right finger on the " +
|
||||
"<strong>i</strong> key for items that belong to the Young People " +
|
||||
"category. Items will appear one at a time.<br><br>" + "If you " +
|
||||
"make a mistake, a red X will appear. Press the keys listed below " +
|
||||
"to continue. Go as fast as you can while being accurate.<br><br> " +
|
||||
@ -63,8 +63,8 @@ var trial_block = {
|
||||
force_correct_key_press: true,
|
||||
display_feedback: true,
|
||||
trial_duration: 3000, //Only if display_feedback is false
|
||||
left_category_key: 'E',
|
||||
right_category_key: 'I',
|
||||
left_category_key: 'e',
|
||||
right_category_key: 'i',
|
||||
left_category_label: ['OLD'],
|
||||
right_category_label: ['YOUNG'],
|
||||
response_ends_trial: true,
|
||||
@ -93,9 +93,9 @@ var instructions_block2 = {
|
||||
type: 'html-keyboard-response',
|
||||
stimulus: "<div style='position: absolute; top: 18%; left: 20%'>Press E for:<br><strong>BAD</strong></div>" +
|
||||
"<div style='position: absolute; top: 18%; right: 20%'>Press I for:<br><strong>GOOD</strong></div>" +
|
||||
"<div style='position: relative; top: 42%; margin-left: auto; margin-right: auto'>Put a left finger on the <strong>E</strong> key for items that " +
|
||||
"<div style='position: relative; top: 42%; margin-left: auto; margin-right: auto'>Put a left finger on the <strong>e</strong> key for items that " +
|
||||
"belong to the Bad category. Put a right finger on the " +
|
||||
"<strong>I</strong> key for items that belong to the Good " +
|
||||
"<strong>i</strong> key for items that belong to the Good " +
|
||||
"category. Items will appear one at a time.<br><br>" + "If you " +
|
||||
"make a mistake, a red X will appear. Press the keys listed below " +
|
||||
"to continue. Go as fast as you can while being accurate.<br><br> " +
|
||||
@ -113,8 +113,8 @@ var trial_block2 = {
|
||||
force_correct_key_press: true,
|
||||
display_feedback: true,
|
||||
trial_duration: 3000, //Only if display_feedback is false
|
||||
left_category_key: 'E',
|
||||
right_category_key: 'I',
|
||||
left_category_key: 'e',
|
||||
right_category_key: 'i',
|
||||
left_category_label: ['BAD'],
|
||||
right_category_label: ['GOOD'],
|
||||
response_ends_trial: true,
|
||||
@ -145,11 +145,11 @@ var trial_block2 = {
|
||||
|
||||
var instructions_block3 = {
|
||||
type: 'html-keyboard-response',
|
||||
stimulus: "<div style='position: absolute; top: 18%; left: 20%'>Press E for:<br> " +
|
||||
stimulus: "<div style='position: absolute; top: 18%; left: 20%'>Press e for:<br> " +
|
||||
"<strong>BAD</strong><br>" + "or<br>" + "<strong>OLD</strong></div>" + "<div style='position: absolute; top: 18%; right: 20%'>" +
|
||||
"Press I for:<br>" + "<strong>GOOD</strong><br>" + "or<br>" + "<strong>YOUNG</strong></div>" +
|
||||
"<div style='position: relative; top: 42%; margin-left: auto; margin-right: auto'>Use <strong>E</strong> for Bad and for " +
|
||||
"Old People<br>" + "Use <strong>I</strong> for Good and for Young People<br>" +
|
||||
"Press i for:<br>" + "<strong>GOOD</strong><br>" + "or<br>" + "<strong>YOUNG</strong></div>" +
|
||||
"<div style='position: relative; top: 42%; margin-left: auto; margin-right: auto'>Use <strong>e</strong> for Bad and for " +
|
||||
"Old People<br>" + "Use <strong>i</strong> for Good and for Young People<br>" +
|
||||
"Each item belongs to only one category.<br><br>" + "If you " +
|
||||
"make a mistake, a red X will appear. Press the keys listed below " +
|
||||
"to continue. Go as fast as you can while being accurate.<br><br> " +
|
||||
@ -167,8 +167,8 @@ var trial_block3 = {
|
||||
force_correct_key_press: true,
|
||||
display_feedback: true,
|
||||
trial_duration: 3000, //Only if display_feedback is false
|
||||
left_category_key: 'E',
|
||||
right_category_key: 'I',
|
||||
left_category_key: 'e',
|
||||
right_category_key: 'i',
|
||||
left_category_label: ['BAD', 'OLD'],
|
||||
right_category_label: ['GOOD', 'YOUNG'],
|
||||
response_ends_trial: true,
|
||||
@ -211,11 +211,11 @@ var trial_block3 = {
|
||||
|
||||
var instructions_block4 = {
|
||||
type: 'html-keyboard-response',
|
||||
stimulus: "<div style='position: absolute; top: 18%; left: 20%'>Press E for:<br> " +
|
||||
stimulus: "<div style='position: absolute; top: 18%; left: 20%'>Press e for:<br> " +
|
||||
"<strong>BAD</strong><br>" + "or<br>" + "<strong>OLD</strong></div>" + "<div style='position: absolute; top: 18%; right: 20%'>" +
|
||||
"Press I for:<br>" + "<strong>GOOD</strong><br>" + "or<br>" + "<strong>YOUNG</strong></div>" +
|
||||
"<div style='position: relative; top: 42%; margin-left: auto; margin-right: auto'>This is the same as the previous part.<br>" + "Use <strong>E</strong> for Bad and for " +
|
||||
"Old People<br>" + "Use <strong>I</strong> for Good and for Young People<br>" +
|
||||
"Press i for:<br>" + "<strong>GOOD</strong><br>" + "or<br>" + "<strong>YOUNG</strong></div>" +
|
||||
"<div style='position: relative; top: 42%; margin-left: auto; margin-right: auto'>This is the same as the previous part.<br>" + "Use <strong>e</strong> for Bad and for " +
|
||||
"Old People<br>" + "Use <strong>i</strong> for Good and for Young People<br>" +
|
||||
"Each item belongs to only one category.<br><br>" + "If you " +
|
||||
"make a mistake, a red X will appear. Press the keys listed below " +
|
||||
"to continue. Go as fast as you can while being accurate.<br><br> " +
|
||||
@ -234,8 +234,8 @@ var trial_block4 = {
|
||||
force_correct_key_press: true,
|
||||
display_feedback: true,
|
||||
trial_duration: 3000, //Only if display_feedback is false
|
||||
left_category_key: 'E',
|
||||
right_category_key: 'I',
|
||||
left_category_key: 'e',
|
||||
right_category_key: 'i',
|
||||
left_category_label: ['BAD', 'OLD'],
|
||||
right_category_label: ['GOOD', 'YOUNG'],
|
||||
response_ends_trial: true,
|
||||
@ -278,10 +278,10 @@ var trial_block4 = {
|
||||
|
||||
var instructions_block5 = {
|
||||
type: 'html-keyboard-response',
|
||||
stimulus: "<div style='position: absolute; top: 18%; left: 20%'>Press E for:<br>" + "<strong>YOUNG</strong></div>" +
|
||||
"<div style='position: absolute; top: 18%; right: 20%'>Press I for:<br>" + "<strong>OLD</strong></div>" +
|
||||
stimulus: "<div style='position: absolute; top: 18%; left: 20%'>Press e for:<br>" + "<strong>YOUNG</strong></div>" +
|
||||
"<div style='position: absolute; top: 18%; right: 20%'>Press i for:<br>" + "<strong>OLD</strong></div>" +
|
||||
"<div style='position: relative; top: 42%; margin-left: auto; margin-right: auto'>Watch out, the labels have changed positions!<br>" +
|
||||
"Use <strong>E</strong> for Young People<br>" + "Use <strong>I</strong> for Old People<br><br>" +
|
||||
"Use <strong>e</strong> for Young People<br>" + "Use <strong>i</strong> for Old People<br><br>" +
|
||||
"If you make a mistake, a red X will appear. Press the keys listed below " +
|
||||
"to continue. Go as fast as you can while being accurate.<br><br> " +
|
||||
"Press the any key when you are ready to start.</div>"
|
||||
@ -299,8 +299,8 @@ var trial_block4 = {
|
||||
force_correct_key_press: true,
|
||||
display_feedback: true,
|
||||
trial_duration: 3000, //Only if display_feedback is false
|
||||
left_category_key: 'E',
|
||||
right_category_key: 'I',
|
||||
left_category_key: 'e',
|
||||
right_category_key: 'i',
|
||||
left_category_label: ['YOUNG'],
|
||||
right_category_label: ['OLD'],
|
||||
response_ends_trial: true,
|
||||
@ -327,11 +327,11 @@ var trial_block4 = {
|
||||
|
||||
var instructions_block6 = {
|
||||
type: 'html-keyboard-response',
|
||||
stimulus: "<div style='position: absolute; top: 18%; left: 20%'>Press E for:<br>" + "<strong>BAD</strong><br>" + "or<br>" +
|
||||
"<strong>YOUNG</strong></div>" + "<div style='position: absolute; top: 18%; right: 20%'>Press I for:<br>" + "<strong>GOOD</strong><br>" + "or<br>" +
|
||||
stimulus: "<div style='position: absolute; top: 18%; left: 20%'>Press e for:<br>" + "<strong>BAD</strong><br>" + "or<br>" +
|
||||
"<strong>YOUNG</strong></div>" + "<div style='position: absolute; top: 18%; right: 20%'>Press i for:<br>" + "<strong>GOOD</strong><br>" + "or<br>" +
|
||||
"<strong>OLD</strong></div>" +
|
||||
"<div style='position: relative; top: 42%; margin-left: auto; margin-right: auto'>Use <strong>E</strong> for Bad and for Young People<br>" +
|
||||
"Use <strong>I</strong> for Good and for Old People<br><br>" +
|
||||
"<div style='position: relative; top: 42%; margin-left: auto; margin-right: auto'>Use <strong>e</strong> for Bad and for Young People<br>" +
|
||||
"Use <strong>i</strong> for Good and for Old People<br><br>" +
|
||||
"If you make a mistake, a red X will appear. Press the keys listed below " +
|
||||
"to continue. Go as fast as you can while being accurate.<br><br> " +
|
||||
"Press the any key when you are ready to start.</div>"
|
||||
@ -348,8 +348,8 @@ var trial_block4 = {
|
||||
force_correct_key_press: true,
|
||||
display_feedback: true,
|
||||
trial_duration: 3000, //Only if display_feedback is false
|
||||
left_category_key: 'E',
|
||||
right_category_key: 'I',
|
||||
left_category_key: 'e',
|
||||
right_category_key: 'i',
|
||||
left_category_label: ['BAD', 'YOUNG'],
|
||||
right_category_label: ['GOOD', 'OLD'],
|
||||
response_ends_trial: true,
|
||||
@ -392,12 +392,12 @@ var trial_block4 = {
|
||||
|
||||
var instructions_block7 = {
|
||||
type: 'html-keyboard-response',
|
||||
stimulus: "<div style='position: absolute; top: 18%; left: 20%'>Press E for:<br>" + "<strong>Bad</strong><br>" + "or<br>" +
|
||||
"<strong>Young People</strong></div>" + "<div style='position: absolute; top: 18%; right: 20%'>Press I for:<br>" + "<strong>Good</strong><br>" + "or<br>" +
|
||||
stimulus: "<div style='position: absolute; top: 18%; left: 20%'>Press e for:<br>" + "<strong>Bad</strong><br>" + "or<br>" +
|
||||
"<strong>Young People</strong></div>" + "<div style='position: absolute; top: 18%; right: 20%'>Press i for:<br>" + "<strong>Good</strong><br>" + "or<br>" +
|
||||
"<strong>Old People</strong></div>" +
|
||||
"<div style='position: relative; top: 42%; margin-left: auto; margin-right: auto'>This is the same as the previous part<br>" +
|
||||
"Use <strong>E</strong> for Bad and for Young People<br>" +
|
||||
"Use <strong>I</strong> for Good and for Old People<br>" +
|
||||
"Use <strong>e</strong> for Bad and for Young People<br>" +
|
||||
"Use <strong>i</strong> for Good and for Old People<br>" +
|
||||
"Each item belongs to only one category<br><br>" +
|
||||
"If you make a mistake, a red X will appear. Press the keys listed below " +
|
||||
"to continue. Go as fast as you can while being accurate.<br><br> " +
|
||||
@ -416,8 +416,8 @@ var trial_block7 = {
|
||||
force_correct_key_press: true,
|
||||
display_feedback: true,
|
||||
trial_duration: 3000, //Only if display_feedback is false
|
||||
left_category_key: 'E',
|
||||
right_category_key: 'I',
|
||||
left_category_key: 'e',
|
||||
right_category_key: 'i',
|
||||
left_category_label: ['BAD', 'YOUNG'],
|
||||
right_category_label: ['GOOD', 'OLD'],
|
||||
response_ends_trial: true,
|
||||
@ -502,6 +502,8 @@ var trial_block7 = {
|
||||
|
||||
jsPsych.init({
|
||||
timeline: timeline,
|
||||
preload_images: ['img/age/of1.jpg','img/age/of2.jpg','img/age/of3.jpg','img/age/om1.jpg','img/age/om2.jpg','img/age/om3.jpg',
|
||||
'img/age/yf1.jpg','img/age/yf4.jpg','img/age/yf5.jpg','img/age/ym2.jpg','img/age/ym3.jpg','img/age/ym5.jpg'],
|
||||
on_finish: function() {
|
||||
jsPsych.data.displayData();
|
||||
}
|
||||
|
@ -38,7 +38,7 @@
|
||||
type: 'image-keyboard-response',
|
||||
stimulus: 'img/happy_face_1.jpg',
|
||||
choices: ['y','n'],
|
||||
prompt: '<p>Have you seen this face before? Y or N.</p>'
|
||||
prompt: '<p>Have you seen this face before? Press y or n.</p>'
|
||||
}
|
||||
|
||||
var trial_2 = {
|
||||
@ -46,7 +46,7 @@
|
||||
stimulus: 'img/happy_face_2.jpg',
|
||||
choices: ['y','n'],
|
||||
trial_duration: 5000,
|
||||
prompt: '<p>Have you seen this face before? Y or N. (5s time limit).</p>'
|
||||
prompt: '<p>Have you seen this face before? Press y or n. (5s time limit).</p>'
|
||||
}
|
||||
|
||||
var trial_3 = {
|
||||
@ -63,7 +63,7 @@
|
||||
choices: ['y','n'],
|
||||
stimulus_width: 400,
|
||||
maintain_aspect_ratio: false,
|
||||
prompt: '<p>Have you seen this face before? Y or N.</p><p>(Stimulus_width set to a smaller value and maintain_aspect_ratio set to false.)</p>'
|
||||
prompt: '<p>Have you seen this face before? Press y or n.</p><p>(Stimulus_width set to a smaller value and maintain_aspect_ratio set to false.)</p>'
|
||||
}
|
||||
|
||||
jsPsych.init({
|
||||
|
@ -13,7 +13,7 @@
|
||||
var size = 50 + Math.floor(param*250);
|
||||
var html = '<div style="display: block; margin: auto; height: 300px; width: 300px; position: relative;">'+
|
||||
'<div style="display: block; position: absolute; top: '+(150 - size/2)+'px; left:'+(150 - size/2)+'px; background-color: #000000; '+
|
||||
'width: '+size+'px; height: '+size+'px;"></div></div><p>Press H to make the square larger. Press G to make the square smaller.</p>'+
|
||||
'width: '+size+'px; height: '+size+'px;"></div></div><p>Press "h" to make the square larger. Press "g" to make the square smaller.</p>'+
|
||||
'<p>When the square is the same size as the previous one, click Next.</p>';
|
||||
return html;
|
||||
}
|
||||
@ -25,7 +25,7 @@
|
||||
'width: 210px; height: 210px;"></div></div>',
|
||||
choices: ['c'],
|
||||
post_trial_gap: 1250,
|
||||
prompt: '<p>Study the size of this square carefully. On the next screen you will have to recreate it. When you are ready, press C.</p>'
|
||||
prompt: '<p>Study the size of this square carefully. On the next screen you will have to recreate it. When you are ready, press "c".</p>'
|
||||
}
|
||||
|
||||
var test = {
|
||||
|
@ -11,9 +11,9 @@
|
||||
var trial = {
|
||||
type: 'same-different-html',
|
||||
stimuli: ['<p>Talkative</p>', '<p>Loquacious</p>'],
|
||||
prompt: "<p>Press S if the words mean the same thing. Press D if they mean different things.</p>",
|
||||
same_key: 'S',
|
||||
different_key: 'D',
|
||||
prompt: "<p>Press 's' if the words mean the same thing. Press 'd' if they mean different things.</p>",
|
||||
same_key: 's',
|
||||
different_key: 'd',
|
||||
answer: 'same'
|
||||
}
|
||||
|
||||
|
@ -16,9 +16,9 @@
|
||||
var trial = {
|
||||
type: 'same-different-image',
|
||||
stimuli: ['img/happy_face_1.jpg', 'img/sad_face_3.jpg'],
|
||||
prompt: "<p>Press S if the faces had the same emotional expression. Press D if the faces had different emotional expressions.</p>",
|
||||
same_key: 'S',
|
||||
different_key: 'D',
|
||||
prompt: "<p>Press 's' if the faces had the same emotional expression. Press 'd' if the faces had different emotional expressions.</p>",
|
||||
same_key: 's',
|
||||
different_key: 'd',
|
||||
answer: 'different'
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
type: 'video-keyboard-response',
|
||||
stimulus: ['video/sample_video.mp4'],
|
||||
choices: ['y','n'],
|
||||
prompt: 'Press Y or N',
|
||||
prompt: 'Press y or n.',
|
||||
width: 600,
|
||||
//height: 600,
|
||||
autoplay: true,
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
var intro = {
|
||||
type: 'html-keyboard-response',
|
||||
stimulus: '<p>You will see a set of Ns on the following screens. Press J if there is a backwards N. If there is no backwards N press F.</p><p>Press any key to begin.</p>'
|
||||
stimulus: '<p>You will see a set of Ns on the following screens. Press j if there is a backwards N. If there is no backwards N press f.</p><p>Press any key to begin.</p>'
|
||||
}
|
||||
|
||||
var trial_1 = {
|
||||
|
@ -18,7 +18,7 @@
|
||||
var instructions = {
|
||||
type: 'html-button-response',
|
||||
stimulus: '<p>Each screen will show either an English word or letters that do not form a word.</p>'+
|
||||
'<p>Press Y if the letters form a valid word.</p><p>Press N if the letters do not form a valid word.</p>',
|
||||
'<p>Press y if the letters form a valid word.</p><p>Press n if the letters do not form a valid word.</p>',
|
||||
choices: ['Ready to start']
|
||||
}
|
||||
timeline.push(instructions);
|
||||
@ -111,7 +111,7 @@
|
||||
"<p>Your average correct response time for low frequency English words was "+Math.round(low_rt)+"ms.</p>"+
|
||||
"<p>The typical pattern of results is that people are faster to respond to high frequency (common) "+
|
||||
"word than low frequency (uncommon) words.</p>"+
|
||||
"<p>Press C to see the entire set of data generated by this experiment.</p>";
|
||||
"<p>Press c to see the entire set of data generated by this experiment.</p>";
|
||||
|
||||
return message;
|
||||
|
||||
|
@ -37,7 +37,7 @@
|
||||
return jsPsych.randomization.sampleWithoutReplacement(images_to_preload, 1)[0];
|
||||
},
|
||||
choices: ['y','n'],
|
||||
prompt: '<p>Have you seen this face before? Y or N.</p>',
|
||||
prompt: '<p>Have you seen this face before? Press y or n.</p>',
|
||||
stimulus_width: 300
|
||||
}
|
||||
|
||||
|
@ -5,11 +5,6 @@
|
||||
<script src="../plugins/jspsych-image-keyboard-response.js"></script>
|
||||
<script src="../plugins/jspsych-html-keyboard-response.js"></script>
|
||||
<link rel="stylesheet" href="../css/jspsych.css">
|
||||
<style>
|
||||
img {
|
||||
width: 300px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body></body>
|
||||
<script>
|
||||
@ -18,6 +13,7 @@
|
||||
stimulus: 'img/happy_face_1.jpg',
|
||||
choices: ['y','n'],
|
||||
render_on_canvas: false,
|
||||
stimulus_width: 300,
|
||||
prompt: '<p>Have you seen this face before? Press "y" or "n".</p>'
|
||||
}
|
||||
|
||||
@ -26,6 +22,7 @@
|
||||
stimulus: 'img/happy_face_2.jpg',
|
||||
choices: ['y','n'],
|
||||
render_on_canvas: false,
|
||||
stimulus_width: 300,
|
||||
prompt: '<p>Have you seen this face before? Press "y" or "n".</p>'
|
||||
}
|
||||
|
||||
@ -34,6 +31,7 @@
|
||||
stimulus: 'img/happy_face_3.jpg',
|
||||
choices: ['y','n'],
|
||||
render_on_canvas: false,
|
||||
stimulus_width: 300,
|
||||
prompt: '<p>Have you seen this face before? Press "y" or "n".</p>'
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user