coglabuzh / online-exps

Unleash the full potential of JavaScript and supercharge your web experiments with this library for experimental programming - based on jsPsych - work in progress! 🎯
2 stars 0 forks source link

Functions used to arrange stimuli in a line #23

Open chenyu-psy opened 7 months ago

chenyu-psy commented 7 months ago

Hi Ajit,

This function serves the general functions displayStimuli and displayButtons #21 . It arranges all of the stimuli in a line.

Parameters

  1. stimuli: an array of objects, including all necessary information for displaying, except for location.
  2. centre: an array([x, y]), the centre position of the circle, the default value is the centre of the screen.
  3. width: a number, the width of the line
  4. border: an object, an array of objects, or null. If it is an object, it draws a border for each object according to the properties we have set. If it is an array of objects, it draws a border for each object according to the properties we have set for each one.

Details of the parameters and output can be found in the issue #22