I'm curious how one would go about creating dynamic instances of a shape in MaxMSP using either jit.gl.sketch, jit.gl.gridshape, or another object that might work. In other words, I want to create spheres using bangs with dynamic starting positions and movement based on input data (simulated or otherwise) using only one (or a couple) object(s).
In a scripting language I would do this by creating a class called MyShape and define the shape and variables that would control its position and movement. Then I would initialize the class and create one or more instances every time my trigger event happened using a for loop to give each instance a unique name: MyShape1, MyShape2, etc. After that my input data would govern the movement of the instances via variable set up in the class.
How would one do this in Max and with what objects? I'm guessing jit.gl.sketch would be best but I'm not sure. Could it be done with jit.gl.gridshape, or jit.gl.multiple? In this case I would most likely control the movement of the spheres via jit.anim.drive.