Skip to content
Discussion options

You must be logged in to vote

Hi Prashanti. Sorry for the delay getting back to you.
What I would do here is add some parameters to the gabor function so that it is able to draw the stimuli for all of your conditions, depending on the values of these parameters. I don't fully understand what you're doing here, so I may be wrong, but I think the easiest way to do this is to pass it all of the parameters that you are currently setting in the trial's on_start function, something like this:

function gabor(c, index1, reward, difference, contrast, contrast1) { 
  \\ ...

(BTW you can see more examples of canvas drawing functions with additional parameters in the canvas-* example files, such as the jspsych-canvas-button-respo…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by prashantig25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants