Integrating paddy-editor in framework/engine is easy as paddy editor exports to json, which can be easily parsed from.
To get clear overview of file structure, you can find it at Data.hx and Paddy.hx.
//------paddy.json-------
typedef PaddyData = {
var name: String;
var window: String;
var scene: String;
var ?theme: zui.Themes.TTheme;
}
//------paddy.json-------
//------window.json-------
typedef WindowData = {
var name: String;
var width: Int;
var height: Int;
var windowMode: Int;
var clearColor: Array;
}
//------window.json-------
//------scene.json-------
typedef SceneData = {
var name: String;
var objects: Array;
var assets: Array;
var ?scripts: Array;
var ?canvasRef: String;
}
typedef AssetData = {
var name: String;
var type: AssetType;
var value: Dynamic;// Ignore this when parsing
var path: String;
}
@:enum abstract AssetType(Int) from Int to Int {
var Image = 0;
var Font = 0;
var Sound = 1;
var Blob = 1;
}
typedef ObjectData = {
var id: Int;
var name: String;
var x: Float;
var y: Float;
var height: Float;
var width: Float;
var isSprite: Bool;
var ?rotation: Float;
var ?visible: Bool;
var ?culled: Bool;
var ?spriteRef: String;
var ?color: Array;
var ?scripts: Array;
}
typedef NodeData = {
var name: String;
var nodes: Nodes;
var nodeCanvas: TNodeCanvas;
}
typedef ScriptData = {
var name: String;
var scriptRef: String;
}
//------scene.json-------