architwin 1.12.5 → 1.13.1

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.
Files changed (45) hide show
  1. package/CORE_FEATURES.md +35 -0
  2. package/lib/architwin.d.ts +96 -5
  3. package/lib/architwin.js +1 -1
  4. package/lib/atwinui/components/toolbar/collapse.d.ts +18 -0
  5. package/lib/atwinui/components/toolbar/collapse.js +62 -0
  6. package/lib/atwinui/components/toolbar/i18n.js +56 -4
  7. package/lib/atwinui/components/toolbar/index.js +11 -1
  8. package/lib/atwinui/components/toolbar/menuBar.d.ts +1 -0
  9. package/lib/atwinui/components/toolbar/menuBar.js +11 -0
  10. package/lib/atwinui/components/toolbar/pipeFormPane.d.ts +31 -0
  11. package/lib/atwinui/components/toolbar/pipeFormPane.js +545 -0
  12. package/lib/atwinui/components/toolbar/pipeListPane.d.ts +19 -0
  13. package/lib/atwinui/components/toolbar/pipeListPane.js +388 -0
  14. package/lib/atwinui/components/toolbar/spaceUserListPane.d.ts +3 -0
  15. package/lib/atwinui/components/toolbar/spaceUserListPane.js +95 -0
  16. package/lib/atwinui/components/toolbar/tagFormPane.d.ts +1 -0
  17. package/lib/atwinui/components/toolbar/tagFormPane.js +4 -1
  18. package/lib/atwinui/components/toolbar/tagIotForm.d.ts +20 -0
  19. package/lib/atwinui/components/toolbar/tagIotForm.js +391 -0
  20. package/lib/atwinui/components/toolbar/tagIotFormPane.d.ts +62 -0
  21. package/lib/atwinui/components/toolbar/tagIotFormPane.js +606 -0
  22. package/lib/atwinui/components/toolbar/tagMessagingPane.js +5 -5
  23. package/lib/atwinui/components/toolbar/usersPane.d.ts +14 -0
  24. package/lib/atwinui/components/toolbar/usersPane.js +273 -0
  25. package/lib/atwinui/components/toolbar/viewingRemoteSpace.d.ts +7 -0
  26. package/lib/atwinui/components/toolbar/viewingRemoteSpace.js +77 -0
  27. package/lib/atwinui/events.d.ts +4 -1
  28. package/lib/atwinui/events.js +96 -15
  29. package/lib/atwinui/helpers.d.ts +15 -0
  30. package/lib/atwinui/helpers.js +49 -0
  31. package/lib/atwinui/index.js +2 -0
  32. package/lib/loaders/curosrMarkerLoader.d.ts +25 -0
  33. package/lib/loaders/curosrMarkerLoader.js +86 -0
  34. package/lib/loaders/index.d.ts +2 -1
  35. package/lib/loaders/index.js +2 -1
  36. package/lib/loaders/pathLoader.d.ts +99 -0
  37. package/lib/loaders/pathLoader.js +451 -0
  38. package/lib/minimap.d.ts +4 -2
  39. package/lib/minimap.js +16 -3
  40. package/lib/types.d.ts +86 -2
  41. package/lib/types.js +39 -0
  42. package/package.json +1 -1
  43. package/static/atwinui.css +263 -0
  44. package/static/map.css +9 -1
  45. package/static/utility.css +81 -1
@@ -0,0 +1,35 @@
1
+ # ArchiTwin Library Core Features
2
+
3
+ This document outlines the core features of the ArchiTwin library, a powerful tool that enhances the Matterport Bundle SDK with additional features and a ready-to-use UI.
4
+
5
+ ## 1. Matterport Bundle SDK Enhancement
6
+
7
+ The ArchiTwin library simplifies the development process by providing pre-built methods for interacting with the Matterport SDK. It offers a comprehensive solution for developers working with the Matterport SDK, offering both a robust API and a user-friendly interface.
8
+
9
+ ## 2. Zoom SDK Integration
10
+
11
+ The library provides pre-built methods for interacting with the Zoom SDK, allowing you to easily integrate video conferencing features into your application.
12
+
13
+ ## 3. Custom Three.js Loaders
14
+
15
+ The library includes custom Three.js loaders for Matterport, enabling advanced 3D object manipulation. This allows you to create more immersive and interactive experiences for your users.
16
+
17
+ ## 4. Space Navigation and Camera Control
18
+
19
+ The library provides methods for navigating around the space and controlling the camera. This allows you to create custom navigation experiences for your users.
20
+
21
+ ## 5. Points of Interest
22
+
23
+ The library allows you to add, remove, and customize tags, as well as access a list of rendered objects and their structure. This allows you to create interactive and informative experiences for your users.
24
+
25
+ ## 6. Object Transformation
26
+
27
+ The library provides methods for transforming objects, including translating, scaling, and rotating them. This allows you to create dynamic and interactive experiences for your users.
28
+
29
+ ## 7. Media Screens
30
+
31
+ The library allows you to create customizable media screens that can display images or videos. This allows you to create rich and engaging experiences for your users.
32
+
33
+ ## 8. Meeting UI
34
+
35
+ The library provides a set of methods to create, start, and stop meetings. This allows you to easily integrate video conferencing features into your application.
@@ -1,9 +1,9 @@
1
1
  import { AxiosInstance } from "axios";
