Magpie is a framework for easily and flexibly building psychological online experiments.
Magpie
Base Components
Prop name | Description | Default |
---|---|---|
text | string - required | - |
type | string |
|
This is the main component for your online experiment. Put it at the root of your application.
The experiment is available in all subcomponents and in the parent as $magpie
Prop name | Description | Default |
---|---|---|
audioAssets | Pass an array of paths to audio files that will be needed in this experiment to enable preloading array |
|
imageAssets | Pass an array of paths to images that will be needed in this experiment to enable preloading array |
|
recordData | Optionally specify variables that should be recorded for the whole experiment object |
|
title | Optionally specify a title for your experiment which will be displayed in the browser title bar (or in the browser tab) string |
|
validateSubmission | This function is called before data is submitted to the server. It will receive the submitted csv data as an array of objects as its only argument. func | Function |
videoAssets | Pass an array of paths to video files that will be needed in this experiment to enable preloading array |
|
wide | Whether to display the experiment in wide format-filling mode boolean |
|
Slot | Description | Bindings |
---|---|---|
default | Place your screens inside this slot. They will be visible one after the other, like a slide show. | - |
title | The contents of this slot will be visible during the entire experiment | - |
A simple experiment with 3 screens
Using a loop to create screens
Providing a title
Besides the screens
slot, the Experiment component also provides an optional title
slot that allows you to display header information on all screens of your experiment.
Validate entered data
The Experiment component also allows specifying a function that will be used to validate the to-be-submitted data before sending it to the server.
This component lets you create experiment sections that appear one after the other like a slideshow. Trial data
Prop name | Description | Default |
---|---|---|
label | A label that can be used to jump to this screen string |
|
progress | If you want to show a progress bar, set this to a value between 0 and 1 number |
|
title | The title of this screen string |
|
validations | Define validators for measurements object |
|
Slot | Description | Bindings |
---|---|---|
default | Place your slides inside this slot. They will be visible one after the other, like a slide show. | - |
Simple screen
Show progress
Multiple slides
One screen may consist of multiple slides that are numbered incrementally and displayed one after another.
You can go to the next slide with the nextSlide
function that is exposed by the Screen component.
Wow.
Store measurements
The screen component also conveniently exposes an object for you to store in the measurements of the current screen, so you can later save them.
Wow.
Validate measurements
The screen can also be used to validate observations.
At least 4 characters required and only alphabetic characters, please.
Jump using labels
Slot | Description |
---|---|
default | - |
Screens
While magpie allows you to easily create your own screens, it also comes with a selection of built-in screens that
you can just drop into your experiment. These include essential screens like <SubmitResultsScreen>
but also ready-made
complex appliances that are often used like <SelfPacedReadingScreen>
. In addition to the props defined below,
these screens also support all props supported by the <Screen>
component.
Slot | Description |
---|---|
default | - |
Use this screen to initiate the interactive socket connection. Once the connection is set up and enough users have joined, this screen will automatically go to the next screen.
You can customize the content of this screen by adding new content inside it. By default it looks like this:
Slot | Description |
---|---|
default | - |
Use this screen to initiate the interactive socket connection. Once the connection is set up and enough users have joined, this screen will automatically go to the next screen.
You can customize the content of this screen by adding new content inside it. By default it looks like this:
This will display all data that has been entered into the experiment up to this point in a table. This is useful for debugging. Once you are gaoing live with your experiment, you can use the SubmitResultsScreen instead of this one to submit the data to the server and say thank you to the user.
Prop name | Description | Default |
---|---|---|
debug | boolean |
|
This screen is used to initialize and calibrate eye tracking.
Eyetracking requires that you install webgazer
.
Inherits from LifecycleScreen
Global Measurements
Measurement | Type | Description |
---|---|---|
et_accuracy | float | The measured accuracy |
Prop name | Description | Default |
---|---|---|
precision | number |
|
This screen is used to initialize and calibrate eye tracking.
Eyetracking requires that you install webgazer
.
Slot | Description |
---|---|
default | - |
This is a pre-built instruction screen, with limited functionality, but simpler to use.
Below the instructions is a button to continue.
Screen Measurements
Measurement | Type | Description |
---|---|---|
responseTime | int | Time between display of this screen until the screen is left |
responseTimeout | boolean | Whether the response time limit was reached |
qud (optional) | string | |
pauseTime (optional) | int | |
fixationTime (optional) | int | |
stimulusTime (optional) | int | |
responseTimeLimit (optional) | int | The response time limit |
feedbackTime (optional) | int |
Prop name | Description | Default |
---|---|---|
feedbackTime | How long feedback should be displayed. Don't set this, to avoid displaying feedback altogether; set to -1 if you want to call nextScreen manually number |
|
fixationTime | Duration of the fixation point phase. Don't set this to avoid showing the fixation point altogether. Set to -1 to call nextSlide manually number |
|
pauseTime | Duration of the pause phase. Don't set this, to avoid the pause altogether. number |
|
qud | Question under discussion. Always visible on the screen string |
|
responseTimeLimit | How long the response should be enabled, don't set this, to avoid the timeout altogether.
When this is set, a number |
|
stimulusTime | Duration of the stimulus phase. Don't set this to avoid hiding the stimulus altogether. Set to -1 to call nextSlide manually number |
|
Slot | Description |
---|---|
fixation | - |
stimulus | - |
task | - |
feedback | - |
This is a built-in screen with 4 life cycle phases:
- Pause
- Fixation
- Stimulus presentation
- Response
- Feedback
The last four phases can be completely customized using the corresponding slots, as you can see below.
Global Measurements
Measurement | Type | Description |
---|---|---|
age | int | |
gender | '' | 'male' | 'female' | 'other' | |
education | '' | 'below highschool' | 'highschool' | 'college' | 'higher' | |
languages | string | |
comments | string |
Prop name | Description | Default |
---|---|---|
age | Whether to ask for participant age boolean |
|
comments | Whether to ask for comments boolean |
|
education | Whether to ask for participant education boolean |
|
gender | Whether to ask for participant gender boolean |
|
languages | Whether to ask for participant mother tongues boolean |
|
Slot | Description | Bindings |
---|---|---|
default | You can add additional questions here, storing data in measurements | measurements : object — a temporary object to store your responses before adding them to the results |
Additional information
Answering the following questions is optional, but your answers will help us analyze our results.
Use this screen at the end of your experiment to submit the data to the server. You can provide the submission URL to the Experiment component.
Stimuli
Text
As with normal HTML you can use normal P
tags for paragraphs as well as strong
, em
etc. to mark them up.
This is a bold text.
Prop name | Description | Default |
---|---|---|
src | The URL of the audio to embed. string - required | - |
autoplay | if specified, the audio will automatically begin playback as soon as it can do so, without waiting for the entire audio file to finish downloading. boolean |
|
controls | If this attribute is set, the browser will offer controls to allow the user to control audio playback, including volume, seeking, and pause/resume playback. boolean |
|
loop | if true, the audio player will automatically seek back to the start upon reaching the end of the audio. boolean |
|
muted | indicates whether the audio will be initially silenced boolean |
|
You can use HTML's audio tag to play audio.
For more details see HTML Audio Element docs on MDN.
Magpie has built-in support for creating visual stimuli on the fly via Konva.js.
Konva Components are prefixed with Canvas
, so Konva.Circle
becomes CanvasCircle
in magpie. Learn more about using Konva.js in Vue.
Drawing simple shapes
Some drawing exercises
Prop name | Description | Default |
---|---|---|
x | X-coordinate of cross center number |
|
y | Y-coordinate of cross center number |
|
This component allows you to display a fixation cross.
Prop name | Description | Default |
---|---|---|
src | The URL of the image to embed. string - required | - |
You can use HTML's <img>
tag to display images.
For more details see HTML img Element docs on MDN.

