Last active
May 27, 2021 18:19
-
-
Save GEJ1/23afc1cc7df41f0b74062f3751ad9f90 to your computer and use it in GitHub Desktop.
webgazer_demo.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>eye tracking</title> | |
<script src="webgazer.js" type="text/javascript" ></script> | |
</head> | |
<body> | |
<script> | |
webgazer.setGazeListener(function(data, elapsedTime) { | |
if (data == null) { | |
return; | |
} | |
var xprediction = data.x; // Coordenadas en el eje X relativas al viewport | |
var yprediction = data.y; // Coordenadas en el eje Y relativas al viewport | |
console.log(elapsedTime); //tiempo desde el momento en que se llamó a "begin" | |
}).begin(); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment