Cylinder shape supports different materials for Top, Bottom and Side parts and may be adjusted according the provided images. The settings are:
- Height - the height of the cylinder
- Radius - the radius of the cylinder
- Segments - defines the level of details of the cylinders. The higher this number, the smoother the cylinder.
- Curve top/bottom - controls the curve level of cylinder’s caps.
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();