dither_animal library
Backwards-compatibility entry point for dither_animals.
Prefer importing package:dither_animals/dither_animals.dart instead.
Classes
- AnimalArt
- AnimalMotion
- A personality: how one animal builds in, idles, blinks and dissolves.
- AnimalStudioPage
- Live dot-style, theme and haptics playground for any animal: change the dot shape, density, size and resolution and watch the owl update instantly.
- BodyPose
- Whole-body transform, in 100-space. Rotation in radians.
- DetailSpec
- Vector detail overlay. kind: 0 dark line, 1 dark fill, 2 white line, 3 white fill, 4 blush fill. Drawn crisp over the dots and follows the warp.
- DitherAnimal
- A cute animal rendered as animated ordered-dither stipple dots.
- DitherHooks
- Event hooks, e.g. for haptics, sound or analytics. Every callback is optional and gets the animal that fired it.
- DitherPet
- A simple, easy-to-use wrapper around DitherAnimal.
- DitherPetState
- Public state for DitherPet — access via GlobalKey<DitherPetState>.
- DitherTheme
- ExprFace
-
Where the face parts sit on the 100x100 art canvas. The table
kExprFacesis generated for every animal (expression_faces.dart); animals whose mouth is a special shape (beaks, snouts...) keep their drawn mouth. - ExprParams
- Numbers that describe one face. Expressions are blended by lerping these, so changing expression is a smooth morph, not a pop.
- EyeSpec
- A round eye drawn by the painter (center + radius, 100-space).
- ShapeLayer
Enums
- DitherAnimalType
- DitherColorMode
- How dot colors are chosen.
- DitherDot
- Shape of every dot. hex and diamond are drawn as filled polygons.
- DitherExpression
- Facial expressions, available on every animal (see kExprFaces). neutral is the original, untouched face.
- DitherMotion
- loop = build -> alive/idle -> dissolve -> repeat once = build, then stay alive forever
- DitherPart
- Body zones used by DitherColorMode.parts. Zones are found from where a dot sits on the 100x100 art canvas, so they work for every animal: ears = top corners, head = upper middle, sides = wings/arms/tails at the edges, feet = the bottom strip, body = everything else.
- PetDot
- Dot style presets — simple names instead of DitherDot enum values.
- PetMood
- Mood presets for DitherPet.mood.
- PetTheme
- Color/theme presets for DitherPet.
- RevealStyle
- How the dots appear (and disappear) for an animal.
Constants
-
kAnimalArt
→ const Map<
DitherAnimalType, AnimalArt> -
kDefaultMoodCycle
→ const List<
DitherExpression> -
kExprFaces
→ const Map<
DitherAnimalType, ExprFace> - Face layout of every animal (for facial expressions).
-
kExprParams
→ const Map<
DitherExpression, ExprParams> -
kMoodCycle
→ const Map<
DitherAnimalType, List< DitherExpression> > -
Mood script used by
autoMood: the animal drifts through these on its own.