jsdriver

package
v4.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 6, 2024 License: Apache-2.0, BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Rendered for js/wasm

Overview

Package jsdriver provides a WASM/JS driver for accessing a screen.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Main

func Main(f func(screen.Screen))

Types

type Canvas2D

type Canvas2D struct {
	// contains filtered or unexported fields
}

Adapted from Mark Farnan's go-canvas library (github.com/markfarnan/go-canvas)

func NewCanvas2d

func NewCanvas2d(width int, height int) *Canvas2D

type Window

type Window struct {
	event.Deque
	// contains filtered or unexported fields
}

func (*Window) Publish

func (w *Window) Publish()

func (*Window) Release

func (w *Window) Release()

func (*Window) Scale

func (w *Window) Scale(dr image.Rectangle, src screen.Texture, sr image.Rectangle, op draw.Op)

func (*Window) Upload

func (w *Window) Upload(dp image.Point, src screen.Image, sr image.Rectangle)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL