5 unstable releases

0.3.0-rc.1 Jul 6, 2023
0.2.0 Feb 5, 2023
0.1.0 Oct 30, 2022
0.1.0-rc.1 Aug 16, 2022
0.1.0-pre Aug 14, 2022

#739 in Graphics APIs

21 downloads per month

Apache-2.0

29KB
737 lines

kaffee

Docs crates.io

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, _: &mut GfxContext) {}

    fn input(&mut self) {}

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

    fn redraw(&mut self, g: &mut GfxContext) {
        g.clear_color(Color::BLACK);
        g.draw_quad(-0.5, -0.5, 1., Color::RED);
    }
}

fn main() {
    pollster::block_on(App::new(GameState {})).run();
}

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


lib.rs:

kaffee - API Documentation

kaffee is a simple 2D framework, built on top of wgpu.

Dependencies

~24–60MB
~865K SLoC