From ab7ea845df8d12badc74cc338ebb1599e77efd41 Mon Sep 17 00:00:00 2001 From: Josh de Leeuw Date: Wed, 21 Apr 2021 10:24:08 -0400 Subject: [PATCH 1/3] add timing tests to test folder --- tests/timing-tests/calibration-timeline.js | 15 ++++++++ tests/timing-tests/square-flicker.html | 42 ++++++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 tests/timing-tests/calibration-timeline.js create mode 100644 tests/timing-tests/square-flicker.html diff --git a/tests/timing-tests/calibration-timeline.js b/tests/timing-tests/calibration-timeline.js new file mode 100644 index 00000000..341a7d42 --- /dev/null +++ b/tests/timing-tests/calibration-timeline.js @@ -0,0 +1,15 @@ +var calibration = { + timeline: [{ + type: 'html-keyboard-response', + stimulus: `
`, + trial_duration: 200, + post_trial_gap: 100 + }], + loop_function: function(data){ + if(data.values()[0].response == ' '){ + return false; + } else { + return true; + } + } +} \ No newline at end of file diff --git a/tests/timing-tests/square-flicker.html b/tests/timing-tests/square-flicker.html new file mode 100644 index 00000000..0aa07e93 --- /dev/null +++ b/tests/timing-tests/square-flicker.html @@ -0,0 +1,42 @@ + + + + + + + + + + + + + \ No newline at end of file From 579e112d5bfd977dd6b16cac630a62ce8514b02a Mon Sep 17 00:00:00 2001 From: Felix Molter Date: Fri, 30 Apr 2021 08:53:09 +0200 Subject: [PATCH 2/3] Fixed plugin documentation title Fixes the title of the documentation page for the `jspsych-webgazer-validate` plugin. --- docs/plugins/jspsych-webgazer-validate.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/plugins/jspsych-webgazer-validate.md b/docs/plugins/jspsych-webgazer-validate.md index e6a26554..bb06068a 100644 --- a/docs/plugins/jspsych-webgazer-validate.md +++ b/docs/plugins/jspsych-webgazer-validate.md @@ -1,4 +1,4 @@ -# jspsych-webgazer-calibrate +# jspsych-webgazer-validate This plugin can be used to measure the accuracy and precision of gaze predictions made by the [WebGazer extension](/extensions/jspsych-ext-webgazer). For a narrative description of eye tracking with jsPsych, see the [eye tracking overview](/overview/eye-tracking). From 21562d92eb52f6f4ac5c23740c87a41645ec2f1e Mon Sep 17 00:00:00 2001 From: Andrian Vangelov Date: Wed, 12 May 2021 11:57:00 +0200 Subject: [PATCH 3/3] Update parameter name in experiment-options.md Updated docs on "Choose whether you want keyboard choices/responses to be case-sensitive", where the mentioned "case_sensitive" parameter must be "case_sensitive_responses" instead, as it is otherwise correctly implemented and mentioned in other places in the documentation (e.g. "jspsych-pluginAPI.md" - starting at line 112 and "jspsych-core.md" at line 368). The "case_sensitive" variable is used only internally (e.g. "jspsych.js" - lines 2273 and 2411), but not exposed to the "jsPsych.init" method when creating an experiment. Tested with the latest release (6.3.1) with the "jspsych-html-keyboard-response" plugin and I can verify that by following the old documentation it doesn't work (for obvious reasons), but following the one I propose here it does work, as initially intended by the developers. Thanks! --- docs/overview/experiment-options.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/overview/experiment-options.md b/docs/overview/experiment-options.md index 2203aea1..468ba7a3 100644 --- a/docs/overview/experiment-options.md +++ b/docs/overview/experiment-options.md @@ -108,7 +108,7 @@ jsPsych.init({ JavaScript keyboard events make a distinction between uppercase and lowercase key responses (e.g. 'a' and 'A'). Often the researcher just cares about which physical key was pressed, and not whether the key press would result in an uppercase letter (for instance, if CapsLock is on or if the Shift key is held down). For this reason, jsPsych converts all key choice parameters and key responses as lowercase by default. This makes it easier to specify key choices (e.g. `choices: ['a']`, instead of `choices: ['a','A']`), and it makes it easier to check and score a participant's response. -There may be situations when you want key choices and responses to be case-sensitive. You can change this by setting the `case_sensitive` parameter to `true` in `jsPsych.init`. +There may be situations when you want key choices and responses to be case-sensitive. You can change this by setting the `case_sensitive_responses` parameter to `true` in `jsPsych.init`. ```js // use case-sensitive key choices and responses, @@ -116,7 +116,7 @@ There may be situations when you want key choices and responses to be case-sensi // and will be recorded this way in the data jsPsych.init({ timeline: [...], - case_sensitive: true + case_sensitive_responses: true }); ``` @@ -146,4 +146,4 @@ jsPsych.init({ {type: 'webgazer'} ] }); -``` \ No newline at end of file +```