ReadonlycenterCurrent 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 viewport.
The target viewport as either a View [x0, y0, x1, y1] or View {centerX, centerY, width, height}.
Optional animation settings.
Optionalarea?: CameraArrayIf provided, interprets view relative to this sub-area.
OptionalisJump?: booleanIf true, performs a "jump" animation (zooms out then in).
OptionallimitZoom?: booleanIf true, respects the image's maximum zoom limit during animation.
Optionalmargin?: [number, number]If provided, adds a margin to the view.
OptionalomniIndex?: numberFor Omni objects: the target image frame index to animate to.
OptionalprevView?: CameraArrayBase the progress override on this starting view.
Optionalprogress?: numberSet the starting animation progress percentage (0-1).
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?].
Gets the scale at which the image fully covers the viewport.
Gets the current viewing direction (yaw) in 360 mode.
The current yaw in radians.
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).
Optionalscale: numberThe object scale multiplier.
Optionalradius: numberThe object radius (distance from center, default 10).
OptionalrotX: numberThe object X rotation in radians.
OptionalrotY: numberThe object Y rotation in radians.
OptionalrotZ: numberThe object Z rotation in radians.
OptionaltransY: numberOptional Y translation in 3D space.
OptionalscaleX: numberOptional non-uniform X scaling.
OptionalscaleY: numberOptional non-uniform Y scaling.
OptionalnoCorrectNorth: booleanThe resulting 4x4 matrix as a Float32Array.
[Omni] Gets the frame index corresponding to a given rotation angle (radians).
Optionalrot: number[Omni] Gets the current rotation angle in degrees based on the active frame index.
[Omni] Gets the screen coordinates [x, y, scale, depth] for given 3D object coordinates.
Gets the current camera zoom scale.
Gets the current image view rectangle.
A copy of the current screen viewport array, or undefined if not initialized.
Gets the current image view rectangle [x0, y0, x1, y1] relative to the image (0-1).
A copy of the current screen viewport array, or undefined if not initialized.
Gets the current image view rectangle [centerX, centerY, width, height] relative to the image (0-1).
A copy of the current screen viewport array, or undefined if not initialized.
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.
Optionalradius: numberOptional offset radius for 360 calculations.
Optionalrotation: numberOptional offset rotation (radians) for 360 calculations.
OptionalnoTrueNorth: 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).
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.
Optionaldirect?: booleanIf true, sets the area instantly without animation.
OptionalnoDispatch?: booleanIf true, prevents dispatching view updates during the animation.
OptionalnoRender?: booleanIf true, prevents triggering a 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 whether the camera view should be limited to always cover the viewport.
If true, limits the view to cover the screen.
Optionalpitch: numberSets a rectangular limit for camera navigation within the image.
The viewport limit rectangle [x0, y0, x1, y1].
[Omni] Applies Omni-specific camera settings (distance, FoV, angle) to the engine canvas.
Sets the 3D rotation for an embedded image (used for placing embeds in 360 space).
Sets the camera zoom scale instantly.
The target scale.
Sets the camera view instantly to the specified viewport.
The target viewport as either a View [x0, y0, x1, y1] or View {centerX, centerY, width, height}.
Options for setting the view.
Optionalarea?: CameraArrayIf provided, interprets view relative to this sub-area instead of the full image.
OptionalcorrectNorth?: booleanIf true (for 360), corrects the view based on the trueNorth setting.
OptionalnoLimit?: booleanIf true, allows setting a view outside the normal image boundaries.
OptionalnoRender?: booleanIf true, prevents triggering a 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