eyetracker.showFeedback

getEyeTracker(id).showFeedback() (since PennController 1.8) Shows the red dot estimating your looks, which is hidden by default after calibration. Example: [js highlight=”11″ try=”data”]newTrial( newButton(“Start”).print().wait(newEyeTracker().test.ready()) ) newTrial( newEyeTracker(“tracker”).calibrate(70) , newText(“Left”).css(“padding”,”20vw”).print(“20vw”, “40vh”), newText(“Right”).css(“padding”,”20vw”).print(“60vw”, “40vh”) , getEyeTracker(“tracker”) .add( getText(“Left”) , getText(“Right”) ) .showFeedback() .start() , newTimer(1000).callback( getEyeTracker(“tracker”).hideFeedback() ).start() , newSelector().add( getText(“Left”) , getText(“Right”) ).wait() )[/js] Will still show the …

eyetracker.test.ready

getEyeTracker(id).test.ready() (since PennController 1.8) Tests whether the participant has granted webGazer access to their webcam, as required by the EyeTracker. Use this early in your experiment, and most usefully in the command of a Button to proceed only after access has been granted. Example: [js highlight=”3,4″ try=”true”]newButton(“Start”) .print() .wait( newEyeTracker().test.ready() .failure( newText(“Please grant access to …

eyetracker.test.calibrated

getEyeTracker(id).test.calibrated() (since PennController 1.8) Tests whether the EyeTracker went through a calibration procedure (regardless of whether it was successful). You probably won’t make use of this, unless you don’t want to calibrate the tracker before your trials nor on every trial, but still need to calibrate it at least on the first trial, and your …

eyetracker.trainOnMouseMove

getEyeTracker(id).trainOnMouseMove() (since PennController 1.8) or getEyeTracker(id).trainOnMouseMove(false) (since PennController 1.8) Tells the model to use mouse movements for its estimations or, if you pass false, to NOT use them. Use this command after calling . Example: [js highlight=”7″ try=”data”]newTrial( newButton(“Start”).print().wait(newEyeTracker().test.ready()) ) newTrial( newEyeTracker(“tracker”) .calibrate(70) .train(true) .trainOnMouseMove(false) , newButton(“Click here first”).print(“20vw”,”40vh”).wait().remove(), newButton(“Now Click here”).print(“60vw”,”40vh”).wait().remove() , newText(“Left”).css(“padding”,”20vw”).print(“20vw”, “40vh”), …

eyetracker.log

getEyeTracker(id).log() (since PennController 1.8) Tell the EyeTracker element to send the collected data points to the PHP script provided by at the end of the trial. If you do not call log on the EyeTracker element, your server will never receive the eye-tracking data.

eyetracker.callback

getEyeTracker(id).callback( function ) (since PennController 1.8) Tell the script to continuously execute the specified javascript function as long as an element is being looked at. The function takes is passed two arguments, the estimated X and Y coordinates. The keyword this in the callback function points to the PennElement instance corresponding to the looked-at element. …

eyetracker.add

getEyeTracker(id).add( element1 , element2, … ) (since PennController 1.8) Adds elements to be tracked. Any commands passed to will be executed on every cycle (or span of cycles) where the estimated looks fall on one of the specified elements. Once you add elements to the tracker and use , the tracker will report 1 (looked-at) …

eyetracker.train

getEyeTracker(id).train() (since PennController 1.8) or getEyeTracker(id).train(true) Starts using mouse movements and clicks to train the model that estimates looks. Pass true as a parameter to make the red dot visible. By default the model is only trained during the calibration phase, but you can train it further with this command. Use to stop training the …

eyetracker.stopTraining

getEyeTracker(id).stopTraining() (since PennController 1.8) Stops using mouse movements and clicks to train the model that estimates looks. By default the model is only trained during the calibration phase, but you can train it further with the command . Example: [js highlight=”15″ try=”data”]newTrial( newButton(“Start”).print().wait(newEyeTracker().test.ready()) ) newTrial( newEyeTracker(“tracker”) .calibrate(70) .train(true) , newButton(“Click here first”).print(“20vw”,”40vh”).wait().remove(), newButton(“Now Click here”).print(“60vw”,”40vh”).wait().remove() …

eyetracker.stop

getEyeTracker(id).stop() (since PennController 1.8) Stops tracking which element is being looked at. The EyeTracker element will stop collecting and sending data points to your PHP script after stop is executed. Example: [js highlight=”11″ try=”data”]newTrial( newButton(“Start”).print().wait(newEyeTracker().test.ready()) ) newTrial( newEyeTracker(“tracker”).calibrate(70) , newText(“Left”).css(“padding”,”20vw”).print(“20vw”, “40vh”), newText(“Right”).css(“padding”,”20vw”).print(“60vw”, “40vh”) , getEyeTracker(“tracker”).add( getText(“Left”) , getText(“Right”) ).showFeedback().start() , newTimer(1000).callback( getEyeTracker(“tracker”).stop() ).start() , newSelector().add( …