UNPKG

clumsy-graphics

Version:

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

64 lines (63 loc) 1.84 kB
/// <reference types="react" /> import * as IO from 'io-ts'; export interface AnimationModuleContainer extends EsModuleDefault<AnimationModule> { } export interface AnimationModule { moduleName: string; frameCount: number; frameSize: { width: number; height: number; }; animationSettings: { frameRate: number; constantRateFactor: number; }; getFrameDescription: (props: { frameCount: number; frameIndex: number; }) => Promise<JSX.Element>; } export interface EsModuleDefault<SomeDefaultExport extends object> { default: SomeDefaultExport; } export declare const AnimationModuleCodec: IO.ExactC<IO.TypeC<{ moduleName: IO.StringC; getFrameDescription: IO.AnyC; frameCount: IO.NumberC; frameSize: IO.ExactC<IO.TypeC<{ width: IO.NumberC; height: IO.NumberC; }>>; animationSettings: IO.ExactC<IO.TypeC<{ frameRate: IO.NumberC; constantRateFactor: IO.NumberC; }>>; }>>; export declare const ClientAnimationModuleCodec: IO.ExactC<IO.TypeC<{ moduleName: IO.StringC; frameCount: IO.NumberC; frameSize: IO.ExactC<IO.TypeC<{ width: IO.NumberC; height: IO.NumberC; }>>; animationSettings: IO.ExactC<IO.TypeC<{ frameRate: IO.NumberC; constantRateFactor: IO.NumberC; }>>; }>>; export declare const AnimationModuleContainerCodec: IO.ExactC<IO.TypeC<{ default: IO.ExactC<IO.TypeC<{ moduleName: IO.StringC; getFrameDescription: IO.AnyC; frameCount: IO.NumberC; frameSize: IO.ExactC<IO.TypeC<{ width: IO.NumberC; height: IO.NumberC; }>>; animationSettings: IO.ExactC<IO.TypeC<{ frameRate: IO.NumberC; constantRateFactor: IO.NumberC; }>>; }>>; }>>;