Skip to content

textmode.export.js

Export plugin for textmode.js - save artworks as images, videos, SVG, JSON, and text.

This plugin adds comprehensive export capabilities to textmode.js instances, allowing you to save your generative artworks in multiple formats with a convenient overlay UI for quick access to all export options.

Available export formats

Image formats

Vector formats

  • SVG - Save as scalable vector graphics

Text formats

  • TXT - Save text content as plain text
  • JSON - Save document data as structured JSON

Animation formats

  • GIF - Save as animated GIF
  • Video - Save as WebM or MP4 video

Interfaces

InterfaceDescription
LayerExportOptionsShared option for exporters that read layer framebuffer data.
JSONRGBAColorRGBA color representation used in JSON exports.
JSONCellTransformCell transform data for JSON exports.
JSONObjectRowCellRich per-cell representation for readable JSON exports.
JSONObjectRowsCellCollectionRow-based cell encoding.
JSONLayerGridGrid dimensions exported for a layer.
JSONExportMetadataOptional export metadata.
TextmodeSelectedDocumentLayerSelected-layer entry in a JSON document export.
TextmodeSelectedDocumentJSONSelected-layer document exported by the JSON exporter.
TextmodeDocumentLayerSingle layer entry in an all-layers JSON export.
TextmodeAllDocumentJSONLayer stack document exported by the JSON exporter.
ExportOverlayControllerController for managing the export overlay UI visibility at runtime.
TextmodeExportAPIRuntime export helpers that createExportPlugin attaches to the Textmodifier instance.
TextmodeExportPluginOptionsOptions for configuring the export plugin.

Type Aliases

Type AliasDescription
GIFExportProgressProgress information emitted during the GIF export process.
GIFExportOptionsOptions for exporting the textmode content to GIF format.
ImageExportOptionsOptions for exporting the textmode content to image format.
JSONExportTargetTarget scope for JSON export.
JSONDocumentFormatCanonical JSON document format identifier.
JSONDocumentVersionCanonical JSON document format version.
JSONExportColorModeSupported JSON color output modes.
JSONColorValueColor value used in the exported JSON document.
JSONCellCollectionSupported JSON cell collection variants.
TextmodeDocumentJSONJSON document exported by the JSON exporter.
JSONExportOptionsOptions for exporting the textmode content to JSON format.
SVGExportOptionsOptions for exporting the textmode content to SVG format.
TXTExportOptionsOptions for exporting the textmode content to TXT format.
VideoRecordingStateLifecycle state reported while a video export is being prepared, recorded, encoded, or completed.
VideoExportPhaseMore granular phase information for progress UIs that need to distinguish setup, rendering, and finalization.
VideoBitratePresetSubjective bitrate preset used when an exact bits-per-second value is not supplied.
VideoExportFormatVideo container format written by saveVideo.
VideoBitrateModeBitrate allocation strategy for the native encoder.
VideoLatencyModeEncoder scheduling mode.
VideoHardwareAccelerationWebCodecs hardware acceleration preference.
VideoExportErrorCode-
VideoExportProgressProgress information emitted during the video export process.
VideoExportOptionsOptions for exporting the textmode content to video format.

Variables

VariableDescription
ExportPluginExport plugin for textmode.js.

Functions

FunctionDescription
createTextmodeExportPluginCreates the textmode.export.js plugin for textmode.js.