Prop name | Description | Default |
---|---|---|
chunks | The chunks array - required | - |
interval | Interval between chunks in miliseconds number |
|
Event name | Description |
---|---|
end |
Slot | Description | Bindings |
---|---|---|
presentation | - | chunk |
This component allows you to display textual or other content in a rapid serial manner, commonly known as Rapid Serial Visual Presentation (RSVP).
Text
Images
The Rsvp component allows you to define the presentation of the chunks you provide. E.g. we could also use this component to display images.
Prop name | Description | Default |
---|---|---|
frequency | The note frequency in hertz (like 440) or as "pitch-octave" notation (like "D#2") number|string - required | - |
attack | The attack of the output envelope in seconds. The attack time is the amount of time it takes for the envelope to reach it's maximum value. number |
|
decay | the decay of the output envelope in seconds. After the attack portion of the envelope, the value will fall over the duration of the decay time to it's sustain value. number |
|
duration | Duration in seconds. By default the tone will only stop when the component is unmounted. number |
|
oscillator | "fatsine" | "fatsquare" | "fatsawtooth" | "fattriangle" | "fatcustom" | "fmsine" | "fmsquare" | "fmsawtooth" | "fmtriangle" | "fmcustom" | "amsine" | "amsquare" | "amsawtooth" | "amtriangle" | "amcustom" | "pulse" | "pwm" string |
|
release | Release time of the output envelope in seconds. After the duration of the synth tone, the envelope's value will fall to it's minimum value over the duration of the release time. number |
|
sustain | The sustain value is the value which the envelope rests at after triggerAttack is called, but before triggerRelease is invoked. Must be between 0 and 1. number |
|
volume | The volume of the output in decibels. number |
|
The Synth component is a basic sound Synthesizer based on Tone.js.
Click to beep.
Prop name | Description | Default |
---|---|---|
src | The URL of the video to embed. string - required | - |
autoplay | if specified, the audio will automatically begin playback as soon as it can do so, without waiting for the entire video file to finish downloading. boolean |
|
controls | If this attribute is set, the browser will offer controls to allow the user to control playback, including volume, seeking, and pause/resume playback. boolean |
|
loop | if true, the video player will automatically seek back to the start upon reaching the end of the video. boolean |
|
muted | indicates whether the video will be initially silenced boolean |
|
You can use HTML's video tag to play video footage.
For more details see HTML Video Element docs on MDN.
Trial Screens
Trial screens display stimuli and record responses during a variety of tasks.
As such they usually inherit from <LifecycleScreen>
, including its 4 life cycle phases:
- Pause
- Fixation
- Stimulus presentation
- Response
This means, for all trial screens you can adjust pause, fixation point and stimulus duration and can
replace fixation and stimulus contents via component slots as seen over at <LifecycleScreen>
.
Inherits from LifecycleScreen
Screen Measurements
Measurement | Type | Description |
---|---|---|
responseTime | int | Time between display of this screen until the screen is left |
responseTimeout | boolean | Whether the response time limit was reached |
qud (optional) | string | |
pauseTime (optional) | int | |
fixationTime (optional) | int | |
stimulusTime (optional) | int | |
responseTimeLimit (optional) | int | The response time limit |
feedbackTime (optional) | int | |
question | string | |
options | array | |
text | string | |
response | string | The completed text |
responses | array | The individual completions |
Prop name | Description | Default |
---|---|---|
options | An array of arrays with possible completions per array - required | - |
text | The text that is supposed to be completed. string - required | - |
feedbackTime | How long feedback should be displayed. Don't set this, to avoid displaying feedback altogether; set to -1 if you want to call nextScreen manually number |
|
fixationTime | Duration of the fixation point phase. Don't set this to avoid showing the fixation point altogether. Set to -1 to call nextSlide manually number |
|
pauseTime | Duration of the pause phase. Don't set this, to avoid the pause altogether. number |
|
qud | Question under discussion. Always visible on the screen string |
|
question | A question string |
|
responseTimeLimit | How long the response should be enabled, don't set this, to avoid the timeout altogether.
When this is set, a number |
|
stimulusTime | Duration of the stimulus phase. Don't set this to avoid hiding the stimulus altogether. Set to -1 to call nextSlide manually number |
|
Slot | Description |
---|---|
fixation | - |
stimulus | - |
feedback | - |
task | - |
This is a pre-built completion screen, with limited functionality, but simpler to use.
What happened in antartica?
Screen Measurements
Measurement | Type | Description |
---|---|---|
responseTime | int | Time between click on 'Go' and response |
responseTimeout | boolean | Whether the response time limit was reached |
mt_time | array | Mouse tracking time coordinates |
mt_x | array | Mouse tracking x coordinates (origin is at the 'Go' button, positive goes right) |
mt_y | array | Mouse tracking y coordinates (origin is at the 'Go' button, positive goes down) |
mtstarttime | int | Time stamp of when mouse tracking started |
Prop name | Description | Default |
---|---|---|
option1 | string representation of option 1 string |
|
option2 | string representation of option 2 string |
|
pauseTime | Duration of the pause phase, don't set this, to avoid the pause altogether number |
|
qud | Question under discussion. Always visible on the screen string |
|
responseTimeLimit | How long the response should be enabled, don't set this, to avoid the timeout altogether number |
|
selectEvent | The event that causes the response to be selected, e.g. string |
|
Slot | Description | Bindings |
---|---|---|
preparation | provide a preparation stimulus, i.e. a text or an audio explanation | - |
option1 | - | - |
option2 | - | - |
stimulus | provide content for the main stimulus | coordinates : object — The coordinates of the Start button on the page (`{x: number, y: number}) |
feedback | provide content for the main stimulus | - |
Inherits from LifecycleScreen
Screen Measurements
Measurement | Type | Description |
---|---|---|
responseTime | int | Time between display of this screen until the screen is left |
responseTimeout | boolean | Whether the response time limit was reached |
qud (optional) | string | |
pauseTime (optional) | int | |
fixationTime (optional) | int | |
stimulusTime (optional) | int | |
responseTimeLimit (optional) | int | The response time limit |
feedbackTime (optional) | int | |
question | string | |
options | array | |
response | string | The chosen option |
Prop name | Description | Default |
---|---|---|
options | Forced choice options array - required | - |
feedbackTime | How long feedback should be displayed. Don't set this, to avoid displaying feedback altogether; set to -1 if you want to call nextScreen manually number |
|
fixationTime | Duration of the fixation point phase. Don't set this to avoid showing the fixation point altogether. Set to -1 to call nextSlide manually number |
|
pauseTime | Duration of the pause phase. Don't set this, to avoid the pause altogether. number |
|
qud | Question under discussion. Always visible on the screen string |
|
question | A question string |
|
responseTimeLimit | How long the response should be enabled, don't set this, to avoid the timeout altogether.
When this is set, a number |
|
stimulusTime | Duration of the stimulus phase. Don't set this to avoid hiding the stimulus altogether. Set to -1 to call nextSlide manually number |
|
Slot | Description |
---|---|
fixation | - |
stimulus | - |
feedback | - |
task | - |
This is a pre-built forced choice screen, with limited functionality, but simpler to use.
Always do the opposite of what you are asked.
Do you understand this question?
Inherits from LifecycleScreen
Screen Measurements
Measurement | Type | Description |
---|---|---|
responseTime | int | Time between display of this screen until the screen is left |
responseTimeout | boolean | Whether the response time limit was reached |
qud (optional) | string | |
pauseTime (optional) | int | |
fixationTime (optional) | int | |
stimulusTime (optional) | int | |
responseTimeLimit (optional) | int | The response time limit |
feedbackTime (optional) | int | |
question | string | |
options | array | The labels of the available options |
response | string | The label of the chosen option |
Prop name | Description | Default |
---|---|---|
options | Forced choice options. Each option must be an object looking as follows array - required | - |
feedbackTime | How long feedback should be displayed. Don't set this, to avoid displaying feedback altogether; set to -1 if you want to call nextScreen manually number |
|
fixationTime | Duration of the fixation point phase. Don't set this to avoid showing the fixation point altogether. Set to -1 to call nextSlide manually number |
|
pauseTime | Duration of the pause phase. Don't set this, to avoid the pause altogether. number |
|
qud | Question under discussion. Always visible on the screen string |
|
question | A question string |
|
responseTimeLimit | How long the response should be enabled, don't set this, to avoid the timeout altogether.
When this is set, a number |
|
stimulusTime | Duration of the stimulus phase. Don't set this to avoid hiding the stimulus altogether. Set to -1 to call nextSlide manually number |
|
Slot | Description |
---|---|
fixation | - |
stimulus | - |
feedback | - |
task | - |
This is a pre-built image selection screen, with limited functionality, but simpler to use.
Eating healthy is good for you.
What do you eat?
Inherits from LifecycleScreen
Screen Measurements
Measurement | Type | Description |
---|---|---|
responseTime | int | Time between display of this screen until the screen is left |
responseTimeout | boolean | Whether the response time limit was reached |
qud (optional) | string | |
pauseTime (optional) | int | |
fixationTime (optional) | int | |
stimulusTime (optional) | int | |
responseTimeLimit (optional) | int | The response time limit |
feedbackTime (optional) | int | |
question | string | |
response | string | The label of the pressed key |
Prop name | Description | Default |
---|---|---|
keys | An object with keys mapped to option labels object - required | - |
feedbackTime | How long feedback should be displayed. Don't set this, to avoid displaying feedback altogether; set to -1 if you want to call nextScreen manually number |
|
fixationTime | Duration of the fixation point phase. Don't set this to avoid showing the fixation point altogether. Set to -1 to call nextSlide manually number |
|
pauseTime | Duration of the pause phase. Don't set this, to avoid the pause altogether. number |
|
qud | Question under discussion. Always visible on the screen string |
|
question | A question string |
|
responseTimeLimit | How long the response should be enabled, don't set this, to avoid the timeout altogether.
When this is set, a number |
|
showOptions | Determines whether information about possible keypresses and their meaning is shown boolean |
|
stimulusTime | Duration of the stimulus phase. Don't set this to avoid hiding the stimulus altogether. Set to -1 to call nextSlide manually number |
|
Slot | Description |
---|---|
fixation | - |
stimulus | - |
feedback | - |
task | - |
This is a pre-built keypress screen, with limited functionality, but simpler to use.

Are fries healthy?
Inherits from LifecycleScreen
Screen Measurements
Measurement | Type | Description |
---|---|---|
responseTime | int | Time between display of this screen until the screen is left |
responseTimeout | boolean | Whether the response time limit was reached |
qud (optional) | string | |
pauseTime (optional) | int | |
fixationTime (optional) | int | |
stimulusTime (optional) | int | |
responseTimeLimit (optional) | int | The response time limit |
feedbackTime (optional) | int | |
question | string | |
responses | array | The selected responses |
target_positions | array | The list of positions of the target words for each choice. Either ('left' or 'right') |
response_times | array | The response times per selectable option |
mazeTimeLimit | int | The maze time limit |
maze_timeout | boolean | Whether the maze time limit was reached |
correct | boolean | Whether all responses were correct |
Prop name | Description | Default |
---|---|---|
competitors | Competitor chunks array - required | - |
targets | Target chunks array - required | - |
feedbackTime | How long feedback should be displayed. Don't set this, to avoid displaying feedback altogether; set to -1 if you want to call nextScreen manually number |
|
fixationTime | Duration of the fixation point phase. Don't set this to avoid showing the fixation point altogether. Set to -1 to call nextSlide manually number |
|
leftKey | The keyboard key to press for the left continuation string |
|
mazeTimeLimit | Time in miliseconds the participant has to select the individual words; number |
|
pauseTime | Duration of the pause phase. Don't set this, to avoid the pause altogether. number |
|
progress | number |
|
qud | Question under discussion. Always visible on the screen string |
|
question | A question string |
|
responseTimeLimit | How long the response should be enabled, don't set this, to avoid the timeout altogether.
When this is set, a number |
|
rightKey | The keyboard key to press for the right continuation string |
|
stimulusTime | Duration of the stimulus phase. Don't set this to avoid hiding the stimulus altogether. Set to -1 to call nextSlide manually number |
|
Slot | Description |
---|---|
fixation | - |
stimulus | - |
feedback | - |
task | - |
This is a pre-built maze task screen.

Are fries healthy?
Inherits from LifecycleScreen
Screen Measurements
Measurement | Type | Description |
---|---|---|
responseTime | int | Time between display of this screen until the screen is left |
responseTimeout | boolean | Whether the response time limit was reached |
qud (optional) | string | |
pauseTime (optional) | int | |
fixationTime (optional) | int | |
stimulusTime (optional) | int | |
responseTimeLimit (optional) | int | The response time limit |
feedbackTime (optional) | int | |
questions | array | |
options | array | |
randomize? | boolean | |
responses | array |
Prop name | Description | Default |
---|---|---|
options | The possible options to choose from array - required | - |
questions | The questions to ask array - required | - |
feedbackTime | How long feedback should be displayed. Don't set this, to avoid displaying feedback altogether; set to -1 if you want to call nextScreen manually number |
|
fixationTime | Duration of the fixation point phase. Don't set this to avoid showing the fixation point altogether. Set to -1 to call nextSlide manually number |
|
pauseTime | Duration of the pause phase. Don't set this, to avoid the pause altogether. number |
|
qud | Question under discussion. Always visible on the screen string |
|
randomize | Whether to shuffle questions boolean |
|
responseTimeLimit | How long the response should be enabled, don't set this, to avoid the timeout altogether.
When this is set, a number |
|
stimulusTime | Duration of the stimulus phase. Don't set this to avoid hiding the stimulus altogether. Set to -1 to call nextSlide manually number |
|
Slot | Description |
---|---|
fixation | - |
stimulus | - |
feedback | - |
task | - |
This is a pre-built multiple choice matrix screen, with limited functionality, but easier to use.
How is the weather today?
How was your breakfast today?
How do you like your job?
What is your opinion of television?
What is your opinion of folk music?
Have participants choose answer from multiple options
Inherits from LifecycleScreen
Screen Measurements
Measurement | Type | Description |
---|---|---|
responseTime | int | Time between display of this screen until the screen is left |
responseTimeout | boolean | Whether the response time limit was reached |
qud (optional) | string | |
pauseTime (optional) | int | |
fixationTime (optional) | int | |
stimulusTime (optional) | int | |
responseTimeLimit (optional) | int | The response time limit |
feedbackTime (optional) | int | |
question | string | |
options | array | |
optionsHtml (optional) | array | |
randomize | boolean | |
orientation | string | |
response | string | The chosen option |
Prop name | Description | Default |
---|---|---|
options | The possible options to choose from array - required | - |
question | A question string - required | - |
feedbackTime | How long feedback should be displayed. Don't set this, to avoid displaying feedback altogether; set to -1 if you want to call nextScreen manually number |
|
fixationTime | Duration of the fixation point phase. Don't set this to avoid showing the fixation point altogether. Set to -1 to call nextSlide manually number |
|
optionsHtml | The possible options to choose from as HTML strings array |
|
orientation | Whether to display 'vertical' or 'horizontal' string |
|
pauseTime | Duration of the pause phase. Don't set this, to avoid the pause altogether. number |
|
qud | Question under discussion. Always visible on the screen string |
|
randomize | Whether to randomize the option order boolean |
|
responseTimeLimit | How long the response should be enabled, don't set this, to avoid the timeout altogether.
When this is set, a number |
|
stimulusTime | Duration of the stimulus phase. Don't set this to avoid hiding the stimulus altogether. Set to -1 to call nextSlide manually number |
|
Slot | Description |
---|---|
fixation | - |
stimulus | - |
feedback | - |
task | - |
This is a pre-built multiple choice screen, with limited functionality, but easier to use.
How was your breakfast?
Have participants choose answer from multiple options
Inherits from LifecycleScreen
Screen Measurements
Measurement | Type | Description |
---|---|---|
responseTime | int | Time between display of this screen until the screen is left |
responseTimeout | boolean | Whether the response time limit was reached |
qud (optional) | string | |
pauseTime (optional) | int | |
fixationTime (optional) | int | |
stimulusTime (optional) | int | |
responseTimeLimit (optional) | int | The response time limit |
feedbackTime (optional) | int | |
question | string | |
optionLeft? | string | |
optionRight? | string | |
count | int | |
response | int | The chosen option |
Prop name | Description | Default |
---|---|---|
question | A question string - required | - |
count | The length of the rating scale number |
|
feedbackTime | How long feedback should be displayed. Don't set this, to avoid displaying feedback altogether; set to -1 if you want to call nextScreen manually number |
|
fixationTime | Duration of the fixation point phase. Don't set this to avoid showing the fixation point altogether. Set to -1 to call nextSlide manually number |
|
optionLeft | Left label for rating string |
|
optionRight | Right label for rating string |
|
pauseTime | Duration of the pause phase. Don't set this, to avoid the pause altogether. number |
|
qud | Question under discussion. Always visible on the screen string |
|
responseTimeLimit | How long the response should be enabled, don't set this, to avoid the timeout altogether.
When this is set, a number |
|
stimulusTime | Duration of the stimulus phase. Don't set this to avoid hiding the stimulus altogether. Set to -1 to call nextSlide manually number |
|
Slot | Description |
---|---|
fixation | - |
stimulus | - |
feedback | - |
task | - |
This is a pre-built rating screen, with limited functionality, but simpler to use.
Eating healthy is good for you.
How healthy do you usually eat?
Inherits from LifecycleScreen
Screen Measurements
Measurement | Type | Description |
---|---|---|
responseTime | int | Time between display of this screen until the screen is left |
responseTimeout | boolean | Whether the response time limit was reached |
qud (optional) | string | |
pauseTime (optional) | int | |
fixationTime (optional) | int | |
stimulusTime (optional) | int | |
responseTimeLimit (optional) | int | The response time limit |
feedbackTime (optional) | int | |
question | string | |
responses | string | The selected responses |
response_times | string | The response times per selectable option |
spr_timeout | boolean | Whether the participant took longer than the set time limit per chunk |
sprTimeLimit | int | Time limit per chunk |
Prop name | Description | Values | Default |
---|---|---|---|
chunks | Self-paced reading text chunks array - required | - | - |
feedbackTime | How long feedback should be displayed. Don't set this, to avoid displaying feedback altogether; set to -1 if you want to call nextScreen manually number | - |
|
fixationTime | Duration of the fixation point phase. Don't set this to avoid showing the fixation point altogether. Set to -1 to call nextSlide manually number | - |
|
instructions | Give instructions on what the participant is supposed to do string | - |
|
pauseTime | Duration of the pause phase. Don't set this, to avoid the pause altogether. number | - |
|
qud | Question under discussion. Always visible on the screen string | - |
|
question | A question string | - |
|
responseTimeLimit | How long the response should be enabled, don't set this, to avoid the timeout altogether.
When this is set, a number | - |
|
sprTimeLimit | Time limit per chunk number | - |
|
stimulusTime | Duration of the stimulus phase. Don't set this to avoid hiding the stimulus altogether. Set to -1 to call nextSlide manually number | - |
|
trigger | The key to press to reveal the next word string | - |
|
underline | Underline type string |
|
|
wordPos | Whether to show the next word at the same position or at the next string |
|
|
Slot | Description |
---|---|
fixation | - |
stimulus | - |
feedback | - |
task | - |
This is a pre-built self-paced reading task screen.

Are fries healthy?
Press SPACE to reveal the words.
Inherits from LifecycleScreen
Screen Measurements
Measurement | Type | Description |
---|---|---|
responseTime | int | Time between display of this screen until the screen is left |
responseTimeout | boolean | Whether the response time limit was reached |
qud (optional) | string | |
pauseTime (optional) | int | |
fixationTime (optional) | int | |
stimulusTime (optional) | int | |
responseTimeLimit (optional) | int | The response time limit |
feedbackTime (optional) | int | |
question | string | |
optionLeft? | string | |
optionRight? | string | |
interval | int | |
ranges | array | |
min | int | |
max | int | |
response | array | The values of all sliders |
range_values | array | The length of the ranges between all sliders and min max |
Prop name | Description | Default |
---|---|---|
question | A question string - required | - |
ranges | The labels for the ranges array - required | - |
feedbackTime | How long feedback should be displayed. Don't set this, to avoid displaying feedback altogether; set to -1 if you want to call nextScreen manually number |
|
fixationTime | Duration of the fixation point phase. Don't set this to avoid showing the fixation point altogether. Set to -1 to call nextSlide manually number |
|
interval | Interval between slider values number |
|
max | Maximum slider value number |
|
min | Minimal slider value number |
|
optionLeft | Left label for rating string |
|
optionRight | Right label for rating string |
|
pauseTime | Duration of the pause phase. Don't set this, to avoid the pause altogether. number |
|
qud | Question under discussion. Always visible on the screen string |
|
responseTimeLimit | How long the response should be enabled, don't set this, to avoid the timeout altogether.
When this is set, a number |
|
stimulusTime | Duration of the stimulus phase. Don't set this to avoid hiding the stimulus altogether. Set to -1 to call nextSlide manually number |
|
Slot | Description |
---|---|
fixation | - |
stimulus | - |
feedback | - |
task | - |
This is a pre-built slider rating screen, with limited functionality, but simpler to use.
Eating healthy is good for you.
How often do you eat meat, vegetarian or vegan?
- 33 meat
- 34 vegetarian
- 33 vegan
Inherits from LifecycleScreen
Screen Measurements
Measurement | Type | Description |
---|---|---|
responseTime | int | Time between display of this screen until the screen is left |
responseTimeout | boolean | Whether the response time limit was reached |
qud (optional) | string | |
pauseTime (optional) | int | |
fixationTime (optional) | int | |
stimulusTime (optional) | int | |
responseTimeLimit (optional) | int | The response time limit |
feedbackTime (optional) | int | |
question | string | |
optionLeft? | string | |
optionRight? | string | |
interval | int | |
ranges | array | |
min | int | |
max | int | |
initial | int | |
response | int | The value of the slider |
Prop name | Description | Default |
---|---|---|
question | A question string - required | - |
disabled | boolean |
|
feedbackTime | How long feedback should be displayed. Don't set this, to avoid displaying feedback altogether; set to -1 if you want to call nextScreen manually number |
|
fixationTime | Duration of the fixation point phase. Don't set this to avoid showing the fixation point altogether. Set to -1 to call nextSlide manually number |
|
initial | Initial slider position number |
|
interval | Interval between slider values number |
|
max | Maximum slider value number |
|
min | Minimal slider value number |
|
optionLeft | Left label for rating string |
|
optionRight | Right label for rating string |
|
pauseTime | Duration of the pause phase. Don't set this, to avoid the pause altogether. number |
|
qud | Question under discussion. Always visible on the screen string |
|
responseTimeLimit | How long the response should be enabled, don't set this, to avoid the timeout altogether.
When this is set, a number |
|
stimulusTime | Duration of the stimulus phase. Don't set this to avoid hiding the stimulus altogether. Set to -1 to call nextSlide manually number |
|
Slot | Description |
---|---|
fixation | - |
stimulus | - |
feedback | - |
task | - |
This is a pre-built slider rating screen, with limited functionality, but simpler to use.
Eating healthy is good for you.
How healthy do you usually eat?
Inherits from LifecycleScreen
Screen Measurements
Measurement | Type | Description |
---|---|---|
responseTime | int | Time between display of this screen until the screen is left |
responseTimeout | boolean | Whether the response time limit was reached |
qud (optional) | string | |
pauseTime (optional) | int | |
fixationTime (optional) | int | |
stimulusTime (optional) | int | |
responseTimeLimit (optional) | int | The response time limit |
feedbackTime (optional) | int | |
question | string | |
response | string | The entered response text |
Prop name | Description | Default |
---|---|---|
question | A question string - required | - |
feedbackTime | How long feedback should be displayed. Don't set this, to avoid displaying feedback altogether; set to -1 if you want to call nextScreen manually number |
|
fixationTime | Duration of the fixation point phase. Don't set this to avoid showing the fixation point altogether. Set to -1 to call nextSlide manually number |
|
pauseTime | Duration of the pause phase. Don't set this, to avoid the pause altogether. number |
|
qud | Question under discussion. Always visible on the screen string |
|
responseTimeLimit | How long the response should be enabled, don't set this, to avoid the timeout altogether.
When this is set, a number |
|
stimulusTime | Duration of the stimulus phase. Don't set this to avoid hiding the stimulus altogether. Set to -1 to call nextSlide manually number |
|
Slot | Description |
---|---|
fixation | - |
stimulus | - |
feedback | - |
task | - |
This is a pre-built image selection screen, with limited functionality, but simpler to use.
Eating healthy is good for you.
What do you usually eat?
Inputs
Magpie offers a range of ready-made default input methods for your experiments to quickly get up and running.
Have the participant complete a text with various gaps.
Prop name | Description | Default |
---|---|---|
options | An array of arrays with possible completions per array - required | - |
text | The text that is supposed to be completed. string - required | - |
Event name | Description |
---|---|
update:response | |
update:responses |
Have your participants provide a text answer
Prop name | Description | Default |
---|---|---|
options | array - required | - |
Event name | Description |
---|---|
update:response |
Fries or soup?
Have the participant choose between multiple options.
Prop name | Description | Default |
---|---|---|
options | The possible options to choose from array - required | - |
Event name | Description | Properties |
---|---|---|
update:response | Change event with the chosen option. Useful in combination with | <anonymous> : undefined |
What's on the bread?
The following example will submit the response directly on clicking it.
What's on the bread?
Have the participant select an image
Prop name | Description | Default |
---|---|---|
options | An array of option objects array - required | - |
Event name | Description | Properties |
---|---|---|
update:response | Change event with the selected image label | <anonymous> : undefined |
Fries or soup?
Have your participants react
Prop name | Description | Default |
---|---|---|
keys | An object with keys mapped to option labels object - required | - |
showOptions | Determines whether information about possible keypresses and their meaning is shown boolean |
|
Event name | Description | Properties |
---|---|---|
update:response | <anonymous> : undefined |
Fries or soup?
Prop name | Description | Default |
---|---|---|
competitors | Competitor chunks array - required | - |
targets | Target chunks array - required | - |
leftKey | The keyboard key to press for the left continuation string |
|
responseTimeLimit | Maximum time alotted for a single response number |
|
rightKey | The keyboard key to press for the right continuation string |
|
showKeypressOptions | Whether to show the options for the KeypressInput boolean |
|
Event name | Description | Properties |
---|---|---|
update:response-times | The list of response times per item | array |
update:responses | The list of selected options | array |
update:target-positions | The list of target positions (either 'left' or 'right') | array |
update:correct | Whether all responses selected the target word | boolean |
update:timeout | Whether the participant took longer than the timeout for one item and the task was aborted | boolean |
end | Emitted when the task was aborted due to timeout or incorrect response, or after selecting the last correct option |
Prop name | Description | Default |
---|---|---|
options | The possible options to choose from array - required | - |
labels | Whether to display labels boolean |
|
optionsHtml | The possible options to choose from as HTML strings array |
|
orientation | Whether to display 'vertical' or 'horizontal' string |
|
randomize | Whether to randomize the option order boolean |
|
Event name | Description | Properties |
---|---|---|
update:response | Change event with the chosen option. Useful in combination with | <anonymous> : undefined |
How was your breakfast?
How was your breakfast?
Which sentence is ungrammatical?
Have the participant choose between multiple options for multiple questions (arranged in a matrix).
Prop name | Description | Default |
---|---|---|
options | The possible answers to choose from array - required | - |
questions | The questions to ask array - required | - |
randomize | Whether to shuffle questions boolean |
|
Event name | Description | Properties |
---|---|---|
update:responses | Change event with the chosen options. | <anonymous> : undefined |
How is the weather today?
How was your breakfast today?
How do you like your job?
What is your opinion of television?
What is your opinion of folk music?
You can also randomize the question order. The response data will still be in the order you supplied the questions in.
What is your opinion of television?
How was your breakfast today?
How is the weather today?
How do you like your job?
What is your opinion of folk music?
Have your participants rank a list of options
Prop name | Description | Default |
---|---|---|
options | array - required | - |
Event name | Description | Properties |
---|---|---|
update:response | <anonymous> : undefined |
Please order the following foods with regards to their healthiness.
Have your participants rate their answer on a rating scale
Prop name | Description | Default |
---|---|---|
count | The length of the rating scale number |
|
left | Text left of the rating scale string |
|
right | Text right of the rating scale string |
|
Event name | Description |
---|---|
update:response |
Fries or soup?
Fries or soup?
Prop name | Description | Values | Default |
---|---|---|---|
chunks | Self-paced reading text chunks array - required | - | - |
instructions | Give instructions on what the participant is supposed to do string | - |
|
responseTimeLimit | Maximum time alotted for a single response number | - |
|
showKeypressOptions | Whether to show the options for the KeypressInput boolean | - |
|
trigger | The key to press to reveal the next word string | - |
|
underline | Underline type string |
|
|
wordPos | Whether to show the next word at the same position or at the next string |
|
|
Event name | Description | Properties |
---|---|---|
update:response-times | List of response times | array |
update:timeout | Whether the user took more time on one item than the set response time | array |
end | Emitted either when the user takes longer than the set response time, or they finish until the end of chunks. |
SerialInputs allow you to record inputs on a series of items that are interrelated and belong to the same trial
Prop name | Description | Default |
---|---|---|
iterations | The number of iterations number - required | - |
Event name | Description |
---|---|
end | Emitted when next() has been called on the last iteration |
Slot | Description | Bindings |
---|---|---|
default | Your content for each iteration | i iterations : Number — The overall number of iterationsrecord : fn(variable:string, value:mixed) — A function to record trial measurements per iteration resulting in an array of values stored at $magpie.measurements.{variable}next : fn() — A function to go to the next iteration |
This is a simple implementation of a Self-paced reading task.

Hello
Prop name | Description | Default |
---|---|---|
disabled | Whether to show the tooltip boolean |
|
initial | Initial slider position number |
|
interval | Interval between slider values number |
|
left | Text left of the slider string |
|
max | Maximum slider value number |
|
min | Minimal slider value number |
|
right | Text right of the slider string |
|
tooltip | Whether to show the tooltip boolean |
|
Event name | Description | Properties |
---|---|---|
update:response | <anonymous> : undefined |
Fries or soup?
Lunch: % SoupProp name | Description | Default |
---|---|---|
ranges | The labels for the ranges array - required | - |
initial | Initial slider position number |
|
interval | Interval between slider values number |
|
left | Text left of the slider string |
|
max | Maximum slider value number |
|
min | Minimal slider value number |
|
right | Text right of the slider string |
|
tooltip | Whether to show the tooltip boolean |
|
Event name | Description | Properties |
---|---|---|
update:responses | <anonymous> : undefined | |
update:rangeValues | <anonymous> : undefined |
How often do you eat meat, vegetarian or vegan?
33% Meat, 34% Vegetarian, 33% Vegan
Have your participants provide a text answer
Event name | Description |
---|---|
update:response |
Fries or soup? Discuss.
Interactive
Magpie allows creating experiments where participants interact with each other online. This works via a web socket connection to the magpie server that relays events to all participants in the same experiment room. There are a number of preconfigured components available for you to use in such scenarios, like e.g. the Chat component, which allows participants to communicate via text messages.
You will likely want to create your own interactive components. To showcase how this works, we'll use a simplified version of the chat component as an example:
<template> <div class="chat"> <div ref="box" class="chat-box"> <!-- List all chat messages --> <p v-for="(message, i) in messages" :key="i" v-text="message.message" ></p> </div> <div class="chat-input"> <!-- Textarea (with a ref called 'text') for composing messages and 'send' button for sending them --> <textarea ref="text"></textarea> <button @click.stop="send()">Send</button> </div> </div> </template> <script> import Vue from 'vue'; export default { name: 'Chat', data() { return { messages: [] }; }, // This is a magpie-specific extension to Vue, which allows // you to specify callbacks for specific socket events. In this case // we're listening on the 'chat_message' event socket: { chat_message(payload) { this.messages.push(payload); } }, methods: { send() { // Here we get the current message from the textarea using the Vue ref we set above const message = this.$refs.text.value; // If the experiment was setup with a socketURL config setting, // the socket will be available as part of the magic $magpie property // allowing us to broadcast this message to the fellow participants in the current room (including ourself) this.$magpie.socket.broadcast('chat_message', message); } } }; </script>
Prop name | Description | Default |
---|---|---|
participantLabel | string |
|
Event name | Description | Properties |
---|---|---|
update:messages | Messages contains all chat messages as objects: | <anonymous> : undefined |
update:data | Data contains all chat messages in tabular form: | <anonymous> : undefined |
This interactive component provides participants the opportunity to chat with each other, if they are in the same room.
Prop name | Description | Default |
---|---|---|
number | number - required | - |
Event name | Description |
---|---|
done |
This interactive component allow waiting until a specified number of participants are on the current screen.
Helpers
This component (re)starts capturing the eye gaze track.
You can retrieve the current eye track with $magpie.eyetracking.getEyeTrack()
.
Eyetracking requires that you install webgazer
.
This component asks the user to enable full screen.
This component (re)starts capturing the mouse track.
You can retrieve the current mouse track with $magpie.mousetracking.getMouseTrack()
.
Prop name | Description | Default |
---|---|---|
data | The data you want to add object - required | - |
global | If you set the global prop, the data will be added to the global experiment measurements instead of only to the current trial boolean |
|
Record allows you to easily add arbitrary data to your measurements:
This component (re)starts the timer for recording the response time.
Prop name | Description | Default |
---|---|---|
id | string - required | - |
This component starts a timer. See TimerStop
for how to use it.
Prop name | Description | Default |
---|---|---|
id | string - required | - |
Event name | Description | Properties |
---|---|---|
update:time | <anonymous> : undefined |
Prop name | Description | Default |
---|---|---|
time | number - required | - |
Event name | Description |
---|---|
done |
API
Classes
Magpie
Kind: global class
- Magpie
- new Magpie()
- .validators :
object
- .v :
object
- .id :
string
- .serverUrl :
string
- .submissionUrl :
string
- .submissionUrl :
string
- .contactEmail :
string
- .mode :
string
- .debug :
boolean
- .socket :
Socket
- .mousetracking :
Mousetracking
- .eyetracking :
Eyetracking
- .currentScreenIndex :
number
- .currentSlideIndex :
number
- .responseTimeStart :
number
- .measurements :
object
- .validateMeasurements :
object
- .timers :
object
- .nextSlide(index)
- .nextScreen(index)
- .saveAndNextScreen(index)
- .addTrialData(data)
- .addExpData(data)
- .getAllData() ⇒
Array.<Object>
- .submit() ⇒
Promise.<void>
- .submitIntermediateResults() ⇒
Promise.<void>
- .setProgress(percentage)
new Magpie()
Magpie specific vue tools exposed as $magpie
magpie.validators : object
Gives easy access to validators. Validation is based on vuelidate.
Name | Meta parameters | Description |
---|---|---|
required | none | Requires non-empty data. Checks for empty arrays and strings containing only whitespaces. |
requiredIf | locator * | Requires non-empty data only if provided property or predicate is true. |
requiredUnless | locator * | Requires non-empty data only if provided property or predicate is false. |
minLength | min length | Requires the input to have a minimum specified length, inclusive. Works with arrays. |
maxLength | max length | Requires the input to have a maximum specified length, inclusive. Works with arrays. |
minValue | min | Requires entry to have a specified minimum numeric value or Date. |
maxValue | max | Requires entry to have a specified maximum numeric value or Date. |
between | min, max | Checks if a number or Date is in specified bounds. Min and max are both inclusive. |
alpha | none | Accepts only alphabet characters. |
alphaNum | none | Accepts only alphanumerics. |
numeric | none | Accepts only numerics. |
integer | none | Accepts positive and negative integers. |
decimal | none | Accepts positive and negative decimal numbers. |
none | Accepts valid email addresses. Keep in mind you still have to carefully verify it on your server, as it is impossible to tell if the address is real without sending verification email. | |
ipAddress | none | Accepts valid IPv4 addresses in dotted decimal notation like 127.0.0.1. |
macAddress | separator=':' | Accepts valid MAC addresses like 00:ff:11:22:33:44:55. Don't forget to call it macAddress(), as it has optional parameter. You can specify your own separator instead of ':'. Provide empty separator macAddress('') to validate MAC addresses like 00ff1122334455. |
sameAs | locator * | Checks for equality with a given property. |
url | none | Accepts only URLs. |
or | validators... | Passes when at least one of provided validators passes. |
and | validators... | Passes when all of provided validators passes. |
not | validator | Passes when provided validator would not pass, fails otherwise. Can be chained with other validators like not(sameAs('field')). |
* Locator is a sibling property name.
Kind: instance property of Magpie
\
magpie.v : object
Shorthand for $magpie.validators
Kind: instance property of Magpie
\
magpie.id : string
The ID of the experiment
Kind: instance property of Magpie
\
magpie.serverUrl : string
Kind: instance property of Magpie
\
magpie.submissionUrl : string
Kind: instance property of Magpie
\
magpie.submissionUrl : string
Kind: instance property of Magpie
\
magpie.contactEmail : string
Kind: instance property of Magpie
\
magpie.mode : string
Kind: instance property of Magpie
\
magpie.debug : boolean
Kind: instance property of Magpie
\
magpie.socket : Socket
Kind: instance property of Magpie
\
magpie.mousetracking : Mousetracking
Kind: instance property of Magpie
\
magpie.eyetracking : Eyetracking
Kind: instance property of Magpie
\
magpie.currentScreenIndex : number
The id of the current screen
Kind: instance property of Magpie
\
magpie.currentSlideIndex : number
The id of the current slide
Kind: instance property of Magpie
\
magpie.responseTimeStart : number
The start time of the responseTime measurement
Kind: instance property of Magpie
\
magpie.measurements : object
The measurements of the current screen. All data in this object can be saved using $magpie.saveMeasurements
Kind: instance property of Magpie
\
magpie.validateMeasurements : object
Validation results on the current measurements
Kind: instance property of Magpie
\
magpie.timers : object
A hash of timer start points by id
Kind: instance property of Magpie
\
magpie.nextSlide(index)
Go to the next slide.
Kind: instance method of Magpie
\
Access: public
Param | Type | Description |
---|---|---|
index | int | the index of the slide to go to (optional; default is next slide) |
magpie.nextScreen(index)
Go to the next screen. (Will also reset scroll position.)
Kind: instance method of Magpie
\
Access: public
Param | Type | Description | |
---|---|---|---|
index | int | String | the index or label of the screen to go to (optional; default is next screen) |
magpie.saveAndNextScreen(index)
SaveMeasurements and go to the next screen. (Will also reset scroll position.)
Kind: instance method of Magpie
\
Access: public
Param | Type | Description | |
---|---|---|---|
index | int | String | the index or label of the screen to go to (optional; default is next screen) |
magpie.addTrialData(data)
Add a result set This method will automatically add a responseTime key to your data with time measured from the start of the current screen
Kind: instance method of Magpie
\
Access: public
Param | Type | Description |
---|---|---|
data | Object | a flat object whose data you want to add to the results |
magpie.addExpData(data)
Add global facts that will be added to each result set
Kind: instance method of Magpie
\
Access: public
Param | Type | Description |
---|---|---|
data | Object | a flat object whose data you want to add to the facts |
magpie.getAllData() ⇒ Array.<Object>
Returns an array of objects with all trial data that has been submitted so far, including experiment-wide data
Kind: instance method of Magpie
\
Access: public\
magpie.submit() ⇒ Promise.<void>
Submit all data collected so far
Kind: instance method of Magpie
\
magpie.submitIntermediateResults() ⇒ Promise.<void>
Submit all data collected so far as intermediate results
Kind: instance method of Magpie
\
magpie.setProgress(percentage)
Set progress bar percentage Will display a progress bar if it's not visible, yet.
Kind: instance method of Magpie
\
Access: public
Param | Type | Description |
---|---|---|
percentage | float | the percentage to display as a number between 0 and 1 |
Socket
Kind: global class
- Socket
- .participantId :
string
- .experimentId :
string
- .participantId :
'CONNECTING'
|'CONNECTED'
|'WAITING'
|'READY'
|'ERROR'
- .participantId :
'WAITING'
|'READY'
|'ERROR'
- .participants :
Array.<string>
- .active :
Array.<string>
- .variant :
Number
- .chain :
Number
- .generation :
Number
- .player :
Number
- .groupLabel :
String
- .lastIterationResults :
Array
- .getParticipantName(id) ⇒
String
- .getParticipantColor(id) ⇒
String
- .initialize()
- .broadcast(event, payload)
- .participantId :
socket.participantId : string
Kind: instance property of Socket
\
socket.experimentId : string
Kind: instance property of Socket
\
socket.participantId : 'CONNECTING'
| 'CONNECTED'
| 'WAITING'
| 'READY'
| 'ERROR'
A reactive property with the state of the socket
Kind: instance property of Socket
\
socket.participantId : 'WAITING'
| 'READY'
| 'ERROR'
A reactive property with the state of the socket
Kind: instance property of Socket
\
socket.participants : Array.<string>
A reactive list of online participants
Kind: instance property of Socket
\
socket.active : Array.<string>
A reactive list of participants currently active in the current screen
Kind: instance property of Socket
\
socket.variant : Number
The variant number of this session
Kind: instance property of Socket
\
socket.chain : Number
The chain number of this session
Kind: instance property of Socket
\
socket.generation : Number
The generation number of this session
Kind: instance property of Socket
\
socket.player : Number
The player id of this session
Kind: instance property of Socket
\
socket.groupLabel : String
The group id of this session
Kind: instance property of Socket
\
socket.lastIterationResults : Array
The results of the last iteration
Kind: instance property of Socket
\
socket.getParticipantName(id) ⇒ String
Kind: instance method of Socket
Param | Type |
---|---|
id | String |
socket.getParticipantColor(id) ⇒ String
Kind: instance method of Socket
Param | Type |
---|---|
id | String |
socket.initialize()
Initialize the socket
Kind: instance method of Socket
\
socket.broadcast(event, payload)
Kind: instance method of Socket
Param | Type |
---|---|
event | string |
payload |
Mousetracking
Kind: global class
mousetracking.start(x, y)
(re)start mouse tracking for the current screen
Kind: instance method of Mousetracking
\
Access: public
Param | Type | Description |
---|---|---|
x | Number | Relative Origin x coordinate |
y | Number | Relative Origin y coordinate |
mousetracking.getMouseTrack(rate) ⇒ Object
Get the mouse track since the appearance of the current screen
Kind: instance method of Mousetracking
\
Access: public
Param | Type | Default | Description |
---|---|---|---|
rate | int | 15 | Time resolution in ms (optional; defaults to 15ms) |
Eyetracking
Kind: global class
eyetracking.start(x, y)
(re)start eye tracking for the current screen
Kind: instance method of Eyetracking
\
Access: public
Param | Type | Description |
---|---|---|
x | Number | Relative Origin x coordinate |
y | Number | Relative Origin y coordinate |
eyetracking.setDebug(debugging)
set debugging status
Kind: instance method of Eyetracking
\
Access: public
Param | Type | Description |
---|---|---|
debugging | Boolean | Whether to display debugging information |
eyetracking.getEyeTrack(rate) ⇒ Object
Get the eye gaze track since the appearance of the current screen
Kind: instance method of Eyetracking
\
Access: public
Param | Type | Default | Description |
---|---|---|---|
rate | int | 15 | Time resolution in ms (optional; defaults to 15ms) |
.validateSubmission(data) ⇒ boolean
Kind: instance function\ Methodof: Magpie
Param | Type |
---|---|
data | Array.<Object> |