An implemention of a number line estimation task outlined by Cohen and Ray.
If you are using a build process, install the package using:
npm i @vijaymarupudi/plugin-number-lineor alternatively, if you're using a HTML file, include this in the <head> section
<script src="https://unpkg.com/jspsych/dist/index.browser.min.js"></script>
<script src="https://unpkg.com/pixi.js/dist/pixi.min.js"></script>
<script src="https://unpkg.com/@vijaymarupudi/plugin-number-line/dist/index.browser.js"></script></script>
<link rel="stylesheet" href="https://unpkg.com/jspsych/css/jspsych.css">Refer to examples/index.html
If you are using a build system, import the plugin using:
import jsPsychNumberLine from '@vijaymarupudi/plugin-number-line'
plugin-number-line requires jsPsych v8.0.0 or later.
See documentation
This project was developed during the 2025 jsPsych hackathon. For more information, refer to the ReadMe file!