Cylinder shape supports different materials for Top, Bottom and Side parts and may be adjusted according the provided images. The settings are:
Click the “Fit to images” button on the object’s properties page to set the Height and Radius properties automatically, according to the loaded images.
Here is a sample script that creates a cylinder object:
var m = scene.root.addMesh("cylinder", "generator.simple.cylinder"); var g = m.generator; g.height = 10; g.radius = 5; g.segments = 16; g.topCurve = 0.3; g.bottomCurve = 0; g.fitToImages();