| Reference | Downloads | Github

Drawing using the mouse as a brush


URL of experiment:
Code in:

Dear all!
I’m trying to run an online experiment in which the subject has to draw some figures with the mouse (see GIF below).
Nothing really complicated: I created the python code, I imported in the builder, and now I’m trying to create the online experiment.
Everything is working, except I have an annoying closing effect, in which the code tries to close the polygon I create (run the online experiment and you’ll see it).
I checked: any browser does that.

Any suggestion?

Thanks in advance!


1 Like

Very nice job of what you’ve done so far! :slight_smile: When this works I think we should definitely include it as a demo of what can be achieved with a bit of code (if that’s OK with you?)!

ShapeStim in PsychoPy has an argument closeShape which defaults to True

and it looks like that has been implemented identically in PsychoJS:


Amazing @jon! It’s working inserting closeShape: false .
Thanks a lot!
It’s strange that with python (builder or code) it’s working anyway, even if the default is closeShape=True.

Of course you can use it: I would be proud of it!! :slight_smile:
Let me share also the python code for the #coder mode:


Thanks. Actually, I’m thinking a step further now - your code coud be the beginning of a Pen Component in Builder!

1 Like