mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-12 16:48:12 +00:00
removed testing html
This commit is contained in:
parent
24d391fb51
commit
c813314f98
@ -1,51 +0,0 @@
|
|||||||
<head>
|
|
||||||
<script src="jspsych.js"></script>
|
|
||||||
<script src="plugins/jspsych-canvas-keyboard-response.js"></script>
|
|
||||||
<script src="plugins/jspsych-canvas-button-response.js"></script>
|
|
||||||
<script src="plugins/jspsych-canvas-slider-response.js"></script>
|
|
||||||
<link href="css/jspsych.css" rel="stylesheet" type="text/css">
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<script>
|
|
||||||
function draw_rect(c) {
|
|
||||||
let ctx = c.getContext("2d");
|
|
||||||
ctx.fillRect(25, 25, 100, 100);
|
|
||||||
}
|
|
||||||
|
|
||||||
let timeline = [];
|
|
||||||
|
|
||||||
let keyboardTrial = {
|
|
||||||
type: 'canvas-keyboard-response',
|
|
||||||
stimulus: draw_rect,
|
|
||||||
prompt: "<p>look it's a rectangle!</p>"
|
|
||||||
}
|
|
||||||
|
|
||||||
timeline.push(keyboardTrial)
|
|
||||||
|
|
||||||
let buttonTrial = {
|
|
||||||
type: 'canvas-button-response',
|
|
||||||
stimulus: draw_rect,
|
|
||||||
choices: ["yes","no"],
|
|
||||||
prompt: "<p>is this a rectangle?</p>"
|
|
||||||
}
|
|
||||||
|
|
||||||
timeline.push(buttonTrial)
|
|
||||||
|
|
||||||
let sliderTrial = {
|
|
||||||
type: 'canvas-slider-response',
|
|
||||||
stimulus: draw_rect,
|
|
||||||
prompt: "<p>very rectangle?</p>"
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
timeline.push(sliderTrial)
|
|
||||||
|
|
||||||
jsPsych.init({
|
|
||||||
timeline: timeline,
|
|
||||||
on_trial_finish: function(data){console.log(data)}
|
|
||||||
})
|
|
||||||
|
|
||||||
</script>
|
|
||||||
</body>
|
|
Loading…
Reference in New Issue
Block a user