import { AxiosInstance } from "axios"; import { MpSdk, Scene, Vector3, Vector2, Renderer } from "../bundle/sdk"; import { tubeLineType, pathLineType } from "./loaders"; import { getAssetUrl } from "./utils"; import { initToolbarUI, themeManager } from "./atwinui"; import { type ITag, type IUser, type ISpace, type IShowcaseObject, type I3DObject, type IMPConfig, type ISweep, type ITagPublic, type NearbyPayload, type NearbyObjects, type IObjectData, TRANSFORM_TYPE, Object3DPosition, ObjectCoordinates, EulerCoordinates, State, FileUpload, ObjectConfig, IAtwinFloor, IAtwinLabel, SPACE_EVENTS, ComponentOptions, SpaceAvatar, IMapConfig, MEETING_SIDEBAR, IO_ROLE, IO_SPACE_EVENTS, IO_MEETING_EVENTS, SCREEN_POSITIONS, ITagCategory, TagMessage, ISdkConnections, PartitionNode, PartitionPayload, ICurrentSpace, SpaceMetadata, IObjectFilters, ITagIOTCategory, DeviceInfo, ScreenShareUser, PathConfig, ModelPayload, IPipeCategory, IPipe } from "./types"; import * as minimap from './minimap'; import '../static/sidebar.css'; import '../static/map.css'; import '../static/media_screen.css'; import { createMeetingTemplate, joinMeetingTemplate } from "./meeting/templates"; import { ActionHistory } from "./actionHistory"; import * as meet from './zoom'; import 'notyf/notyf.min.css'; import { convertYupToZup, convertZupToYup, getRelativePosition, getOriginalWorldPosition } from "./worldConversion"; import { renderPreviewModal, togglePreviewModal, closePreviewModal, setPreviewModalAction, activePreviewModal } from "./atwinui/components/toolbar"; import { ActionPathHistory } from "./actionPathHistory"; import { removeScreenShareSessionData } from "./atwinui/components/toolbar/screenSharePane"; import { clearTagVisibilityStorage } from "./atwinui/components/toolbar/tagListPane"; import { clearActivePane } from "./atwinui/events"; declare const transformHistory: ActionHistory; declare const pathHistory: ActionPathHistory; declare const partitionHistory: ActionPathHistory; declare const _config: { mp: { urlParams: string[]; }; meet: { meetingKey: string; }; zoom: { SDKKey: string; SDKSecret: string; }; }; declare let _api: AxiosInstance; declare let _spaceId: string; declare let _space: ISpace; declare let _mpConfig: IMPConfig; declare let _atwin: MpSdk | null; declare let _tags: ITag[]; declare let _tagCategories: ITagCategory[]; declare let _tagMessageRecepients: { name: string; uuid: string; }[]; declare let _meetingParticipants: any; declare let tags: ITagPublic[]; declare let sweeps: any; declare let _3DXObjects: IObjectData[]; declare let selectedObject: IObjectData; declare let previousObjTransform: Object3DPosition; declare let currentObjTransform: Object3DPosition; declare let actionHistory: Array; declare let _sceneObject: Scene.IObject; declare let _pointerCoord: Vector3; declare let _generatedObjectIds: number[]; declare let state: State; declare let domMousePosition: Vector3; declare let isFitScreenOccupied: boolean; declare let isCdnMapDataAvailable: boolean; declare let _atwinConnections: ISdkConnections; declare let _onMouseClickInstance: Function; declare let _modelDetails: MpSdk.Model.ModelDetails; declare const tagColors: string[]; declare let editMode: boolean, _thisVertexPath: any[]; declare let _tubes: MpSdk.Scene.IObject; declare let _pathConfig: PathConfig; declare let _partitionNodes: PartitionNode[]; declare let _currentSpace: any; declare let _tagIotCategoryTypes: ITagIOTCategory[]; declare let _tagIotDevices: DeviceInfo[]; declare let _iotLinkedSyatemOptions: string[]; declare let _spaceUsers: ScreenShareUser[]; declare let _screenSharingHostUser: ScreenShareUser; declare let _screenSharingParticipantUsers: ScreenShareUser[]; declare let _pipeCategories: IPipeCategory[]; declare let _selectedPipeCategory: IPipeCategory; declare let _pipes: IPipe[]; declare let _selectedPipe: IPipe; /** * Initializes the axios API instance. Use this if you want to make an API call using the library without * invoking the connectSpace method * @param apiKey (optional) api key assigned to the Authorization header * @param contentType (optional) set the content-type header. Default is multipart/form-data */ declare function initAtwinApi(apiKey?: string, contentType?: string): void; /** * initialization: loginUser, iframe, space, tags, objects * @constructor * @param url - the URL of the space you wish to connect to. * @param auth - an authentication object with the apiKey and user credentials. * @param config - a config object to set some default space behavior. */ declare function connectSpace(url: string, auth: { apiURL?: string; apiKey: string; user: IUser; } | null, config: IMPConfig, callbacks?: { onLoad: Function; onStart: Function; onPlay: Function; }): Promise; declare function getAtwinSdk(iframeId?: string): MpSdk | null; /** * Check if a specific toolbar feature is enabled or not */ declare function isToolbarFeatureEnabled(key: string): boolean; declare function getFloors(): IAtwinFloor[]; declare function getLabels(): IAtwinLabel[]; /** * Super light weight alternative to lodash's debounce * This function will allow you to debounce a function a set amoint in milliseconds * Useful for improving performance if your function is inside a subscribe method * @param maxTime milliseconds * @returns {boolean} */ declare function hasTimeElapsed(maxTime: number): boolean; /** * This function returns an object that returns an array of 3D, video, and slideshow objects * You can pass a object type as a object parameter to set what the contents of the returned objects will be * @constructor * @param payload * @type {NearbyPayload} * @returns {NearbyObjects} */ declare function getNearbyObjects(payload: NearbyPayload): NearbyObjects; declare function setRenderDistance(distance: number): void; /** * Sets the animation state of a 3D model. Works only for GLB files for now * @param action Set the animation state to either play or stop * @param target The target object. This could technically just accept the id but I will use the entire object data for now just in case * @returns {void} */ declare function setAnimationState(action: string, modelId: number): void; declare function getSpaceId(url: string): string; declare function getCurrentSweep(): ISweep; declare function getCurrentCameraPose(): MpSdk.Camera.Pose; declare function getCurrentCameraZoom(): MpSdk.Camera.ZoomData; declare function getCameraPosition(): MpSdk.Vector3; declare function getCurrentSweepPosition(): MpSdk.Vector3; declare function getCurrentFloor(): MpSdk.Floor.FloorData; declare function getSweeps(iframeId?: string): Promise; declare function getAllSweeps(): { id: string; position: Vector3; neighbors: string[]; }[]; declare function moveToSweep(sweepId: string, rotation?: Vector2, iframeId?: string): Promise; declare function getNearbySweeps(sweepId: string): Promise; declare function disableSweeps(sweeps?: ISweep[], iframeId?: string): Promise; declare function enableSweeps(sweeps?: ISweep[], iframeId?: string): Promise; /** * Enables the current or an array of sweeps * @param sweepIds (optional) - If not set, will enable or disable the current sweep * @param iframeId (optional) - If not set, will utilize the default sdk instance * @returns */ declare function enableSweep(sweepIds?: string[], iframeId?: string): Promise; /** * Enables the current or an array of sweeps * @param sweepIds (optional) - If not set, will enable or disable the current sweep * @param iframeId (optional) - If not set, will utilize the default sdk instance * @returns */ declare function disableSweep(sweepIds?: string[], iframeId?: string): Promise; /** * Stores the selected object captured by the ClickSpy class attached to the object upon creation in * show3dObjects() function. ClickSpy is not attached if viewMode is set to public. Please take note that * you cannot set an object as selected if it has not been rendered into the 3D space * @param data The data of the showcase object. Implements the IShowcaseObject interface * @param node The node of the object * @param component The component of the object * @param type The type of the object */ declare function setSelectedObject(data: IShowcaseObject, node: Scene.INode, component: Scene.IComponent, type: string): void; /** * Returns the array of 3d models in the space. You can optionally pass filters * @param filters - Filter the returned array, if multiple filters are passed, the filters will be applied in a sequencial order * @returns */ declare function get3DXObjects(filters?: IObjectFilters): Array; declare function set3DXObjects(objects: Array): void; /** * Clears the 3DXObjects array. DOES NOT remove the rendered objects from the space. * @param filters - (optional) Remove objects from the array that match your filters only * @returns */ declare function clear3DXObjects(filters?: IObjectFilters): void; /** * Clears the current selected object and sets it to null */ declare function clearSelectedObject(): void; declare function removeTransformControls(): void; declare function setTransformControls(selectedObject: IObjectData, mode?: string): void; declare function setTransformMode(mode: TRANSFORM_TYPE | string): Promise; /** * This function either reverts or restores an transformation action done on an object * @param action Accepts either undo or redo. undo is the default value if none is set * @param useNewHistory - Flag to set if user wants to use new history method. Defaults to true * @returns {boolean} Returns false if you can still undo/redo and true if not. */ declare function revertTransform(action?: string, useNewHistory?: boolean): boolean; /** * Clears the action history of all objects * @returns {void} */ declare function clearActionHistory(): void; declare function convertToEuler(coords: EulerCoordinates): ObjectCoordinates; /** * * @param node The node of the object * @param transform Object containing the desired position, rotation, and scale of the target object * @param reverting (optional) Used for undoing previous actions. Default is false */ declare function setObjectTransformation(node: Scene.INode, transform: Object3DPosition, reverting?: boolean): void; declare function playVideo(videoId: number): void; declare function pauseVideo(videoId: number): void; declare function cameraRotate(x: number, y: number, speed: number, iframeId?: string): Promise; declare function cameraSetRotation(x: number, y: number, speed?: number, iframeId?: string): Promise; declare function cameraPan(x: number, z: number, iframeId?: string): Promise; declare function cameraLookAt(x: number, y: number, iframeId?: string): Promise; declare function captureSpaceScreenshot(callback?: Function | null, resolution?: Renderer.Resolution, visibility?: Renderer.Visibility, iframeId?: string): Promise; /** * Captures a space screenshot and retrieves camera details. * @param callback - Optional callback function. * @param resolution - Optional screenshot resolution. Default: { width: 1920, height: 1080 }. * @param visibility - Optional visibility settings. Default: { mattertags: false, measurements: false, sweeps: false, views: false }. * @param iframeId - Optional id of iframe * @returns Object with screenshot and camera details. */ declare function captureScreenshotAndCameraDetails(callback?: Function | null, resolution?: Renderer.Resolution, visibility?: Renderer.Visibility, iframeId?: string): Promise<{ base64Screenshot: string; cameraPose: MpSdk.Camera.Pose; cameraZoom: MpSdk.Camera.ZoomData; }>; /** * Captures a screenshot (JPEG) of the user's current view. * @param callback - Optional callback function. * @param resolution - Optional screenshot resolution. Default: { width: 1920, height: 1080 }. * @param visibility - Optional visibility settings. Default: { mattertags: false, measurements: false, sweeps: false, views: false }. * @param iframeId - Optional id of iframe * @returns {string} Screenshot URI -- a base64 encoded string */ declare function captureCurrentView(callback?: Function | null, resolution?: Renderer.Resolution, visibility?: Renderer.Visibility, iframeId?: string): Promise; /** * Zooms the camera by a percentage. The zoom delta is defined relative to the base field of view, not the current zoom. * This means that the delta is strictly added, and not multiplied by the current zoom first. * Ex: If at zoom 2.0, zooming by another 0.1x will bring the camera to 2.1x (2.0 + 0.1) not 2.2x (2.0 + 2.0 * 0.1) * NOTE: This will FAIL if user is not in Inside Mode * @param zoom - */ declare function cameraZoomBy(zoom: number, callback?: Function, iframeId?: string): Promise; /** * Zooms the camera to a percentage of the base field of view. * Ex: Doubling the zoom, halves the field of view. * NOTE: This will FAIL if user is not in Inside Mode * @param zoom - */ declare function cameraZoomTo(zoom: number, callback?: Function, iframeId?: string): Promise; /** * Reset the zoom of the camera back to 1.0x. * NOTE: This will FAIL if user is not in Inside Mode */ declare function cameraZoomReset(iframeId?: string): Promise; /** * Moves the camera position in the direction of the argument provided. * @constructor * @param direction FORWARD,BACKWARD,LEFT,RIGHT,UP,DOWN * @type {string} */ declare function moveInDirection(direction: string, iframeId?: string): Promise; declare function getViewMode(): MpSdk.Mode.Mode; declare function setViewMode(mode: string, iframeId?: string): Promise; declare function disconnectSpace(iframeId?: string): Promise; /** * This method enables the targeting pointer to appear. Clicking on any area of the 3D space will * give your the position coordinates of that area you clicked on. You can optionally pass a callback function into this method * @param callback (optional) A callback function is a function you can pass to the method that will trigger once the user has clicked on a position * @returns */ declare function getTargetPosition(callback?: Function, continousClick?: boolean): Promise; /** * Cancels the pointer and resets the marker texture */ declare function cancelModelPlacement(): Promise; declare function setPointerCoordinates(position: Vector3): void; /** * Renders a 3D model into the space. * @param {ModelPayload} payload * @returns {Promise} */ declare function renderModel(payload: ModelPayload): Promise; /** * Reusable method that adds an object to the space locally. * @param {string} mediaUrl - The url pointing to the model/media resource * @param {string} objectType - The file type of the object * @param {ObjectConfig} config - Object that contains the configuration for the object to be rendered like * position, rotation, and scale to name an example * @deprecated - Use renderModel instead * @returns {Promise} */ declare function addObjectToSpace(mediaUrl: string, objectType: string, config?: ObjectConfig, object_data?: I3DObject): Promise; /** * Renders an avatar model to the space based on participant camera position and rotation. Wrapper for addObjectToSpace * @param modelUrl * @param modelType * @param avatarConfig * @returns */ declare function renderAvatar(avatarConfig: SpaceAvatar): Promise; declare function setSpaceAvatar(avatar: { id?: number; modelUrl: string; }): Promise; /** * Function that renders an object with an eye icon that serves as a visual representation of a user's line of sight. * @param position - x,y,z position of the anchor of the marker * @param rotation - (optional) x,y,z rotation of the anchor * @param viewpointId - Set a custom id for the viewpoint marker instead of a random id. */ declare function renderViewpointMarker(transform: { position: Vector3; rotation?: Vector3; }, viewpointId?: string, options?: ComponentOptions): Promise; /** * Toggle the visibility of a single, group, or all viewpoints. This method requires the object id of the viewpoint * @param {number|Array} viewpointIds - (optional) Pass as single or an array of ids of the viewpoints. If undefined will toggle all viewpoints' visibility instead * @returns */ declare function toggleViewpointVisibility(viewpointIds?: number | Array): void; /** * Converts pitch and yaw values to euler coordinates * @param {number} x - pitch * @param {number} y - yaw * @returns {Vector3} - Eular coordinates */ declare function convertDegRotationToEuler(x: number, y: number): Vector3; /** * Creates a copy of an object in the 3D space. You can specify a custom offset position and rotation of the cloned object * @param payload The object that you want to duplicate * @param position_offset Offset the position of the duplicate object (optional) * @param rotation_offset Offset the rotation of the duplicate object. Can be used to mirror an object (optional) * @returns {Promise} */ declare function copyObject(payload: IShowcaseObject, position_offset?: Vector3, rotation_offset?: Vector3): Promise; /** * Sets _lastCopiedObjectPosition to undefined */ declare function clearLastCopiedObjectPosition(): void; /** * Replaces a target object with a new object. The object being replaced is removed from the 3D space entirely * @param payload The new object to replace the target object * @param target The object to be replaced * @param options options to pass into the loader (optional) * @returns {Promise} */ declare function replaceObject(payload: I3DObject, target: IObjectData, options?: Object): Promise; /** * Navigates the user to Matterport's true origin (0, 0, 0) and places a marker at that location. * If a custom marker URL is provided, it uses that; otherwise, it uses a default marker. */ declare function goToMPOrigin(iframeId?: string, customMarkerUrl?: string): Promise; /** * Creates a 2D blank canvas that can used to display a wide variety images or videos dynamically by the user * A user can use transform controls to scale,reposition, and rotate the frame as they see fit * @param {string} mediaUrl (optional) Public link to the image or video media * @param transform (optional) Object containing the x,y,z coordinates for position,rotation,and scale * @param {boolean} readonly (optional) Disable updatig of media screen content. Default is false * @param {boolean} autoplay (optional) Auto play videos if media content is a video * @returns Object ID */ declare function addMediaScreen(mediaUrl?: string, transform?: { position: Vector3; scale: Vector3; rotation: Vector3; }, mediaViewerId?: number, readonly?: boolean, autoplay?: boolean): Promise; /** * Chages the value of the url property of a component. Can be used to change the media of a * node in a scene object. Please take note that the URL to the media you pass MUST be public and have the * appropriate CORS headers. * @param id The object id of the object * @param url The url of the asset. Can be image or video * @param type The file type of the media you want to set as the content. Value can either be image or video. Image is the default value */ declare function attachMediaScreenContent(mediaScreenId: number, mediaUrl: string, mediaType?: string): Promise; /** * Controls video media displayed on an HTML video element, works on videos used as textures for meshes * @param action Playback function, accepts play,pause,mute,unmute * @param element HTML video element * @param objectId id of the object * @returns */ declare function setVideoPlayback(action: string, element: HTMLVideoElement | undefined, objectId: number, isMediascreenDocked?: boolean): void; /** * Set a model's visibility * @param id - Object id * @param visible - true or false * @returns */ declare function setModelVisibility(id: number, visible?: boolean): void; /** * Toggles the display position of a media screen. * @param {string} id - The id of the media screen model * @param {boolean} visibility - Set the visibility of the model. Default value is false */ declare function toggleFitToScreen(id: number, visibility?: boolean): boolean; /** * Adds a customizable text frame to the 3D space. The method internally generates elements and programmatically * applies CSS styling. You can use this method to display text messages to the 3D screen. * @param {string} title (optional) Title of the message * @param {string} message Message content * @param {string} textScreenName Name of the text frame. * @param transform x,y,x values for position,rotation, and scale * @param {string} textColor valid color value * @param {string} backgroundColor valid background color value * @returns {Promise} */ declare function addTextMarkupScreen(title: string, message: string, textScreenName: string, transform: { position: Vector3; scale: Vector3; rotation: Vector3; }, textColor?: string, backgroundColor?: string): Promise; /** * Method that updates the style and content of the text frame. You can customize the text content as well as the * foreground and background color of the target text markup screen. * @param {number} showcase_id - The showcase id of the target object * @param {string} title - The title of your content * @param {string} text - The body of the text content * @param {string} textColor (optional) Set the color of the text. Can accept any valid color value * @param {string} backgroundColor (optional) Set the color of the background. Can accept any valid color value * @returns */ declare function setTextMarkupScreenContent(showcase_id: number, title?: string, text?: string, textColor?: string, backgroundColor?: string): void; /** * * @param payload * @type {ObjectUpload} * @returns */ declare function addObject(payload: FileUpload): Promise; declare function getObject(id: number): Promise; declare function updateShowcaseObject(payload: IShowcaseObject): Promise; /** * Updates the target object stored in s3 bucket. This performs a PUT request * @param id - The object id of the object that needs to be updated * @param {FileUpload} payload - The payload that contains the file object information that will be used to update * @returns {Promise} * @deprecated - All non matterport api calls should be done in application side */ declare function updateObject(id: number, payload: FileUpload): Promise; /** * Delete an object from from the s3 bucket * @param id - The object id of the target object to be deleted * @deprecated - use disposeModel instead * @returns */ declare function deleteObject(id: number): Promise; /** * Deletes an object added to a showcase space. Not to be confused with delete object which totally deletes an * object from the s3 storage * @param id - The showcase id of the object * @deprecated - use disposeModel instead * @returns */ declare function deleteShowcaseObject(id: number): Promise; /** * Delete an object from the 3D space * @param {IObjectData} target - The target model. You may use _3DXObjects to find your target model * @returns {number} Model id */ declare function disposeModel(target: IObjectData): Promise; /** * Deletes ALL models in the space * @returns */ declare function disposeAllModels(): Promise; declare function setLibrary(libraryModels: Array): Promise>; declare function getLibrary(refetch?: boolean): Promise>; declare function getNearestSweepFromObject(objectId: number): { sweepId: string; index: number; }; declare function rotateCameraToObject(objectCoord: Vector3): Promise; /** * @param objectId - object id * @deprecated - Use gotoModel instead */ declare function goTo3dx(objectId: number): Promise; declare function goToModel(objectId: number, iframeId?: string): Promise; declare function goToParticipant(participantId: number): Promise; declare function goToPosition(pos: Vector3, iframeId?: string): Promise; declare function showMinimap(): void; declare function hideMinimap(): void; declare function getMapConfig(): IMapConfig; declare function toggleSpaceNavigation(state?: boolean): void; /** * Draws a semi transparent tube line along a path * @param {Array} vertices - Array of coordinates or vertices * @deprecated - Use renderPath instead to render a path and setPathLine to update an existing path * @returns */ declare function drawPath(vertices: Array, options?: ComponentOptions): Promise; declare function setPathLine(id: number, path: Array): void; /** * Update the inputs of a rendered path line * @param id - id of the object/path * @param {ComponentOptions} options - keys you want to update, you should only populate keys that you explicitly wanted to update * @returns */ declare function setPathLineOptions(id: number, options: ComponentOptions): void; /** * Destroys the current path line instance * @param payload */ declare function disposePathLine(): void; /** * Returms the current tube line and data instance * @returns */ declare function getCurrentTubeLine(): IObjectData; /** * Renders a 3D path in the space, the path can display any valid ASCII value and display it as an animated value that follows along the line. * @param vertices - array of xyz coordinates * @param options - customization options to dictate the look and behavior of the path * @returns */ declare function renderPath(vertices: Array, options?: ComponentOptions): void; /** * Renders a polygon from an array of coordinates or an object containing an array of coordinates * @param {PartitionPayload|Array} payload * @param {boolean} updatePolygon - Update an existing polygon instance. Defaults to false * @returns {void} */ declare function renderPolygon(payload: PartitionPayload | Array, options?: ComponentOptions): IShowcaseObject; /** * Updates the polygons by passing a new array of vertices. Do note that any vertex markers visible will not automatically update their position * @param {number} id - id of the polygon object * @param {Array} vertices - array of vertices that are used to render the geometry of the polygon * @returns {void} */ declare function setPolygonPath(id: number, vertices: Array): void; /** * Updates the drawing mode of a polygon loader * @param {number} id - id of the polygon object * @param {string} mode - drawing mode * @returns {void} */ declare function setPolygonDrawingMode(id: number, mode: string): void; /** * Removes a vertex sphere from the space. If no argument is passed it will remove the last vertex that has been added * @param {number} index - (optional) Index of an element of vertex path * @returns */ declare function deleteVertex(index?: number): void; /** * Enables vertice controls on an existing polygon * @param component * @returns */ declare function enableVerticeControls(component: MpSdk.Scene.IComponent): void; declare function getVertexPath(): Array; /** * Deletes the edge of a polygon. * @param component - The component of the polygon instance * @param endPoint - Endpoint of the edge to be deleted * @returns */ declare function deleteEdge(component: MpSdk.Scene.IComponent, endPoint: Vector3): void; /** * Configure the loader to be used for the vertice and path of the drawing system. You can also pass different customization options for both path and vertex compnents. * You only need to run this once unless you intend to switch the configuration again. * @param {PathConfig} config - Configuration to be used by the drawing system * @returns */ declare function setDrawingConfig(config: PathConfig): void; /** * Gets the current configuration used by the drawing system * @returns Current configuration used by the drawing system */ declare function getDrawingConfig(): PathConfig; /** * Resets the configuration for the drawing system to its defaults */ declare function resetDrawingConfig(): void; declare function startDraw(config?: PathConfig): void; declare function exitDraw(): void; declare function cancelDraw(): void; declare function setCurrentPolygon(polygonData: IObjectData): void; declare function getCurrentPolygon(): IObjectData; /** * Toggles the visibility of the children of a mesh * @param {MpSdk.Scene.IComponent} component - Component of the model * @param {string} name - name of the model */ declare function toggleMeshChildrenVisibility(component: MpSdk.Scene.IComponent, name: string, visible?: boolean): boolean; /** * Updates the value of a property of a child of the mesh * @param {MpSdk.Scene.IComponent} component - Component of the model * @param {string} name - name of the model * @param {string} key = property key * @param {any} value = value for the property * @returns */ declare function setMeshChildrenMaterialProperty(component: MpSdk.Scene.IComponent, name: string, key: string, value: any): void; /** * Wrapper function around toggleMeshChildrenVisibility * @param {MpSdk.Scene.IComponent} component - Component of the model * @param {string} name - name of the model */ declare function toggleWallVisibility(component: MpSdk.Scene.IComponent, name: string, visible?: boolean): boolean; /** * Wrapper function around toggleMeshChildrenVisibility * @param {MpSdk.Scene.IComponent} component - Component of the model * @param {string} name - name of the model */ declare function toggleFloorVisibility(component: MpSdk.Scene.IComponent, name: string, visible?: boolean): boolean; /** * Returns the children of a model's component * @param component * @returns */ declare function getChildrenOfModel(component: MpSdk.Scene.IComponent): any; /** * Toggle the visibility of the vertice rings. This requires the rings to be rendered in the space to work * @param visibility - Default is false */ declare function toggleVerticeRingVisibility(visibility?: boolean): void; /** * Sets the global offset value of the y axis of a rendered polygon. * @param {number} offset * @returns */ declare function setPolygonFloorOffset(offset: number): void; /** * Returns the value of the global floor offset * @returns */ declare function getPolygonFloorOffset(): number; /** * Set the value of the base height or y-axis of the vertex of a polygon * @param baseHeight * @returns */ declare function setFloorBaseHeight(baseHeight: number): void; /** * Returns the value of the global base height * @returns */ declare function getFloorBaseHeight(): number; /** * Clear the value of the base height for floors of polygons */ declare function clearFloorBaseHeight(): void; /** * Set the value of the base height or y-axis of the vertex of a polygon * @param baseHeight * @returns */ declare function setWallBaseHeight(baseHeight: number): void; /** * Returns the value of the global base height * @returns */ declare function getWallBaseHeight(): number; /** * Clear the value of the base height for floors of polygons */ declare function clearWallBaseHeight(): void; declare function undoDrawAction(): void; declare function redoDrawAction(): void; declare function getIsPolygonVisible(): boolean; declare function setTagIcon(payload: { tag: MpSdk.Tag.TagData; iconName: string; iconUrl: string; color: MpSdk.Color | string; iframeId?: string; }): Promise; declare function renderTag(payload: { tag: MpSdk.Tag.Descriptor; }, addTo_tags?: boolean, iframeId?: string): Promise; declare function _renderTagPaneContent(): void; declare function addTag(tagData: MpSdk.Tag.TagData): ITag; declare function getMpTags(): ITag[]; declare function getTagDataCollection(): MpSdk.Dictionary; declare function disposeTag(payload: { tagId: string; }): Promise; /** * Toggles the visibility state of a specific tag. * * @param {Object} payload - The tag data. * @param {string} payload.tagId - The unique identifier of the tag to update. * @param {boolean} payload.visibility - The desired visibility state (true = visible, false = hidden). * @returns {Promise} Resolves when the visibility update is complete. */ declare function toggleVisibilityTag(payload: { tagId: string; visibility: boolean; }): Promise; declare function getMpTag(tagId: string): ITag; declare function getTags(space: ISpace): Promise; declare function gotoTag(tagId: string): Promise; declare function tagStateSubscriber(): Promise; declare function showTags(tags: ITag[], _withIcon?: boolean, iframeId?: string): Promise; declare function disposeTags(iframeId?: string): Promise; declare function attachTagMedia(payload: { tagId: string; attachments: string[]; }): Promise; declare function detachTagMedia(payload: { tagId: string; attachmentIds: string[]; }): Promise; declare function moveTag(tagId: string, callback?: Function): Promise; declare function registerSandbox(payload: { content: string; options?: Partial; iframeId?: string; }): Promise<[sandboxId: string, messenger: MpSdk.Tag.IMessenger]>; declare function attachSandbox(payload: { sandboxId: string; tagIds: string[]; iframeId?: string; }): Promise; declare function editTagLabel(payload: { tagId: string; label: string; }): Promise; declare function editTagDescription(payload: { tagId: string; description: string; }): Promise; declare function editTagStem(payload: { tagId: string; stemVisible: boolean; }): Promise; declare function editTagIcon(payload: { tagId: string; iconName?: string; icon?: string; color: MpSdk.Color | string; }): Promise; declare function editTagColor(payload: { tagId: string; color: MpSdk.Color; }): Promise; declare function saveTag(payload: { tagId: string; floor: IAtwinFloor; label: IAtwinLabel; colorHex: string; }): Promise; /** * Set tag categories in toolbar * @param {ITagCategory[]} tagCategories * @returns */ declare function setTagCategories(tagCategories: ITagCategory[]): ITagCategory[]; /** * Sets the categories assigned to the user based on their roles. * @param tagCategories */ declare function setUserAssignedCategories(tagCategories: ITagCategory[]): void; declare function getUserAssignedCategories(): ITagCategory[]; declare function setTagMessageRecepients(recepients: Array<{ name: string; uuid: string; }>): void; declare function getTagMessageRecepients(): Array<{ name: string; uuid: string; }>; declare function setTagMessages(messages: Array): void; declare function getTagMessages(): Array; declare function setSelectedTagUuid(uuid: string): void; declare function getSelectedTagUuid(): string; declare function setCurrentSpace(space: ICurrentSpace): any; declare function setIotCategoryTypes(payload: Array): ITagIOTCategory[]; declare function setIotDeviceTypes(payload: Array): DeviceInfo[]; declare function setIoTDeviceTagIcons(payload: any): void; declare function setIoTLinkedSystemOptions(payload: Array): void; declare function getIoTDeviceTagIcons(): { alert: string; normal: string; }; declare function renderMeetingSidebar(template?: string, templateName?: MEETING_SIDEBAR): void; /** * Subscribes a method or an array of methods to a Matterport event. * @param {SPACE_EVENTS|string} eventType - Valid event type * @param {Function | Array} callback - A function or an array of functions. Async methods supported */ declare function subscribeSpaceEvent(eventType: SPACE_EVENTS | string, callback: Function | Array, iframeId?: string): void; /** * Unsubscribes a callback method from an event * @param {string} eventType - Valid event type * @param {Function|Array} callback - A function or an array of functions. Async methods supported */ declare function unsubscribeSpaceEvent(eventType: SPACE_EVENTS | string, callback: Function | Array): void; /** * Executes methods subscribed to an event. * @param {SPACE_EVENTS|string} eventType - Valid event type * @param {IShowcaseObject} payload - Object data payload * @returns {void} */ declare function dispatchSpaceEvent(eventType: SPACE_EVENTS | string, payload?: any): Promise; /** * Registers a custom event type that can be dispatched at runtime. * Your registered event type should be in uppercase and use snake_case. * Example SCROLL_END * @param eventType - Custom event type. * @returns */ declare function registerCustomSpaceEvent(eventType: string | Array): void; /** * Clears the space vent queue. You can optionally clear events that match an iframeId * @param iframeId - (optional) iframeId of the events you want to clear */ declare function clearSpaceEventQueue(iframeId?: string): void; declare function initSocketIo(meetingId?: string, role?: IO_ROLE): void; declare function socketEmit(payload: { socketEvent: IO_SPACE_EVENTS | IO_MEETING_EVENTS; data: any; }): void; declare function getSelectedObject(): IObjectData; declare function renderInSpaceMediaScreen(): Promise; declare function enableHUD(objectId: number, screenPosition?: SCREEN_POSITIONS): void; declare function canSetHud(p: { screenPos: SCREEN_POSITIONS; meshUuid: string; }): boolean; declare function saveMediaScreenHud(p: { meshUuid: string; screenPos: SCREEN_POSITIONS; }): void; declare function removeMediaScreenHud(p: { meshUuid: string; }): void; declare function enableFitScreen(): void; declare function disableFitScreen(): void; declare function disableHUD(objectId: number): void; declare function getMediaScreenHUDs(): { meshUuid: string; screenPosition: SCREEN_POSITIONS; }[]; declare function getParticipants(): Promise; declare function followParticipant(followParticipant: any): void; declare function unFollowParticipant(unFollowParticipant: any): void; /** * This function sets and manages the partition nodes * @param {Array} partitionNodes Array of partition nodes */ declare function setSpacePartitionNodes(partitionNodes: Array): Promise; declare function getPathBetweenSweeps(startSweepId: string, endSweepId: string, iframeId?: string): Promise<{ path: MpSdk.Graph.Vertex[]; position: { x: number; y: number; z: number; }[]; }>; declare function moveAlongPath(path: any[], iframeId: any, transitionTime?: number): Promise; /** * Set the space meta data variable * @param payload */ declare function setSpaceMetadata(payload: SpaceMetadata | null): void; /** * Returns the value of the space meta data * @returns */ declare function getSpaceMetadata(): SpaceMetadata; /** * Set value to screen sharing host user * @param {ScreenShareUser | null} user * @returns */ declare function setScreenSharingHostUser(user: ScreenShareUser | null): ScreenShareUser; /** * Set value to screen sharing participant users * @param {ScreenShareUser[]} users * @returns */ declare function setScreenSharingParticipantUsers(users: ScreenShareUser[]): ScreenShareUser[]; /** * Update the texture of the pointer reticle using a registered texture ID. * Defaults to 'targetPointer' if no ID is provided. * @param {string} [textureId] - Optional texture ID to apply to the pointer, if equal to 'resetTexture' it will reset texture * @returns {Promise} */ declare function updatePointerTexture(textureId?: string): Promise; /** * Syncs an object's position and rotation to align with a pointer intersection surface. * If an object is provided, its transformation is updated. Otherwise, a new marker is added at the intersection point. * * @param {MpSdk.Pointer.Intersection} pointerIntersection - The pointer intersection from Matterport SDK * @param {IObjectData} [_object] - Optional object to transform * @param {string} [markerTexture] - Optional texture URL for a new marker * @returns {Promise} - Returns the new object if created, otherwise void */ declare const renderCursorMarkerPointer: (pointerIntersection: MpSdk.Pointer.Intersection, _object?: IObjectData, markerTexture?: string) => Promise; /** * Toggles the visibility of an HTML element by its ID. * @param {string} id - The ID of the HTML element to be shown or hidden. * @param {boolean} shouldShow - Boolean flag to show (true) or hide (false) the element. */ declare function toggleElementVisibility(id: string, shouldShow: boolean): void; /** * Set pipes categories value * @param {IPipeCategory[]} pipes * @returns */ declare function setPipeCategories(pipes: IPipeCategory[]): IPipeCategory[]; /** * Set selected pipes catrgory value * @param {IPipeCategory} pipe * @returns */ declare function setSelectedPipeCategory(pipe: IPipeCategory): IPipeCategory; /** * Gets the current pipe category for the pipe form. * * @returns - The current category. */ declare function getSelectedPipeCategory(): IPipeCategory; /** * Set pipes value * @param {IPipe[]} pipes * @returns */ declare function setPipes(pipes: IPipe[]): IPipe[]; /** * Set selected pipes value * @param {IPipe} pipe * @returns */ declare function setSelectedPipe(pipe: IPipe): IPipe; /** * Gets the current pipe for the pipe form. * * @returns - The current pipe. */ declare function getSelectedPipe(): IPipe; /** * Set selected pipes value * @param {Boolean} status * @returns */ declare function setPipeIsDrawingMode(status: Boolean): Boolean; /** * Set _thisVertexPath value * @param {Vector2[]} path * @returns */ declare function setVertexPath(path: Vector2[]): void; /** * Gets the current pipe for the pipe form. * * @returns - The current pipe. */ declare function getPipeIsDrawingMode(): Boolean; declare function undoPipePath(): void; declare function redoPipePath(): void; /** * Sets whether the screen sharing pointer is enabled * @param value boolean * @returns void * */ declare function setPointerEnabled(value: boolean): void; /** * Retrieves the ground-level Y-coordinate of a specific floor. * This function samples the world position at the center of the screen, * checks if the detected floor matches the provided `floorId`, * and returns its ground-level Y coordinate. * * @param {string} floorId - ID of the floor * **/ declare function getFloorGroundLevel(floorId: any): Promise; declare function appendNotionUrlTagDescription(tagId: string, description: string, notionUrl: string): Promise; export { _atwin, _config, _mpConfig, tags, sweeps, selectedObject, previousObjTransform, currentObjTransform, actionHistory, state, _tags, _tagCategories, _tagMessageRecepients, _space, _spaceId, _api, _pointerCoord, _3DXObjects, _meetingParticipants, _generatedObjectIds, _tagIotCategoryTypes, _tagIotDevices, _iotLinkedSyatemOptions, tagColors, domMousePosition, isFitScreenOccupied, isCdnMapDataAvailable, minimap, _modelDetails, _onMouseClickInstance, transformHistory, _partitionNodes, _currentSpace, _spaceUsers, _screenSharingHostUser, _screenSharingParticipantUsers, initAtwinApi, getAtwinSdk, connectSpace, disconnectSpace, clearActionHistory, getSweeps, getCurrentSweep, getCurrentSweepPosition, moveToSweep, getNearbySweeps, getAllSweeps, getCurrentCameraPose, getCurrentCameraZoom, getCameraPosition, getCurrentFloor, moveInDirection, cameraLookAt, cameraPan, cameraRotate, cameraSetRotation, getViewMode, setViewMode, captureSpaceScreenshot, captureScreenshotAndCameraDetails, captureCurrentView, cameraZoomBy, cameraZoomReset, cameraZoomTo, getNearbyObjects, setTransformMode, setSelectedObject, clearSelectedObject, revertTransform, setTransformControls, removeTransformControls, setRenderDistance, addObject, getObject, addObjectToSpace, renderModel, addMediaScreen, attachMediaScreenContent, updateObject, updateShowcaseObject, deleteObject, deleteShowcaseObject, copyObject, replaceObject, getTargetPosition, setObjectTransformation, setPointerCoordinates, addTextMarkupScreen, setTextMarkupScreenContent, goTo3dx, goToModel, hasTimeElapsed, getSelectedObject, renderAvatar, setSpaceAvatar, get3DXObjects, set3DXObjects, clear3DXObjects, setLibrary, getLibrary, disposeModel, disposeAllModels, renderInSpaceMediaScreen, goToPosition, goToParticipant, getNearestSweepFromObject, cancelModelPlacement, renderViewpointMarker, toggleViewpointVisibility, convertDegRotationToEuler, isToolbarFeatureEnabled, goToMPOrigin, pauseVideo, playVideo, setVideoPlayback, setAnimationState, showMinimap, hideMinimap, getMapConfig, addTag, getTags, gotoTag, renderTag, disposeTag, disposeTags, toggleVisibilityTag, getMpTags, getTagDataCollection, getMpTag, showTags, attachTagMedia, detachTagMedia, moveTag, editTagLabel, editTagDescription, editTagStem, editTagIcon, editTagColor, attachSandbox, registerSandbox, saveTag, rotateCameraToObject, setModelVisibility, tagStateSubscriber, setTagIcon, setTagCategories, setUserAssignedCategories, getUserAssignedCategories, setTagMessageRecepients, getTagMessageRecepients, setTagMessages, getTagMessages, setSelectedTagUuid, getSelectedTagUuid, setCurrentSpace, toggleFitToScreen, getFloors, getLabels, getFloorGroundLevel, renderMeetingSidebar, createMeetingTemplate, joinMeetingTemplate, meet, dispatchSpaceEvent, subscribeSpaceEvent, unsubscribeSpaceEvent, registerCustomSpaceEvent, clearSpaceEventQueue, initSocketIo, socketEmit, getParticipants, followParticipant, unFollowParticipant, enableHUD, disableHUD, getMediaScreenHUDs, canSetHud, saveMediaScreenHud, removeMediaScreenHud, enableFitScreen, disableFitScreen, initToolbarUI, themeManager, convertToEuler, disableSweeps, enableSweeps, enableSweep, disableSweep, tubeLineType, pathLineType, _sceneObject, _tubes, drawPath, toggleSpaceNavigation, startDraw, exitDraw, cancelDraw, setPolygonPath, setPolygonDrawingMode, setPathLine, setPathLineOptions, getCurrentTubeLine, renderPolygon, toggleWallVisibility, toggleMeshChildrenVisibility, toggleFloorVisibility, getChildrenOfModel, toggleVerticeRingVisibility, setPolygonFloorOffset, getPolygonFloorOffset, setFloorBaseHeight, clearFloorBaseHeight, enableVerticeControls, deleteEdge, disposePathLine, getFloorBaseHeight, setMeshChildrenMaterialProperty, undoDrawAction, redoDrawAction, setWallBaseHeight, getWallBaseHeight, clearWallBaseHeight, getVertexPath, setSpacePartitionNodes, setCurrentPolygon, getSpaceId, getCurrentPolygon, getPathBetweenSweeps, moveAlongPath, _atwinConnections, convertZupToYup, convertYupToZup, getRelativePosition, getOriginalWorldPosition, setSpaceMetadata, getSpaceMetadata, getAssetUrl, setIotCategoryTypes, setIotDeviceTypes, setIoTDeviceTagIcons, getIoTDeviceTagIcons, setIoTLinkedSystemOptions, setScreenSharingHostUser, setScreenSharingParticipantUsers, renderCursorMarkerPointer, updatePointerTexture, toggleElementVisibility, renderPath, setDrawingConfig, getDrawingConfig, resetDrawingConfig, _pipeCategories, _selectedPipeCategory, setPipeCategories, setSelectedPipeCategory, getSelectedPipeCategory, _pipes, _selectedPipe, setPipes, setSelectedPipe, getSelectedPipe, deleteVertex, setPipeIsDrawingMode, getPipeIsDrawingMode, setPointerEnabled, removeScreenShareSessionData, setVertexPath, _pathConfig, undoPipePath, redoPipePath, pathHistory, clearTagVisibilityStorage, partitionHistory, _renderTagPaneContent, clearActivePane, renderPreviewModal, togglePreviewModal, closePreviewModal, setPreviewModalAction, activePreviewModal, _thisVertexPath, getIsPolygonVisible, appendNotionUrlTagDescription, editMode, clearLastCopiedObjectPosition };