mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-10 11:10:54 +00:00
adjust plugin examples for v6
This commit is contained in:
parent
ed3250d48f
commit
8f34d44b28
@ -1,20 +1,19 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
|
||||
<script src="../jspsych.js"></script>
|
||||
<script src="../plugins/jspsych-animation.js"></script>
|
||||
<link rel="stylesheet" href="../css/jspsych.css"></link>
|
||||
</head>
|
||||
|
||||
<body></body>
|
||||
<script>
|
||||
|
||||
var animation_trial = {
|
||||
type: 'animation',
|
||||
stimuli: ['img/happy_face_1.jpg', 'img/happy_face_2.jpg', 'img/happy_face_3.jpg', 'img/happy_face_4.jpg'],
|
||||
sequence_reps: 3,
|
||||
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();
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</html>
|
||||
|
@ -1,7 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<script src="../jspsych.js"></script>
|
||||
<script src="../plugins/jspsych-button-response.js"></script>
|
||||
<link rel="stylesheet" href="../css/jspsych.css"></link>
|
||||
@ -9,6 +8,7 @@
|
||||
img { width: 300px; }
|
||||
</style>
|
||||
</head>
|
||||
<body></body>
|
||||
<script>
|
||||
|
||||
var br_trial = {
|
||||
|
@ -1,12 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<script src="../jspsych.js"></script>
|
||||
<script src="../plugins/jspsych-call-function.js"></script>
|
||||
<link rel="stylesheet" href="../css/jspsych.css"></link>
|
||||
</head>
|
||||
|
||||
<body></body>
|
||||
<script>
|
||||
|
||||
var trial = {
|
||||
@ -15,6 +14,7 @@
|
||||
};
|
||||
|
||||
// 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 = {
|
||||
type: 'call-function',
|
||||
func: function(){ return Date.now(); }
|
||||
@ -23,7 +23,8 @@
|
||||
|
||||
jsPsych.init({
|
||||
timeline: [trial, next_trial],
|
||||
on_finish: function(){ jsPsych.data.displayData(); }
|
||||
on_finish: function(){ jsPsych.data.displayData(); },
|
||||
default_iti: 1000
|
||||
});
|
||||
|
||||
|
||||
|
@ -2,7 +2,6 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
|
||||
<script src="../jspsych.js"></script>
|
||||
<script src="../plugins/jspsych-categorize-animation.js"></script>
|
||||
<link rel="stylesheet" href="../css/jspsych.css"></link>
|
||||
@ -12,8 +11,9 @@
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body></body>
|
||||
<script>
|
||||
|
||||
var trials = {
|
||||
type: 'categorize-animation',
|
||||
stimuli: ['img/happy_face_1.jpg', 'img/sad_face_3.jpg'],
|
||||
@ -22,16 +22,16 @@
|
||||
text_answer: 'different',
|
||||
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>",
|
||||
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({
|
||||
timeline: [trials],
|
||||
on_finish: function() {
|
||||
jsPsych.data.displayData();
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</html>
|
||||
|
@ -2,7 +2,6 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
|
||||
<script src="../jspsych.js"></script>
|
||||
<script src="../plugins/jspsych-categorize.js"></script>
|
||||
<link rel="stylesheet" href="../css/jspsych.css"></link>
|
||||
@ -12,7 +11,7 @@
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body></body>
|
||||
<script>
|
||||
var trials = {
|
||||
type: 'categorize',
|
||||
|
@ -5,6 +5,7 @@
|
||||
<script src="../plugins/jspsych-free-sort.js"></script>
|
||||
<link rel="stylesheet" href="../css/jspsych.css"></link>
|
||||
</head>
|
||||
<body></body>
|
||||
<script>
|
||||
|
||||
var trials = {
|
||||
|
@ -13,7 +13,7 @@
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body></body>
|
||||
<script>
|
||||
var fullscreen_trial = {
|
||||
type: 'fullscreen',
|
||||
|
@ -2,12 +2,11 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
|
||||
<script src="../jspsych.js"></script>
|
||||
<script src="../plugins/jspsych-html.js"></script>
|
||||
<link rel="stylesheet" href="../css/jspsych.css"></link>
|
||||
</head>
|
||||
|
||||
<body></body>
|
||||
<script>
|
||||
/*
|
||||
this demo will only work if run online or with special permissions enable offline
|
||||
@ -26,11 +25,11 @@
|
||||
};
|
||||
|
||||
var consent_block = {
|
||||
"type": "html",
|
||||
"force_refresh": true,
|
||||
"url": "external_html/simple_consent.html",
|
||||
"cont_btn": "start",
|
||||
"check_fn": check_consent
|
||||
type: "html",
|
||||
force_refresh: true,
|
||||
url: "external_html/simple_consent.html",
|
||||
cont_btn: "start",
|
||||
check_fn: check_consent
|
||||
}
|
||||
|
||||
jsPsych.init({
|
||||
|
Loading…
Reference in New Issue
Block a user