@@ -8,15 +8,17 @@ const facesDir = path.join(rootFolder, 'assets', 'face_house', 'faces');
88const housesDir = path . join ( rootFolder , 'assets' , 'face_house' , 'houses' ) ;
99const fixation = path . join ( rootFolder , 'assets' , 'common' , 'fixationcross.png' ) ;
1010
11- const stimuli = Array . from ( { length :30 } , ( v , k ) => `Face${ k + 1 } ` ) . concat ( Array . from ( { length :30 } , ( v , k ) => `House${ k + 1 } ` ) . map ( ( s ) => ( { ;
12- condition : s . startsWith ( 'Face' ) ? 'Face' : 'House' ,
13- dir : s . startsWith ( 'Face' ) ? facesDir : housesDir ,
14- filename : `${ s } .jpg` ,
15- name : s ,
16- response : s . startsWith ( 'Face' ) ? '1' : '9' ,
17- phase : 'main' ,
18- type : s . startsWith ( 'Face' ) ? EVENTS . STIMULUS_1 : EVENTS . STIMULUS_2 ,
19- } ) ) ;
11+ const stimuli = Array . from ( { length : 30 } , ( _ , i ) => `Face${ i + 1 } ` )
12+ . concat ( Array . from ( { length : 30 } , ( v , k ) => `House${ k + 1 } ` ) )
13+ . map ( ( s ) => ( {
14+ condition : s . startsWith ( 'Face' ) ? 'Face' : 'House' ,
15+ dir : s . startsWith ( 'Face' ) ? facesDir : housesDir ,
16+ filename : `${ s } .jpg` ,
17+ name : s ,
18+ response : s . startsWith ( 'Face' ) ? '1' : '9' ,
19+ phase : 'main' ,
20+ type : s . startsWith ( 'Face' ) ? EVENTS . STIMULUS_1 : EVENTS . STIMULUS_2 ,
21+ } ) ) ;
2022
2123// phase: ['Face1', 'House1'].includes(s) ? 'practice' : 'main',
2224
0 commit comments