hxn

Surface

The web page's canvas. Render each frame into currentTexture, then show it with present.

Static methods

function hxnAdopt(hxnRaw:Handle):Surface

An object for a value the library returned.

Properties

var hxnRaw:Handle

Methods

function preferredFormat(adapter:Adapter):Format

The format the browser prefers for the canvas, Bgra8Unorm or Rgba8Unorm.

function configure(device:Device, format:Format, usage:Int, width:Int, height:Int):Void

Sizes the canvas to width by height and has device render into it, in format, for usage (TextureUsage bits).

function currentTexture():Texture

This frame's texture, the same one until present.

function present():Void

Shows the frame rendered into currentTexture, after the work submitted before.

function close():Void

Releases the native value now. The collector does it otherwise. Using this object afterwards throws.