Best way to "birth" a visual object/patch

effixx's picture

What would be the best way to do something as simple as adding an INSTANCE of a visual object on demand...

For example, let's say I wanted to create an instance of an existing sprite or even a circle or sphere on mouse click.

Or another example, if I wanted to draw a path/line from one mouse click point to another...

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

jstrecker's picture
Re: Best way to "birth" a visual object/patch

Try queue or particle system.

jrs's picture
Re: Best way to "birth" a visual object/patch

Search the apple mailing list for OOP - there is a thread started by memo that got pretty detailed talking about this stuff - there were also some great compositions posted by memo and others for doing these types of scenario with java script

usefuldesign.au's picture
Re: Best way to "birth" a visual object/patch

The Kineme GL Structure Renderer patch is worth looking at, as well as the obvious choice the Iterator patch. Use Javascript or queue patches to generate the instance location/transformation matrix.

effixx's picture
Re: Best way to "birth" a visual object/patch

Excellent, thanks everybody. I think I'm on the right path.

I couldn't find the beginning of the apple mailing list thread, however this really simple example is really helpful in accomplishing what ya'll are describing in terms of writing mouse coordinates to a structure on click:

http://www.zugakousaku.com/en/particle-using-by-javascript/

Also, I've tried to do my research on this topic and found another thread about it but couldn't get to a solution... what the hell is up with mouse events in QC? I'm using Snow Leopard/QC4 and besides there not really being comprehensive mouse event handlers, the Left Mouse that fires in the Mouse patch is so. freaking. wonky.