Readonly
centerCurrent center screen coordinates [x, y] and scale [z]. For 360, also includes [yaw, pitch]. For Omni, also includes [frameIndex].
Animates the camera to center on specific image coordinates and scale.
The target coordinates [x, y, scale]. Scale is optional.
Optional animation settings.
A Promise that resolves when the animation completes.
Animates the camera to a view where the image covers the viewport.
Optional animation settings.
A Promise that resolves when the animation completes.
Animates the camera to a view showing the entire image (minimum zoom).
Optional animation settings.
A Promise that resolves when the animation completes.
Animates the camera smoothly to a target view rectangle.
The target viewport rectangle [x0, y0, x1, y1].
Optional animation settings.
A Promise that resolves when the animation completes, or rejects if aborted.
Gets the relative image coordinates [x, y, scale, depth, yaw?, pitch?] corresponding to a screen coordinate. Rounds the result for cleaner output.
The screen X coordinate in pixels.
The screen Y coordinate in pixels.
If true, treats x/y as absolute browser window coordinates.
If true, allows returning coordinates outside the image bounds (0-1).
A Float64Array containing the relative image coordinates [x, y, scale, depth, yaw?, pitch?].
Calculates a 4x4 transformation matrix for placing an object at specific coordinates
with scale and rotation in 360 space. Used for CSS matrix3d
.
The image X coordinate (0-1).
The image Y coordinate (0-1).
Optional
scale: numberThe object scale multiplier.
Optional
radius: numberThe object radius (distance from center, default 10).
Optional
rotX: numberThe object X rotation in radians.
Optional
rotY: numberThe object Y rotation in radians.
Optional
rotZ: numberThe object Z rotation in radians.
Optional
transY: numberOptional Y translation in 3D space.
Optional
scaleX: numberOptional non-uniform X scaling.
Optional
scaleY: numberOptional non-uniform Y scaling.
The resulting 4x4 matrix as a Float32Array.
Calculates the screen coordinates of the four corners of a transformed quad in 360 space. Used for positioning HTML embeds accurately on the 360 sphere.
The quad center X coordinate (0-1).
The quad center Y coordinate (0-1).
The quad relative width (0-1).
The quad relative height (0-1).
Rotation over X axis (radians).
Rotation over Y axis (radians).
Rotation over Z axis (radians).
Horizontal scale multiplier.
Vertical scale multiplier.
A Float32Array containing the screen coordinates [x0,y0, x1,y1, x2,y2, x3,y3].
Gets the screen coordinates [x, y, scale, depth] corresponding to relative image coordinates.
The image X coordinate (0-1).
The image Y coordinate (0-1).
If true, returns absolute browser window coordinates instead of element-relative.
Optional
radius: numberOptional offset radius for 360 calculations.
Optional
rotation: numberOptional offset rotation (radians) for 360 calculations.
Optional
noTrueNorth: booleanIf true (for 360), ignores the trueNorth
correction.
A Float64Array containing the screen coordinates [x, y, scale, depth].
Pans the camera view by a relative pixel amount.
The horizontal pixel distance to pan.
The vertical pixel distance to pan.
Animation duration in ms (0 for instant).
Options: render (force render), noLimit (allow panning outside bounds).
Optional
noOptional
render?: booleanLimits the horizontal and vertical viewing range for 360 images.
The horizontal arc limit as a percentage (0-1, where 1 = 360°). 0 disables horizontal limit.
The vertical arc limit as a percentage (0-1, where 1 = 180°). 0 disables vertical limit.
Sets the rendering area for this image within the main canvas. Used for split-screen and potentially other layout effects. Animates by default.
The target area rectangle [x0, y0, x1, y1] relative to the main canvas (0-1).
Options for setting the area.
Optional
direct?: booleanIf true, sets the area instantly without animation.
Optional
noIf true, prevents dispatching view updates during the animation.
Optional
noIf true, prevents triggering a Wasm render after setting the area.
Sets the center of the screen to the specified image coordinates and scale instantly.
The target image X coordinate (0-1).
The target image Y coordinate (0-1).
The target scale (optional, defaults to current scale).
Sets a rectangular limit for camera navigation within the image.
The viewport limit rectangle [x0, y0, x1, y1].
Sets the camera view instantly to the specified rectangle.
The target viewport rectangle [x0, y0, x1, y1].
Options for setting the view.
Optional
area?: ViewIf provided, interprets v
relative to this sub-area instead of the full image.
Optional
correctIf true (for 360), corrects the view based on the trueNorth
setting.
Optional
noIf true, allows setting a view outside the normal image boundaries.
Optional
noIf true, prevents triggering a Wasm render after setting the view.
Performs an animated zoom centered on a specific screen point (or the current center).
The amount to zoom (positive zooms out, negative zooms in).
Forced duration in ms (0 for instant).
Screen pixel X-coordinate for zoom focus (optional, defaults to center).
Screen pixel Y-coordinate for zoom focus (optional, defaults to center).
Animation speed multiplier (optional).
If true, allows zooming beyond image boundaries.
A Promise that resolves when the zoom animation completes.
Zooms in by a specified factor.
Zoom factor (e.g., 1 = standard zoom step).
Animation duration in ms.
Animation speed multiplier.
A Promise that resolves when the animation completes.
Zooms out by a specified factor.
Zoom factor (e.g., 1 = standard zoom step).
Animation duration in ms.
Animation speed multiplier.
A Promise that resolves when the animation completes.
Represents the virtual camera used to view a MicrioImage. Provides methods for controlling the viewport (position, zoom, rotation), converting between screen and image coordinates, and managing animations.
Instances are typically accessed via
micrioImage.camera
.Author
Marcel Duin marcel@micr.io