konfeti - v0.6.0
    Preparing search index...

    Type Alias PathShapeOptions

    PathShapeOptions: ShapeEntryBase & {
        path: OneOrMany<string | Path2D>;
        size?: Range<Pixels>;
        type: "path";
        viewBox?: readonly [width: number, height: number];
    }

    Custom Vector Path Shape Entry. Draws any SVG path (d attribute) or Path2D, filled with the particle color.

    Type Declaration

    • Readonlypath: OneOrMany<string | Path2D>

      SVG Path Data or Path2D. A list picks one per particle.

    • Optional Readonlysize?: Range<Pixels>

      Rendered Size (longer side of the view box).

      [12, 18]

    • Readonlytype: "path"

      Shape Type.

    • Optional ReadonlyviewBox?: readonly [width: number, height: number]

      Path Coordinate Box as [width, height]. The path is centered in this box and scaled so its longer side equals size.

      [24, 24]

    shapes: [{
    type: "path",
    path: "M12 2l3 7h7l-5.5 4 2 7-6.5-4.5L5.5 20l2-7L2 9h7z",
    viewBox: [24, 24],
    }]