|
15 | 15 | right part of your screen.
|
16 | 16 | </p>
|
17 | 17 | <p>
|
18 |
| - Whenever you see a circle, please press the 'p' key on your keyboard, |
19 |
| - whenever you see a square, please press the 'q' key - regardless of the |
| 18 | + Whenever you see a <strong>{{keyQisForShape == "circle" ? 'circle' : 'square'}}, press 'q'</strong> on your keyboard, |
| 19 | + whenever you see a <strong>{{keyQisForShape == "circle" ? 'square' : 'circle'}}, press 'p'</strong> - regardless of the |
20 | 20 | position of the shape.
|
21 | 21 | </p>
|
22 | 22 | <p>
|
|
36 | 36 | <template v-for="(trial, i) in trialsTrain">
|
37 | 37 | <KeypressScreen
|
38 | 38 | :key="i"
|
39 |
| - :keys="{ q: 'square', p: 'circle' }" |
| 39 | + :keys="{ q: keyQisForShape, p: keyQisForShape == 'circle' ? 'square' : 'circle' }" |
40 | 40 | :fixation-time="Math.floor(Math.random() * 1500 + 1200)"
|
41 | 41 | >
|
42 | 42 |
|
43 |
| - <Record :data="{ |
44 |
| - trial: i, |
45 |
| - target_object: trial.target_object, |
46 |
| - target_position: trial.target_position, |
47 |
| - phase: 'test' |
48 |
| - }" /> |
49 |
| - |
50 | 43 | <template #stimulus>
|
51 | 44 | <CanvasStage :config="{ width: 800, height: 400 }">
|
52 | 45 | <CanvasLayer>
|
|
71 | 64 | />
|
72 | 65 | </CanvasLayer>
|
73 | 66 | </CanvasStage>
|
| 67 | + <Record :data="{ |
| 68 | + trial: i, |
| 69 | + keyQisForShape: keyQisForShape, |
| 70 | + target_object: trial.target_object, |
| 71 | + target_position: trial.target_position, |
| 72 | + phase: 'test' |
| 73 | + }" /> |
74 | 74 | </template>
|
75 | 75 | </KeypressScreen>
|
76 | 76 | </template>
|
|
82 | 82 | <template v-for="(trial, i) in trialsTest">
|
83 | 83 | <KeypressScreen
|
84 | 84 | :key="i"
|
85 |
| - :keys="{ q: 'square', p: 'circle' }" |
| 85 | + :keys="{ q: keyQisForShape, p: keyQisForShape == 'circle' ? 'square' : 'circle' }" |
86 | 86 | :fixation-time="Math.floor(Math.random() * 1500 + 1200)"
|
87 | 87 | >
|
88 | 88 |
|
89 |
| - <Record :data="{ |
90 |
| - trial: i, |
91 |
| - target_object: trial.target_object, |
92 |
| - target_position: trial.target_position, |
93 |
| - phase: 'training' |
94 |
| - }" /> |
95 | 89 | <template #stimulus>
|
96 | 90 | <CanvasStage :config="{ width: 800, height: 400 }">
|
97 | 91 | <CanvasLayer>
|
|
116 | 110 | />
|
117 | 111 | </CanvasLayer>
|
118 | 112 | </CanvasStage>
|
| 113 | + <Record :data="{ |
| 114 | + trial: i, |
| 115 | + keyQisForShape: keyQisForShape, |
| 116 | + target_object: trial.target_object, |
| 117 | + target_position: trial.target_position, |
| 118 | + phase: 'training' |
| 119 | + }" /> |
119 | 120 | </template>
|
120 | 121 | </KeypressScreen>
|
121 | 122 | </template>
|
122 | 123 |
|
123 | 124 |
|
124 | 125 | <PostTestScreen />
|
125 | 126 |
|
126 |
| - <DebugResultsScreen /> |
| 127 | + <SubmitResultsScreen /> |
| 128 | + |
127 | 129 | </Experiment>
|
128 | 130 | </template>
|
129 | 131 |
|
130 | 132 | <script>
|
131 | 133 | import _ from 'lodash';
|
| 134 | +
|
| 135 | +var keyQisForShape = _.sample(["square", "circle"]) |
| 136 | +
|
132 | 137 | export default {
|
133 | 138 | name: 'App',
|
134 | 139 |
|
135 | 140 | data() {
|
136 |
| - const trialsTrain = _.map(_.range(1), () => _.sample(conditions)); |
137 |
| - const trialsTest = _.map(_.range(2), () => _.sample(conditions)); |
| 141 | + const trialsTrain = _.map(_.range(10), () => _.sample(conditions)); |
| 142 | + const trialsTest = _.map(_.range(20), () => _.sample(conditions)); |
138 | 143 | return {
|
139 | 144 | trialsTrain,
|
140 |
| - trialsTest |
| 145 | + trialsTest, |
| 146 | + keyQisForShape |
141 | 147 | };
|
142 | 148 | }
|
143 | 149 | };
|
|
0 commit comments