Micrio sizing and <canvas> controller

Constructors

Properties

Accessors

Methods

Constructors

Properties

element: HTMLCanvasElement = ...

The Micrio WebGL rendering <canvas> element

isMobile: Writable<boolean> = ...

Client is a mobile device, Writable

viewport: ViewRect = ...

Canvas sizing information

Accessors

  • get $isMobile(): boolean
  • Client is a mobile device, Writable value

    Returns boolean

Methods

  • Get the screen pixel ratio

    Parameters

    Returns number

    The device pixel ratio

  • Micrio element resize handler

    Returns void

  • Set virtual offset margins applied to all viewports

    Parameters

    • width: number

      The offset width in pixels

    • height: number

      The offset height in pixels

    Returns void