我正在尝试在 jsPsych 的实验中添加一个固定交叉。我对js很陌生。
这是我所拥有的:
var test_stimuli = [
{
image: "img/blau_links.png",
data: { correct_response: 37 }
},
{
image: "img/blau_rechts.png",
data: { correct_response: 37 }
},
{
image: "img/gruen_links.png",
data: { correct_response: 39 }
},
{
image: "img/gruen_rechts.png",
data: { correct_response: 39 }
}
];
var all_tests = jsPsych.randomization.repeat(test_stimuli, 50, true);
var post_test_gap = function() {
return Math.floor( Math.random() * 1500 ) + 750;
}
var test_block = {
type: "single-stim",
stimuli: all_tests.image,
choices: [37, 39],
data: all_tests.data,
timing_response: 1500,
timing_post_test: post_test_gap
};
var fixation_trial = {
type: 'single-stim',
stimuli: ['<p style='text-align:center'>+</p>'],
is_html: true,
timing_response: 500,
timing_post_trial: 0,
choices: 'none'
}
var experiment = [];
experiment.push(instructions_block);
experiment.push(trial_block);
experiment.push(posttrial_block);
experiment.push(fixation_trial);
experiment.push(test_block);
experiment.push(debrief_block);
/* start the experiment */
jsPsych.init({experiment_structure: experiment,
on_finish: function() {
jsPsych.data.displayData();
}
我现在想要的是在测试块的每次试验之前添加一个固定十字。在当前形式中,它在所有刺激之后仅显示一次。任何帮助表示赞赏。