Commit 0d05da8f authored by Julian Kirkeby Lysvik's avatar Julian Kirkeby Lysvik

First commit

parent b51cdb3b
......@@ -2,13 +2,13 @@
* Experiment2_B Test *
**********************/
import { PsychoJS } from './lib/core-3.0.3.js';
import * as core from './lib/core-3.0.3.js';
import { TrialHandler } from './lib/data-3.0.3.js';
import { Scheduler } from './lib/util-3.0.3.js';
import * as util from './lib/util-3.0.3.js';
import * as visual from './lib/visual-3.0.3.js';
import { Sound } from './lib/sound-3.0.3.js';
import { PsychoJS } from './lib/core-3.0.4.js';
import * as core from './lib/core-3.0.4.js';
import { TrialHandler } from './lib/data-3.0.4.js';
import { Scheduler } from './lib/util-3.0.4.js';
import * as util from './lib/util-3.0.4.js';
import * as visual from './lib/visual-3.0.4.js';
import { Sound } from './lib/sound-3.0.4.js';
// init psychoJS:
var psychoJS = new PsychoJS({
......@@ -19,7 +19,7 @@ var psychoJS = new PsychoJS({
psychoJS.openWindow({
fullscr: true,
color: new util.Color([1.0, 1.0, 1.0]),
units: 'use prefs'
units: 'height'
});
// store info about the experiment session:
......@@ -83,7 +83,7 @@ var frameDur;
function updateInfo() {
expInfo['date'] = util.MonotonicClock.getDateStr(); // add a simple timestamp
expInfo['expName'] = expName;
expInfo['psychopyVersion'] = '3.0.3';
expInfo['psychopyVersion'] = '3.0.4';
// store frame rate of monitor if we can measure it successfully
expInfo['frameRate'] = psychoJS.window.getActualFrameRate();
......@@ -514,7 +514,7 @@ function Instruction_IntroRoutineEnd() {
}
// check responses
if (['', [], undefined].indexOf(key_resp_1.keys) >= 0) { // No response was made
if (key_resp_1.keys === undefined || key_resp_1.keys.length === 0) { // No response was made
key_resp_1.keys = undefined;
}
......@@ -1014,7 +1014,7 @@ function Instruction_ProdRoutineEnd() {
}
// check responses
if (['', [], undefined].indexOf(key_resp_2.keys) >= 0) { // No response was made
if (key_resp_2.keys === undefined || key_resp_2.keys.length === 0) { // No response was made
key_resp_2.keys = undefined;
}
......@@ -1191,7 +1191,7 @@ function Test_ProdRoutineEnd() {
// check responses
if (['', [], undefined].indexOf(text_resp.keys) >= 0) { // No response was made
if (text_resp.keys === undefined || text_resp.keys.length === 0) { // No response was made
text_resp.keys = undefined;
}
......@@ -1312,7 +1312,7 @@ function Instruction_FCRoutineEnd() {
}
// check responses
if (['', [], undefined].indexOf(key_resp_4.keys) >= 0) { // No response was made
if (key_resp_4.keys === undefined || key_resp_4.keys.length === 0) { // No response was made
key_resp_4.keys = undefined;
}
......@@ -1517,7 +1517,7 @@ function Test_FCRoutineEnd() {
}
// check responses
if (['', [], undefined].indexOf(FC_resp.keys) >= 0) { // No response was made
if (FC_resp.keys === undefined || FC_resp.keys.length === 0) { // No response was made
FC_resp.keys = undefined;
}
......
......@@ -11,7 +11,7 @@ var psychoJS = new PsychoJS({
psychoJS.openWindow({
fullscr: true,
color: new util.Color([1.0, 1.0, 1.0]),
units: 'use prefs'
units: 'height'
});
// store info about the experiment session:
......@@ -75,7 +75,7 @@ var frameDur;
function updateInfo() {
expInfo['date'] = util.MonotonicClock.getDateStr(); // add a simple timestamp
expInfo['expName'] = expName;
expInfo['psychopyVersion'] = '3.0.3';
expInfo['psychopyVersion'] = '3.0.4';
// store frame rate of monitor if we can measure it successfully
expInfo['frameRate'] = psychoJS.window.getActualFrameRate();
......@@ -506,7 +506,7 @@ function Instruction_IntroRoutineEnd() {
}
// check responses
if (['', [], undefined].indexOf(key_resp_1.keys) >= 0) { // No response was made
if (key_resp_1.keys === undefined || key_resp_1.keys.length === 0) { // No response was made
key_resp_1.keys = undefined;
}
......@@ -1006,7 +1006,7 @@ function Instruction_ProdRoutineEnd() {
}
// check responses
if (['', [], undefined].indexOf(key_resp_2.keys) >= 0) { // No response was made
if (key_resp_2.keys === undefined || key_resp_2.keys.length === 0) { // No response was made
key_resp_2.keys = undefined;
}
......@@ -1183,7 +1183,7 @@ function Test_ProdRoutineEnd() {
// check responses
if (['', [], undefined].indexOf(text_resp.keys) >= 0) { // No response was made
if (text_resp.keys === undefined || text_resp.keys.length === 0) { // No response was made
text_resp.keys = undefined;
}
......@@ -1304,7 +1304,7 @@ function Instruction_FCRoutineEnd() {
}
// check responses
if (['', [], undefined].indexOf(key_resp_4.keys) >= 0) { // No response was made
if (key_resp_4.keys === undefined || key_resp_4.keys.length === 0) { // No response was made
key_resp_4.keys = undefined;
}
......@@ -1509,7 +1509,7 @@ function Test_FCRoutineEnd() {
}
// check responses
if (['', [], undefined].indexOf(FC_resp.keys) >= 0) { // No response was made
if (FC_resp.keys === undefined || FC_resp.keys.length === 0) { // No response was made
FC_resp.keys = undefined;
}
......
......@@ -4,6 +4,7 @@
<head>
<title>experiment2_b [PsychoPy]</title>
<meta charset="UTF-8">
<meta name="viewport" content="user-scalable=no">
<!-- external libraries -->
<script type="text/javascript" src="lib/vendors/jquery-2.2.0.min.js"></script>
......@@ -26,7 +27,7 @@
<div id="root"/>
<script type='module' src='./experiment2_b.js'></script>
<script nomodule type="text/javascript" src="lib/psychojs-3.0.3.js"></script>
<script nomodule type="text/javascript" src="lib/psychojs-3.0.4.js"></script>
<script nomodule type="text/javascript" src="./experiment2_bNoModule.js"></script>
</body>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment