readme.md 1.32 KB
Newer Older
David Bridges's avatar
_  
David Bridges committed
1 2 3 4 5
# Drag and drop demonstration

This task shows you the drag and drop capabilities of PsychoPy and PsychoJS.
The demonstration uses a drag and drop puzzle game. 
The task requires you to drag and drop the black and white pieces into the empty square.
David Bridges's avatar
_  
David Bridges committed
6 7 8
in order to match the puzzle presented above the empty square. 
When you have finished, press the "Continue" button to see whether or not you were correct, 
and how long the trial took.
David Bridges's avatar
_  
David Bridges committed
9 10 11

To generate more designs, you can run the shapeMaker.psyexp task from Builder.
When you run the shapeMaker task, you will be asked for a number of rows. You 
David Bridges's avatar
David Bridges committed
12 13
can choose either 2 or 3 rows for 4 or 9 piece shapes, respectively. Each shape
consists of a grid in the following orders. 
David Bridges's avatar
_  
David Bridges committed
14

David Bridges's avatar
David Bridges committed
15
### For 4 piece shapes
David Bridges's avatar
David Bridges committed
16
| 1 | 2 |
David Bridges's avatar
David Bridges committed
17
| --| --|
David Bridges's avatar
David Bridges committed
18
| 3 | 4 |
David Bridges's avatar
_  
David Bridges committed
19

David Bridges's avatar
David Bridges committed
20
### For 9 piece shapes
David Bridges's avatar
David Bridges committed
21
| 1 | 2 | 3 |
David Bridges's avatar
David Bridges committed
22
| --| --| --|
David Bridges's avatar
David Bridges committed
23 24
| 4 | 5 | 6 |
| 7 | 8 | 9 |
David Bridges's avatar
_  
David Bridges committed
25

David Bridges's avatar
David Bridges committed
26
The answers for each new shape need to be added the the conditions file, where columns
David Bridges's avatar
David Bridges committed
27
`a1` to `a9` relate to the shape grid locations as described above. E.g., `a1` relates to space 1
David Bridges's avatar
David Bridges committed
28
in the grid. So, for an all white shape created using 2 rows (so a 4 piece shape), 
David Bridges's avatar
David Bridges committed
29
you would enter `"white.png"` in columns `a1` to `a4` in the conditions file, 
David Bridges's avatar
David Bridges committed
30 31 32 33 34
and leave the rest of the cells for that row blank.

You can run this task from Pavlovia by going to:

https://run.pavlovia.org/demos/draganddrop/html/