Pin types and colors
What a pin's type says, which wires fit, and how colors and handle shapes show it.
Every pin has a type: the kind of value it gives or takes, such as
number, Point or Circle. The type decides which wires fit, and the
editor shows it twice: as text next to the pin, and as the pin's color and
shape.

Which wires fit
A wire fits when the output's type is the input's type, or a subtype of it:
- a
Circleoutput connects to aCircle,ShapeorRenderableinput, since a circle is a shape and a shape is a renderable; each type's page shows its parents; - arrays follow their elements: an
Array<Circle>connects to anArray<Shape>input; - the Output and Group nodes'
objectsinput takes single objects or arrays of them; - there are no conversions:
PointandVec2don't connect to each other, nor does anumberto astringinput; - a choice (enum) only connects to the same choice.
While you drag a wire, the pins it fits are ringed and the others dimmed.
Colors
A pin's color says which family its type belongs to. A type takes the color of its nearest parent with one, so all shapes and lines are green, and so are types added later.
| Color | Family | Types |
|---|---|---|
| Numbers | number | |
| Booleans | boolean | |
| Text | string | |
| Choices (enums) | StrokeDash, StrokeCaps, StrokeJoin, EasingCurve, EasingMode, StepPosition, FontFallback, TextAlign, TextAnchor, BlendMode, WallpaperGroup, MetaballFalloff | |
| Points and vectors | Vec2, Point, PointScalar, PointVector | |
| Colors and strokes | Paint, Color, ColorStop, LinearGradient, RadialGradient, Stroke | |
| Bounding boxes | BoundingBox | |
| Shapes, lines and groups | Renderable, Shape, Line, Circle, Ellipse, Rectangle, Polygon, RegularPolygon, Text, ClosedSpline, Sector, Segment, Polyline, Arc, Bezier, Spline, Group, SvgImage | |
| Functions | Function(…) | |
| Generic, not set yet | T | |
| Other | Types without a family of their own |
Wires take the color of the output they come from.
Shapes
A pin's shape says what kind of value it holds:
| Handle | Pin | Example |
|---|---|---|
| circle | A single value | Point |
| square | An array (in its elements' color) | Array<Point> |
| diamond | A function | Function(T, number) -> (U) |
| square, hollow | A generic type not set yet | Array<T> |
See also
- Generic pins, for hollow pins.
- Composite types: arrays and functions.
- Types: every type, with its properties.