00 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Black Friday / Cyber Monday
30% OFF all plugins
Including renewals
Nov 27–30, 2026
The runtime API of the plugin is exposed through the InteractiveMapApi interface. An instance is passed to custom code (e.g. Custom JS, Action Run Script) and gives you full programmatic control over the map: scenes, viewport, audio, styles, UI widgets and events.
The root facade for a single player instance.
| Method | Description |
|---|---|
on(event, handler) | Subscribes to a map event (see Events). Returns an unsubscribe function — call it to remove the listener. |
getResourceUrl(type) | Returns the base URL for plugin resources. type: "assets" | "icons". |
getId() | Returns the ID of the current interactive map. |
generateId() | Generates a new unique ID (same format used internally for scenes, layers and controls). |
getContainer() | Returns the host HTMLDivElement the map is mounted into. |
getShadowRoot() | Returns the ShadowRoot of the map element. Use it to query internal DOM when needed. |
start() | Starts the map (initialization, initial scene, auto-load, etc.). |
destroy() | Fully destroys the map instance and releases resources. |
styleApi | Read-only property. Returns the StyleApi instance. |
audioApi | Read-only property. Returns the AudioApi instance. |
viewportApi | Read-only property. Returns the ViewportApi instance. |
| Read-only property. Returns the SceneApi instance. |
uiApi | Read-only property. Returns the UIApi instance. |
Sub-APIs are exposed directly as getters. You can always access them as core properties on the root instance:
Applies/removes emotion styles (CSS classes) on the map.
| Method | Description |
|---|---|
applyStyle(style: EmotionStyle): string | Applies a style and returns the generated class name. |
removeStyle(className: string): void | Removes a previously applied style by its class name. |
Sound playback control.
| Method | Description |
|---|---|
playFromAction(action, context?) | Plays a sound defined by a PlaySoundAction. Optional context: { sceneId?, layerId? } identifies the origin of the sound. |
stop(channel?) | Stops a specific sound/channel; omit the argument to stop everything. |
setMuted(muted: boolean) | Mutes/unmutes audio. |
setMasterVolume(volume: number) | Sets the master volume. |
dispose() | Releases all audio resources. |
Camera control: pan, zoom, fullscreen.
| Method | Description |
|---|---|
setOptions(options: Partial<ViewportOptions>) | Merges new viewport options (background, pan, zoom, constraints — see ViewportOptions in map.ts). |
getOptions(): Readonly<ResolvedViewportOptions> | Returns the fully resolved (with defaults applied) viewport options. |
lookAt(params: LookAtParams): Promise<ViewportApi> | Animates the camera to the given target. Resolves when the animation finishes. |
lookAtLayer(params: LookAtLayerParams): Promise<ViewportApi> | Animates the camera to focus a specific layer. |
zoom(params: ZoomParams): Promise<ViewportApi> | Animates to an absolute zoom level. |
zoomBy(params: ZoomByParams): Promise<ViewportApi> | Animates zoom by a relative delta. |
zoomAndCenter(params: ZoomParams): Promise<ViewportApi> | Sets the zoom level and centers the canvas. |
toggleFullscreen() | Toggles fullscreen mode. |
isFullscreen(): boolean | Returns whether fullscreen is currently active. |
All animated methods are chainable: await map.viewportApi.zoom({...}).then(api => api.lookAt({...})).
Scene and layer management.
| Method | Description |
|---|---|
size(): number | Number of scenes. |
has(sceneId): boolean | Whether a scene exists. |
get(sceneId): Scene | null | Returns a scene by ID. |
getIndex(sceneId): number | null | Returns the scene position in the list. |
getLayer(sceneId, layerId): Layer | null | Returns a layer within a scene. |
getActive(): Scene | null | Returns the currently visible scene. |
getList(): Scene[] | Returns all scenes. |
getNext(loop?): Scene | null | Next scene; loop: true wraps around. |
getPrev(loop?): Scene | null | Previous scene; loop: true wraps around. |
setDefault(sceneId | null): void | Sets/clears the default (initial) scene. |
getDefault(): string | null | Returns the default scene ID. |
add(scene): boolean | Adds a scene; returns true on success. |
remove(sceneId): boolean | Removes a scene; returns true on success. |
move(sceneIds, pos): boolean | Moves the given scenes to position pos. |
show(sceneId): boolean | Shows a scene (fires scene:show). |
hide(): boolean | Hides the current scene (fires scene:hide). |
Control widget management.
| Method | Description |
|---|---|
size(): number | Number of registered widgets. |
has(controlId): boolean | Whether a widget exists. |
get(controlId): ControlWidget | null | Returns a widget by ID. |
add(widget: ControlWidget): boolean | Registers a widget; returns true on success (fires widget:add). |
remove(controlId): boolean | Removes a widget (fires widget:remove). |