URL of experiment: https://pavlovia.org/Wake/ebbinghaus-darts
Description of the problem:
I now have an experiment that doesn’t give an explicit error message but it doesn’t work either. There is supposed to be a yellow circle surrounded by 6 to 12 white circles. I’m currently using builder components for both. The code in the javascript looks like this.
// Initialize components for Routine "trial_components"
flanker_1 = new visual.Polygon ({
win: psychoJS.window, name: 'flanker_1',
edges: 36, size:[1.0, 1.0],
ori: 0, pos: [0, 0],
lineWidth: 1, lineColor: new util.Color([(- 1.0), (- 1.0), (- 1.0)]),
fillColor: new util.Color([1.0, 1.0, 1.0]),
opacity: 1, depth: -4, interpolate: true,
});
target = new visual.Polygon ({
win: psychoJS.window, name: 'target',
edges: 36, size:[(scale * dtarget), (scale * dtarget)],
ori: 0, pos: [0, 0],
lineWidth: 1, lineColor: new util.Color([(- 1), (- 1), (- 1)]),
fillColor: new util.Color(1.0),
opacity: 1, depth: -5, interpolate: true,
});
// update component parameters for each repeat
for (var Idx = 0, _pj_a = 12; (Idx < _pj_a); Idx += 1) {
pic.push([((scale * cos((((Idx * 2) * pi) / nflankers))) * ((dtarget + offset) + (dflanker / 2))), (voffset + ((scale * sin((((Idx * 2) * pi) / nflankers))) * ((dtarget + offset) + (dflanker / 2))))]);
}
flanker_1.setPos(pic[0]);
flanker_1.setSize([(scale * dflanker), (scale * dflanker)]);
// *flanker_1* updates
if (t >= 0.0 && flanker_1.status === PsychoJS.Status.NOT_STARTED) {
// keep track of start time/frame for later
flanker_1.tStart = t; // (not accounting for frame time here)
flanker_1.frameNStart = frameN; // exact frame index
flanker_1.setAutoDraw(true);
}
// *target* updates
if (t >= 0.0 && target.status === PsychoJS.Status.NOT_STARTED) {
// keep track of start time/frame for later
target.tStart = t; // (not accounting for frame time here)
target.frameNStart = frameN; // exact frame index
target.setAutoDraw(true);
}
Also, the dart displays correctly at the start of the routine but then disappears as soon as it is touched.
dart = new visual.ImageStim({
win : psychoJS.window,
name : 'dart', units : undefined,
image : 'dandelion_dart.png', mask : undefined,
ori : 0, pos : [0, 0], size : 1.0,
color : new util.Color([1, 1, 1]), opacity : 1,
flipHoriz : false, flipVert : false,
texRes : 128, interpolate : true, depth : -17.0
});
dartpos = [0, (- 0.35)];
dartsize = [0.25, 0.25];
dartv = [0, 0];
dartoldpos = [0, (- 0.35)];
dart.setPos(dartpos);
dart.setSize(dartsize);
// *dart* updates
if (t >= 0.0 && dart.status === PsychoJS.Status.NOT_STARTED) {
// keep track of start time/frame for later
dart.tStart = t; // (not accounting for frame time here)
dart.frameNStart = frameN; // exact frame index
dart.setAutoDraw(true);
}
Happy Easter
Wakefield