Repository
Current version released
4 years ago
Dependencies
deno.land/x
pane
⚠️ Work in progress. Expect breaking changes.
Pane provides bindings for rust crate
winit in preparation for
webgpu integration in deno. This
module will provide a way of getting a
raw_window_handle
resource
to provide to deno and interaction with the window. Pane no longer provides
bindings to pixels as a way of drawing
framebuffers onto the window, instead use WebGPU.
Example
Singe window
import { PaneEventLoop, PaneWindow } from "https://deno.land/x/pane/mod.ts";
const eventLoop = new PaneEventLoop();
const _pane = new PaneWindow(eventLoop);
setInterval(() => {
for (const event of eventLoop.step()) {
if (
event.type === "windowEvent" &&
event.value.event.type === "closeRequested"
) {
Deno.exit();
}
}
}, 0);
Multiple windows
import { PaneEventLoop, PaneWindow } from "https://deno.land/x/pane/mod.ts";
const eventLoop = new PaneEventLoop();
const _pane1 = new PaneWindow(eventLoop);
const _pane2 = new PaneWindow(eventLoop);
setInterval(() => {
for (const event of eventLoop.step()) {
if (
event.type === "windowEvent" &&
event.value.event.type === "closeRequested"
) {
Deno.exit();
}
}
}, 0);
Maintainers
- Elias Sjögreen (@eliassjogreen)
Permission Table
Permission Needed | Required | Reason |
---|---|---|
--allow-env |
yes | For development variables. |
--allow-net |
yes | For getting the prebuild binaries. |
--allow-read |
yes | For reading the library. |
--allow-plugin |
yes | It’s a plugin, what do you expect. |
--unstable |
yes | It’s unstable because it is a plugin. |
Other
Related
Contribution
Pull request, issues and feedback are very welcome. Code style is formatted with
deno fmt
and commit messages are done following Conventional Commits spec.
Licence
Copyright 2020-2021, the denosaurs team. All rights reserved. MIT license.