Plugins
Trace
Image tracing, edge detection, and conversion to vector layers.
Image tracing layer that extracts edges, contours, and features from reference images for conversion into vector layers.
Installation
npm install @genart-dev/plugin-traceLayer Types
| Type ID | Display Name | Description |
|---|---|---|
trace:reference | Trace Reference | Image reference with edge detection and tracing algorithms |
Properties
trace:reference
| Property | Type | Default | Description |
|---|---|---|---|
src | string | "" | Source image (URL or data URI) |
algorithm | select | "canny" | Tracing algorithm: canny, sobel, laplacian, threshold, contour, posterize, stipple |
threshold | number | 128 | Edge detection threshold (0-255) |
blur | number | 1 | Pre-processing blur radius |
invert | boolean | false | Invert the traced output |
opacity | number | 0.5 | Reference overlay opacity (0-1) |
color | color | "#000000" | Trace output color |
lineWidth | number | 1 | Trace line width |
detail | number | 0.5 | Detail level (0-1, higher = more detail) |
MCP Tools
| Tool | Description |
|---|---|
trace_edges | Run edge detection on the reference image |
trace_contours | Extract contour outlines from the image |
trace_threshold | Apply threshold-based black/white conversion |
trace_posterize | Reduce image to limited color levels |
trace_stipple | Convert image to stipple dot pattern |
trace_configure | Update trace algorithm and parameters |
trace_to_layers | Convert trace output to editable vector layers |
Example
{
"tool": "design_add_layer",
"arguments": {
"type": "trace:reference",
"properties": {
"src": "https://example.com/reference.jpg",
"algorithm": "canny",
"threshold": 100,
"blur": 2,
"detail": 0.7,
"opacity": 0.4,
"color": "#1a1a2e"
}
}
}