figureone
    Preparing search index...

    Cone shape options object that extends OBJ_Generic3All and OBJ_FigurePrimitive

    By default, a cone with its base at the origin and its tip along the x axis will be created.

    • sides number — number of sides (10)
    • radius number — radius of cube base
    • normals flat | curveflat normals will make light shading across a face cone constant. curve will gradiate the shading. Use curve to make a surface look more round with fewer number of sides. (flat)
    • line TypeParsableLine — line that can position and orient the cone. First point of line is cone base center, and second point is cone tip.
    • length number — length of the cone along the x axis if line isn't defined (1)
    • rotation number — rotation of base - this is only noticable for small numbers of sides (0) points of cube
    • lines boolean — if true then points representing the edes of the faces will be returned. If false, then points representing two triangles per face and an associated normal for each point will be returned.

    To test examples, append them to the boilerplate

    figure.add({
    make: 'cone',
    radius: 0.2,
    sides: 20,
    color: [1, 0, 0, 1],
    line: [[0, 0, 0], [0, 0.5, 0]],
    });
    // Cone with curve normals
    figure.add({
    make: 'cone',
    radius: 0.2,
    normals: 'curve',
    sides: 20,
    color: [1, 0, 0, 1],
    line: [[0, 0, 0], [0, 0.5, 0]],
    });
    // Wire mesh cone
    figure.add({
    make: 'cone',
    radius: 0.2,
    normals: 'curve',
    sides: 20,
    color: [1, 0, 0, 1],
    line: [[0, 0, 0], [0, 0.5, 0]],
    lines: true,
    });
    @interface