Cylinder shape options object that extends OBJ_Generic3All and OBJ_FigurePrimitive
By default, a cylinder along the x axis will be created.
To test examples, append them to the boilerplate
figure.add({ make: 'cylinder', radius: 0.2, length: 0.5, sides: 20, color: [1, 0, 0, 1],}); Copy
figure.add({ make: 'cylinder', radius: 0.2, length: 0.5, sides: 20, color: [1, 0, 0, 1],});
// Use curve normals to give rounder looks for same number of sidesfigure.add({ make: 'cylinder', radius: 0.2, length: 0.5, sides: 20, normals: 'curve', color: [1, 0, 0, 1],}); Copy
// Use curve normals to give rounder looks for same number of sidesfigure.add({ make: 'cylinder', radius: 0.2, length: 0.5, sides: 20, normals: 'curve', color: [1, 0, 0, 1],});
// Wire mesh cylinderfigure.add({ make: 'cylinder', radius: 0.2, length: 0.2, lines: true, sides: 50, ends: false, color: [1, 0, 0, 1],}); Copy
// Wire mesh cylinderfigure.add({ make: 'cylinder', radius: 0.2, length: 0.2, lines: true, sides: 50, ends: false, color: [1, 0, 0, 1],});
// Three cylinders as x, y, z axesfigure.add([ { make: 'cylinder', radius: 0.02, line: [[0, 0, 0], [0.5, 0, 0]], color: [1, 0, 0, 1], }, { make: 'cylinder', radius: 0.02, line: [[0, 0, 0], [0, 0.5, 0]], color: [0, 1, 0, 1], }, { make: 'cylinder', radius: 0.02, line: [[0, 0, 0], [0, 0, 0.5]], color: [0, 0, 1, 1], },]);@interface Copy
// Three cylinders as x, y, z axesfigure.add([ { make: 'cylinder', radius: 0.02, line: [[0, 0, 0], [0.5, 0, 0]], color: [1, 0, 0, 1], }, { make: 'cylinder', radius: 0.02, line: [[0, 0, 0], [0, 0.5, 0]], color: [0, 1, 0, 1], }, { make: 'cylinder', radius: 0.02, line: [[0, 0, 0], [0, 0, 0.5]], color: [0, 0, 1, 1], },]);@interface
Cylinder shape options object that extends OBJ_Generic3All and OBJ_FigurePrimitive
By default, a cylinder along the x axis will be created.
See
To test examples, append them to the boilerplate
Example
Example
Example
Example