examples: add initial ecs-app
This is a temporary application to begin iterating on high-level ECS applications. Eventually, this will be removed - for now it's just here so we can see how this API looks today and improve it. Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
6ec27861b4
commit
d3b03901fb
4 changed files with 96 additions and 1 deletions
13
examples/ecs-app/renderer.zig
Normal file
13
examples/ecs-app/renderer.zig
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
const mach = @import("mach");
|
||||
const ecs = mach.ecs;
|
||||
|
||||
pub const module = ecs.Module(.{
|
||||
.components = .{
|
||||
.location = Vec3,
|
||||
.rotation = Vec3,
|
||||
},
|
||||
// TODO: there would be systems that we register here. Functions that iterate over entities
|
||||
// with renderer components like `.geometry` and render them for example!
|
||||
});
|
||||
|
||||
pub const Vec3 = struct { x: f32, y: f32, z: f32 };
|
||||
Loading…
Add table
Add a link
Reference in a new issue