-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Free to use online library for programming of psychological online experiments - the JavaScript library tailored to elevate your psychological studies in the digital realm! 🚀 From academics, for academics.
Whether you're a curious psychologist, a dedicated researcher, or a tech-savvy cognitive scientist, WebPsy.js is your indispensable toolkit for designing and conducting seamless web-based psychological experiments, with a particular focus on harnessing the power of jsPsych.
Contributions and feedback are welcome; have a look at CONTRIBUTING.md
for more information.
First, create an experiment. The best way to do this is to clone the coglabuzh/jspsych-template repository, as it provides a good starting point. Remember to run npm i
in the root of the experiment to install the necessary dependencies. Then, run npm i @coglabuzh/webpsy.js
to install the production version of this library. Now, you can import the functions and types described below by including this at the top of any .ts/.js file:
import { colorPicker, coloredGraphic } from "@coglabuzh/webpsy.js";
The /examples
folder contains example experiments that use the library functions and act as a starting point to develop your own experiments. Here's how to use them to create your own experiment:
- On the GitHub website, navigate to the folder that contains the experiment.
- Copy the contents of the address bar to copy the current url. (Example: https://github.com/coglabuzh/online-exps/tree/main/examples/wm-ltm-test)
- Go to DownGit and paste the url there. Click "Download".
- The experiment is now downloaded as a ZIP file. Unpack it, then open it in your editor.
- Run
npm install
and thennpm run dev
to install all necessary dependencies and run the experiment in your browser.
Currently, the library is comprised of three categories:
These are functions that return HTML as a string. They can be used in any jsPsych trial that has a stimulus
field.
These are functions that are needed frequently when creating experiments.
Adds some much-needed types to jsPsych. Currently, we mostly provide types for the data generated by trials.
There are examples that show you how to implement functions for specific experiments.