2
2
  import { MpSdk, Scene, Vector3, Vector2, Renderer } from "../bundle/sdk";
3
- import { tubeLineType } from "./loaders";
3
+ import { tubeLineType, pathLineType } from "./loaders";
4
4
  import { getAssetUrl } from "./utils";
5
5
  import { initToolbarUI, themeManager } from "./atwinui";
6
- 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 } from "./types";
6
+ 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, PathConfig, ModelPayload, IPipeCategory, IPipe } from "./types";
7
7
  import * as minimap from './minimap';
8
8
  import '../static/sidebar.css';
9
9
  import '../static/map.css';
@@ -58,6 +58,10 @@ declare let _modelDetails: MpSdk.Model.ModelDetails;
58
58
  declare const tagColors: string[];
59
59
  declare let _tubes: MpSdk.Scene.IObject;
60
60
  declare let _partitionNodes: PartitionNode[];
61
+ declare let _pipeCategories: IPipeCategory[];
62
+ declare let _selectedPipeCategory: IPipeCategory;
63
+ declare let _pipes: IPipe[];
64
+ declare let _selectedPipe: IPipe;
61
65
  /**
62
66
  * Initializes the axios API instance. Use this if you want to make an API call using the library without
63
67
  * invoking the connectSpace method
@@ -263,12 +267,19 @@ declare function getTargetPosition(callback?: Function, continousClick?: boolean
263
267
  */
264
268
  declare function cancelModelPlacement(): Promise<void>;
265
269
  declare function setPointerCoordinates(position: Vector3): void;
270
+ /**
271
+ * Renders a 3D model into the space.
272
+ * @param {ModelPayload} payload
273
+ * @returns {Promise<IShowcaseObject>}
274
+ */
275
+ declare function renderModel(payload: ModelPayload): Promise<IShowcaseObject>;
266
276
  /**
267
277
  * Reusable method that adds an object to the space locally.
268
278
  * @param {string} mediaUrl - The url pointing to the model/media resource
269
279
  * @param {string} objectType - The file type of the object
270
280
  * @param {ObjectConfig} config - Object that contains the configuration for the object to be rendered like
271
281
  * position, rotation, and scale to name an example
282
+ * @deprecated - Use renderModel instead
272
283
  * @returns {Promise<IShowcaseObject>}
273
284
  */
274
285
  declare function addObjectToSpace(mediaUrl: string, objectType: string, config?: ObjectConfig, object_data?: I3DObject): Promise<IShowcaseObject>;
@@ -464,10 +475,18 @@ declare function toggleSpaceNavigation(state?: boolean): void;
464
475
  /**
465
476
  * Draws a semi transparent tube line along a path
466
477
  * @param {Array<Vector3>} vertices - Array of coordinates or vertices
478
+ * @deprecated - Use renderPath instead to render a path and setPathLine to update an existing path
467
479
  * @returns
468
480
  */
469
481
  declare function drawPath(vertices: Array<Vector3>, options?: ComponentOptions): Promise<void>;
470
- declare function setTubeLinePath(id: number, path: Array<Vector3>): void;
482
+ declare function setPathLine(id: number, path: Array<Vector3>): void;
483
+ /**
484
+ * Update the inputs of a rendered path line
485
+ * @param id - id of the object/path
486
+ * @param {ComponentOptions} options - keys you want to update, you should only populate keys that you explicitly wanted to update
487
+ * @returns
488
+ */
489
+ declare function setPathLineOptions(id: number, options: ComponentOptions): void;
471
490
  /**
472
491
  * Destroys the current path line instance
473
492
  * @param payload
@@ -478,6 +497,13 @@ declare function disposePathLine(): void;
478
497
  * @returns
479
498
  */
480
499
  declare function getCurrentTubeLine(): IObjectData;
