Deno SDL2

Cross platform and stable bindings to SDL2. Have fun!

Features

  • Bindings to Video, Graphics, Font and Mixer subsystems.
  • API similar to Rust-sdl2
  • Not --unstable. Uses TCP instead of Deno's traditional plugin system.

Example

import { Canvas } from "https://deno.land/x/sdl2/mod.ts";

const canvas = new Canvas({ title: "Hello, Deno!", width: 800, height: 400 });

canvas.addEventListener("event", (e: WindowEvent) => {
  console.log(e.detail);
});

canvas.setDrawColor(0, 64, 255, 0);
canvas.clear();
canvas.present();

canvas.start();

License

MIT