-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.html
94 lines (81 loc) · 3.41 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<!DOCTYPE html>
<html>
<head>
<!-- Title shown in tab -->
<title>Illusion Game</title>
<!-- Load all necessary plugins -->
<script src="https://unpkg.com/jspsych"></script>
<script src="https://unpkg.com/@jspsych/plugin-fullscreen"></script>
<script src="https://unpkg.com/@jspsych/plugin-preload"></script>
<script src="https://unpkg.com/@jspsych/plugin-html-keyboard-response"></script>
<script src="https://unpkg.com/@jspsych/plugin-html-button-response"></script>
<script src="https://unpkg.com/@jspsych/plugin-image-keyboard-response"></script>
<!-- Load Illusion Game scripts -->
<!-- <script src="https://realitybending.github.io/IllusionGame/v3/stimuli/stimuli_training.js"></script>
<script src="https://realitybending.github.io/IllusionGame/v3/stimuli/stimuli_part1.js"></script>
<script src="https://realitybending.github.io/IllusionGame/v3/stimuli/stimuli_part2.js"></script>
<script src="https://realitybending.github.io/IllusionGame/v3/instructions.js"></script>
<script src="https://realitybending.github.io/IllusionGame/v3/IllusionGame.js"></script> -->
<script src="v3/stimuli/stimuli_training.js"></script>
<script src="v3/stimuli/stimuli_part1.js"></script>
<script src="v3/stimuli/stimuli_part2.js"></script>
<script src="v3/instructions.js"></script>
<script src="v3/IllusionGame.js"></script>
<link
href="https://unpkg.com/jspsych/css/jspsych.css"
rel="stylesheet"
type="text/css"
/>
<style>
/* set canvas to be full screen */
.jspsych-content {
max-width: 100%;
}
/*Hide scrollbar while keeping it functional */
body {
overflow-y: scroll;
}
Body::-webkit-scrollbar {
display: none;
}
</style>
</head>
<body></body>
<script>
// Initialize experiment =================================================
var timeline = []
var jsPsych = initJsPsych({
on_finish: function () {
// Display data in browser (useful for debugging)
jsPsych.data.displayData("json")
},
})
// Enter fullscreen mode
timeline.push({
type: jsPsychFullscreen,
fullscreen_mode: true,
delay_after: 0,
})
// Test
// timeline.push(IG_create_block(stimuli_part1, (show_marker = false)))
// Illusion Game =======================================================
timeline.push(ig_practice)
// Randomize order of the 2 parts
for (var task of jsPsych.randomization.shuffleNoRepeats([
IG_create_block(stimuli_part1, (show_marker = false)),
IG_create_block(stimuli_part2, (show_marker = false)),
])) {
timeline.push(task)
}
// End =================================================================
// Exit fullscreen mode
timeline.push({
type: jsPsychFullscreen,
fullscreen_mode: false,
})
/* ----------------- Run the timeline ----------------- */
jsPsych.run(timeline)
// jsPsych.simulate(timeline, "visual")
// jsPsych.simulate(timeline, "data-only")
</script>
</html>