Commit fa1aab70 authored by Thomas Pronk's avatar Thomas Pronk

_

parent 8996728b
......@@ -106,7 +106,7 @@ function experimentInit() {
// Download the webgazer library and re-download seedrandom.js (since webgazer
// overrides it with a version that conflicts with PsychoJS)
psychoJS.downloadResources([
{ name: 'webgazer.js', path: 'js/webgazer-2.0.1.tp.js' },
{ name: 'webgazer.js', path: 'js/webgazer-1.7.3.js' },
{ name: 'seedrandom.js', path: 'https://cdnjs.cloudflare.com/ajax/libs/seedrandom/3.0.1/seedrandom.min.js' }
]);
// Initialize x and y arrays; we use these to calculate running averages of
......@@ -294,7 +294,7 @@ function webcam_trialRoutineBegin(snapshot) {
frameN = -1;
// update component parameters for each repeat
// Show webcam thumbnail
window.webgazer.params.showVideoPreview = true;
//window.webgazer.params.showVideoPreview = true;
// Start eye tracking
window.webgazer
// Called on each eye tracking update
......
......@@ -116,7 +116,7 @@ function experimentInit() {
// Download the webgazer library and re-download seedrandom.js (since webgazer
// overrides it with a version that conflicts with PsychoJS)
psychoJS.downloadResources([
{ name: 'webgazer.js', path: 'js/webgazer-2.0.1.tp.js' },
{ name: 'webgazer.js', path: 'js/webgazer-1.7.3.js' },
{ name: 'seedrandom.js', path: 'https://cdnjs.cloudflare.com/ajax/libs/seedrandom/3.0.1/seedrandom.min.js' }
]);
// Initialize x and y arrays; we use these to calculate running averages of
......@@ -303,7 +303,7 @@ function webcam_trialRoutineBegin(snapshot) {
frameN = -1;
// update component parameters for each repeat
// Show webcam thumbnail
window.webgazer.params.showVideoPreview = true;
//window.webgazer.params.showVideoPreview = true;
// Start eye tracking
window.webgazer
// Called on each eye tracking update
......
......@@ -38,7 +38,7 @@
<Param name="Before Experiment" updates="constant" val="ale" valType="extendedCode"/>
<Param name="Before JS Experiment" updates="constant" val="" valType="extendedCode"/>
<Param name="Begin Experiment" updates="constant" val="" valType="extendedCode"/>
<Param name="Begin JS Experiment" updates="constant" val="// Download the webgazer library and re-download seedrandom.js (since webgazer&amp;#10;// overrides it with a version that conflicts with PsychoJS)&amp;#10;psychoJS.downloadResources([&amp;#10; { name: 'webgazer.js', path: 'js/webgazer-2.0.1.tp.js' },&amp;#10; { name: 'seedrandom.js', path: 'https://cdnjs.cloudflare.com/ajax/libs/seedrandom/3.0.1/seedrandom.min.js' }&amp;#10;]);&amp;#10;// Initialize x and y arrays; we use these to calculate running averages of &amp;#10;// current gaze position; the longer the window, the slower, but more fluent&amp;#10;// the updates&amp;#10;let averagingWindow = 10;&amp;#10;window.xGazes = new Array(averagingWindow ).fill(0);&amp;#10;window.yGazes = new Array(averagingWindow ).fill(0);&amp;#10;&amp;#10;" valType="extendedCode"/>
<Param name="Begin JS Experiment" updates="constant" val="// Download the webgazer library and re-download seedrandom.js (since webgazer&amp;#10;// overrides it with a version that conflicts with PsychoJS)&amp;#10;psychoJS.downloadResources([&amp;#10; { name: 'webgazer.js', path: 'js/webgazer-1.7.3.js' },&amp;#10; { name: 'seedrandom.js', path: 'https://cdnjs.cloudflare.com/ajax/libs/seedrandom/3.0.1/seedrandom.min.js' }&amp;#10;]);&amp;#10;// Initialize x and y arrays; we use these to calculate running averages of &amp;#10;// current gaze position; the longer the window, the slower, but more fluent&amp;#10;// the updates&amp;#10;let averagingWindow = 10;&amp;#10;window.xGazes = new Array(averagingWindow ).fill(0);&amp;#10;window.yGazes = new Array(averagingWindow ).fill(0);&amp;#10;&amp;#10;" valType="extendedCode"/>
<Param name="Begin JS Routine" updates="constant" val="" valType="extendedCode"/>
<Param name="Begin Routine" updates="constant" val="" valType="extendedCode"/>
<Param name="Code Type" updates="None" val="JS" valType="str"/>
......@@ -106,7 +106,7 @@
<Param name="Before JS Experiment" updates="constant" val="" valType="extendedCode"/>
<Param name="Begin Experiment" updates="constant" val="" valType="extendedCode"/>
<Param name="Begin JS Experiment" updates="constant" val="" valType="extendedCode"/>
<Param name="Begin JS Routine" updates="constant" val="// Start eye tracking&amp;#10;window.webgazer&amp;#10; // Called on each eye tracking update&amp;#10; .setGazeListener(function(data, clock) {&amp;#10; if (data !== null) {&amp;#10; // Remove first element from gazes array, add current gaze at the end&amp;#10; window.xGazes.shift();&amp;#10; window.xGazes.push(data.x);&amp;#10; window.yGazes.shift();&amp;#10; window.yGazes.push(data.y);&amp;#10; }&amp;#10; })&amp;#10; .begin();&amp;#10; //.showPredictionPoints(true); &amp;#10;" valType="extendedCode"/>
<Param name="Begin JS Routine" updates="constant" val="// Show webcam thumbnail&amp;#10;//window.webgazer.params.showVideoPreview = true;&amp;#10;// Start eye tracking&amp;#10;window.webgazer&amp;#10; // Called on each eye tracking update&amp;#10; .setGazeListener(function(data, clock) {&amp;#10; if (data !== null) {&amp;#10; // Remove first element from gazes array, add current gaze at the end&amp;#10; window.xGazes.shift();&amp;#10; window.xGazes.push(data.x);&amp;#10; window.yGazes.shift();&amp;#10; window.yGazes.push(data.y);&amp;#10; }&amp;#10; })&amp;#10; .begin();&amp;#10; //.showPredictionPoints(true); &amp;#10;" valType="extendedCode"/>
<Param name="Begin Routine" updates="constant" val="" valType="extendedCode"/>
<Param name="Code Type" updates="None" val="JS" valType="str"/>
<Param name="Each Frame" updates="constant" val="" valType="extendedCode"/>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment