Skip to content

Instantly share code, notes, and snippets.

@dakom
Last active June 28, 2018 08:06
Show Gist options
  • Select an option

  • Save dakom/bb044fc100f77ab7f0c9ad70d4e11a70 to your computer and use it in GitHub Desktop.

Select an option

Save dakom/bb044fc100f77ab7f0c9ad70d4e11a70 to your computer and use it in GitHub Desktop.
namespace JiTap;
// Note - the flatbuffer exporter has some issues with ordering
// So adjustments for readability need to be tested before commit
//GENERIC - TRANSFORM
table Transform {
posX: double;
posY: double;
posZ: double;
originX: double;
originY: double;
originZ: double;
scaleX: double;
scaleY: double;
scaleZ: double;
rotX: double;
rotY: double;
rotZ: double;
rotW: double;
}
//GENERIC - IMAGE
table ImageAssetImageSource {
url: string;
}
table ImageAssetTextSource {
html: string;
}
union ImageAssetSource {ImageAssetImageSource, ImageAssetTextSource}
table ImageAsset {
src: ImageAssetSource;
transform: Transform;
}
//GENERIC - TRACE
table Trace_Rectangle {
startPoint: [double];
endPoint: [double];
}
union Trace {Trace_Rectangle}
//GENERIC - AUDIO
table AudioAsset {
src: string;
}
//ACTIVITY - ASK A QUESTION
table Activity_Questions {
questions: [Question];
}
table Question {
label: string;
trace: Trace;
audio: QuestionAudio;
}
table QuestionAudio {
question: AudioAsset;
answer: AudioAsset;
mistake: AudioAsset;
}
//ACTIVITIES - SOUNDBOARD
table Activity_Soundboard {
options: Soundboard_Options;
items: [Soundboard_Item];
}
table Soundboard_Options {
introAudio: AudioAsset;
bgAudio: AudioAsset;
oneTime: bool;
showHints: bool;
}
table Soundboard_Item {
trace: Trace;
audio: AudioAsset;
jump: string;
}
//ACTIVITIES - PUZZLE
table Activity_Puzzle {
options: Puzzle_Options;
items: [Puzzle_Item];
}
table Puzzle_Options {
jump: string;
audio: AudioAsset;
freePlay: bool;
easyMode: bool;
disableHints: bool;
shapes3d: bool;
}
table Puzzle_Item {
trace: Trace;
audio: AudioAsset;
}
//ACTIVITIES - SAY SOMETHING
table Activity_SaySomething {
audio: AudioAsset;
continueAfter: bool;
jump: string;
}
//ACTIVITIES - VIDEO
enum Video_SourceType : byte { Upload = 1, Youtube }
table Activity_Video {
src: string;
srcType: Video_SourceType;
}
//ACTIVITIES - TALK_TYPE
enum TalkType_AnswerType : byte { Keyboard = 1, Microphone }
table Activity_TalkType {
options: TalkType_Options;
items: [TalkType_Item];
}
table TalkType_Options {
jump: string;
audio: AudioAsset;
showHints: bool;
}
table TalkType_Item {
trace: Trace;
audio: AudioAsset;
answer: string;
answerType: TalkType_AnswerType;
}
//ACTIVITIES - ALL
union Activity {
Activity_Questions,
Activity_Soundboard,
Activity_SaySomething,
Activity_Puzzle,
Activity_Video,
Activity_TalkType
}
//DESIGN
table Sticker {
img: ImageAsset;
}
table Design {
bg:ImageAsset;
stickers: [Sticker];
}
//SLIDE
table Slide {
slideId: string;
creationId: string;
design:Design;
activity:Activity;
}
//END
root_type Slide;
file_identifier "JITP";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment