https://github.com/konsumer/deno-minifb
Deno wrapper around minifb, for making a framebuffer you can draw pixels to
https://github.com/konsumer/deno-minifb
Last synced: over 1 year ago
JSON representation
Deno wrapper around minifb, for making a framebuffer you can draw pixels to
- Host: GitHub
- URL: https://github.com/konsumer/deno-minifb
- Owner: konsumer
- Created: 2021-09-11T02:05:59.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-12-27T21:22:04.000Z (over 4 years ago)
- Last Synced: 2025-02-28T14:56:38.499Z (over 1 year ago)
- Language: Rust
- Size: 94.7 KB
- Stars: 12
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# deno minifb
This is a thin wrapper around [minifb](https://docs.rs/minifb/latest/minifb/) that you can use in deno. Combine it with [canvas](https://github.com/DjDeveloperr/deno-canvas) for native window that works like the [canvas web API](https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API) or [webgpu](https://deno.land/x/deno@v1.9.2/op_crates/webgpu) for 3D stuff (**note**: it runs very slow webgpu, unusable for a game, as it's frame-by-frame.)
# WIP
We are still working on it. The first goal is to get a basic window for canvas, but eventually we plan to add mouse, key, exit-handler, and loop-lifecycle stuff (for locking into a specific framerate.) The evenutal goal is to be a minimal piece to making performant native games in deno, using standardd web APIs.
## deno support
Currently, you need to run deno from [this PR](https://github.com/denoland/deno/pull/11648).
I compiled it on linux, liek this:
```
git clone --recursive https://github.com/eliassjogreen/deno.git deno-pr-buffers
cd deno-pr-buffers
cargo build
```
Then set `DENO` in the Makefile.
## usage
```ts
// TODO
```
## development
You will need `deno`, `make`, and `cargo` (for rust) in your path. On mac or linux, run `make setup` to install everything you need.
Run `make` for some help.