We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
conditional_function
let jsPsych = initJsPsych({ show_progress_bar: true, message_progress_bar: (progress) => `${progress * 100}`, }); let trial = { type: jsPsychHtmlKeyboardResponse, stimulus: 'Trial 1', }; let child_timeline = { type: jsPsychHtmlKeyboardResponse, timeline: [{stimulus: 'Trial 2.1'}, {stimulus: 'Trial 2.2'}], conditional_function: function () { return false; }, }; jsPsych.run([trial, child_timeline, trial]);
In this case, when the second trial is finished, the progress ends at 0.75.
trial
loop_function
let jsPsych = initJsPsych({ show_progress_bar: true, message_progress_bar: (progress) => `${progress * 100}`, }); let trial = { type: jsPsychHtmlKeyboardResponse, stimulus: 'Trial 1', }; let counter = 0; let child_timeline = { type: jsPsychHtmlKeyboardResponse, timeline: [{stimulus: 'Trial 2.1'}, {stimulus: 'Trial 2.2'}], loop_function: function () { // loop the timeline twice counter++; return counter < 2; }, }; jsPsych.run([trial, child_timeline, trial]);
Progress increases with a 0.25 step and reaches 1 just before the second trial runs.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When used with
conditional_function
and the timeline is skippedIn this case, when the second
trial
is finished, the progress ends at 0.75.When used with
loop_function
and the timeline is loopedProgress increases with a 0.25 step and reaches 1 just before the second
trial
runs.The text was updated successfully, but these errors were encountered: