-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathscene.zig
More file actions
35 lines (29 loc) · 787 Bytes
/
scene.zig
File metadata and controls
35 lines (29 loc) · 787 Bytes
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
//! Scene based rendering API
pub const Properties = @import("scene/Properties.zig");
pub const Renderer = @import("scene/Renderer.zig");
pub const Path = @import("scene/Path.zig");
pub const Node = union(enum) {
container: Container,
image: Image,
text: Text,
pub const Container = @import("scene/Node/Container.zig");
pub const Image = @import("scene/Node/Image.zig");
pub const Text = @import("scene/Node/Text.zig");
pub fn getChildren(self: Node) []const Node {
return switch (self) {
.container => |container| container.children,
else => &.{},
};
}
test {
_ = Container;
_ = Image;
_ = Text;
}
};
test {
_ = Properties;
_ = Renderer;
_ = Node;
_ = Path;
}