konfeti - v0.6.0
    Preparing search index...

    Type Alias ShapeHandler<TEntry>

    Shape Handler. Turns one shapes[] entry into a resolved, spawnable shape. Built-in handlers (starShape, emojiShape …) are registered automatically by konfeti; with konfeti/lite register only the ones you use.

    type ShapeHandler<TEntry extends { type: string }> = {
        resolve: (entry: TEntry, context: ShapeHandlerContext) => ResolvedShape;
        styleDefaults?: ShapeStyle;
        type: TEntry["type"];
    }

    Type Parameters

    • TEntry extends { type: string }
    Index
    resolve: (entry: TEntry, context: ShapeHandlerContext) => ResolvedShape

    Resolve Entry.

    styleDefaults?: ShapeStyle

    Style Defaults for This Type (below paper and entry styles).

    type: TEntry["type"]

    Handled Shape Type.