Package Exports
- @genart-dev/plugin-patterns
Readme
@genart-dev/plugin-patterns
Decorative pattern fills as design layers for genart.dev — 153 presets across 28 layer types, from geometric tessellations to cultural motifs. Renders with Canvas2D primitives — no brush engine dependency.
Part of genart.dev — a generative art platform with an MCP server, desktop app, and IDE extensions.
Install
npm install @genart-dev/plugin-patternsUsage
import patternsPlugin from "@genart-dev/plugin-patterns";
import { createDefaultRegistry } from "@genart-dev/core";
const registry = createDefaultRegistry();
registry.registerPlugin(patternsPlugin);
// Or access individual exports
import {
GEOMETRIC_PRESETS,
PATTERN_PRESETS,
getGeometricPreset,
getPatternPreset,
} from "@genart-dev/plugin-patterns";
const awning = getGeometricPreset("awning");
// { layerType: "patterns:stripe", angle: 90, spacing: 30, lineWidth: 30, colors: ["#c0392b", "#ffffff"] }
const hatchLight = getPatternPreset("hatch-light");
// { strategy: { type: "hatch", angle: 45, spacing: 12 }, lineWidth: 2 }Layer Types (29)
| Type | Category | Presets | Description |
|---|---|---|---|
patterns:fill |
Illustration fills | 11 | Hatch, crosshatch, stipple, scumble, contour |
patterns:stripe |
Core geometric | 8 | Parallel lines/bands at any angle |
patterns:dot |
Core geometric | 8 | Regular/offset dot grids |
patterns:checker |
Core geometric | 7 | Alternating squares, optionally rotated |
patterns:wave |
Core geometric | 9 | Sine, triangle, square, sawtooth rows |
patterns:crosshatch-geo |
Core geometric | 6 | Clean geometric crosshatch |
patterns:herringbone |
Core geometric | 7 | Interlocking V-pattern / zigzag blocks |
patterns:tile |
Core geometric | 8 | Seamless repeating tiles (brick, hex, moroccan, etc.) |
patterns:triangle |
Geometric | 6 | Equilateral, pinwheel, arrow, kaleidoscope |
patterns:diamond |
Geometric | 5 | Simple, argyle, nested, adjointed, lattice |
patterns:hexagon |
Geometric | 5 | Honeycomb, interlocked, flower, grid |
patterns:star |
Geometric | 5 | Six-pointed, eight-pointed, plus-grid |
patterns:circle |
Geometric | 6 | Concentric, overlapping, packed, semicircle |
patterns:square |
Geometric | 5 | Nested, rotated, offset, stars-and-squares |
patterns:octagon |
Geometric | 2 | Octagon-square, outline |
patterns:scale |
Geometric | 4 | Fishscale, scallop, overlapping, pointed |
patterns:chainlink |
Geometric | 3 | Circle, oval, double |
patterns:japanese |
Cultural | 6 | Asanoha, seigaiha, shippo, bishamon-kikko, yagasuri, kumiko |
patterns:lattice |
Cultural | 5 | Greek key, Chinese fret, double meander |
patterns:plaid |
Cultural | 4 | Tartan, buffalo plaid, madras, windowpane |
patterns:cube |
Cultural | 3 | Isometric, stacked, tumbling blocks |
patterns:ethnic |
Cultural | 6 | Tribal zigzag, kente, lotus, step, songket, arrow |
patterns:leaf |
Organic | 4 | Simple leaf, fern row, tropical scatter, vine trail |
patterns:floral |
Organic | 5 | Daisy, rosette, cherry blossom, sunflower |
patterns:memphis |
Organic | 4 | Classic, confetti, geometric, squiggle |
patterns:eye |
Organic | 4 | Vesica, pointed, almond, double |
patterns:spiral |
Organic | 4 | Archimedean, logarithmic, scroll, double |
patterns:terrazzo |
Organic | 3 | Classic, bold, blob |
patterns:custom |
Custom | — | Agent-created from drawing commands |
All layer types support region (JSON clip region), opacity, and standard layer transform properties.
Presets (153)
Fill (11)
Stripe (8)
Dot (8)
Checker (7)
Wave (9)
Crosshatch (6)
Herringbone (7)
Tile (8)
Triangle (6)
Diamond (5)
Hexagon (5)
Star (5)
Circle (6)
Japanese (6)
Lattice (5)
Plaid (4)
| Preview | ID | Name | Description |
|---|---|---|---|
![]() |
tartan |
Tartan | Scottish tartan |
![]() |
buffalo-plaid |
Buffalo Plaid | Classic buffalo plaid |
![]() |
madras |
Madras | Madras cotton plaid |
![]() |
windowpane |
Windowpane | Windowpane check |
Cube (3)
| Preview | ID | Name | Description |
|---|---|---|---|
![]() |
isometric-cube |
Isometric Cube | 3D isometric cubes |
![]() |
stacked-cubes |
Stacked Cubes | Stacked cube illusion |
![]() |
tumbling-blocks |
Tumbling Blocks | Classic tumbling blocks |
Leaf (4)
Floral (5)
Memphis (4)
Eye (4)
Spiral (4)
Terrazzo (3)
| Preview | ID | Name | Description |
|---|---|---|---|
![]() |
terrazzo-classic |
Terrazzo Classic | Classic terrazzo chips |
![]() |
terrazzo-bold |
Terrazzo Bold | Large bold chips |
![]() |
blob-scatter |
Blob Scatter | Organic blob scatter |
Square (5)
Octagon (2)
| Preview | ID | Name | Description |
|---|---|---|---|
![]() |
octagon-square |
Octagon & Square | Classic octagon-square tiling |
![]() |
octagon-outline |
Octagon Outline | Outlined octagon grid |
Scale (4)
Chainlink (3)
| Preview | ID | Name | Description |
|---|---|---|---|
![]() |
chainlink-fence |
Chainlink Fence | Classic chainlink |
![]() |
chain-mail |
Chain Mail | Interlocking rings |
![]() |
interlocking-rings |
Interlocking Rings | Decorative ring links |
Ethnic (6)
MCP Tools (7)
Exposed to AI agents through the MCP server when this plugin is registered:
| Tool | Description |
|---|---|
list_pattern_presets |
List all presets grouped by category |
add_pattern |
Add a pattern layer (by type + preset or manual properties) |
update_pattern |
Update pattern layer properties by layer ID |
set_pattern_region |
Set clip region (bounds, rect, ellipse, polygon) |
set_pattern_shading |
Set value-based shading (patterns:fill only) |
tile_pattern |
Configure tile layer (shape, size, gap, rotation, colors) |
create_pattern |
Create custom pattern from drawing commands |
Custom Patterns
The patterns:custom layer type lets agents create entirely new patterns from drawing commands:
import { patternMcpTools } from "@genart-dev/plugin-patterns";
// DrawCommand types: line, circle, rect, arc, path, polygon
// Stored in sketch thirdParty, resolved at render time
// Tiles the unit cell with scale/rotation/color overrideExamples
The examples/ directory contains 153 .genart files (one per preset) with matching .png thumbnails. Open examples/patterns-gallery.genart-workspace to view all presets in a grid layout.
To re-render thumbnails:
node render-examples.cjsTo regenerate gallery images:
bash generate-galleries.shRelated Packages
| Package | Purpose |
|---|---|
@genart-dev/core |
Plugin host, layer system (dependency) |
@genart-dev/mcp-server |
MCP server that surfaces plugin tools to AI agents |
Support
Questions, bugs, or feedback — support@genart.dev or open an issue.
License
MIT



















































































































































































