Documentation ¶
Overview ¶
Package media provides utilities for wasm media.
Index ¶
- func OnKey(ev KeyEvent, f func(key string))
- type Canvas
- func (c Canvas) ClearRect(r Rect)
- func (c Canvas) ClientH() int
- func (c Canvas) ClientW() int
- func (c Canvas) DrawImage(img Image, r Rect)
- func (c Canvas) DrawImageFlipHorizontal(img Image, r Rect)
- func (c Canvas) DrawText(s string, x, y int)
- func (c Canvas) OnMouse(mapTouch bool, f func(click MouseClick, x, y int))
- func (c Canvas) SetFont(name, style string)
- type Image
- type KeyEvent
- type MouseClick
- type Rect
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Canvas ¶
Canvas represents an HTML5 canvas.
func (Canvas) DrawImageFlipHorizontal ¶
DrawImageFlipHorizontal ...
type Image ¶
Image represents a js image.
type MouseClick ¶
type MouseClick int8
MouseClick ...
const ( MouseUp MouseClick = iota MouseDown )
Mouse clicks ...
func (MouseClick) String ¶
func (m MouseClick) String() string
Click to show internal directories.
Click to hide internal directories.