You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am currently working on an experiment where I am creating canvas drawings of different shapes. Currently I wrote separate functions to create the different shapes. For example function ( ) drawTriangle draws a triangle for a trial, function ( ) drawRect ( ) draws a rectangle, etc. I need to do this for a number of polygons so I was wondering if there's a clever way to compress it.
Also, is there a way in jsPsych to make an array of the canvas objects? I need to iterate over them.
This discussion was converted from issue #1352 on January 19, 2021 17:13.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am currently working on an experiment where I am creating canvas drawings of different shapes. Currently I wrote separate functions to create the different shapes. For example function ( ) drawTriangle draws a triangle for a trial, function ( ) drawRect ( ) draws a rectangle, etc. I need to do this for a number of polygons so I was wondering if there's a clever way to compress it.
Also, is there a way in jsPsych to make an array of the canvas objects? I need to iterate over them.
Beta Was this translation helpful? Give feedback.
All reactions