Virtual chin rest plugin #975
Replies: 7 comments 21 replies
-
Very interesting and would love to check it out but I'm greeted with this when I try to view it on cognition.run... |
Beta Was this translation helpful? Give feedback.
-
This is great! If you are willing to write documentation and create an example for using the plugin we can incorporate it into a future release. You could open a Pull Request to merge this in. We can also work on the documentation and example ourselves, but that'll be slower. We may also want to consider merging some of this work with the |
Beta Was this translation helpful? Give feedback.
-
Thats great Gustavo, thank you very much! I just found the original paper and code and hoped so much that someone would be able to make it into a plugin :) Does your plugin allow to take the scale from the credit card and use it as a measure to resize the rest of the experiment into a certain size, like the Resize plugin? Anyway, this plugin looks amazing, so thanks again! Yuval |
Beta Was this translation helpful? Give feedback.
-
@GEJ1 Thanks for your interest in our work and making effort to convert it to a jsPsych plugin! Please let me know how I can help - I am happy to review/contribute to the pull request. Best, |
Beta Was this translation helpful? Give feedback.
-
Thanks for opening the pull request! I do think it would be worth merging some of the resize plugin features into this, like being able to select the object size for scaling and having the rest of the experiment scaled to a particular size. We should probably also make the text configurable so it can be used in other languages. One way to do this is to make the instructions for using the plugin a parameter. Other really useful things for the pull request would be:
We should make sure that the documentation page links to @QishengLi 's paper and provides the appropriate citation info. The documentation for the RDK plugin is a nice example of this. |
Beta Was this translation helpful? Give feedback.
-
Sorry for the many questions, but I still have some issues. After the virtual chinrest plugin is over, it doesn't continue to the next trial (which is an html-keyboard-response trial). It instead shows an error message right after pressing the space bar: jspsych-html-keyboard-response.js:109 Uncaught TypeError: Cannot read property 'className' of null Couldn't manage to understand what might cause this, as it is working fine without the chinrest plugin. My best guess is something to do with the additional css files that I might didn't use them right. Here is part of my html page where I put all of the files you provided with the plugin:
Does it look OK? Any ideas to what might be the problem? Thanks very much, |
Beta Was this translation helpful? Give feedback.
-
Hi Gustavo, I had somehow missed your implementation so spent some time today making my own. It looks like we've taken pretty similar strategies when implementing @QishengLi's code. I was mainly trying to touch as little of that code as possible, and then simply build a JsPsych plug-in around it. My main interest is having a self-contained plugin that can give me the viewing distance and px2mm, which I can then use to compute approximate px2deg. I am not so interested in having resizing built into the function, as I find it more useful to define the size of individual display elements in physical units. Would you allow me to contribute to your plugin, and if so how do I go about it? Best, Peter |
Beta Was this translation helpful? Give feedback.
-
Hi everyone,
I was working on wraping up the code from virtual chin rest (paper: Qisheng Li et al., 2020) into a plugin, and I think I have a first version that works.
Thank you @jodeleeuw for your super useful youtube video about making plugins: https://youtu.be/XQcsFwAmbiw
If anyone is interested in making improvements:
code : https://github.com/GEJ1/jsPsych_online_TMT/blob/master/jspsych/plugins/jspsych-virtual-chin.js
external JS/CSS for using jquery and stimulus : https://drive.google.com/drive/folders/1CP8Cg1xbzILPxejGEXtpLDHQuPxkxFF6?usp=sharing
I used the same external files that the original JavaScript code: https://github.com/QishengLi/virtual_chinrest
ps: Maybe theres is some comments in spanish, sorry hehe.
Best!
Gustavo.
Beta Was this translation helpful? Give feedback.
All reactions