Sphere shape options object that extends OBJ_Generic3All and OBJ_FigurePrimitive
By default, a sphere with its center at the origin will be created.
To test examples, append them to the boilerplate
figure.add({ make: 'sphere', radius: 0.5, color: [1, 0, 0, 1],}); Copy
figure.add({ make: 'sphere', radius: 0.5, color: [1, 0, 0, 1],});
// Sphere with 'curve' normalsfigure.add({ make: 'sphere', radius: 0.5, normals: 'curve', color: [1, 0, 0, 1],}); Copy
// Sphere with 'curve' normalsfigure.add({ make: 'sphere', radius: 0.5, normals: 'curve', color: [1, 0, 0, 1],});
// Wire mesh spherefigure.add({ make: 'sphere', radius: 0.5, sides: 30, lines: true, normals: 'curve', color: [1, 0, 0, 1],}); Copy
// Wire mesh spherefigure.add({ make: 'sphere', radius: 0.5, sides: 30, lines: true, normals: 'curve', color: [1, 0, 0, 1],});
// Ring of spheres, rotated to by in xz planefigure.add({ make: 'sphere', radius: 0.1, color: [1, 0, 0, 1], center: [0.3, 0, 0], normals: 'curve', copy: [ { along: 'rotation', num: 10, step: Math.PI * 2 / 10 }, ], transform: ['r', Math.PI / 2, 1, 0, 0],});@interface Copy
// Ring of spheres, rotated to by in xz planefigure.add({ make: 'sphere', radius: 0.1, color: [1, 0, 0, 1], center: [0.3, 0, 0], normals: 'curve', copy: [ { along: 'rotation', num: 10, step: Math.PI * 2 / 10 }, ], transform: ['r', Math.PI / 2, 1, 0, 0],});@interface
Sphere shape options object that extends OBJ_Generic3All and OBJ_FigurePrimitive
By default, a sphere with its center at the origin will be created.
See
To test examples, append them to the boilerplate
Example
Example
Example
Example