diff --git a/docs/demos/jspsych-sketchpad-demo1.html b/docs/demos/jspsych-sketchpad-demo1.html new file mode 100644 index 00000000..dfe6b5e7 --- /dev/null +++ b/docs/demos/jspsych-sketchpad-demo1.html @@ -0,0 +1,61 @@ + + + + + + + + + + + + diff --git a/docs/demos/jspsych-sketchpad-demo2.html b/docs/demos/jspsych-sketchpad-demo2.html new file mode 100644 index 00000000..c089ed4a --- /dev/null +++ b/docs/demos/jspsych-sketchpad-demo2.html @@ -0,0 +1,63 @@ + + + + + + + + + + + + diff --git a/docs/plugins/sketchpad.md b/docs/plugins/sketchpad.md index 50381ae9..67672c35 100644 --- a/docs/plugins/sketchpad.md +++ b/docs/plugins/sketchpad.md @@ -64,58 +64,46 @@ In addition to the [default data collected by all plugins](../overview/plugins.m ## Examples -???+ example "Identical distractors" +???+ example "Basic sketchpad with a prompt" === "Code" ```javascript - var instructions = { - type: jsPsychHtmlButtonResponse, - stimulus: `

Press J if there is a backwards N.

-

Press F if all the Ns are in the normal orientation.

`, - choices: ['Continue'] - } - var trial = { - type: jsPsychVisualSearchCircle, - target: 'img/backwardN.gif', - foil: 'img/normalN.gif', - fixation_image: 'img/fixation.gif', - target_present: true, - set_size: 4 + type: jsPsychSketchpad, + prompt: '

Draw an apple!

', + prompt_location: 'abovecanvas', + canvas_width: 300, + canvas_height: 300, + border_width: 2 } ``` === "Demo"
- +
- Open demo in new tab + Open demo in new tab -???+ example "Variety of different distractors" +???+ example "Image segmentation with different colors" === "Code" ```javascript - var instructions = { - type: jsPsychHtmlButtonResponse, - stimulus: `

Press E if there is an elephant in the group.

-

Press N if there is no elephant in the group.

`, - choices: ['Continue'] - } - var trial = { - type: jsPsychVisualSearchCircle, - stimuli: ['img/elephant.png', 'img/lion.png', 'img/monkey.png'], - fixation_image: 'img/fixation.gif', - target_present_key: 'e', - target_absent_key: 'n', - target_present: true + type: jsPsychSketchpad, + prompt: '

Circle the mouth using red. Circle the eyes using blue.

', + prompt_location: 'abovecanvas', + stroke_color_palette: ['red', 'blue'], + stroke_color: 'red', + background_image: 'img/sad_face_4.jpg', + canvas_width: 380, + canvas_height: 252 } ``` === "Demo"
- +
- Open demo in new tab + Open demo in new tab