jsPsych
jsPsych copied to clipboard
preload plugin loads in background when array is not flat
Haven't fully figured out the conditions for when this happens, but it seems like setting...
const preload_trial = {
type: jsPsychPreload,
images: [array_of_images, other_array_of_images]
}
... causes the preload to run in the background with the trial completing immediately. Instead, setting...
const preload_trial = {
type: jsPsychPreload,
images: array_of_images.concat(other_array_of_images)
}
... runs the trial as expected.