500
+ /**
501
+ * 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.
502
+ * @param vertices - array of xyz coordinates
503
+ * @param options - customization options to dictate the look and behavior of the path
504
+ * @returns
505
+ */
506
+ declare function renderPath(vertices: Array<Vector3>, options?: ComponentOptions): void;
481
507
  /**
482
508
  * Renders a polygon from an array of coordinates or an object containing an array of coordinates
483
509
  * @param {PartitionPayload|Array<Vector3>} payload
@@ -492,6 +518,12 @@ declare function renderPolygon(payload: PartitionPayload | Array<Vector3>, optio
492
518
  * @returns {void}
493
519
  */
494
520
  declare function setPolygonPath(id: number, vertices: Array<Vector3>): void;
521
+ /**
522
+ * Removes a vertex sphere from the space. If no argument is passed it will remove the last vertex that has been added
523
+ * @param {number} index - (optional) Index of an element of vertex path
524
+ * @returns
525
+ */
526
+ declare function deleteVertex(index?: number): void;
495
527
  /**
496
528
  * Enables vertice controls on an existing polygon
497
529
  * @param component
@@ -505,7 +537,18 @@ declare function enableVerticeControls(component: MpSdk.Scene.IComponent): void;
505
537
  * @returns
506
538
  */
507
539
  declare function deleteEdge(component: MpSdk.Scene.IComponent, endPoint: Vector3): void;
508
- declare function startDraw(): void;
540
+ /**
541
+ * 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.
542
+ * You only need to run this once unless you intend to switch the configuration again.
543
+ * @param {PathConfig} config - Configuration to be used by the drawing system
544
+ * @returns
545
+ */
546
+ declare function setDrawingConfig(config: PathConfig): void;
547
+ /**
548
+ * Resets the configuration for the drawing system to its defaults
549
+ */
550
+ declare function resetDrawingConfig(): void;
551
+ declare function startDraw(config?: PathConfig): void;
509
552
  declare function exitDraw(): void;
510
553
  declare function cancelDraw(): void;
511
554
  declare function setCurrentPolygon(polygonData: IObjectData): void;
@@ -762,4 +805,52 @@ declare function setSpaceMetadata(payload: SpaceMetadata | null): void;
762
805
  * @returns
763
806
  */
764
807
  declare function getSpaceMetadata(): SpaceMetadata;
765
- 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, getTagDataCollection, 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, getAssetUrl };
808
+ /**
809
+ * Set pipes categories value
810
+ * @param {IPipeCategory[]} pipes
811
+ * @returns
812
+ */
813
+ declare function setPipeCategories(pipes: IPipeCategory[]): IPipeCategory[];
814
+ /**
815
+ * Set selected pipes catrgory value
816
+ * @param {IPipeCategory} pipe
817
+ * @returns
818
+ */
819
+ declare function setSelectedPipeCategory(pipe: IPipeCategory): IPipeCategory;
820
+ /**
821
+ * Gets the current pipe category for the pipe form.
822
+ *
823
+ * @returns - The current category.
824
+ */
825
+ declare function getSelectedPipeCategory(): IPipeCategory;
826
+ /**
827
+ * Set pipes value
828
+ * @param {IPipe[]} pipes
829
+ * @returns
830
+ */
831
+ declare function setPipes(pipes: IPipe[]): IPipe[];
832
+ /**
833
+ * Set selected pipes value
834
+ * @param {IPipe} pipe
835
+ * @returns
836
+ */
837
+ declare function setSelectedPipe(pipe: IPipe): IPipe;
838
+ /**
839
+ * Gets the current pipe for the pipe form.
840
+ *
841
+ * @returns - The current pipe.
842
+ */
843
+ declare function getSelectedPipe(): IPipe;
844
+ /**
845
+ * Set selected pipes value
846
+ * @param {Boolean} status
847
+ * @returns
848
+ */
849
+ declare function setPipeIsDrawingMode(status: Boolean): Boolean;
850
+ /**
851
+ * Gets the current pipe for the pipe form.
852
+ *
853
+ * @returns - The current pipe.
854
+ */
855
+ declare function getPipeIsDrawingMode(): Boolean;
856
+ 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, renderModel, 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, getTagDataCollection, 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, pathLineType, _sceneObject, _tubes, drawPath, toggleSpaceNavigation, startDraw, exitDraw, cancelDraw, setPolygonPath, setPathLine, setPathLineOptions, 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, getAssetUrl, renderPath, setDrawingConfig, resetDrawingConfig, _pipeCategories, _selectedPipeCategory, setPipeCategories, setSelectedPipeCategory, getSelectedPipeCategory, _pipes, _selectedPipe, setPipes, setSelectedPipe, getSelectedPipe, deleteVertex, setPipeIsDrawingMode, getPipeIsDrawingMode };