kaffee 0.2.0

Small 2D framework
Documentation

kaffee

Docs

This is an attempt at designing a simple 2D graphics API on top of wgpu, inspired by macroquad. You should probably not use this (yet).

Example

use kaffee::prelude::*;

struct GameState;

impl EventHandler for GameState {
    fn init(&mut self, r: &mut RenderContext) {}

    fn update(&mut self, dt: f32) {}

    fn redraw(&mut self, r: &mut RenderContext) {
        r.draw_batch(|b| {
            b.draw_rect(50., 50., 300., 300., GREEN);
            b.draw_rect(150., 150., 300., 300., RED);
            b.draw_rect(250., 250., 300., 300., WHITE);
        });
    }
}

fn main() {
    pollster::block_on(App::run(&Settings::default(), GameState {}))
}

Goals

  • Good documentation and examples
  • Provide an easy to use API
  • Support a wide range of platforms
  • Decent performance

License

Apache License, Version 2.0