Skip to content

Commit

Permalink
rotation included
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorenceBockting committed Apr 11, 2019
1 parent a1b7e08 commit 638371d
Show file tree
Hide file tree
Showing 3 changed files with 253 additions and 92 deletions.
2 changes: 1 addition & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ $("document").ready(function() {
// in debug mode this returns the babe-object, which you can access in the console of your browser
// in all other modes null will be returned
window.babe_monitor = babeInit({
views_seq: [
views_seq:[
intro,
instructions,
instruction_practice,
Expand Down
199 changes: 146 additions & 53 deletions trials.js
Original file line number Diff line number Diff line change
@@ -1,84 +1,177 @@
const condition_one = {
const key_targets = _.shuffle(['circle', 'square']);
const p_target = key_targets[0];
const q_target = key_targets[1];

const practice = {
// maybe don't display a question (thus having less overall stimuli on screen")?
// as it is now, it might interfere with the experiment
practice:[
circle: [
{
question: "Press <strong>q</strong> for circle and <strong>p</strong> for square",
picture: "images/circle_right.png",
key1: 'q',
key2: 'p',
q: 'circle',
p: 'square',
expected: 'circle'
q: q_target,
p: p_target,
expected: 'circle' === p_target? p_target : q_target,
canvas: {
focalColor: 'blue',
focalShape: 'circle',
focalNumber: 1,
elemSize: 100,
total: 2,
start_with: 'focal',
otherShape: 'square',
otherColor: 'white',
sort: 'split_grid'
}
},
{
question: "Press <strong>q</strong> for circle and <strong>p</strong> for square",
picture: "images/circle_left.png",
key1: 'q',
key2: 'p',
q: 'circle',
p: 'square',
expected: 'circle'
},
q: q_target,
p: p_target,
expected: 'circle' === p_target? p_target : q_target,
canvas: {
focalColor: 'white',
focalShape: 'square',
focalNumber: 1,
elemSize: 100,
total: 2,
start_with: 'focal',
otherShape: 'circle',
otherColor: 'blue',
sort: 'split_grid'
}
}
],
square: [
{
question: "Press <strong>q</strong> for circle and <strong>p</strong> for square",
picture: "images/square_right.png",
key1: 'q',
key1: 'q',
key2: 'p',
q: 'circle',
p: 'square',
expected: 'square'
q: q_target,
p: p_target,
expected: 'square' === p_target? p_target : q_target,
canvas: {
focalColor: 'blue',
focalShape: 'square',
focalNumber: 1,
elemSize: 100,
total: 2,
start_with: 'other',
otherShape: 'circle',
otherColor: 'white',
sort: 'split_grid'
}
},
{
question: "Press <strong>q</strong> for circle and <strong>p</strong> for square",
picture: "images/square_left.png",
key1: 'q',
key1: 'q',
key2: 'p',
q: 'circle',
p: 'square',
expected: 'square'
q: q_target,
p: p_target,
expected: 'square' === p_target? p_target : q_target,
canvas: {
focalColor: 'white',
focalShape: 'square',
focalNumber: 1,
elemSize: 100,
total: 2,
start_with: 'other',
otherShape: 'square',
otherColor: 'blue',
sort: 'split_grid'
}
}
],
]
};
// the following is the counter-balance, maybe don't call it 'test' but 'counter' or similar
// same goes for 'practice' above in that case
test:[
const test = {
circle: [
{
question: "Press <strong>q</strong> for square and <strong>p</strong> for circle",
picture: "images/circle_right.png",
key1: 'q',
key2: 'p',
q: 'square',
p: 'circle',
expected: 'circle'
q: q_target,
p: p_target,
expected: 'circle' === p_target? p_target : q_target,
canvas: {
focalColor: 'blue',
focalShape: 'circle',
focalNumber: 1,
elemSize: 100,
total: 2,
start_with: 'focal',
otherShape: 'square',
otherColor: 'white',
sort: 'split_grid'
}
},
{
question: "Press <strong>q</strong> for square and <strong>p</strong> for circle",
picture: "images/circle_left.png",
key1: 'q',
key2: 'p',
q: 'square',
p: 'circle',
expected: 'circle'
},
q: q_target,
p: p_target,
expected: 'circle' === p_target? p_target : q_target,
canvas: {
focalColor: 'white',
focalShape: 'square',
focalNumber: 1,
elemSize: 100,
total: 2,
start_with: 'focal',
otherShape: 'circle',
otherColor: 'blue',
sort: 'split_grid'
}
}
],
square: [
{
question: "Press <strong>q</strong> for square and <strong>p</strong> for circle",
picture: "images/square_right.png",
key1: 'q',
key1: 'q',
key2: 'p',
q: 'square',
p: 'circle',
expected: 'square'
q: q_target,
p: p_target,
expected: 'square' === p_target? p_target : q_target,
canvas: {
focalColor: 'blue',
focalShape: 'square',
focalNumber: 1,
elemSize: 100,
total: 2,
start_with: 'other',
otherShape: 'circle',
otherColor: 'white',
sort: 'split_grid'
}
},
{
question: "Press <strong>q</strong> for square and <strong>p</strong> for circle",
picture: "images/square_left.png",
key1: 'q',
key1: 'q',
key2: 'p',
q: 'square',
p: 'circle',
expected: 'square'
q: q_target,
p: p_target,
expected: 'square' === p_target? p_target : q_target,
canvas: {
focalColor: 'white',
focalShape: 'circle',
focalNumber: 1,
elemSize: 100,
total: 2,
start_with: 'other',
otherShape: 'square',
otherColor: 'blue',
sort: 'split_grid'
}
}
]
}

]
};

const simonTask_info = {
keyPress_test:
_.flattenDeep(babeUtils.views.loop([babeUtils.views.loop(practice.circle, 2), babeUtils.views.loop(practice.square,2)],2))
,
keyPress_practice:
_.flattenDeep(babeUtils.views.loop([babeUtils.views.loop(practice.circle, 2), babeUtils.views.loop(practice.square,2)],5))
};

simonTask_info.keyPress_test = _.shuffle(simonTask_info.keyPress_test)
simonTask_info.keyPress_practice = _.shuffle(simonTask_info.keyPress_practice)


Loading

0 comments on commit 638371d

Please sign in to comment.