-
Notifications
You must be signed in to change notification settings - Fork 2
/
rendering.fbs
121 lines (103 loc) · 2.16 KB
/
rendering.fbs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
namespace rlbot.flat;
enum TextHAlign: ubyte {
Left,
Center,
Right,
}
enum TextVAlign: ubyte {
Top,
Center,
Bottom,
}
struct Color {
r:ubyte;
g:ubyte;
b:ubyte;
a:ubyte;
}
table BallAnchor {
index:uint;
local:Vector3 (required);
}
table CarAnchor {
index:uint;
local:Vector3 (required);
}
union RelativeAnchor {
BallAnchor,
CarAnchor,
}
table RenderAnchor {
world:Vector3 (required);
relative:RelativeAnchor;
}
table Line3D {
start:RenderAnchor (required);
end:RenderAnchor (required);
color:Color (required);
}
table PolyLine3D {
points:[Vector3] (required);
color:Color (required);
}
table String2D {
text:string (required);
/// Screen-space coordinates such that x=0 is left edge and x=1 is right edge of window.
x:float;
/// Screen-space coordinates such that y=0 is top edge and y=1 is bottom edge of window.
y:float;
scale:float;
foreground:Color (required);
background:Color (required);
h_align:TextHAlign;
v_align:TextVAlign;
}
table String3D {
text:string (required);
anchor:RenderAnchor (required);
scale:float;
foreground:Color (required);
background:Color (required);
h_align:TextHAlign;
v_align:TextVAlign;
}
table Rect2D {
/// Screen-space coordinates such that x=0 is left edge and x=1 is right edge of window.
x:float;
/// Screen-space coordinates such that y=0 is top edge and y=1 is bottom edge of window.
y:float;
/// Screen-space size such that width=0.1 is 10% of window width.
width:float;
/// Screen-space size such that height=0.1 is 10% of window height.
height:float;
color:Color (required);
centered:bool;
}
table Rect3D {
anchor:RenderAnchor (required);
/// Screen-space size such that width=0.1 is 10% of window width.
width:float;
/// Screen-space size such that height=0.1 is 10% of window height.
height:float;
color:Color (required);
}
union RenderType {
Line3D,
PolyLine3D,
String2D,
String3D,
Rect2D,
Rect3D,
}
table RenderMessage {
variety:RenderType (required);
}
table RenderGroup {
render_messages:[RenderMessage] (required);
/// The id of the render group
id:int;
}
root_type RenderGroup;
table RemoveRenderGroup {
id:int;
}