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-infoThis fires for any loaded or pre-loaded image data JSON (resolution, base settings), including linked images that are preloaded for tours. The
event.detailis the individual image JSON, that can be manipulated at this point.settingsThe main image data (resolution, low-level settings) has been downloaded and will be processed next. The
event.detailis the settings JSON, allowing for any preprocessing manipulation.presetThe image info has been loaded and the
Camerahas been initialized. Nothing else is initialized or loaded yet.placedThe Micrio
<canvas>HTML element has been placed in the Micrio HTML container.pre-metadataFires when image content data has been loaded, but not yet initialized. The
event.detailis the data JSON. This allows you to change any data (markers, tours, ...) before it gets processed by Micrio.metadataAll required data, such as tours and markers, has been succesfully loaded and initialized.
ready&micrio-ready(fires onwindow).Comes directly after
metadataand signifies that the image is fully ready to start being drawn. An alternative is themicrio-readyevent which fires on thewindowinstead of the Micrio HTML element.load&showThe image is fully loaded and the first frame has been succesfully drawn, but the image is still fading in. The event
loadfires for any Micrio image, even embedded inside another<micr-io>element. Theshowevent only fires on a main<micr-io>element.drawnThe 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-startandload-endThese fire when texture downloading starts, or finishes. This event can be used to show or hide a custom loader element.
errorThis event fires for any fatal Micrio errors that might arise. The
event.detailis the error detail object. When this event is fired, a fatalExceptionwill also be thrown.hideThe Micrio element is removed.