mach: wasm: Build textured-cube and ecs-app examples
This commit is contained in:
parent
5f0d54bd1b
commit
81e6de55f8
2 changed files with 3 additions and 2 deletions
|
|
@ -41,9 +41,10 @@ pub fn build(b: *std.build.Builder) void {
|
||||||
.{ .name = "instanced-cube", .packages = &[_]Pkg{Packages.zmath} },
|
.{ .name = "instanced-cube", .packages = &[_]Pkg{Packages.zmath} },
|
||||||
.{ .name = "advanced-gen-texture-light", .packages = &[_]Pkg{Packages.zmath} },
|
.{ .name = "advanced-gen-texture-light", .packages = &[_]Pkg{Packages.zmath} },
|
||||||
.{ .name = "fractal-cube", .packages = &[_]Pkg{Packages.zmath} },
|
.{ .name = "fractal-cube", .packages = &[_]Pkg{Packages.zmath} },
|
||||||
.{ .name = "gkurve", .packages = &[_]Pkg{ Packages.zmath, Packages.zigimg, freetype.pkg }, .std_platform_only = true },
|
|
||||||
.{ .name = "textured-cube", .packages = &[_]Pkg{ Packages.zmath, Packages.zigimg } },
|
.{ .name = "textured-cube", .packages = &[_]Pkg{ Packages.zmath, Packages.zigimg } },
|
||||||
.{ .name = "ecs-app", .packages = &[_]Pkg{} },
|
.{ .name = "ecs-app", .packages = &[_]Pkg{} },
|
||||||
|
// NOTE: examples with std_platform_only should be placed at last
|
||||||
|
.{ .name = "gkurve", .packages = &[_]Pkg{ Packages.zmath, Packages.zigimg, freetype.pkg }, .std_platform_only = true },
|
||||||
}) |example| {
|
}) |example| {
|
||||||
// FIXME: this is workaround for a problem that some examples (having the std_platform_only=true field) as
|
// FIXME: this is workaround for a problem that some examples (having the std_platform_only=true field) as
|
||||||
// well as zigimg uses IO which is not supported in freestanding environments. So break out of this loop
|
// well as zigimg uses IO which is not supported in freestanding environments. So break out of this loop
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,6 @@ pub const Vec2 = struct { x: f32, y: f32 };
|
||||||
fn update(msg: Message) void {
|
fn update(msg: Message) void {
|
||||||
switch (msg) {
|
switch (msg) {
|
||||||
// TODO: implement queries, ability to set components, etc.
|
// TODO: implement queries, ability to set components, etc.
|
||||||
.tick => std.debug.print("\nphysics tick!\n", .{}),
|
.tick => std.log.debug("physics tick!", .{}),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue