Possible to dynamically make gridshapes?

Lume's icon

Hello,
I'm wondering if it's possible to make gridshapes with input
from the mouse. I've included a patch with a script, which is
a modification of jitter tutorial 47.

There are some clues on these threads:
https://cycling74.com/forums/rendering-multiple-gridshapes-w-opengl-in-js
https://cycling74.com/forums/multiple-object-instances-with-javascript
but I guess I can't wrap my head around the syntax (I've never used prototyping before).

It might not even be possible, when I save I get the error message
"js jitter listener: can't make event object"

Any help or advice would be appreciated!

4936.callback.zip
zip
Lume's icon

Just wanted to add, on my system, tutorial 47 acts strangely.
When the mouse is idle, the sphere/torus moves back to the centre position.
I'm pretty sure it's not supposed to do this.
Anyone confirm if this is a bug? (else, a quirk of my system) ...

4937.callback.js
js
ssheridan's icon

I'm also interested in making a similar patch, and I've been having the same problem with the tutorial 47 patcher.

Lume's icon

Anybody else have the same problem or can comment on this matter?
I know that, with the second script I uploaded, the circles are being created,
they're just not being placed where the mouse cursor is.

As if there's a problem with event.args[0] and args[1].