Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
I
IncorrectStopEXP
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
HSINYUAN CHEN
IncorrectStopEXP
Commits
8e967b63
Commit
8e967b63
authored
Dec 08, 2020
by
HSINYUAN CHEN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
_
parent
cbc760ec
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
85 additions
and
106 deletions
+85
-106
IncorrectStopEXP-legacy-browsers.js
html/IncorrectStopEXP-legacy-browsers.js
+41
-50
IncorrectStopEXP.js
html/IncorrectStopEXP.js
+42
-54
index.html
html/index.html
+2
-2
No files found.
html/IncorrectStopEXP-legacy-browsers.js
View file @
8e967b63
...
...
@@ -19,7 +19,6 @@ psychoJS.openWindow({
let
expName
=
'IncorrectStopEXP'
;
// from the Builder filename that created this script
let
expInfo
=
{
'session'
:
'01'
,
'participant'
:
''
};
// Start code blocks for 'Before Experiment'
// schedule the experiment:
psychoJS
.
schedule
(
psychoJS
.
gui
.
DlgFromDict
({
dictionary
:
expInfo
,
...
...
@@ -50,14 +49,12 @@ psychoJS.start({
expInfo
:
expInfo
,
});
psychoJS
.
experimentLogger
.
setLevel
(
core
.
Logger
.
ServerLevel
.
DEBUG
);
var
frameDur
;
function
updateInfo
()
{
expInfo
[
'date'
]
=
util
.
MonotonicClock
.
getDateStr
();
// add a simple timestamp
expInfo
[
'expName'
]
=
expName
;
expInfo
[
'psychopyVersion'
]
=
'2020.
2.8
'
;
expInfo
[
'psychopyVersion'
]
=
'2020.
1.3
'
;
expInfo
[
'OS'
]
=
window
.
navigator
.
platform
;
// store frame rate of monitor if we can measure it successfully
...
...
@@ -138,7 +135,7 @@ function experimentInit() {
var
trials2
;
var
currentLoop
;
function
trials2LoopBegin
(
t
rials2Loop
Scheduler
)
{
function
trials2LoopBegin
(
t
his
Scheduler
)
{
// set up handler to look after randomisation of conditions etc
trials2
=
new
TrialHandler
({
psychoJS
:
psychoJS
,
...
...
@@ -154,15 +151,15 @@ function trials2LoopBegin(trials2LoopScheduler) {
trials2
.
forEach
(
function
()
{
const
snapshot
=
trials2
.
getSnapshot
();
t
rials2Loop
Scheduler
.
add
(
importConditions
(
snapshot
));
t
rials2Loop
Scheduler
.
add
(
instructRoutineBegin
(
snapshot
));
t
rials2Loop
Scheduler
.
add
(
instructRoutineEachFrame
(
snapshot
));
t
rials2Loop
Scheduler
.
add
(
instructRoutineEnd
(
snapshot
));
t
his
Scheduler
.
add
(
importConditions
(
snapshot
));
t
his
Scheduler
.
add
(
instructRoutineBegin
(
snapshot
));
t
his
Scheduler
.
add
(
instructRoutineEachFrame
(
snapshot
));
t
his
Scheduler
.
add
(
instructRoutineEnd
(
snapshot
));
const
trials1LoopScheduler
=
new
Scheduler
(
psychoJS
);
t
rials2Loop
Scheduler
.
add
(
trials1LoopBegin
,
trials1LoopScheduler
);
t
rials2Loop
Scheduler
.
add
(
trials1LoopScheduler
);
t
rials2Loop
Scheduler
.
add
(
trials1LoopEnd
);
t
rials2LoopScheduler
.
add
(
endLoopIteration
(
trials2Loop
Scheduler
,
snapshot
));
t
his
Scheduler
.
add
(
trials1LoopBegin
,
trials1LoopScheduler
);
t
his
Scheduler
.
add
(
trials1LoopScheduler
);
t
his
Scheduler
.
add
(
trials1LoopEnd
);
t
hisScheduler
.
add
(
endLoopIteration
(
this
Scheduler
,
snapshot
));
});
return
Scheduler
.
Event
.
NEXT
;
...
...
@@ -170,7 +167,7 @@ function trials2LoopBegin(trials2LoopScheduler) {
var
trials1
;
function
trials1LoopBegin
(
t
rials1Loop
Scheduler
)
{
function
trials1LoopBegin
(
t
his
Scheduler
)
{
// set up handler to look after randomisation of conditions etc
trials1
=
new
TrialHandler
({
psychoJS
:
psychoJS
,
...
...
@@ -186,11 +183,11 @@ function trials1LoopBegin(trials1LoopScheduler) {
trials1
.
forEach
(
function
()
{
const
snapshot
=
trials1
.
getSnapshot
();
t
rials1Loop
Scheduler
.
add
(
importConditions
(
snapshot
));
t
rials1Loop
Scheduler
.
add
(
trialRoutineBegin
(
snapshot
));
t
rials1Loop
Scheduler
.
add
(
trialRoutineEachFrame
(
snapshot
));
t
rials1Loop
Scheduler
.
add
(
trialRoutineEnd
(
snapshot
));
t
rials1LoopScheduler
.
add
(
endLoopIteration
(
trials1Loop
Scheduler
,
snapshot
));
t
his
Scheduler
.
add
(
importConditions
(
snapshot
));
t
his
Scheduler
.
add
(
trialRoutineBegin
(
snapshot
));
t
his
Scheduler
.
add
(
trialRoutineEachFrame
(
snapshot
));
t
his
Scheduler
.
add
(
trialRoutineEnd
(
snapshot
));
t
hisScheduler
.
add
(
endLoopIteration
(
this
Scheduler
,
snapshot
));
});
return
Scheduler
.
Event
.
NEXT
;
...
...
@@ -215,7 +212,7 @@ var t;
var
frameN
;
var
_ready_allKeys
;
var
instructComponents
;
function
instructRoutineBegin
(
snapshot
)
{
function
instructRoutineBegin
(
trials
)
{
return
function
()
{
//------Prepare to start Routine 'instruct'-------
t
=
0
;
...
...
@@ -234,16 +231,14 @@ function instructRoutineBegin(snapshot) {
if
(
'status'
in
thisComponent
)
thisComponent
.
status
=
PsychoJS
.
Status
.
NOT_STARTED
;
});
// check if the Routine should terminate
if
(
!
continueRoutine
)
{
// a component has requested a forced-end of Routine
return
Scheduler
.
Event
.
NEXT
;
}
return
Scheduler
.
Event
.
NEXT
;
};
}
var
continueRoutine
;
function
instructRoutineEachFrame
(
snapshot
)
{
function
instructRoutineEachFrame
(
trials
)
{
return
function
()
{
//------Loop for each frame of Routine 'instruct'-------
let
continueRoutine
=
true
;
// until we're told otherwise
...
...
@@ -312,7 +307,7 @@ function instructRoutineEachFrame(snapshot) {
}
function
instructRoutineEnd
(
snapshot
)
{
function
instructRoutineEnd
(
trials
)
{
return
function
()
{
//------Ending Routine 'instruct'-------
instructComponents
.
forEach
(
function
(
thisComponent
)
{
...
...
@@ -331,7 +326,7 @@ function instructRoutineEnd(snapshot) {
var
_resp_allKeys
;
var
number_correct
;
var
trialComponents
;
function
trialRoutineBegin
(
snapshot
)
{
function
trialRoutineBegin
(
trials
)
{
return
function
()
{
//------Prepare to start Routine 'trial'-------
t
=
0
;
...
...
@@ -356,15 +351,13 @@ function trialRoutineBegin(snapshot) {
if
(
'status'
in
thisComponent
)
thisComponent
.
status
=
PsychoJS
.
Status
.
NOT_STARTED
;
});
// check if the Routine should terminate
if
(
!
continueRoutine
)
{
// a component has requested a forced-end of Routine
return
Scheduler
.
Event
.
NEXT
;
}
return
Scheduler
.
Event
.
NEXT
;
};
}
function
trialRoutineEachFrame
(
snapshot
)
{
function
trialRoutineEachFrame
(
trials
)
{
return
function
()
{
//------Loop for each frame of Routine 'trial'-------
let
continueRoutine
=
true
;
// until we're told otherwise
...
...
@@ -439,7 +432,7 @@ function trialRoutineEachFrame(snapshot) {
}
function
trialRoutineEnd
(
snapshot
)
{
function
trialRoutineEnd
(
trials
)
{
return
function
()
{
//------Ending Routine 'trial'-------
trialComponents
.
forEach
(
function
(
thisComponent
)
{
...
...
@@ -490,7 +483,7 @@ function trialRoutineEnd(snapshot) {
var
thanksComponents
;
function
thanksRoutineBegin
(
snapshot
)
{
function
thanksRoutineBegin
(
trials
)
{
return
function
()
{
//------Prepare to start Routine 'thanks'-------
t
=
0
;
...
...
@@ -506,16 +499,14 @@ function thanksRoutineBegin(snapshot) {
if
(
'status'
in
thisComponent
)
thisComponent
.
status
=
PsychoJS
.
Status
.
NOT_STARTED
;
});
// check if the Routine should terminate
if
(
!
continueRoutine
)
{
// a component has requested a forced-end of Routine
return
Scheduler
.
Event
.
NEXT
;
}
return
Scheduler
.
Event
.
NEXT
;
};
}
var
frameRemains
;
function
thanksRoutineEachFrame
(
snapshot
)
{
function
thanksRoutineEachFrame
(
trials
)
{
return
function
()
{
//------Loop for each frame of Routine 'thanks'-------
let
continueRoutine
=
true
;
// until we're told otherwise
...
...
@@ -534,7 +525,7 @@ function thanksRoutineEachFrame(snapshot) {
}
frameRemains
=
0.0
+
2.0
-
psychoJS
.
window
.
monitorFramePeriod
*
0.75
;
// most of one frame period left
if
(
(
thanksText
.
status
===
PsychoJS
.
Status
.
STARTED
||
thanksText
.
status
===
PsychoJS
.
Status
.
FINISHED
)
&&
t
>=
frameRemains
)
{
if
(
thanksText
.
status
===
PsychoJS
.
Status
.
STARTED
&&
t
>=
frameRemains
)
{
thanksText
.
setAutoDraw
(
false
);
}
// check for quit (typically the Esc key)
...
...
@@ -564,7 +555,7 @@ function thanksRoutineEachFrame(snapshot) {
}
function
thanksRoutineEnd
(
snapshot
)
{
function
thanksRoutineEnd
(
trials
)
{
return
function
()
{
//------Ending Routine 'thanks'-------
thanksComponents
.
forEach
(
function
(
thisComponent
)
{
...
...
@@ -577,21 +568,21 @@ function thanksRoutineEnd(snapshot) {
}
function
endLoopIteration
(
scheduler
,
snapshot
)
{
function
endLoopIteration
(
thisScheduler
,
loop
)
{
// ------Prepare for next entry------
return
function
()
{
if
(
typeof
snapshot
!==
'undefined'
)
{
if
(
typeof
loop
!==
'undefined'
)
{
// ------Check if user ended loop early------
if
(
snapshot
.
finished
)
{
if
(
loop
.
finished
)
{
// Check for and save orphaned data
if
(
psychoJS
.
experiment
.
isEntryEmpty
())
{
psychoJS
.
experiment
.
nextEntry
(
snapshot
);
psychoJS
.
experiment
.
nextEntry
(
loop
);
}
s
cheduler
.
stop
();
thisS
cheduler
.
stop
();
}
else
{
const
thisTrial
=
snapshot
.
getCurrentTrial
();
const
thisTrial
=
loop
.
getCurrentTrial
();
if
(
typeof
thisTrial
===
'undefined'
||
!
(
'isTrials'
in
thisTrial
)
||
thisTrial
.
isTrials
)
{
psychoJS
.
experiment
.
nextEntry
(
snapshot
);
psychoJS
.
experiment
.
nextEntry
(
loop
);
}
}
return
Scheduler
.
Event
.
NEXT
;
...
...
@@ -600,9 +591,9 @@ function endLoopIteration(scheduler, snapshot) {
}
function
importConditions
(
currentLoop
)
{
function
importConditions
(
trials
)
{
return
function
()
{
psychoJS
.
importAttributes
(
currentLoop
.
getCurrentTrial
());
psychoJS
.
importAttributes
(
trials
.
getCurrentTrial
());
return
Scheduler
.
Event
.
NEXT
;
};
}
...
...
html/IncorrectStopEXP.js
View file @
8e967b63
...
...
@@ -6,12 +6,9 @@ import { PsychoJS } from './lib/core-2020.1.js';
import
*
as
core
from
'./lib/core-2020.1.js'
;
import
{
TrialHandler
}
from
'./lib/data-2020.1.js'
;
import
{
Scheduler
}
from
'./lib/util-2020.1.js'
;
import
*
as
util
from
'./lib/util-2020.1.js'
;
import
*
as
visual
from
'./lib/visual-2020.1.js'
;
import
*
as
sound
from
'./lib/sound-2020.1.js'
;
import
*
as
util
from
'./lib/util-2020.1.js'
;
//some handy aliases as in the psychopy scripts;
const
{
abs
,
sin
,
cos
,
PI
:
pi
,
sqrt
}
=
Math
;
const
{
round
}
=
util
;
// init psychoJS:
const
psychoJS
=
new
PsychoJS
({
...
...
@@ -30,7 +27,6 @@ psychoJS.openWindow({
let
expName
=
'IncorrectStopEXP'
;
// from the Builder filename that created this script
let
expInfo
=
{
'session'
:
'01'
,
'participant'
:
''
};
// Start code blocks for 'Before Experiment'
// schedule the experiment:
psychoJS
.
schedule
(
psychoJS
.
gui
.
DlgFromDict
({
dictionary
:
expInfo
,
...
...
@@ -61,14 +57,12 @@ psychoJS.start({
expInfo
:
expInfo
,
});
psychoJS
.
experimentLogger
.
setLevel
(
core
.
Logger
.
ServerLevel
.
DEBUG
);
var
frameDur
;
function
updateInfo
()
{
expInfo
[
'date'
]
=
util
.
MonotonicClock
.
getDateStr
();
// add a simple timestamp
expInfo
[
'expName'
]
=
expName
;
expInfo
[
'psychopyVersion'
]
=
'2020.
2.8
'
;
expInfo
[
'psychopyVersion'
]
=
'2020.
1.3
'
;
expInfo
[
'OS'
]
=
window
.
navigator
.
platform
;
// store frame rate of monitor if we can measure it successfully
...
...
@@ -149,7 +143,7 @@ function experimentInit() {
var
trials2
;
var
currentLoop
;
function
trials2LoopBegin
(
t
rials2Loop
Scheduler
)
{
function
trials2LoopBegin
(
t
his
Scheduler
)
{
// set up handler to look after randomisation of conditions etc
trials2
=
new
TrialHandler
({
psychoJS
:
psychoJS
,
...
...
@@ -164,15 +158,15 @@ function trials2LoopBegin(trials2LoopScheduler) {
// Schedule all the trials in the trialList:
for
(
const
thisTrials2
of
trials2
)
{
const
snapshot
=
trials2
.
getSnapshot
();
t
rials2Loop
Scheduler
.
add
(
importConditions
(
snapshot
));
t
rials2Loop
Scheduler
.
add
(
instructRoutineBegin
(
snapshot
));
t
rials2Loop
Scheduler
.
add
(
instructRoutineEachFrame
(
snapshot
));
t
rials2Loop
Scheduler
.
add
(
instructRoutineEnd
(
snapshot
));
t
his
Scheduler
.
add
(
importConditions
(
snapshot
));
t
his
Scheduler
.
add
(
instructRoutineBegin
(
snapshot
));
t
his
Scheduler
.
add
(
instructRoutineEachFrame
(
snapshot
));
t
his
Scheduler
.
add
(
instructRoutineEnd
(
snapshot
));
const
trials1LoopScheduler
=
new
Scheduler
(
psychoJS
);
t
rials2Loop
Scheduler
.
add
(
trials1LoopBegin
,
trials1LoopScheduler
);
t
rials2Loop
Scheduler
.
add
(
trials1LoopScheduler
);
t
rials2Loop
Scheduler
.
add
(
trials1LoopEnd
);
t
rials2LoopScheduler
.
add
(
endLoopIteration
(
trials2Loop
Scheduler
,
snapshot
));
t
his
Scheduler
.
add
(
trials1LoopBegin
,
trials1LoopScheduler
);
t
his
Scheduler
.
add
(
trials1LoopScheduler
);
t
his
Scheduler
.
add
(
trials1LoopEnd
);
t
hisScheduler
.
add
(
endLoopIteration
(
this
Scheduler
,
snapshot
));
}
return
Scheduler
.
Event
.
NEXT
;
...
...
@@ -180,7 +174,7 @@ function trials2LoopBegin(trials2LoopScheduler) {
var
trials1
;
function
trials1LoopBegin
(
t
rials1Loop
Scheduler
)
{
function
trials1LoopBegin
(
t
his
Scheduler
)
{
// set up handler to look after randomisation of conditions etc
trials1
=
new
TrialHandler
({
psychoJS
:
psychoJS
,
...
...
@@ -195,11 +189,11 @@ function trials1LoopBegin(trials1LoopScheduler) {
// Schedule all the trials in the trialList:
for
(
const
thisTrials1
of
trials1
)
{
const
snapshot
=
trials1
.
getSnapshot
();
t
rials1Loop
Scheduler
.
add
(
importConditions
(
snapshot
));
t
rials1Loop
Scheduler
.
add
(
trialRoutineBegin
(
snapshot
));
t
rials1Loop
Scheduler
.
add
(
trialRoutineEachFrame
(
snapshot
));
t
rials1Loop
Scheduler
.
add
(
trialRoutineEnd
(
snapshot
));
t
rials1LoopScheduler
.
add
(
endLoopIteration
(
trials1Loop
Scheduler
,
snapshot
));
t
his
Scheduler
.
add
(
importConditions
(
snapshot
));
t
his
Scheduler
.
add
(
trialRoutineBegin
(
snapshot
));
t
his
Scheduler
.
add
(
trialRoutineEachFrame
(
snapshot
));
t
his
Scheduler
.
add
(
trialRoutineEnd
(
snapshot
));
t
hisScheduler
.
add
(
endLoopIteration
(
this
Scheduler
,
snapshot
));
}
return
Scheduler
.
Event
.
NEXT
;
...
...
@@ -224,7 +218,7 @@ var t;
var
frameN
;
var
_ready_allKeys
;
var
instructComponents
;
function
instructRoutineBegin
(
snapshot
)
{
function
instructRoutineBegin
(
trials
)
{
return
function
()
{
//------Prepare to start Routine 'instruct'-------
t
=
0
;
...
...
@@ -242,16 +236,14 @@ function instructRoutineBegin(snapshot) {
for
(
const
thisComponent
of
instructComponents
)
if
(
'status'
in
thisComponent
)
thisComponent
.
status
=
PsychoJS
.
Status
.
NOT_STARTED
;
// check if the Routine should terminate
if
(
!
continueRoutine
)
{
// a component has requested a forced-end of Routine
return
Scheduler
.
Event
.
NEXT
;
}
return
Scheduler
.
Event
.
NEXT
;
};
}
var
continueRoutine
;
function
instructRoutineEachFrame
(
snapshot
)
{
function
instructRoutineEachFrame
(
trials
)
{
return
function
()
{
//------Loop for each frame of Routine 'instruct'-------
let
continueRoutine
=
true
;
// until we're told otherwise
...
...
@@ -320,7 +312,7 @@ function instructRoutineEachFrame(snapshot) {
}
function
instructRoutineEnd
(
snapshot
)
{
function
instructRoutineEnd
(
trials
)
{
return
function
()
{
//------Ending Routine 'instruct'-------
for
(
const
thisComponent
of
instructComponents
)
{
...
...
@@ -339,7 +331,7 @@ function instructRoutineEnd(snapshot) {
var
_resp_allKeys
;
var
number_correct
;
var
trialComponents
;
function
trialRoutineBegin
(
snapshot
)
{
function
trialRoutineBegin
(
trials
)
{
return
function
()
{
//------Prepare to start Routine 'trial'-------
t
=
0
;
...
...
@@ -363,15 +355,13 @@ function trialRoutineBegin(snapshot) {
for
(
const
thisComponent
of
trialComponents
)
if
(
'status'
in
thisComponent
)
thisComponent
.
status
=
PsychoJS
.
Status
.
NOT_STARTED
;
// check if the Routine should terminate
if
(
!
continueRoutine
)
{
// a component has requested a forced-end of Routine
return
Scheduler
.
Event
.
NEXT
;
}
return
Scheduler
.
Event
.
NEXT
;
};
}
function
trialRoutineEachFrame
(
snapshot
)
{
function
trialRoutineEachFrame
(
trials
)
{
return
function
()
{
//------Loop for each frame of Routine 'trial'-------
let
continueRoutine
=
true
;
// until we're told otherwise
...
...
@@ -446,7 +436,7 @@ function trialRoutineEachFrame(snapshot) {
}
function
trialRoutineEnd
(
snapshot
)
{
function
trialRoutineEnd
(
trials
)
{
return
function
()
{
//------Ending Routine 'trial'-------
for
(
const
thisComponent
of
trialComponents
)
{
...
...
@@ -497,7 +487,7 @@ function trialRoutineEnd(snapshot) {
var
thanksComponents
;
function
thanksRoutineBegin
(
snapshot
)
{
function
thanksRoutineBegin
(
trials
)
{
return
function
()
{
//------Prepare to start Routine 'thanks'-------
t
=
0
;
...
...
@@ -512,16 +502,14 @@ function thanksRoutineBegin(snapshot) {
for
(
const
thisComponent
of
thanksComponents
)
if
(
'status'
in
thisComponent
)
thisComponent
.
status
=
PsychoJS
.
Status
.
NOT_STARTED
;
// check if the Routine should terminate
if
(
!
continueRoutine
)
{
// a component has requested a forced-end of Routine
return
Scheduler
.
Event
.
NEXT
;
}
return
Scheduler
.
Event
.
NEXT
;
};
}
var
frameRemains
;
function
thanksRoutineEachFrame
(
snapshot
)
{
function
thanksRoutineEachFrame
(
trials
)
{
return
function
()
{
//------Loop for each frame of Routine 'thanks'-------
let
continueRoutine
=
true
;
// until we're told otherwise
...
...
@@ -540,7 +528,7 @@ function thanksRoutineEachFrame(snapshot) {
}
frameRemains
=
0.0
+
2.0
-
psychoJS
.
window
.
monitorFramePeriod
*
0.75
;
// most of one frame period left
if
(
(
thanksText
.
status
===
PsychoJS
.
Status
.
STARTED
||
thanksText
.
status
===
PsychoJS
.
Status
.
FINISHED
)
&&
t
>=
frameRemains
)
{
if
(
thanksText
.
status
===
PsychoJS
.
Status
.
STARTED
&&
t
>=
frameRemains
)
{
thanksText
.
setAutoDraw
(
false
);
}
// check for quit (typically the Esc key)
...
...
@@ -570,7 +558,7 @@ function thanksRoutineEachFrame(snapshot) {
}
function
thanksRoutineEnd
(
snapshot
)
{
function
thanksRoutineEnd
(
trials
)
{
return
function
()
{
//------Ending Routine 'thanks'-------
for
(
const
thisComponent
of
thanksComponents
)
{
...
...
@@ -583,21 +571,21 @@ function thanksRoutineEnd(snapshot) {
}
function
endLoopIteration
(
scheduler
,
snapshot
)
{
function
endLoopIteration
(
thisScheduler
,
loop
)
{
// ------Prepare for next entry------
return
function
()
{
if
(
typeof
snapshot
!==
'undefined'
)
{
if
(
typeof
loop
!==
'undefined'
)
{
// ------Check if user ended loop early------
if
(
snapshot
.
finished
)
{
if
(
loop
.
finished
)
{
// Check for and save orphaned data
if
(
psychoJS
.
experiment
.
isEntryEmpty
())
{
psychoJS
.
experiment
.
nextEntry
(
snapshot
);
psychoJS
.
experiment
.
nextEntry
(
loop
);
}
s
cheduler
.
stop
();
thisS
cheduler
.
stop
();
}
else
{
const
thisTrial
=
snapshot
.
getCurrentTrial
();
const
thisTrial
=
loop
.
getCurrentTrial
();
if
(
typeof
thisTrial
===
'undefined'
||
!
(
'isTrials'
in
thisTrial
)
||
thisTrial
.
isTrials
)
{
psychoJS
.
experiment
.
nextEntry
(
snapshot
);
psychoJS
.
experiment
.
nextEntry
(
loop
);
}
}
return
Scheduler
.
Event
.
NEXT
;
...
...
@@ -606,9 +594,9 @@ function endLoopIteration(scheduler, snapshot) {
}
function
importConditions
(
currentLoop
)
{
function
importConditions
(
trials
)
{
return
function
()
{
psychoJS
.
importAttributes
(
currentLoop
.
getCurrentTrial
());
psychoJS
.
importAttributes
(
trials
.
getCurrentTrial
());
return
Scheduler
.
Event
.
NEXT
;
};
}
...
...
html/index.html
View file @
8e967b63
...
...
@@ -18,12 +18,12 @@
<script
type=
"text/javascript"
src=
"https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.0/jquery.min.js"
></script>
<script
type=
"text/javascript"
src=
"https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"
></script>
<script
type=
"text/javascript"
src=
"https://cdnjs.cloudflare.com/ajax/libs/seedrandom/3.0.1/seedrandom.min.js"
></script>
<script
type=
"text/javascript"
src=
"https://cdnjs.cloudflare.com/ajax/libs/pixi.js/
5.3.3
/pixi.min.js"
></script>
<script
type=
"text/javascript"
src=
"https://cdnjs.cloudflare.com/ajax/libs/pixi.js/
4.8.7
/pixi.min.js"
></script>
<script
type=
"text/javascript"
src=
"https://cdnjs.cloudflare.com/ajax/libs/PreloadJS/1.0.1/preloadjs.min.js"
></script>
<script
type=
"text/javascript"
src=
"https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.24.0/moment.min.js"
></script>
<script
type=
"text/javascript"
src=
"https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.14.2/xlsx.full.min.js"
></script>
<script
type=
"text/javascript"
src=
"https://cdnjs.cloudflare.com/ajax/libs/log4javascript/1.4.9/log4javascript.min.js"
></script>
<script
type=
"text/javascript"
src=
"https://cdnjs.cloudflare.com/ajax/libs/tone/1
4.7.61/Tone
.js"
></script>
<script
type=
"text/javascript"
src=
"https://cdnjs.cloudflare.com/ajax/libs/tone/1
3.8.6/Tone.min
.js"
></script>
<script
type=
"text/javascript"
src=
"https://cdnjs.cloudflare.com/ajax/libs/howler/2.1.2/howler.min.js"
></script>
<script
type=
"text/javascript"
src=
"https://cdnjs.cloudflare.com/ajax/libs/pako/1.0.10/pako.min.js"
></script>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment