Is there a way to change the color of already created primitive?
For example, in case CylinderGeometry we can initialize cylinder with custom material, and after that change material's color. Here's the working example of recoloring:
http://jsfiddle.net/kasheftin/Lzb52/2/I want to do the same thing with CylinderOutlineGeometry.
Let's try to change my example to achieve that:
1. If we just change CylinderGeometry to CylinderOutlineGeometry (
http://jsfiddle.net/kasheftin/Lzb52/3/), there's an exception: cylinderOulineGeometry does not support vertexFormat (vertexFormat is not a property of this geometry at all), but using MaterialAppearance in primitive requires it. So we can't use MaterialAppearance any more.
2. Let's check, what appearance might be used with CylinderOutlineGeometry. EllipsoidSurfaceAppearance requires vertexFormat.st, PolylineColorAppearance requires nextPosition3dLow. PerInstanceColorAppearance is the only supported one. But obviously this appearance does not include the color variable inside. Here's non-working example with it and with white wireframe:
http://jsfiddle.net/kasheftin/Lzb52/4/.
3. Changing geometry instance attributes after creating primitive does not affect it, it seems that init color value is copied somewhere.