adjust plugin examples for v6

This commit is contained in:
Josh de Leeuw 2017-06-21 09:10:56 -04:00
parent ed3250d48f
commit 8f34d44b28
8 changed files with 22 additions and 22 deletions

View File

@ -1,20 +1,19 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<script src="../jspsych.js"></script> <script src="../jspsych.js"></script>
<script src="../plugins/jspsych-animation.js"></script> <script src="../plugins/jspsych-animation.js"></script>
<link rel="stylesheet" href="../css/jspsych.css"></link> <link rel="stylesheet" href="../css/jspsych.css"></link>
</head> </head>
<body></body>
<script> <script>
var animation_trial = { var animation_trial = {
type: 'animation', type: 'animation',
stimuli: ['img/happy_face_1.jpg', 'img/happy_face_2.jpg', 'img/happy_face_3.jpg', 'img/happy_face_4.jpg'], stimuli: ['img/happy_face_1.jpg', 'img/happy_face_2.jpg', 'img/happy_face_3.jpg', 'img/happy_face_4.jpg'],
sequence_reps: 3, sequence_reps: 3,
frame_time: 300, frame_time: 300,
prompt: '<p class="center-content">Watch the faces</p>' prompt: '<p class="center-content">Watch the faces.</p>'
}; };
@ -24,6 +23,7 @@
jsPsych.data.displayData(); jsPsych.data.displayData();
} }
}); });
</script> </script>
</html> </html>

View File

@ -1,7 +1,6 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<script src="../jspsych.js"></script> <script src="../jspsych.js"></script>
<script src="../plugins/jspsych-button-response.js"></script> <script src="../plugins/jspsych-button-response.js"></script>
<link rel="stylesheet" href="../css/jspsych.css"></link> <link rel="stylesheet" href="../css/jspsych.css"></link>
@ -9,6 +8,7 @@
img { width: 300px; } img { width: 300px; }
</style> </style>
</head> </head>
<body></body>
<script> <script>
var br_trial = { var br_trial = {

View File

@ -1,12 +1,11 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<script src="../jspsych.js"></script> <script src="../jspsych.js"></script>
<script src="../plugins/jspsych-call-function.js"></script> <script src="../plugins/jspsych-call-function.js"></script>
<link rel="stylesheet" href="../css/jspsych.css"></link> <link rel="stylesheet" href="../css/jspsych.css"></link>
</head> </head>
<body></body>
<script> <script>
var trial = { var trial = {
@ -15,6 +14,7 @@
}; };
// this is to check if the plugin specific default for timing_post_trial works. // this is to check if the plugin specific default for timing_post_trial works.
// if it does, then the return values should be nearly identical.
var next_trial = { var next_trial = {
type: 'call-function', type: 'call-function',
func: function(){ return Date.now(); } func: function(){ return Date.now(); }
@ -23,7 +23,8 @@
jsPsych.init({ jsPsych.init({
timeline: [trial, next_trial], timeline: [trial, next_trial],
on_finish: function(){ jsPsych.data.displayData(); } on_finish: function(){ jsPsych.data.displayData(); },
default_iti: 1000
}); });

View File

@ -2,7 +2,6 @@
<html> <html>
<head> <head>
<script src="../jspsych.js"></script> <script src="../jspsych.js"></script>
<script src="../plugins/jspsych-categorize-animation.js"></script> <script src="../plugins/jspsych-categorize-animation.js"></script>
<link rel="stylesheet" href="../css/jspsych.css"></link> <link rel="stylesheet" href="../css/jspsych.css"></link>
@ -12,8 +11,9 @@
} }
</style> </style>
</head> </head>
<body></body>
<script> <script>
var trials = { var trials = {
type: 'categorize-animation', type: 'categorize-animation',
stimuli: ['img/happy_face_1.jpg', 'img/sad_face_3.jpg'], stimuli: ['img/happy_face_1.jpg', 'img/sad_face_3.jpg'],
@ -22,16 +22,16 @@
text_answer: 'different', text_answer: 'different',
correct_text: "<p class='center-content'>Correct. The faces had %ANS% expressions.</p>", correct_text: "<p class='center-content'>Correct. The faces had %ANS% expressions.</p>",
incorrect_text: "<p class='center-content'>Incorrect. The faces had %ANS% expressions.</p>", incorrect_text: "<p class='center-content'>Incorrect. The faces had %ANS% expressions.</p>",
prompt: "<p class='center-content'>Press D if the faces had different emotional expressions. Press S if the faces had the same emotional expressions.</p>", prompt: "<p class='center-content'>Press D if the faces had different emotional expressions. Press S if the faces had the same emotional expression.</p>",
}; };
jsPsych.init({ jsPsych.init({
timeline: [trials], timeline: [trials],
on_finish: function() { on_finish: function() {
jsPsych.data.displayData(); jsPsych.data.displayData();
} }
}); });
</script> </script>
</html> </html>

View File

@ -2,7 +2,6 @@
<html> <html>
<head> <head>
<script src="../jspsych.js"></script> <script src="../jspsych.js"></script>
<script src="../plugins/jspsych-categorize.js"></script> <script src="../plugins/jspsych-categorize.js"></script>
<link rel="stylesheet" href="../css/jspsych.css"></link> <link rel="stylesheet" href="../css/jspsych.css"></link>
@ -12,7 +11,7 @@
} }
</style> </style>
</head> </head>
<body></body>
<script> <script>
var trials = { var trials = {
type: 'categorize', type: 'categorize',

View File

@ -5,6 +5,7 @@
<script src="../plugins/jspsych-free-sort.js"></script> <script src="../plugins/jspsych-free-sort.js"></script>
<link rel="stylesheet" href="../css/jspsych.css"></link> <link rel="stylesheet" href="../css/jspsych.css"></link>
</head> </head>
<body></body>
<script> <script>
var trials = { var trials = {

View File

@ -13,7 +13,7 @@
} }
</style> </style>
</head> </head>
<body></body>
<script> <script>
var fullscreen_trial = { var fullscreen_trial = {
type: 'fullscreen', type: 'fullscreen',

View File

@ -2,12 +2,11 @@
<html> <html>
<head> <head>
<script src="../jspsych.js"></script> <script src="../jspsych.js"></script>
<script src="../plugins/jspsych-html.js"></script> <script src="../plugins/jspsych-html.js"></script>
<link rel="stylesheet" href="../css/jspsych.css"></link> <link rel="stylesheet" href="../css/jspsych.css"></link>
</head> </head>
<body></body>
<script> <script>
/* /*
this demo will only work if run online or with special permissions enable offline this demo will only work if run online or with special permissions enable offline
@ -26,11 +25,11 @@
}; };
var consent_block = { var consent_block = {
"type": "html", type: "html",
"force_refresh": true, force_refresh: true,
"url": "external_html/simple_consent.html", url: "external_html/simple_consent.html",
"cont_btn": "start", cont_btn: "start",
"check_fn": check_consent check_fn: check_consent
} }
jsPsych.init({ jsPsych.init({