Repository navigation
v0.6.0 - Remove ECS Dependency
Breaking Changes
- Removed zig-ecs dependency entirely - The library no longer depends on external ECS
- ECS-based Engine API removed - Use VisualEngine instead
Changes
- VisualEngine is now the primary and only sprite management API
- Engine namespace now only provides static Input/UI helpers (
gfx.Engine.Input,gfx.Engine.UI) - Effect types (Fade, TemporalFade, Flash) now have built-in
update()methods - Added
getDisplayColor()to Flash effect - All examples (01-09) migrated to VisualEngine pattern
- Updated documentation to reflect new architecture
Migration Guide
Replace ECS-based Engine usage with VisualEngine:
// Before (ECS-based - no longer supported)
var registry = ecs.Registry.init(allocator);
var engine = try gfx.Engine.init(allocator, ®istry, .{...});
const player = registry.create();
registry.add(player, gfx.Position{...});
// After (VisualEngine)
var engine = try gfx.VisualEngine.init(allocator, .{
.window = .{ .width = 800, .height = 600, .title = "My Game" },
});
const player = try engine.addSprite(.{
.sprite_name = "player_idle",
.x = 400, .y = 300,
});
// Use static helpers for input/UI
if (gfx.Engine.Input.isDown(.left)) { ... }
gfx.Engine.UI.text("Hello", .{ .x = 10, .y = 10, .size = 20, .color = gfx.Color.white });