ShapeId
Vec3
z field ranges from 0 to 1 and is present when drawn with a pressure-sensitive stylus.
DrawSegment
path field is a base64-encoded buffer of Vec3 points.
DrawShape
Style types
Shape type union
DrawShape is the only shape type. Additional types may be added in future versions.
Constants
| Constant | Value | Description |
|---|---|---|
STROKE_WIDTHS | { s: 2, m: 3.5, l: 5, xl: 10 } | Pixel widths for each size |
DRAG_DISTANCE_SQUARED | 36 | Threshold for click vs drag detection |
MAX_POINTS_PER_SHAPE | 200 | Maximum points per shape before a new segment starts |
DEFAULT_COLORS | Record of 13 colors | Built-in color palette |