save x,y coords, not just dx/dy

This commit is contained in:
Josh de Leeuw 2021-04-09 09:22:19 -04:00
parent 63e30ae43e
commit 346726ec44

View File

@ -110,7 +110,7 @@
var cancelGazeUpdate = jsPsych.extensions['webgazer'].onGazeUpdate(function(prediction){ var cancelGazeUpdate = jsPsych.extensions['webgazer'].onGazeUpdate(function(prediction){
if(performance.now() > pt_start_val){ if(performance.now() > pt_start_val){
pt_data.push({dx: prediction.x - x, dy: prediction.y - y, t: Math.round(performance.now()-start)}); pt_data.push({x: prediction.x, y: prediction.y, dx: prediction.x - x, dy: prediction.y - y, t: Math.round(performance.now()-start)});
} }
}); });