; PSY 1903
PSY 1903 Programming for Psychologists

Suggestion Box

Spot an error or have suggestions for improvement on these notes? Let us know!

Advanced jsPsych Features

The following is a sampling of some more advanced/novel jsPsych plugins you should explore.

Canvas / Dynamically Generated Stimuli

The HTML canvas element allows you to draw graphics, animations, and other visual elements directly in the browser. It is a blank area on which you can use JavaScript to draw shapes, lines, images, text, and more.

Using the Canvas element and jsPsych’s canvas-related plugins, you can create experiments that use dynamically generated stimuli.

Plugins:

Virtual Chin Rest

The jsPsych virtual chinrest is used to estimate the physical distance between a participant’s eyes and their computer screen. This is important in psychological and vision experiments where precise control over visual stimuli (such as their size or position) is critical for ensuring that results are valid.

Since online experiments cannot control the actual physical setup of participants, the virtual chinrest provides a way to estimate screen distance and adjust visual stimuli accordingly.

Learn more: https://www.jspsych.org/latest/plugins/virtual-chinrest/

Posner Cueing Task demo using the virtual chinrest...

Code for the above demo...

Eye tracking

https://www.jspsych.org/latest/overview/eye-tracking

Demo

Image sequences

https://www.jspsych.org/latest/plugins/animation

Sketchpad

https://www.jspsych.org/latest/plugins/sketchpad

https://www.jspsych.org/latest/plugins/visual-search-circle

Audio

Record audio response: https://www.jspsych.org/latest/plugins/html-audio-response/

Play audio and listen for a response:

Reconstruction

https://www.jspsych.org/latest/plugins/reconstruction

More...

Experiment Factory: https://expfactory.github.io/experiments