Variable ShowfileSchemaConst
Showfile
Schema
: Record<{ $chessbots_show_schema_version
: Literal<3>; audio
: Optional<Record<{ data
: InstanceOf<Uint8Array>; mimeType
: String; }, false>>; name
: String; timeline
: Arr<Record<{ remainingEvents
: Arr<Union<[Record<{ durationMs
: Number; id
: String; target
: Union<[Record<{ controlPoint
: Record<{ x
: Number; y
: Number; }, false>; endPoint
: Record<{ x
: Number; y
: Number; }, false>; type
: Literal<CubicBezier>; }, false>, Record<{ endPoint
: Record<{ x
: Number; y
: Number; }, false>; type
: Literal<QuadraticBezier>; }, false>]>; type
: Literal<"goto_point">; }, false>, Record<{ durationMs
: Number; id
: String; type
: Literal<"wait">; }, false>]>, false>; startPoint
: Record<{ durationMs
: Number; id
: String; target
: Record<{ point
: Record<{ x
: Number; y
: Number; }, false>; type
: Literal<StartPoint>; }, false>; type
: Literal<"start_point">; }, false>; }, false>, false>; }, false> = ...
The showfile schema.
Remarks
At runtime this is a regular JS object. When saved as a file, it is stored as binary in the Concise Binary Object Representation (CBOR) format. The main reason for using a binary format is to allow the audio file to be included inline with the file. Alternatives include base64 encoding the audio file so it could be stored as a string in a JSON file, or storing the audio file separately, perhaps using a ZIP file.