Surface
The web page's canvas. Render each frame into currentTexture, then show it with present.
Static methods
function hxnAdopt(hxnRaw:Handle):SurfaceAn object for a value the library returned.
Properties
var hxnRaw:HandleMethods
function preferredFormat(adapter:Adapter):FormatThe format the browser prefers for the canvas, Bgra8Unorm or Rgba8Unorm.
function configure(device:Device, format:Format, usage:Int, width:Int, height:Int):VoidSizes the canvas to width by height and has device render into it, in format, for usage (TextureUsage bits).
function currentTexture():TextureThis frame's texture, the same one until present.
function present():VoidShows the frame rendered into currentTexture, after the work submitted before.
function close():VoidReleases the native value now. The collector does it otherwise. Using this object afterwards throws.