psytask - v1.1.1
    Preparing search index...

    Function jsPsychStim

    • Create a scene with jsPsych Plugin

      This function provides a compatibility layer for using jsPsych plugins within psytask. It handles the integration between jsPsych plugin API and psytask's scene system.

      Parameters

      • trial: TrialType<PluginInfo>
      • ctx: Scene<never>

      Returns { node: HTMLDivElement; data: () => LooseObject }

      using scene = app.scene(jsPsychStim, {
      defaultProps: {
      type: jsPsychHtmlKeyboardResponse,
      stimulus: 'default',
      choices: ['f', 'j'],
      },
      });
      await scene.show({ stimulus: 'new' }); // change stimulus