Skip to content

Instantly share code, notes, and snippets.

@dgehriger
Last active November 20, 2024 11:37
Show Gist options
  • Save dgehriger/4486084b0bbbff0a99c4c3918e634e84 to your computer and use it in GitHub Desktop.
Save dgehriger/4486084b0bbbff0a99c4c3918e634e84 to your computer and use it in GitHub Desktop.
Schema for Maverick Movie Definition
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"additionalProperties": false,
"properties": {
"$schema": {
"type": "string",
"format": "uri",
"const": "https://gist.githubusercontent.com/dgehriger/4486084b0bbbff0a99c4c3918e634e84/raw/mav_movie_definition.v1.schema.json"
},
"version": {
"type": "integer",
"const": 1
},
"movie_id": {
"type": "string",
"pattern": "^[a-f0-9]{32}$"
},
"fps": {
"type": "string",
"enum": ["Fps0", "Fps1", "Fps2", "Fps4", "Fps8", "Fps16", "Fps32"]
},
"play_mode": {
"type": "string",
"enum": ["None", "Once", "Loop", "PingPong"]
},
"movie_time": {
"type": "string",
"enum": [
"Time4000ms",
"Time3500ms",
"Time3000ms",
"Time2500ms",
"Time2000ms",
"Time1500ms",
"Time1000ms",
"Time500ms",
"Time250ms",
"Time0ms"
]
},
"movie_type": {
"type": "string",
"enum": [
"Track1Only",
"Track2Only",
"SumTracks",
"StackTracks",
"MorphTracks",
"FlipTracks"
]
},
"track1": {
"$ref": "#/definitions/TrackDefinition"
},
"track2": {
"$ref": "#/definitions/TrackDefinition"
}
},
"required": [
"version",
"fps",
"play_mode",
"movie_time",
"movie_type",
"track1",
"track2"
],
"definitions": {
"TrackDefinition": {
"type": "object",
"additionalProperties": false,
"properties": {
"color1": {
"$ref": "#/definitions/PixelDefinition"
},
"color2": {
"$ref": "#/definitions/PixelDefinition"
},
"velocity": {
"type": "string",
"enum": [
"Vel4cw",
"Vel3cw",
"Vel2cw",
"Vel1cw",
"Vel0",
"Vel1ccw",
"Vel2ccw",
"Vel3ccw",
"Vel4ccw"
]
},
"frame_type": {
"type": "string",
"enum": ["Color1", "Color2", "LinearInterp", "SineInterp", "Dot"]
}
},
"required": ["color1", "color2", "velocity", "frame_type"]
},
"PixelDefinition": {
"type": "object",
"additionalProperties": false,
"properties": {
"r": {
"type": "integer",
"minimum": 0,
"maximum": 255
},
"g": {
"type": "integer",
"minimum": 0,
"maximum": 255
},
"b": {
"type": "integer",
"minimum": 0,
"maximum": 255
}
},
"required": ["r", "g", "b"]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment