-
Notifications
You must be signed in to change notification settings - Fork 81
Addition of the Triple Handle Controller plugin for continuous, three-dimensional affective ratings #149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Remove TODO in Readme.md
Update the Author/Citaitons in Readme.md
Remove install section in documentation.
Add package.json
jadeddelta
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hey there, thank you so much for the submission! i was unable to test the triple handle controller part itself, but we trust your periphery. here's just some simple things to change (especially updating the package.json( before we can add it on, along with some suggestions if you'd like to implement them to make it easier for other researchers to work with the plugin.
| @@ -0,0 +1,8 @@ | |||
| { | |||
| { | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be good to flesh this out in line with other packages, so it can be integrated via npm
| /* Set up constants */ | ||
| const info = { | ||
| name: "3-axis video annotation", | ||
| version: "0.1.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because we're in a js file, the version will have to be updated manually: so just make it 1.0.0 for the first release
| "Indices of the game controller axis that will control measurement axis 3.", | ||
| }, | ||
| axis_location: { | ||
| type: jspsych.ParameterType.COMPLEX, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to be more exact, we can set type: jspsych.ParameterType.STRING, and add array: true
| description: | ||
| "The location of the axes on the screen. L = left, H = hidden, R = right.", | ||
| }, | ||
| mode: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it looks like mode can only be 'DEBUG' or not: wondering if there is more planned for this or if debug mode should just be a true/false parameter?
| * This plugin collects responses to an video file in real time | ||
| * using a game controller. | ||
| * | ||
| * @author YOUR NAME |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't forget to credit yourself here!
| 0, | ||
| this.mapValue(axis3Meter, this.zeroThreshold, 1, 0, 1) | ||
| ); | ||
| try { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it necessary to wrap all of these in try catch/have them separate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this part of the code displays the values captured from the gamepad to the UI.
Separate try-catch statements are there so that if one of the UI elements creates an error, it does not cause that element to ruin the experiment or freeze the UI of the other elements.
This does not affect actual data collected during the experiment.
| window.clearInterval(this.interval); | ||
| this.animate = false; | ||
| // end trial | ||
| this.jsPsych.finishTrial({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a note, if you'd like, you can add to the info property at the top the data provided by this plugin, which you can find here: link
| <div id="thc-overlay"> | ||
| <p> | ||
| A controller with throttles has not been detected. | ||
| If you have already plugged one in, please try pressing any |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for people trying to make this plugin but for another language, it would be nice to make this a parameter and have what you have as the default
| }"></video> | ||
| <div id="thc-video-toolbar"> | ||
| <div class="thc-toolbar-group"> | ||
| <button id="play-btn" class="jspsych-btn player-btn">► Play</button> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same with these button labels too
…d array: true Closes jspsych#11
Update package.json
Adds options so that experimenters can change the strings in the UI.
Change how the debug works and changed mode to a boolean.
Added authors to function docstring.
Hi all, this PR introduces the triple-handle controller plugin, enabling continuous three-dimensional affective ratings (e.g., valence, arousal, dominance) in jsPsych experiments. It lets participants adjust three separate handles in real time, providing dynamic affective data during stimulus presentation.
Included:
How to verify:
You will need a handle controller. We developed and tested the plugin using a Logitech Flight Throttle Quadrant.
Feedback is welcome, especially on code clarity and documentation. Thanks for reviewing!