In addition to defining the shape of an on-the-fly object, you can also use vertices to define its size and color. Check out the following section for information on changing vertex parameters dynamically (or after the layer has already been created).
Note: To manipulate an on-the-fly object as a whole, use the commands you would use with any 3d object (<node3d>.setPosition, <node3d>.setScale, <node3d>.color, etc.).
To set vertex color, include viz.vertexColor([r,g,b]) before the vertices you want to effect. Replace [r,g,b] with the color values you want. All the vertices after this command will be effected unless you add another viz.vertexColor([r,g,b]).
If your layer is a group of points, use viz.pointSize(<size>) between the viz.startLayer and viz.endLayer commands, replacing <size> with the desired width in pixels.
If your layer consists of lines, use viz.lineWidth(size) between the viz.startLayer and viz.endLayer commands, replacing <size> with the desired width in pixels.
Include viz.texCoord([x,y]) before adding each vertex for which you want to apply a texture coordinate. Replace [x,y] with the texture coordinates for that vertex.
Creating 3D models on-the-fly-- the basics
Creating models on-the-fly command table