mwg API
    Preparing search index...

    Function splitSvgGroups

    • An SVG authored with named <g id="..."> groups loads as one standalone SVG per group - the natural authoring form for a skeletal puppet: one drawing, one source of truth for palette and style, split at load. Each part keeps the original <svg> root attributes (viewBox included) and carries exactly one group's children.

      Refused by name: an empty id, a duplicate id, and any group the scan cannot balance.

      Parameters

      • source: string

      Returns Record<string, string>