Micrio client Events lifecycle Client 3.x
WARNING
This page is about the Micrio client version 3. Use the links below to navigate to newer versions.
The order of events to know when a Micrio element is initialized, has its required data to start, has drawn its first frame, or is being destroyed is as follows.
All events below fire on the Micrio HTML element, unless specified otherwise.
micrio-created
(fires onwindow
)A new Micrio JS has been created. This is before any initialization or loading is done.
pre-info
This fires for any loaded or pre-loaded image data JSON (resolution, base settings), including linked images that are preloaded for tours. The
event.detail
is the individual image JSON, that can be manipulated at this point.settings
The main image data (resolution, low-level settings) has been downloaded and will be processed next. The
event.detail
is the settings JSON, allowing for any preprocessing manipulation.preset
The image info has been loaded and the
Camera
has been initialized. Nothing else is initialized or loaded yet.placed
The Micrio
<canvas>
HTML element has been placed in the Micrio HTML container.pre-metadata
Fires when image content data has been loaded, but not yet initialized. The
event.detail
is the data JSON. This allows you to change any data (markers, tours, ...) before it gets processed by Micrio.metadata
All required data, such as tours and markers, has been succesfully loaded and initialized.
ready
&micrio-ready
(fires onwindow
).Comes directly after
metadata
and signifies that the image is fully ready to start being drawn. An alternative is themicrio-ready
event which fires on thewindow
instead of the Micrio HTML element.load
&show
The image is fully loaded and the first frame has been succesfully drawn, but the image is still fading in. The event
load
fires for any Micrio image, even embedded inside another<micr-io>
element. Theshow
event only fires on a main<micr-io>
element.drawn
The first fully opaque (100% opacity) has been drawn! From here on, the Micrio element will be opaque and can be for instance faded in.
load-start
andload-end
These fire when texture downloading starts, or finishes. This event can be used to show or hide a custom loader element.
error
This event fires for any fatal Micrio errors that might arise. The
event.detail
is the error detail object. When this event is fired, a fatalException
will also be thrown.hide
The Micrio element is removed.