Skip to main content
This release was yanked — the latest version of @fazil47/deno-winit is 0.2.1. Jump to latest

Winit bindings for Deno.

This package works with Deno
This package works with Deno
JSR Score
94%
Published
5 months ago (0.1.0)
class WinitWindow

Constructors

new
WinitWindow(unnamed 0: { forceX11?: boolean; width?: number; height?: number; presentationFormat?: GPUTextureFormat; setupFunction?: (
device: GPUDevice,
) => void
; drawFunction?: (
device: GPUDevice,
) => void
; resizeFunction?: (
width: number,
height: number,
) => void
; }
)

Properties

private
drawFunction: (
device: GPUDevice,
) => void
private
dylibPromise: Promise<winitDylib>
private
height: number
private
resizeFunction: (
width: number,
height: number,
) => void
private
setupFunction: (
device: GPUDevice,
) => void
private
system:
"win32"
| "cocoa"
| "wayland"
| "x11"
| null
private
width: number

Methods

spawn(): Promise<void>

Add Package

deno add jsr:@fazil47/deno-winit

Import symbol

import { WinitWindow } from "@fazil47/deno-winit";

---- OR ----

Import directly with a jsr specifier

import { WinitWindow } from "jsr:@fazil47/deno-winit";