added timer to survey

This commit is contained in:
Shaheed Azaad
2025-07-02 00:10:11 +02:00
parent 34239413b1
commit 9460d6247c
7 changed files with 1111 additions and 83 deletions

View File

@@ -160,9 +160,9 @@ class jsPsychObjectMoving {
}
function initiate_partner_action(){
const go_delay = trial.selector === 'participant' ? 1200 : 800
const partner_go_delay = jsPsych.randomization.sampleExGaussian(go_delay, 300, 1/100, true);
const partner_teleport_delay = jsPsych.randomization.sampleExGaussian(1200, 200, 1/100, true);
const go_delay = trial.selector === 'participant' ? 1400 : 1000
const partner_go_delay = jsPsych.randomization.sampleExGaussian(go_delay, 500, 1/100, true);
const partner_teleport_delay = jsPsych.randomization.sampleExGaussian(1400, 300, 1/100, true);
setTimeout(() => {
change_object_colour(object_partner);

View File

@@ -15,10 +15,15 @@ const redImages = {
instructions_4: '/images/red/instructions_4.png',
};
const html = (strings, ...values) =>
strings
.reduce((result, str, i) => result + str + (values[i] || ''), '')
.trim();
import html from '../utils/html.js';
export const textStimuli = {
complete: html`Experiment complete. Please paste the following link into your browser to confirm completion on Prolific:
<span class="text-blue-500">
${import.meta.env.VITE_COMPLETE_URL}
</a>
`,
};
function getStimulusMap(together_colour) {
const colourMap = getColourMap(together_colour);
@@ -28,6 +33,23 @@ function getStimulusMap(together_colour) {
// Select the appropriate image map based on the color
const imageMap = together_colour === 'blue' ? blueImages : redImages;
stimulusMap.set('pre_survey_info', html`
<p class="leading-relaxed">
You will now answer a few questions about your experience in the experiment. It is important that you read the questions carefully and answer them honestly.
</p>
<p class ="leading-relaxed mt-2">
Nonsense or random answers may lead to your submission being rejected.
</p>
<p class="mt-6">
Press
<strong>SPACE</strong>
to continue.
</p>
`
);
stimulusMap.set(
'pre_consent_info',
html`