Replies: 1 comment 1 reply
-
I thought this was an interesting exercise to try out for myself and I have found out that it is rather easy to combine the two. Basically, I started from the jsPsychCanvasButtonResponse plugin and made a few adaptations to turn it into a jsPsychMatterButtonResponse plugin. It's mainly a proof of concept so I guess there is still a lot you could do (e.g. configuring MatterJs options in the trial definition) and I also did not adjust the whole plugin so that all properties map nicely on those of MatterJs. But it possible ;) The script below contains an example and the plugin code. To make it work you will probably need to update the script reference locations in the head section. |
Beta Was this translation helpful? Give feedback.
-
Hello ! :)
I would like to conduct an online experiment where participants play a game based on a 2D physics engine, like matter.js. I didn't find any examples of a mix between matter.js and jsPsych, or a similar combination.
Do you have an opinion if it's relevant and/or possible to integrate matter.js in jsPsych frames ?
Thank you for your time !
Beta Was this translation helpful? Give feedback.
All reactions