Polygon size changes after syncing

URL of experiment: garsiniss [PsychoPy]

Description of the problem: The experiment seems to work properly offline, but after syncing and running it online, the polygon size changed, the fixation cross was oversized:

Though it supposed to be much smaller (I’ve set it to (1, 1) deg). And I set the duration of this routine between 1 and 2 seconds with this code: randDuration = Math.floor(Math.random() * (2 * 1000 - 1 * 1000) + 1 * 1000) / (1*1000); It worked perfectly offline too, but this duration seemed to be messed up when online, the routine just didn’t end. What could be the problem?

I’ve tried debugging the problem, but the console just showed that polygon size is undefined:


In python, I define a random duration in the following manner

randDuration = random()*(2-1)+1

to get random durations lasting between 1 and 2 seconds.

Any particular reason why you use degree? See here for some information about screen units

Best wishes Jens

The duration needs to be defined with JS code in order to sync experiment with pavlovia (maybe I didn’t understand something, correct me if I’m wrong). I used degrees because it’s pretty convenient, and worked offline. But I could just convert them to any other unit. Is there any other size unit that would work with pavlovia? Thank you


PsychoPy should auto-translate the Python-Code to PsychoJS.

Best wishes.

Cross-linking other thread by mykolas. Polygon size and location undefined - #2 by thomas_pronk