Worldshaper/docs/kb/systems/graphics-painter.md

2 KiB

Graphics Painter

What It Owns

This is the dedicated art-editing environment for tile and sprite graphics. It covers shape tools, erasers, transforms, previewing, and animation timeline editing for the currently opened asset.

Core Behaviors

  • Shape drawing modes:
    • rectangle
    • circle
    • triangle
    • line
  • Shape variants:
    • outline
    • fill
    • outline + fill
  • Shape erasers:
    • rectangle
    • circle
    • triangle
  • Transform workflows available through the painter menu.
  • Animation timeline controls, frame order, playback speed, and preview.

Important UI Surfaces

  • Graphic Painter window
  • Tool menu and tooltip menus
  • Animation timeline row
  • Preview card and frame preview

Important Files

  • src/worldshaperStudio/tileArtEditorWindowController.ts
  • src/worldshaperStudio/graphicsDocumentHelpers.ts
  • src/worldshaperStudio/importController.ts
  • src/worldshaperStudio/dom.ts

Known Tool Details

  • Shape menus are nested by shape and variant, rather than being a single flat tool list.
  • The active draw tool and active eraser shape are tracked separately.
  • The painter already knows about animation preview, frame creation, and per-frame editing; many animation requests should be phrased as extensions to an existing timeline rather than brand-new systems.
  • The preview and animation controls are editor-side only; runtime rendering requests often cross into Rendering And Viewport.

Relationships

  • Depends on Content Catalog And Records for source records and saved asset definitions.
  • Depends on Floating Window Shell because the painter lives inside a movable editor window.
  • Feeds Rendering And Viewport when edited assets are later shown in the live map renderer.
  • Intersects with Animation-tagged requests when frame behavior changes.

Triage Hints

Requests about sprite drawing, tile art tools, frame duplication, painter transforms, selection or move workflows, and editor-side animation controls should usually start here.