URL of experiment:
Description of the problem:
I’m building an experiment and have a continue button that I make using a code component in builder.
It works fine locally but when I try to run it it on Pavlovia I get a “win is not defined error”. So I assume it’s ahving an issue with my code to build the rectangle below. I’m using PsychoJS auto converter. Could something be going wrong with he JS code?
Python code:
polygon = visual.Rect(
win = win,
name='polygon',
width=0.2, height=0.1,
ori=0, pos=(0.65, -.4),
lineWidth=1, lineColor=[1,1,1], lineColorSpace='rgb',
fillColor=[1,1,1], fillColorSpace='rgb',
opacity=1, depth=-1.0, interpolate=True)
JS code:
polygon = new visual.Rect({"win": win, "name": "polygon", "width": 0.2, "height": 0.1, "ori": 0, "pos": [0.65, (- 0.4)], "lineWidth": 1, "lineColor": [1, 1, 1], "lineColorSpace": "rgb", "fillColor": [1, 1, 1], "fillColorSpace": "rgb", "opacity": 1, "depth": (- 1.0), "interpolate": true});
Thanks for any help. If this doesn’t work, maybe I’ll switch to a spacebar press to continue.