Skip to content
/ neko Public

frame buffer deno module built on top of mini_fb with canvas api implementation and a webgpu renderer

License

Notifications You must be signed in to change notification settings

load1n9/neko

Repository files navigation


Neko 🐈

frame buffer deno module built on top of mini_fb with canvas api implementation and a webgpu renderer

neko stars neko releases neko License


Packages

  • Core - basic frame buffer library
  • Canvas - javascript canvas implementation
  • WebGPU - webgpu renderer

Usage

Using Methods

import { Neko, World } from "https://deno.land/x/neko/mod.ts";

const width = 800;
const height = 600;

const neko = new Neko({
  title: "Neko",
  width,
  height,
});
const frame = new Uint8Array(width * height * 4).fill(0x000000);
class Instance extends World {
  updateSync() {
    frame[Math.round(Math.random() * frame.length)] = Math.round(
      Math.random() * 0xffffff,
    );
    neko.setFrameBuffer(frame);
  }
}

new Instance().startSync(neko, 60);

Using Functions

import { Neko, World } from "https://deno.land/x/neko/mod.ts";

const width = 800;
const height = 600;

const neko = new Neko({
  title: "Neko",
  width,
  height,
});
const frame = new Uint8Array(width * height * 4).fill(0x000000);
new World().startSync(neko, {
  fps: 60,
  updateSync: () => {
    frame[Math.round(Math.random() * frame.length)] = Math.round(
      Math.random() * 0xffffff,
    );
    neko.setFrameBuffer(frame);
  },
});

Maintainers

About

frame buffer deno module built on top of mini_fb with canvas api implementation and a webgpu renderer

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published