UNPKG

clumsy-graphics

Version:

a tool for rapidly developing animations where frames are described using svg elements à la react 🙃

72 lines (71 loc) 3.38 kB
import * as IO from 'io-ts'; import { ConvertAnimationMp4ToGifApi } from '../convertAnimationMp4ToGif/convertAnimationMp4ToGif'; import { RenderAnimationModuleApi } from '../renderAnimationModule/renderAnimationModule'; import { StartAnimationDevelopmentApi } from '../startAnimationDevelopment/startAnimationDevelopment'; import { Optional } from './common'; export declare type ClumsyGraphicsCommand = StartDevelopmentCommand | RenderAnimationCommand | RenderAnimationFrameCommand | ConvertAnimationToGifCommand; export interface StartDevelopmentCommand extends CliCommandBase<'startDevelopment', Optional<StartAnimationDevelopmentApi, 'clientServerPort' | 'generatedAssetsDirectoryPath' | 'numberOfFrameRendererWorkers'>> { } export declare const StartDevelopmentCommandCodec: IO.ExactC<IO.TypeC<{ commandName: IO.LiteralC<"startDevelopment">; commandApi: IO.ExactC<IO.IntersectionC<[IO.TypeC<{ animationModulePath: IO.StringC; }>, IO.PartialC<{ clientServerPort: IO.Type<number, string, unknown>; generatedAssetsDirectoryPath: IO.StringC; numberOfFrameRendererWorkers: IO.Type<number, string, unknown>; }>]>>; }>>; interface RenderAnimationCommand extends CliCommandBase<'renderAnimation', Optional<RenderAnimationModuleApi, 'numberOfFrameRendererWorkers' | 'suppressWorkerStdout'>> { } interface RenderAnimationFrameCommand extends CliCommandBase<'renderAnimationFrame', { animationModulePath: string; frameFileOutputPath: string; frameIndex: number; }> { } interface ConvertAnimationToGifCommand extends CliCommandBase<'convertAnimationToGif', ConvertAnimationMp4ToGifApi> { } interface CliCommandBase<CommandName extends string, CommandOptions extends object> { commandName: CommandName; commandApi: CommandOptions; } export declare const ClumsyGraphicsCommandCodec: IO.UnionC<[IO.ExactC<IO.TypeC<{ commandName: IO.LiteralC<"startDevelopment">; commandApi: IO.ExactC<IO.IntersectionC<[IO.TypeC<{ animationModulePath: IO.StringC; }>, IO.PartialC<{ clientServerPort: IO.Type<number, string, unknown>; generatedAssetsDirectoryPath: IO.StringC; numberOfFrameRendererWorkers: IO.Type<number, string, unknown>; }>]>>; }>>, IO.ExactC<IO.TypeC<{ commandName: IO.LiteralC<"renderAnimation">; commandApi: IO.ExactC<IO.IntersectionC<[IO.TypeC<{ animationModulePath: IO.StringC; animationMp4OutputPath: IO.StringC; }>, IO.PartialC<{ numberOfFrameRendererWorkers: IO.Type<number, string, unknown>; suppressWorkerStdout: IO.Type<boolean, string, unknown>; }>]>>; }>>, IO.ExactC<IO.TypeC<{ commandName: IO.LiteralC<"renderAnimationFrame">; commandApi: IO.ExactC<IO.TypeC<{ animationModulePath: IO.StringC; frameFileOutputPath: IO.StringC; frameIndex: IO.Type<number, string, unknown>; }>>; }>>, IO.ExactC<IO.TypeC<{ commandName: IO.LiteralC<"convertAnimationToGif">; commandApi: IO.ExactC<IO.IntersectionC<[IO.TypeC<{ animationMp4SourcePath: IO.StringC; animationGifOutputPath: IO.StringC; }>, IO.PartialC<{ gifAspectRatioWidth: IO.Type<number, string, unknown>; }>]>>; }>>]>; export interface ParseCommandLineArgsApi { processArgv: Array<string>; } export declare function parseCommandLineArgs(api: ParseCommandLineArgsApi): unknown; export {};