Skip to main content

Winit bindings for Deno.

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

The winit window class.

Constructors

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

The winit window constructor.

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
private
windowIconPath: string | null

Methods

spawn(): Promise<void>

Spawns the winit window.

Add Package

deno add @fazil47/deno-winit

Import symbol

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