Micrio

Micrio. Micrio

The main Micrio constructor

Constructor

new Micrio(datanon-null)

Create a Micrio instance
Parameters:
Name Type Description
data MicrioArguments The freeform options

Members

(non-null) arguments :MicrioArguments

The raw original settings
Type:

(non-null) camera :Camera

The main Camera
Type:

(constant, non-null) container :HTMLElement

Main container element
Type:
  • HTMLElement

(non-null) custom :CustomJSON

Custom image JSON settings
Type:

(constant, non-null) data :MicrioInfoData

The main settings object
Type:

el :HTMLCanvasElement|undefined

Main canvas element
Type:
  • HTMLCanvasElement | undefined

id :string

The main ID
Type:
  • string

inited :boolean

Inited state (data is loaded)
Type:
  • boolean

isLoaded :boolean

Micrio has been loaded
Type:
  • boolean

(constant, non-null) loader :Loader

The data loader
Type:

(constant, non-null) modules :Modules

Modules controller
Type:

(constant, non-null) settings :MicrioInfoSettingsData

Main options
Type:

shown :boolean

Is currently shown
Type:
  • boolean

(nullable) zone :MicrioZoneData

Optional space data
Type:

Methods

addEventListener(type, action, captureOrSettingsopt)

Add a virtual event listener
Parameters:
Name Type Attributes Default Description
type string The event type to listen for
action function The event handler
captureOrSettings VirtualEventArgument | boolean <optional>
false If capture, the event goes at the top of the stack

destroy(switchingopt, disposeGLopt)

Destroy this current instance
Parameters:
Name Type Attributes Default Description
switching boolean <optional>
false Is part of an image switching operation
disposeGL boolean <optional>
false Also dispose the GL rendering context

dispatchEvent(type, _dataopt, nullable)

Dispatch a virtual event
Parameters:
Name Type Attributes Description
type string The event type
_data VirtualEventData <optional>
<nullable>
The event data

hide(cbopt, switchingopt, forceopt)

Hide this instance
Parameters:
Name Type Attributes Default Description
cb function <optional>
Callback function
switching boolean <optional>
false Part of an image switch operation
force boolean <optional>
false Also dispose the WebGL rendering context

removeEventListener(type, action, captureOrSettingsopt)

Remove a virtual event listener
Parameters:
Name Type Attributes Default Description
type string The event type
action function The event handler
captureOrSettings VirtualEventArgument | boolean <optional>
false If capture, the event goes at the top of the stack

setZoomLimit(limopt, forceopt)

Set the maximum zoom limit
Parameters:
Name Type Attributes Default Description
lim number <optional>
1 The limit
force boolean <optional>
false Force updating the limit

show() → (non-null) {Promise}

Show this Micrio instance
Returns:
The promise when the image is shown
Type
Promise

showPlay(playVidopt)

Show play button when autoplay is blocked
Parameters:
Name Type Attributes Description
playVid function <optional>
Callback function when play button clicked