tabler library
The tabler icon pack as stroke_morph icon data.
Classes
- BlockTransport
- Block transport parameters, set by the global hybrid.
- CubicPath
-
Normalized subpath: a chain of cubics packed as points
[p0, c1, c2, p1, c1', c2', p2, …]→ a Float64List of length2·(3m+1), withmthe number of segments. Consecutive segments share an endpoint. - IconEl
-
One element of Lucide-style icon data: a
[tag, attrs]pair. - MorphController
- Drives one morphing icon.
- MorphIcon
- A stroke icon that morphs into any other stroke icon.
- MorphIconData
-
Input accepted by the core: either an IconNode or a raw
dattribute. - MorphIconState
- MorphPainter
- MorphPlan
- MorphTablerIcons
- Every tabler icon, as a named constant.
- NodeIcon
-
An icon given as Lucide-style
[tag, attrs]data. - PathIcon
-
An icon given as a raw
dattribute. - PlanItem
- Sampled
- Subpath sampled at N points by arc length, plus its topology.
- Spring
- SpringConfig
- A spring configuration: stiffness and damping.
- SvgDocument
- An SVG document reduced to what this library needs.
- SvgIcon
- Loads morphable icon data from SVG documents.
Enums
- SpringPreset
- Spring presets (ζ = c/(2√k)) with the API's public names.
Constants
Functions
-
allocOutputs(
MorphPlan plan) → List< Float64List> - Preallocated output buffers for a plan (zero allocation per frame).
-
buildCubicPath(
List< CubicPath> paths) → Path - Builds the exact cubic path of a normalized icon — the at-rest shape.
-
buildPlan(
List< Sampled> srcSubs, List<Sampled> dstSubs) → MorphPlan - Builds the morph plan between two lists of sampled subpaths. The plan is cacheable; it accepts any list — including intermediate shapes (interruptions).
-
canonicalD(
MorphIconData icon) → String -
Canonical
dattribute of an icon: a PathIcon's string verbatim, or a NodeIcon's real cubics quantized to 4 decimals. -
cubicsToPathD(
List< CubicPath> paths) → String -
Cubic subpaths → canonical
d, quantized to 4 decimals. -
dampingRatioOf(
SpringConfig spring) → double - ζ = c / (2√k): 1 is critically damped, below it overshoots, above it crawls.
-
fillPolyline(
Path path, List< Float64List> subs, List<bool> closed) → void -
Refills
pathwith the sampled subpaths — the in-flight shape. -
fitIcon(
MorphIconData input, Object viewBox, [double grid = 24]) → String -
Re-grids an icon drawn on
viewBoxonto the sharedgrid(24 by default), centred and preserving aspect ratio — the SVGxMidYMid meetrule. -
iconToCubics(
MorphIconData input) → List< CubicPath> - Icon (MorphIconData) → list of cubic subpaths.
-
interpLinear(
MorphPlan plan, double t, List< Float64List> out) → void - Raw coordinate lerp (same correspondence, no decomposition).
-
interpPolar(
MorphPlan plan, double t, List< Float64List> out) → void -
parseSvgDocument(
String source) → SvgDocument -
Parses an
<svg>document into drawable geometry and its coordinate space. -
resampleIcon(
MorphIconData input, [int n = 64]) → List< Sampled> - Full input pipeline: icon → cubics → sampled subpaths with their topology (the plan needs to know which subpaths are closed loops).
-
resamplePath(
CubicPath path, [int n = 64, double? cornerThreshold]) → Float64List -
Samples a cubic subpath at
npoints equidistant by arc length, anchoring corners and endpoints as exact samples. Returns aFloat64List(2n). Closed paths distribute n intervals around the loop (without duplicating the first point); the circular start-point freedom is resolved by the plan's circular correspondence. -
resolveSpring(
{SpringPreset? preset, double? stiffness, double? damping, Duration? duration}) → SpringConfig -
Resolves a spring the way the web driver's
resolveSpringdoes: a preset supplies the defaults, and either component may be overridden. -
serialize(
List< List< subs, [List<double> >bool> ? closed]) → String -
Sampled subpaths → polyline
dattribute.closed[k]appends Z to subpath k (closed loops in flight); without flags everything is open. -
springForDuration(
Duration duration, {SpringPreset? preset, double? dampingRatio}) → SpringConfig -
The spring that settles in
durationwhile keeping a damping ratio ofdampingRatio(default: the ratio ofpreset, or ofsnappy). -
springSettleTime(
SpringConfig spring) → Duration -
How long
springtakes to settle from rest, by the criterion the driver actually uses. The inverse of springForDuration, and what pins it. -
svgToIcon(
String source, {bool fit = true, double grid = 24}) → MorphIconData -
An
<svg>document → morphable icon data.
Typedefs
Exceptions / Errors
- StrokeMorphError
- Every error this library throws.