jsPsych/packages/jspsych/tests/timing-tests/calibration-timeline.js
bjoluc c119650471 Move experiment execution into jsPsych.run()
The `run()` method takes a timeline and returns a promise that is
resolved when the experiment finishes.
Hence, jsPsych can now be initialized without starting an experiment.
This re-enables usage of `jsPsych.timelineVariable()` in timeline
definitions and repairs exclusion checks and extension loading.
2021-07-19 17:10:37 +02:00

18 lines
372 B
JavaScript

var calibration = {
timeline: [
{
type: jsPsychHtmlKeyboardResponse,
stimulus: `<div style="width:200px; height: 200px; background: white;"></div>`,
trial_duration: 200,
post_trial_gap: 100,
},
],
loop_function: (data) => {
if (data.values()[0].response == " ") {
return false;
} else {
return true;
}
},
};