textmode.export.js / ZIPExportOptions
Type Alias: ZIPExportOptions
ts
type ZIPExportOptions = { [F in ZIPFrameFormat]: ZIPCaptureOptions & { format: F; frameOptions?: ZIPFrameOptionsMap[F] } }[ZIPFrameFormat];Options for capturing a frame sequence as a ZIP archive.
Set the required format to png, jpg, webp, svg, or txt. Add shared capture settings such as frameCount, frameRate, and filename from ZIPCaptureOptions. Use frameOptions for settings specific to the selected format; ZIPFrameOptionsMap lists the available options. Set the archive filename and image format on the outer options, not in frameOptions.
Examples
Capture 120 PNG frames at 30 frames per second, scaled to double size:
ts
await t.saveZip({
format: 'png',
filename: 'animation',
frameCount: 120,
frameRate: 30,
frameOptions: { scale: 2 },
});Capture SVG frames with outlined characters:
ts
const archive = await t.toZipBlob({
format: 'svg',
frameCount: 60,
frameRate: 30,
frameOptions: { drawMode: 'stroke', strokeWidth: 1.5 },
});