Talisman Stroke Editor
pattern.strokes is a list of strokes, each containing points normalised to [0,1]² on the fixed 90 × 210 canvas. The editor uses the same ratio and default paper and stroke colours, #FFFE85 and #FF0000, as the workstation.
Drawing Controls
- Polyline: click to add vertices. Press
Enter, right-click or double-click to finish a stroke; pressEscto cancel it. - Freehand: hold and drag to draw. On release, Ramer-Douglas-Peucker simplification uses the toolbar ε to remove redundant points.
Ctrl+Z/Ctrl+Yundo or redo. The list supports deleting individual strokes, andClearempties the canvas.Snap to whole pixelsaligns coordinates with whole pixels;Griddisplays grid lines;Stroke orderdisplays stroke starts and numbers, matchingpattern.show_order: truein game.Load from JSONaccepts a stroke array or a completepatternobject.Zoomchanges only the display scale; the canvas remains90 × 210.Decimalsspecifies the decimal places in exported coordinates.
Validation and Readouts
- Stroke order and pigment: the list reports each stroke's pixel length, approximately one pigment unit per pixel under the default settings.
- Geometry validation: the loader rejects strokes with fewer than 2 points, more than
256strokes, more than4096points per stroke, or entirely coincident points. The editor reports these constraints before export.
Scoring normalises translation and scale but preserves rotation. Overall position and size therefore do not affect the score, while orientation does. Resampling uses a 2-pixel step, and simplification uses 0.5 × tolerance (6.3 pixels at the default 0.06), removing finer detail.
Export Format
[
[[0.5, 0.05], [0.5, 0.95]],
[[0.1, 0.5], [0.9, 0.5]]
]
Use the exported array as pattern.strokes. The editor generates geometry only; configure pattern.tolerance, pattern.guide, pattern.show_order, talisman, result and grade thresholds in the recipe.
Next
- talisman_drawing — every field of the recipe,
patternand the grades included. - Author a Talisman Drawing — the whole flow starting from one drawing.
- Talisman Scoring — how the score resamples, normalises and weights.