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 | Supported JSON color output modes. |
| JSONExportOptions | Options for exporting the textmode content to JSON format. |
| JSONExportTarget | Target scope for JSON export. |
| TextmodeDocumentJSON | JSON document exported by the JSON exporter. |
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. |