Skip to content

How to draw multiple stimuli using the canvas-keyboard-response plugin? #1420

Answered by becky-gilbert
prashantig25 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @prashantig25, I think the canvas-* plugin stimulus parameter needs to be a function, whereas you have an array of functions. If you want to draw two stimuli on the canvas at the same time, then you'll just need to combine your two drawing functions into one. Your other option is to create your own modified version of the canvas-keyboard-response plugin so that it accepts multiple drawing functions for the same canvas, or creates multiple canvases on the page. Please feel free to follow up here f you need any further guidance.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@prashantig25
Comment options

Comment options

You must be logged in to vote
1 reply
@prashantig25
Comment options

Answer selected by jodeleeuw
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