jspsych-expbuilder-plugin-dynamic
v1.0.7
Published
DynamicPlugin for jsPsych — composable multi-component trial plugin
Readme
jsPsych ExpBuilder DynamicPlugin
DynamicPlugin is the composable jsPsych plugin used by ExpBuilder to render multiple visual/audio components and response components inside one trial.
Timing system
The current timing implementation uses:
performance.now()and event timestamps for response timing;requestAnimationFrame()with nearest-frame scheduling for visual onset, stimulus duration, trial duration, and frame interval measurement;- cached preload for current-trial assets;
ImageBitmappreparation and WebGL textures for timing-criticalImageComponentand plainTextComponentstimuli;- rAF-only visual commits during active trials;
- explicit DOM interactive-layer auditing for inputs, surveys, uploads, and cloze text;
- background prefetch for upcoming DynamicPlugin trial assets;
- RT from the measured trial onset;
- native capture-phase
keydown/pointerdownresponse timing with event-lag diagnostics; - per-trial and per-stimulus timing diagnostics, including duration error, dropped-frame estimates, render commit metrics, GPU timer metrics when available, and quality flags.
diagnostics_levelcontrols whether trials save summary-only data or full debug arrays.
For response trials, read rt/rt_raw as:
response_time - trial_onset_timert_corrected is saved separately only when a compatible calibration profile
is supplied; rt always remains the raw value.
Read the full timing documentation here:
Build
npm run buildThe build outputs:
dist/index.es.jsdist/index.iife.js
