Questions tagged [jspsych]

A JavaScript library for creating and running behavioral experiments in a web browser.

71 questions
0
votes
1 answer

JsPsych - RT image audio response

I am a newbie to jsPsych and am trying to build a language switching experiment using Becky Gilbert's image audio response plugin: https://github.com/becky-gilbert/jsPsych/blob/audio-response/docs/plugins/jspsych-image-audio-response.md I don't…
IWILSO
  • 1
  • 1
0
votes
0 answers

Why won't my computer recognize my HTML canvas element?

I am trying to implement the HTML canvas tag in Visual Studio Code, but it is not working. Here is my code: Test
puzzleGuzzle
  • 101
  • 10
0
votes
0 answers

How to hide the thumb of slider till participant responds, in canvas-slider-response plugin in jsPsych?

I have a behavioural experiment on jsPsych. Currently, I present participants with an image that is drawn on HTML canvas and they have to respond with a slider. However, I don't want them to see the thumb till they click on the slider (to avoid a…
0
votes
1 answer

modifying jsPsych slider appearance running on cognition.run

I'm trying to change the appearance of the default slider in jsPsych running on cognition.run. I have uploaded various custom css files but I can't seem to make any change to the appearance (of anything). In jsPsych there is a blue bar to the left…
0
votes
1 answer

How do I resolve the VSC error "ENOENT: no such file or directory"?

I am trying to run a code in Visual Studio Code, but I am getting this error in my debug console: Could not read source map for file:///C:/Users/####/OneDrive/Documents/Programming/Softwares/JavaScript/jspsych-6.3.1/examples/js/webgazer/webgazer.js:…
0
votes
1 answer

How do I encode a condition matching technique into my program?

I am new to programming and am currently trying to use jsPsych to create a browser-based behavior experiment. In my experiment, participants first complete a "pre-trial" in which they rate various pictures: var scale_1 = ["Do not enjoy", "Neutral",…
puzzleGuzzle
  • 101
  • 10
0
votes
1 answer

How do I add images to a Likert scale?

I am new to both jsPsych and programming in general. I am trying to create a browser-based experiment that displays Likert scales on the user's screen, along with images. Specifically, I would like to measure people's opinions of different…
puzzleGuzzle
  • 101
  • 10
0
votes
0 answers

randomizing multiple objects stored in a list.js

Been bashing my head over this for a while. The project I'm working on requires that I display two randomly selected videos from a list of four possible, unique animations, and on the next page, display the correct corresponding textual description…
0
votes
0 answers

How to get data for more analysis?

I have to modify an existing jsPsych experiment to summarize reaction times over conditions. I thought I could start by writing a simple function called within jsPsych.init() that I named extractingData(). I get this message in my console: "Uncaught…
0
votes
1 answer

Cannot get text to appear as it is typed

I am using the jsPsych library to code any experiment. I am very new to js, so I apologize if my error is obvious. I am trying to get text to appear on-screen as it is typed. This was done successfully in this experiment, after the creator modified…
Adam_G
  • 7,337
  • 20
  • 86
  • 148
0
votes
0 answers

How to successfully display contrast differences in images draw using HTML5 canvas on a Mac desktop?

I want to display two Gabor patches on my screen for my experiment. I am drawing the Gabor patches using HTML5 canvas. I want both patches to have different contrast levels. When I run the code on Windows PC and laptops using chrome and firefox, the…
0
votes
1 answer

Adding a Color Picker/External Library to a jsPsych Plugin

I am trying to create a jsPsych plugin where the user can select a color for each stimulus. For this I am using jscolor. jscolor works well in vanilla HTML, but when I try to incorporate it in a jsPsych plugin it does not load the jscolor…
0
votes
1 answer

How to call a function to draw a stimulus using the 'manual' property in jsPsych psychophysics plugin?

I have been trying to use the 'manual' object property to draw grating stimulus. I have written a function to draw the stimulus using drawFunc. However, I want to change one input parameter i.e. level of contrast using context.filter, in every…
0
votes
1 answer

Is there a way to generate a random contrast level on html canvas?

I am trying to present this shape as a stimulus in a behavioral experiment. I wantthe image to have a random contrast level between 0 and 1. I am trying to use Math.random() for that but when I run this in Chrome the shape flickers when it is…
0
votes
1 answer

save timelineVariable for each trial - js jsPsych

I am trying to save a timelineVariable in this case border_color. For each trial I am changing the color of the border around a stimulus (randomly selecting it from an array border_color). However I am now struggling to save border(color) for each…
Lara
  • 5
  • 5