Files
breeze/tests/lumi_mascot_behavior.zi
waozi ef0de86e02
Cloudflare Pages / Build and verify the site (push) Successful in 3m29s
Integrate Breeze desktop, Android, and app updates
Use the verified dependency lock across native hosts and bundled apps. Preserve saved styles, local app reactivation, and offline packages while integrating the latest practice, Habits, Lumi, and figure preview updates.
2026-11-20 02:24:34 -03:00

33 lines
1.3 KiB
Ziran

#import "geometry"
#import "drawing_props"
#import, file "../apps/lumi/lumi_mascot.zi";
// Lumi beside her messages faces the chat. She was drawn with a negative
// source width, which the desktop host's raster rejects: opening Lumi with
// a reply on screen failed the frame and closed Inner Breeze.
#program_export
main :: () -> s32 {
bounds := Rectangle.{10.0, 20.0, 40.0, 40.0}
corners: [4]Vector2
picture := LumiMascotFacingLeft(cast(u64)7, bounds, corners[:])
// An empty source is the whole picture; no host mirrors through a
// negative one any more.
if picture.source.width < 0.0 || picture.source.height < 0.0 { return 1 }
// Mirrored by the warp: the picture's left edge lies on her right.
if picture.mesh.columns != 2 || picture.mesh.rows != 2 || picture.mesh.points.count != 4 {
return 2
}
expected: [4]Vector2 = .[Vector2.{50.0, 20.0}, Vector2.{10.0, 20.0},
Vector2.{50.0, 60.0}, Vector2.{10.0, 60.0}]
for i: 0..3 {
if picture.mesh.points[i].x != expected[i].x || picture.mesh.points[i].y != expected[i].y {
return 3
}
}
if picture.bounds.x != bounds.x || picture.bounds.width != bounds.width ||
picture.key != cast(u64)7 || picture.asset_path != LUMI_MASCOT_PATH {
return 4
}
return 0
}