textmode.export.js
Export finished textmode.js artworks without leaving the sketch.
Choose an output
Use canvas capture for the rendered image on screen: PNG, JPEG, WebP, GIF, and video preserve compositing, filters, shaders, and post-processing. Use layer data export when the artwork should stay editable or machine readable: TXT and SVG read from the selected layer, while JSON can describe either the selected layer or the full layer stack.
Start with ExportPlugin, then call the helpers added to your sketch or use the built-in export overlay. For recipes and format trade-offs, read the Exporting guide.
Workflow
Install the plugin and use the export helpers added to a textmode.js sketch.
| Name | Description |
|---|---|
| TextmodeExportAPI | Runtime export helpers that ExportPlugin attaches to the Textmodifier instance. |
| ExportPlugin | Default export plugin instance for the standard textmode.js workflow. |
Canvas capture
Export a still image from the rendered canvas.
| Type Alias | Description |
|---|---|
| ImageExportOptions | Options for exporting the textmode content to image format. |
GIF export
Capture deterministic frames and encode an animated GIF.
| Type Alias | Description |
|---|---|
| GIFExportOptions | Options for capturing deterministic textmode frames as an animated GIF. |
| GIFExportProgress | Progress information emitted while deterministic frames are captured and encoded as an animated GIF. |
Video export
Capture deterministic frames and encode MP4 or WebM video with Mediabunny.
| Type Alias | Description |
|---|---|
| VideoBitrateMode | Bitrate allocation strategy for the native encoder. |
| VideoExportFormat | Video container format produced by saveVideo() and toVideoBlob(). |
| VideoExportOptions | Options for capturing deterministic textmode frames as MP4 or WebM video. |
| VideoExportPhase | Detailed phase information for progress UIs that distinguish capability probing, frame capture, and output. |
| VideoExportProgress | Progress information emitted while a deterministic video is probed, captured, and written. |
| VideoHardwareAcceleration | WebCodecs hardware acceleration preference. |
| VideoQuality | Video compression policy passed to Mediabunny. |
| VideoQualityLevel | Qualitative video quality level matching Mediabunny's five native levels. |
| VideoRecordingState | High-level lifecycle state reported while a video export is captured, encoded, or completed. |
| VideoSaveDestination | Destination policy used by saveVideo(). |
Layer data export
Export selected-layer text or vector data as TXT or SVG.
| Name | Description |
|---|---|
| LayerExportOptions | Shared option for exporters that read layer framebuffer data. |
| SVGExportOptions | Options for exporting the textmode content to SVG format. |
| TXTExportOptions | Options for exporting the textmode content to TXT format. |
JSON document data
Export selected-layer or full-stack document data as JSON.
| Type Alias | Description |
|---|---|
| JSONExportColorMode | Color representation written by the JSON exporter: hexadecimal strings or RGBA channel objects. |
| JSONExportOptions | Options for exporting textmode content to JSON. |
| JSONExportTarget | Layer selection for export; never serialized into the document. |
Overlay
Configure and control the built-in export overlay.
| Name | Description |
|---|---|
| ExportOverlayController | Controller for managing the export overlay UI visibility at runtime. |
| ExportOverlayPosition | Current canvas-relative placement state for the export overlay UI. |
| ExportOverlayPositionInput | Canvas-relative placement coordinates for the export overlay UI. |
| ExportDefaults | Per-format default options used to seed the overlay UI inputs at mount time and after a ExportOverlayController.resetDefaults call. |
| ExportDefaultsPatch | Partial patch accepted by ExportOverlayController.setDefaults. |
| GIFOverlayDefaults | Default GIF export fields controlled by the export overlay. |
| ImageOverlayDefaults | Default image export fields controlled by the export overlay. |
| JSONOverlayDefaults | Default JSON export fields controlled by the export overlay. |
| SVGOverlayDefaults | Default SVG export fields controlled by the export overlay. |
| TXTOverlayDefaults | Default TXT export fields controlled by the export overlay. |
| VideoOverlayDefaults | Default video export fields controlled by the export overlay. |
ZIP frame-sequence export
Capture deterministic PNG, JPEG, WebP, SVG, JSON, or TXT frames in a code-only ZIP archive.
| Name | Description |
|---|---|
| ZIPExportError | Error raised by ZIP frame-sequence validation, capture, or archive creation. |
| ZIPCaptureOptions | Options shared by all ZIP frame formats. |
| ZIPExportProgress | Progress information emitted while ZIP frames are captured and archived. |
| ZIPFrameOptionsMap | Format-specific options forwarded to each existing still exporter. |
| ZIPExportErrorCode | Machine-readable ZIP export failure category. |
| ZIPExportOptions | Discriminated options for a deterministic ZIP frame-sequence export. |
| ZIPExportState | Lifecycle state reported by a ZIP frame-sequence export. |
| ZIPFrameFormat | File format used for every frame in a ZIP frame-sequence export. |