mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-10 11:10:54 +00:00
40 lines
1.1 KiB
HTML
40 lines
1.1 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>jsPsychPluginFreeSortOrdered Example</title>
|
|
<script src="https://unpkg.com/jspsych"></script>
|
|
<!-- Load the published plugin package here, e.g.
|
|
<script src="https://unpkg.com/plugin-free-sort-ordered"></script>
|
|
<script src="../dist/index.browser.js"></script> -->
|
|
<script src="../dist/index.browser.js"></script>
|
|
<link rel="stylesheet" href="https://unpkg.com/jspsych/css/jspsych.css" />
|
|
<link rel="stylesheet" href="../src/styles.css" />
|
|
</head>
|
|
|
|
<body></body>
|
|
<script>
|
|
const jsPsych = initJsPsych();
|
|
|
|
const trial = {
|
|
type: jsPsychPluginFreeSortOrdered,
|
|
stimulus: [
|
|
'../assets/blue-rec.png',
|
|
'../assets/green-rec.png',
|
|
'../assets/red-rec.png',
|
|
],
|
|
stim_height: 100,
|
|
stim_width: 200,
|
|
stim_order: [2, 0, 1],
|
|
scale_factor: 1,
|
|
holding_area_height: 500,
|
|
holding_area_width: 1000,
|
|
prompt: 'Drag and drop the boxes to sort them in order.',
|
|
prompt_location: 'above',
|
|
button_label: 'Continue',
|
|
include_counter: true,
|
|
};
|
|
|
|
jsPsych.run([trial])
|
|
</script>
|
|
</html>
|