From 706ffb97436d65ef6da568e9bbd6f08c47cc01c3 Mon Sep 17 00:00:00 2001 From: Ford McDonald Date: Fri, 3 May 2024 11:21:06 -0400 Subject: [PATCH 1/2] buildTrials functions versus Trial objects --- docs/further_reading/jspsych_basics.mdx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 docs/further_reading/jspsych_basics.mdx diff --git a/docs/further_reading/jspsych_basics.mdx b/docs/further_reading/jspsych_basics.mdx new file mode 100644 index 00000000..9e1559d2 --- /dev/null +++ b/docs/further_reading/jspsych_basics.mdx @@ -0,0 +1,16 @@ +--- +id: jspsych +slug: /jspsych +title: JSPsych +description: "Understanding concepts in JSPsych" +--- + +## Assembling Trials: Functions vs. Objects + +When working with Honeycomb to create experiments, users often have questions regarding the distinction between trials exported directly as Trial objects and those encapsulated within functions that output Trial objects. + +In the `honeycombTrials.js` file, you'll find that some trials are exported as objects while others are enclosed within functions. During experiment execution, certain downstream trials may require access to data collected in previous trials. + +Trials relying on the global `jsPsych` object to store timeline data or retrieve aggregated results from prior trials need to dynamically ingest this information during the experiment. Consequently, the `buildTrial` functions serve the purpose of assembling trials with data in the jsPsych object collected during the experiment. + +For further information about the `jsPsych` global object, refer to the [jsPsych documentation](https://www.jspsych.org/7.3/reference/jspsych/). From e35494609e719241a097874e2fd3cb0f40bfa20d Mon Sep 17 00:00:00 2001 From: Ford McDonald Date: Fri, 3 May 2024 11:25:52 -0400 Subject: [PATCH 2/2] buildTrials functions versus Trial objects --- docs/further_reading/jspsych_basics.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/further_reading/jspsych_basics.mdx b/docs/further_reading/jspsych_basics.mdx index 9e1559d2..507a718b 100644 --- a/docs/further_reading/jspsych_basics.mdx +++ b/docs/further_reading/jspsych_basics.mdx @@ -11,6 +11,6 @@ When working with Honeycomb to create experiments, users often have questions re In the `honeycombTrials.js` file, you'll find that some trials are exported as objects while others are enclosed within functions. During experiment execution, certain downstream trials may require access to data collected in previous trials. -Trials relying on the global `jsPsych` object to store timeline data or retrieve aggregated results from prior trials need to dynamically ingest this information during the experiment. Consequently, the `buildTrial` functions serve the purpose of assembling trials with data in the jsPsych object collected during the experiment. +Trials relying on the global `jsPsych` object to store timeline data or retrieve aggregated results from prior trials need to dynamically ingest this information during the experiment. Consequently, the `buildTrial` functions serve the purpose of assembling trials with data from the jsPsych object collected during the experiment. For further information about the `jsPsych` global object, refer to the [jsPsych documentation](https://www.jspsych.org/7.3/reference/jspsych/).