architwin 1.10.21 → 1.10.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/architwin.d.ts +65 -6
- package/lib/architwin.js +1 -1
- package/lib/atwinui/components/toolbar/card.js +3 -1
- package/lib/atwinui/components/toolbar/generalSettingsMenuPane.d.ts +4 -0
- package/lib/atwinui/components/toolbar/generalSettingsMenuPane.js +92 -0
- package/lib/atwinui/components/toolbar/i18n.js +10 -2
- package/lib/atwinui/components/toolbar/index.js +5 -1
- package/lib/atwinui/components/toolbar/menuBar.d.ts +1 -0
- package/lib/atwinui/components/toolbar/menuBar.js +16 -0
- package/lib/atwinui/components/toolbar/modelControlsPane.js +3 -3
- package/lib/atwinui/components/toolbar/tagListPane.d.ts +4 -0
- package/lib/atwinui/components/toolbar/tagListPane.js +98 -4
- package/lib/atwinui/events.d.ts +6 -1
- package/lib/atwinui/events.js +381 -5
- package/lib/atwinui/index.js +7 -1
- package/lib/minimap.d.ts +63 -3
- package/lib/minimap.js +491 -60
- package/lib/types.d.ts +92 -1
- package/lib/types.js +22 -0
- package/lib/utils.d.ts +1 -0
- package/lib/utils.js +20 -1
- package/lib/worldConversion.d.ts +15 -0
- package/lib/worldConversion.js +45 -0
- package/package.json +1 -1
- package/static/atwinui.css +38 -1
- package/static/icons/mapleftrighticon.svg +17 -0
- package/static/icons/mapscaleheighticon.svg +18 -0
- package/static/icons/mapscalewidthicon.svg +16 -0
- package/static/icons/mapupdownicon.svg +17 -0
- package/static/images/377.png +0 -0
- package/static/images/pinkoriginmarker.png +0 -0
- package/static/map.css +212 -0
- package/static/utility.css +157 -1
package/lib/architwin.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { AxiosInstance } from "axios";
|
|
|
2
2
|
import { MpSdk, Scene, Vector3, Vector2, Renderer } from "../bundle/sdk";
|
|
3
3
|
import { tubeLineType } from "./loaders";
|
|
4
4
|
import { initToolbarUI, themeManager } from "./atwinui";
|
|
5
|
-
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 } from "./types";
|
|
5
|
+
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 } from "./types";
|
|
6
6
|
import * as minimap from './minimap';
|
|
7
7
|
import '../static/sidebar.css';
|
|
8
8
|
import '../static/map.css';
|
|
@@ -11,7 +11,7 @@ import { createMeetingTemplate, joinMeetingTemplate } from "./meeting/templates"
|
|
|
11
11
|
import { ActionHistory } from "./actionHistory";
|
|
12
12
|
import * as meet from './zoom';
|
|
13
13
|
import 'notyf/notyf.min.css';
|
|
14
|
-
import { convertYupToZup, convertZupToYup } from "./worldConversion";
|
|
14
|
+
import { convertYupToZup, convertZupToYup, getRelativePosition, getOriginalWorldPosition } from "./worldConversion";
|
|
15
15
|
declare const transformHistory: ActionHistory;
|
|
16
16
|
declare const _config: {
|
|
17
17
|
mp: {
|
|
@@ -52,7 +52,7 @@ declare let domMousePosition: Vector3;
|
|
|
52
52
|
declare let isFitScreenOccupied: boolean;
|
|
53
53
|
declare let isCdnMapDataAvailable: boolean;
|
|
54
54
|
declare let _atwinConnections: ISdkConnections;
|
|
55
|
-
declare let _onMouseClickInstance:
|
|
55
|
+
declare let _onMouseClickInstance: Function;
|
|
56
56
|
declare let _modelDetails: MpSdk.Model.ModelDetails;
|
|
57
57
|
declare const tagColors: string[];
|
|
58
58
|
declare let _tubes: MpSdk.Scene.IObject;
|
|
@@ -153,6 +153,11 @@ declare function disableSweep(sweepIds?: string[], iframeId?: string): Promise<v
|
|
|
153
153
|
*/
|
|
154
154
|
declare function setSelectedObject(data: IShowcaseObject, node: Scene.INode, component: Scene.IComponent, type: string): void;
|
|
155
155
|
declare function get3DXObjects(): Array<IObjectData>;
|
|
156
|
+
/**
|
|
157
|
+
* Clears the 3DXObjects array. DOES NOT remove the rendered objects from the space.
|
|
158
|
+
* Use carefully
|
|
159
|
+
*/
|
|
160
|
+
declare function clear3DXObjects(): void;
|
|
156
161
|
/**
|
|
157
162
|
* Clears the current selected object and sets it to null
|
|
158
163
|
*/
|
|
@@ -198,7 +203,37 @@ declare function captureSpaceScreenshot(callback?: Function | null, resolution?:
|
|
|
198
203
|
declare function captureScreenshotAndCameraDetails(callback?: Function | null, resolution?: Renderer.Resolution, visibility?: Renderer.Visibility, iframeId?: string): Promise<{
|
|
199
204
|
base64Screenshot: string;
|
|
200
205
|
cameraPose: MpSdk.Camera.Pose;
|
|
206
|
+
cameraZoom: MpSdk.Camera.ZoomData;
|
|
201
207
|
}>;
|
|
208
|
+
/**
|
|
209
|
+
* Captures a screenshot (JPEG) of the user's current view.
|
|
210
|
+
* @param callback - Optional callback function.
|
|
211
|
+
* @param resolution - Optional screenshot resolution. Default: { width: 1920, height: 1080 }.
|
|
212
|
+
* @param visibility - Optional visibility settings. Default: { mattertags: false, measurements: false, sweeps: false, views: false }.
|
|
213
|
+
* @param iframeId - Optional id of iframe
|
|
214
|
+
* @returns {string} Screenshot URI -- a base64 encoded string
|
|
215
|
+
*/
|
|
216
|
+
declare function captureCurrentView(callback?: Function | null, resolution?: Renderer.Resolution, visibility?: Renderer.Visibility, iframeId?: string): Promise<string>;
|
|
217
|
+
/**
|
|
218
|
+
* Zooms the camera by a percentage. The zoom delta is defined relative to the base field of view, not the current zoom.
|
|
219
|
+
* This means that the delta is strictly added, and not multiplied by the current zoom first.
|
|
220
|
+
* 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)
|
|
221
|
+
* NOTE: This will FAIL if user is not in Inside Mode
|
|
222
|
+
* @param zoom -
|
|
223
|
+
*/
|
|
224
|
+
declare function cameraZoomBy(zoom: number, callback?: Function): Promise<number | undefined>;
|
|
225
|
+
/**
|
|
226
|
+
* Zooms the camera to a percentage of the base field of view.
|
|
227
|
+
* Ex: Doubling the zoom, halves the field of view.
|
|
228
|
+
* NOTE: This will FAIL if user is not in Inside Mode
|
|
229
|
+
* @param zoom -
|
|
230
|
+
*/
|
|
231
|
+
declare function cameraZoomTo(zoom: number, callback?: Function): Promise<number | undefined>;
|
|
232
|
+
/**
|
|
233
|
+
* Reset the zoom of the camera back to 1.0x.
|
|
234
|
+
* NOTE: This will FAIL if user is not in Inside Mode
|
|
235
|
+
*/
|
|
236
|
+
declare function cameraZoomReset(): Promise<void>;
|
|
202
237
|
/**
|
|
203
238
|
* Moves the camera position in the direction of the argument provided.
|
|
204
239
|
* @constructor
|
|
@@ -281,6 +316,11 @@ declare function copyObject(payload: IShowcaseObject, position_offset?: Vector3,
|
|
|
281
316
|
* @returns {Promise<IShowcaseObject>}
|
|
282
317
|
*/
|
|
283
318
|
declare function replaceObject(payload: I3DObject, target: IObjectData, options?: Object): Promise<IShowcaseObject>;
|
|
319
|
+
/**
|
|
320
|
+
* Navigates the user to Matterport's true origin (0, 0, 0) and places a marker at that location.
|
|
321
|
+
* If a custom marker URL is provided, it uses that; otherwise, it uses a default marker.
|
|
322
|
+
*/
|
|
323
|
+
declare function goToMPOrigin(iframeId?: string, customMarkerUrl?: string): Promise<void>;
|
|
284
324
|
/**
|
|
285
325
|
* Creates a 2D blank canvas that can used to display a wide variety images or videos dynamically by the user
|
|
286
326
|
* A user can use transform controls to scale,reposition, and rotate the frame as they see fit
|
|
@@ -390,6 +430,11 @@ declare function deleteShowcaseObject(id: number): Promise<void>;
|
|
|
390
430
|
* @returns {number} Model id
|
|
391
431
|
*/
|
|
392
432
|
declare function disposeModel(target: IObjectData): Promise<number>;
|
|
433
|
+
/**
|
|
434
|
+
* Deletes ALL models in the space
|
|
435
|
+
* @returns
|
|
436
|
+
*/
|
|
437
|
+
declare function disposeAllModels(): Promise<any[]>;
|
|
393
438
|
declare function setLibrary(libraryModels: Array<I3DObject>): Promise<Array<I3DObject>>;
|
|
394
439
|
declare function getLibrary(refetch?: boolean): Promise<Array<I3DObject>>;
|
|
395
440
|
declare function getNearestSweepFromObject(objectId: number): {
|
|
@@ -402,9 +447,9 @@ declare function rotateCameraToObject(objectCoord: Vector3): Promise<void>;
|
|
|
402
447
|
* @deprecated - Use gotoModel instead
|
|
403
448
|
*/
|
|
404
449
|
declare function goTo3dx(objectId: number): Promise<void>;
|
|
405
|
-
declare function goToModel(objectId: number): Promise<void>;
|
|
450
|
+
declare function goToModel(objectId: number, iframeId?: string): Promise<void>;
|
|
406
451
|
declare function goToParticipant(participantId: number): Promise<void>;
|
|
407
|
-
declare function goToPosition(pos: Vector3): Promise<MpSdk.Vector3>;
|
|
452
|
+
declare function goToPosition(pos: Vector3, iframeId?: string): Promise<MpSdk.Vector3>;
|
|
408
453
|
declare function showMinimap(): void;
|
|
409
454
|
declare function hideMinimap(): void;
|
|
410
455
|
declare function getMapConfig(): IMapConfig;
|
|
@@ -650,6 +695,10 @@ declare function dispatchSpaceEvent(eventType: SPACE_EVENTS | string, payload?:
|
|
|
650
695
|
* @returns
|
|
651
696
|
*/
|
|
652
697
|
declare function registerCustomSpaceEvent(eventType: string | Array<string>): void;
|
|
698
|
+
/**
|
|
699
|
+
* Clears the space event queue
|
|
700
|
+
*/
|
|
701
|
+
declare function clearSpaceEventQueue(): void;
|
|
653
702
|
declare function initSocketIo(meetingId?: string, role?: IO_ROLE): void;
|
|
654
703
|
declare function socketEmit(payload: {
|
|
655
704
|
socketEvent: IO_SPACE_EVENTS | IO_MEETING_EVENTS;
|
|
@@ -693,4 +742,14 @@ declare function getPathBetweenSweeps(startSweepId: string, endSweepId: string,
|
|
|
693
742
|
}[];
|
|
694
743
|
}>;
|
|
695
744
|
declare function moveAlongPath(path: any[], iframeId: any, transitionTime?: number): Promise<void>;
|
|
696
|
-
|
|
745
|
+
/**
|
|
746
|
+
* Set the space meta data variable
|
|
747
|
+
* @param payload
|
|
748
|
+
*/
|
|
749
|
+
declare function setSpaceMetadata(payload: SpaceMetadata | null): void;
|
|
750
|
+
/**
|
|
751
|
+
* Returns the value of the space meta data
|
|
752
|
+
* @returns
|
|
753
|
+
*/
|
|
754
|
+
declare function getSpaceMetadata(): SpaceMetadata;
|
|
755
|
+
export { _atwin, _config, _mpConfig, tags, sweeps, selectedObject, previousObjTransform, currentObjTransform, actionHistory, state, _tags, _tagCategories, _tagMessageRecepients, _space, _spaceId, _api, _pointerCoord, _3DXObjects, _meetingParticipants, _generatedObjectIds, tagColors, domMousePosition, isFitScreenOccupied, isCdnMapDataAvailable, minimap, _modelDetails, _onMouseClickInstance, transformHistory, _partitionNodes, 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, addMediaScreen, attachMediaScreenContent, updateObject, updateShowcaseObject, deleteObject, deleteShowcaseObject, copyObject, replaceObject, getTargetPosition, setObjectTransformation, setPointerCoordinates, addTextMarkupScreen, setTextMarkupScreenContent, goTo3dx, goToModel, hasTimeElapsed, getSelectedObject, renderAvatar, setSpaceAvatar, get3DXObjects, 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, getMpTags, getMpTag, showTags, attachTagMedia, detachTagMedia, moveTag, editTagLabel, editTagDescription, editTagStem, editTagIcon, editTagColor, saveTag, rotateCameraToObject, setModelVisibility, tagStateSubscriber, setTagIcon, setTagCategories, setUserAssignedCategories, getUserAssignedCategories, setTagMessageRecepients, getTagMessageRecepients, setTagMessages, getTagMessages, setSelectedTagUuid, getSelectedTagUuid, setCurrentSpace, toggleFitToScreen, getFloors, getLabels, 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, enableSweep, disableSweep, tubeLineType, _sceneObject, _tubes, drawPath, toggleSpaceNavigation, startDraw, exitDraw, cancelDraw, setPolygonPath, setTubeLinePath, getCurrentTubeLine, renderPolygon, toggleWallVisibility, toggleMeshChildrenVisibility, toggleFloorVisibility, getChildrenOfModel, toggleVerticeRingVisibility, setPolygonFloorOffset, getPolygonFloorOffset, setFloorBaseHeight, clearFloorBaseHeight, enableVerticeControls, deleteEdge, disposePathLine, getFloorBaseHeight, setMeshChildrenMaterialProperty, undoDrawAction, redoDrawAction, addUndoDrawActions, setWallBaseHeight, getWallBaseHeight, clearWallBaseHeight, setSpacePartitionNodes, setCurrentPolygon, getSpaceId, getCurrentPolygon, getPathBetweenSweeps, moveAlongPath, _atwinConnections, convertZupToYup, convertYupToZup, getRelativePosition, getOriginalWorldPosition, setSpaceMetadata, getSpaceMetadata };
|