genart.dev

.genart-workspace File

Specification of the .genart-workspace spatial layout format

.genart-workspace File Format

A .genart-workspace file is a lightweight JSON document that defines the spatial layout of sketch artboards on an infinite canvas. It references .genart files by path — it does not embed them.

Format version

Current version: 1.0

Required fields

FieldTypeDescription
genart-workspacestringFormat version ("1.0")
idstringUnique workspace identifier
titlestringWorkspace display name
createdstringISO 8601 timestamp
modifiedstringISO 8601 timestamp
viewportobjectCamera position and zoom
sketchesarraySketch references with positions

Viewport

The viewport defines the camera state:

{
  "viewport": {
    "x": 140,
    "y": 150,
    "zoom": 0.5
  }
}
FieldTypeDefaultDescription
xnumber0Horizontal camera offset
ynumber0Vertical camera offset
zoomnumber1.0Zoom level

Sketches

Each entry references a .genart file and positions it on the canvas:

{
  "sketches": [
    {
      "file": "waves.genart",
      "position": { "x": 0, "y": 0 },
      "label": "Wave Field",
      "locked": false,
      "visible": true
    }
  ]
}
FieldTypeRequiredDescription
filestringyesRelative path to .genart file
positionobjectyes{ x, y } position on canvas
labelstringnoDisplay label (overrides sketch title)
lockedbooleannoPrevent repositioning
visiblebooleannoShow/hide on canvas

Groups

Optional named groupings of sketches:

{
  "groups": [
    {
      "id": "shader-experiments",
      "label": "Shader Experiments",
      "sketchFiles": ["gradient.genart", "noise.genart", "flow.genart"],
      "color": "#0074D9"
    }
  ]
}
FieldTypeRequiredDescription
idstringyesUnique group identifier
labelstringyesDisplay label
sketchFilesstring[]yesReferenced .genart file paths
colorstringnoGroup highlight color (hex)

Minimal example

{
  "genart-workspace": "1.0",
  "id": "minimal-ws",
  "title": "Minimal Workspace",
  "created": "2026-02-14T00:00:00Z",
  "modified": "2026-02-14T00:00:00Z",
  "viewport": { "x": 0, "y": 0, "zoom": 1.0 },
  "sketches": [
    {
      "file": "minimal.genart",
      "position": { "x": 0, "y": 0 }
    }
  ]
}

Full example

{
  "genart-workspace": "1.0",
  "id": "full-ws",
  "title": "Full Workspace",
  "created": "2026-02-14T00:00:00Z",
  "modified": "2026-02-14T00:00:00Z",
  "viewport": { "x": 140, "y": 150, "zoom": 0.5 },
  "sketches": [
    { "file": "waves.genart", "position": { "x": 0, "y": 0 }, "label": "Grid Noise" },
    { "file": "circles.genart", "position": { "x": 612, "y": 0 }, "label": "Canvas Circles" },
    { "file": "gradient.genart", "position": { "x": 1224, "y": 0 }, "label": "Shader Gradient" },
    { "file": "cubes.genart", "position": { "x": 0, "y": 612 } },
    { "file": "rings.genart", "position": { "x": 612, "y": 612 } }
  ],
  "groups": [
    {
      "id": "renderer-tests",
      "label": "Renderer Tests",
      "sketchFiles": ["circles.genart", "gradient.genart", "cubes.genart", "rings.genart"],
      "color": "#0074D9"
    }
  ]
}

Design principles

  • The workspace is spatial metadata only — it does not embed sketch content
  • File paths are relative to the workspace file location
  • The workspace is lightweight enough to version-control alongside sketch files
  • Groups are a visual organizer — they don't affect sketch behavior