Represents and controls a single Micrio image instance within the viewer. This class manages the image's metadata (info), cultural data (data), settings, camera, state, and interactions with the WebAssembly module for rendering and processing. It handles loading image tiles, embeds, markers, tours, and galleries associated with the image.

Instances are typically created and managed by the main HTMLMicrioElement.

Marcel Duin marcel@micr.io

Properties

album?: Album

Album information if this image is part of a V5 album.

camera: Camera

The virtual camera instance controlling the view for this image.

data: Writable<ImageData> = ...

Svelte Writable store holding the image's cultural data (markers, tours, text content for the current language). See Models.ImageData.ImageData.

dataPath: string

Base path URI for fetching data.[lang].json files.

embeds: MicrioImage[] = []

Array of child MicrioImage instances embedded within this image.

error: string

Stores an error message if loading failed.

grid: Grid

Grid controller instance, if this image is a grid container.

id: string

The unique identifier (Micrio ID) for this image.

Svelte Readable store holding the image's core information (dimensions, format, settings, etc.). See Models.ImageInfo.ImageInfo.

openedView: View

Stores the camera view state when a marker is opened, used to return to the previous view.

opts: {
    area?: View;
    isEmbed?: boolean;
    isPassive?: boolean;
    secondaryTo?: MicrioImage;
    useParentCamera?: boolean;
} = {}

Options controlling behavior (embedding, split-screen, etc.).

Type declaration

  • Optionalarea?: View

    Optional sub area [x0, y0, x1, y1] defining placement within a parent canvas (for embeds/galleries).

  • OptionalisEmbed?: boolean

    If true, this image is embedded within another image (affects rendering/camera).

  • OptionalisPassive?: boolean

    If true, passively follows the view changes of the primary split-screen image.

  • OptionalsecondaryTo?: MicrioImage

    For split screen, the primary image this one is secondary to.

  • OptionaluseParentCamera?: boolean

    If true, uses the parent image's camera instead of creating its own (for switch/omni galleries).

settings: Writable<Settings> = ...

Svelte Writable store holding the image's specific settings, often merged from attributes and info data. See Models.ImageInfo.Settings.

state: State.Image

State manager specific to this image instance (view, active marker, etc.). See State.Image.

Gallery swiper instance, if this image is part of a swipe gallery.

tileBase: string

Base path for fetching image tiles.

uuid: string = ...

A unique instance identifier (UUID) generated for this specific instance.

video: Writable<HTMLVideoElement> = ...

Svelte Writable store holding the HTMLVideoElement if this image represents a video.

viewport: Writable<View> = ...

Svelte Writable store holding the calculated pixel viewport [left, top, width, height] of this image within the main canvas.

visible: Writable<boolean> = ...

Svelte Writable store indicating if this image's canvas is currently visible and being rendered.

wasm: Wasm

The global Wasm controller instance.

Accessors

Methods

  • Adds an embedded MicrioImage (representing another Micrio image or video) within this image.

    Parameters

    • info: Partial<ImageInfo>

      Partial info data for the embed.

    • area: View

      The placement area [x0, y0, x1, y1] within the parent image.

    • opts: EmbedOptions = {}

      Embedding options (opacity, fit, etc.).

    Returns MicrioImage

    The newly created embedded MicrioImage instance.

  • Fades in the image smoothly or instantly.

    Parameters

    • direct: boolean = false

    Returns void

  • Fades out the image smoothly or instantly.

    Parameters

    • direct: boolean = false

    Returns void

  • Gets the HTMLMediaElement associated with a video embed ID.

    Parameters

    • id: string

    Returns HTMLMediaElement