add option to resetCalibration

This commit is contained in:
Josh de Leeuw 2021-03-05 09:54:15 -05:00
parent bbd50935d3
commit a5b9a915f9
2 changed files with 8 additions and 0 deletions

View File

@ -86,6 +86,10 @@ Turns on gaze prediction. The extension will automatically handle this for you i
Turns off gaze prediction. The extension will automatically handle this for you in most cases. You probably only need to use this if you are writing your own plugin that interfaces directly with WebGazer.
### resetCalibration()
Clears all calibration data.
### startMouseCalibration()
Turns on mouse movement and mouse clicks as calibration events. While the `webgazer-calibration` plugin can also be used to run a parmeterized calibration routine, this calibration function call allows you to continuously calibrate WebGazer to any mouse movements or clicks throughout the experiment. For example, any *-button-response trial would also function as a WebGazer calibration event.

View File

@ -161,6 +161,10 @@ jsPsych.extensions['webgazer'] = (function () {
state.webgazer.pause();
}
extension.resetCalibration() = function(){
state.webgazer.clearData();
}
extension.stopMouseCalibration = function () {
state.webgazer.removeMouseEventListeners()
}