architwin 1.8.2 → 1.8.3
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/README.md +21 -0
- package/lib/architwin.d.ts +49 -2
- package/lib/architwin.js +6498 -1
- package/lib/atwinui/components/toolbar/i18n.js +47 -2
- package/lib/atwinui/components/toolbar/index.js +9 -1
- package/lib/atwinui/components/toolbar/menuBar.d.ts +3 -0
- package/lib/atwinui/components/toolbar/menuBar.js +32 -16
- package/lib/atwinui/components/toolbar/objectListPane.js +1 -1
- package/lib/atwinui/components/toolbar/roomCreation/roomFormPane.d.ts +12 -0
- package/lib/atwinui/components/toolbar/roomCreation/roomFormPane.js +583 -0
- package/lib/atwinui/components/toolbar/roomCreation/roomLayerListPane.d.ts +33 -0
- package/lib/atwinui/components/toolbar/roomCreation/roomLayerListPane.js +448 -0
- package/lib/atwinui/components/toolbar/tagListPane.js +1 -2
- package/lib/atwinui/components/toolbar/themePane.js +1 -1
- package/lib/atwinui/events.d.ts +3 -1
- package/lib/atwinui/events.js +242 -2
- package/lib/atwinui/index.js +3 -1
- package/lib/convert.d.ts +1 -14
- package/lib/convert.js +6 -63
- package/lib/loaders/index.d.ts +2 -1
- package/lib/loaders/index.js +2 -1
- package/lib/loaders/polydrawerLoader.d.ts +147 -0
- package/lib/loaders/polydrawerLoader.js +760 -0
- package/lib/types.d.ts +88 -1
- package/lib/types.js +16 -0
- package/lib/utils.d.ts +2 -0
- package/lib/utils.js +16 -0
- package/lib/vertexPlacer.d.ts +18 -0
- package/lib/vertexPlacer.js +69 -0
- package/lib/zoom.d.ts +6 -1
- package/lib/zoom.js +10 -1
- package/package.json +4 -2
- package/static/atwinui.css +431 -2
- package/static/utility.css +39 -1
- package/lib/atwinui/components/toolbar/menu-bar.d.ts +0 -4
- package/lib/atwinui/components/toolbar/menu-bar.js +0 -35
- package/lib/atwinui/components/toolbar/sidebar-container.d.ts +0 -5
- package/lib/atwinui/components/toolbar/sidebar-container.js +0 -27
package/README.md
CHANGED
|
@@ -179,6 +179,7 @@ ArchiTwin Library
|
|
|
179
179
|
- [setupMeetingSession()](#setupMeetingSession)
|
|
180
180
|
- [sendCommand()](#sendCommand)
|
|
181
181
|
- [attachParticipantVideo()](#attachParticipantVideo)
|
|
182
|
+
- [setAvatarMeetingImage()](#setAvatarMeetingImage)
|
|
182
183
|
- [Viewpoint](#viewpoint)
|
|
183
184
|
- [renderViewpointMarker()](#renderViewpointMarker)
|
|
184
185
|
- [toggleViewpointVisibility()](#toggleViewpointVisibility)
|
|
@@ -6478,6 +6479,26 @@ import * as atwin from 'architwin'
|
|
|
6478
6479
|
await atwin.meet.attachParticipantVideo(userId)
|
|
6479
6480
|
````
|
|
6480
6481
|
|
|
6482
|
+
### setAvatarMeetingImage()
|
|
6483
|
+
This function will set the avatar image source link to the current user
|
|
6484
|
+
|
|
6485
|
+
*Function Signature*
|
|
6486
|
+
```typescript
|
|
6487
|
+
async function setAvatarMeetingImage(avatarSrc: string): Promise<void>
|
|
6488
|
+
```
|
|
6489
|
+
|
|
6490
|
+
*Parameter Table*
|
|
6491
|
+
| parameter | type | required | default | values |
|
|
6492
|
+
| :----: | :----: | :---: | :---: | :---: |
|
|
6493
|
+
| avatarSrc | string | yes | null | Avatar image source link |
|
|
6494
|
+
|
|
6495
|
+
*Example:*
|
|
6496
|
+
````typescript
|
|
6497
|
+
import * as atwin from 'architwin'
|
|
6498
|
+
|
|
6499
|
+
await atwin.meet.setAvatarMeetingImage(avatarSrc)
|
|
6500
|
+
````
|
|
6501
|
+
|
|
6481
6502
|
## Viewpoint
|
|
6482
6503
|
|
|
6483
6504
|
Viewpoints are pointers composed of a 2 dimensional line and a 2D marker at the opposite that can be used to act as markers of where a user or object is looking at. This can be especially useful for if you plan on implementing multiplayer functionalities in your space. The next few sections will explain how you can render, customize, and manipulate viewpoints.
|
package/lib/architwin.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { AxiosInstance } from "axios";
|
|
2
2
|
import { MpSdk, Scene, Vector3, Vector2, Renderer } from "../bundle/sdk";
|
|
3
|
+
import { tubeLineType } from "./loaders";
|
|
3
4
|
import { initToolbarUI, themeManager } from "./atwinui";
|
|
4
|
-
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 } 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, RoomNode, PartitionPayload } from "./types";
|
|
5
6
|
import * as minimap from './minimap';
|
|
6
7
|
import '../static/sidebar.css';
|
|
7
8
|
import '../static/map.css';
|
|
@@ -41,6 +42,7 @@ declare let selectedObject: IObjectData;
|
|
|
41
42
|
declare let previousObjTransform: Object3DPosition;
|
|
42
43
|
declare let currentObjTransform: Object3DPosition;
|
|
43
44
|
declare let actionHistory: Array<string>;
|
|
45
|
+
declare let _sceneObject: Scene.IObject;
|
|
44
46
|
declare let _pointerCoord: Vector3;
|
|
45
47
|
declare let _generatedObjectIds: number[];
|
|
46
48
|
declare let state: State;
|
|
@@ -50,6 +52,8 @@ declare let isCdnMapDataAvailable: boolean;
|
|
|
50
52
|
declare let _onMouseClickInstance: any;
|
|
51
53
|
declare let _modelDetails: MpSdk.Model.ModelDetails;
|
|
52
54
|
declare const tagColors: string[];
|
|
55
|
+
declare let _tubes: MpSdk.Scene.IObject;
|
|
56
|
+
declare let _roomNodes: RoomNode[];
|
|
53
57
|
/**
|
|
54
58
|
* Initializes the axios API instance. Use this if you want to make an API call using the library without
|
|
55
59
|
* invoking the connectSpace method
|
|
@@ -101,6 +105,7 @@ declare function setRenderDistance(distance: number): void;
|
|
|
101
105
|
* @returns {void}
|
|
102
106
|
*/
|
|
103
107
|
declare function setAnimationState(action: string, modelId: number): void;
|
|
108
|
+
declare function getSpaceId(url: string): string;
|
|
104
109
|
declare function getCurrentSweep(): ISweep;
|
|
105
110
|
declare function getCurrentCameraPose(): MpSdk.Camera.Pose;
|
|
106
111
|
declare function getCurrentCameraZoom(): MpSdk.Camera.ZoomData;
|
|
@@ -353,6 +358,7 @@ declare function updateShowcaseObject(payload: IShowcaseObject): Promise<IShowca
|
|
|
353
358
|
* @param id - The object id of the object that needs to be updated
|
|
354
359
|
* @param {FileUpload} payload - The payload that contains the file object information that will be used to update
|
|
355
360
|
* @returns {Promise<I3DObject>}
|
|
361
|
+
* @deprecated - All non matterport api calls should be done in application side
|
|
356
362
|
*/
|
|
357
363
|
declare function updateObject(id: number, payload: FileUpload): Promise<I3DObject>;
|
|
358
364
|
/**
|
|
@@ -394,6 +400,42 @@ declare function goToPosition(pos: Vector3): Promise<MpSdk.Vector3>;
|
|
|
394
400
|
declare function showMinimap(): void;
|
|
395
401
|
declare function hideMinimap(): void;
|
|
396
402
|
declare function getMapConfig(): IMapConfig;
|
|
403
|
+
declare function toggleSpaceNavigation(state?: boolean): void;
|
|
404
|
+
/**
|
|
405
|
+
* Draws a semi transparent tube line along a path
|
|
406
|
+
* @param {Array<Vector3>} vertices - Array of coordinates or vertices
|
|
407
|
+
* @returns
|
|
408
|
+
*/
|
|
409
|
+
declare function drawLine(vertices: Array<Vector3>, options?: ComponentOptions): Promise<void>;
|
|
410
|
+
declare function setTubeLinePath(id: number, path: Array<Vector3>): void;
|
|
411
|
+
/**
|
|
412
|
+
* Returms the current tube line and data instance
|
|
413
|
+
* @returns
|
|
414
|
+
*/
|
|
415
|
+
declare function getCurrentTubeLine(): IObjectData;
|
|
416
|
+
/**
|
|
417
|
+
* Renders a polygon from an array of coordinates
|
|
418
|
+
* @param {Vector3} path - Array of coordinates
|
|
419
|
+
* @returns {void}
|
|
420
|
+
*/
|
|
421
|
+
declare function renderPolygonFromPath(path: Array<Vector3>): void;
|
|
422
|
+
/**
|
|
423
|
+
* Renders a polygon from an array of coordinates or an object containing an array of coordinates
|
|
424
|
+
* @param {PartitionPayload|Array<Vector3>} payload
|
|
425
|
+
* @returns {void}
|
|
426
|
+
*/
|
|
427
|
+
declare function renderPolygon(payload: PartitionPayload | Array<Vector3>): IShowcaseObject;
|
|
428
|
+
/**
|
|
429
|
+
* Updates the polygons by passing a new array of vertices. Do note that any vertex markers visible will not automatically update their position
|
|
430
|
+
* @param {number} id - id of the polygon object
|
|
431
|
+
* @param {Array<Vector3>} vertices - array of vertices that are used to render the geometry of the polygon
|
|
432
|
+
* @returns {void}
|
|
433
|
+
*/
|
|
434
|
+
declare function setPolygonPath(id: number, vertices: Array<Vector3>): void;
|
|
435
|
+
declare function startDraw(): void;
|
|
436
|
+
declare function exitDraw(): void;
|
|
437
|
+
declare function cancelDraw(): void;
|
|
438
|
+
declare function getCurrentPolygon(): IObjectData;
|
|
397
439
|
declare function setTagIcon(payload: {
|
|
398
440
|
tag: MpSdk.Tag.TagData;
|
|
399
441
|
iconName: string;
|
|
@@ -532,4 +574,9 @@ declare function getMediaScreenHUDs(): {
|
|
|
532
574
|
declare function getParticipants(): Promise<import("./types").IO_Participant[]>;
|
|
533
575
|
declare function followParticipant(followParticipant: any): void;
|
|
534
576
|
declare function unFollowParticipant(unFollowParticipant: any): void;
|
|
535
|
-
|
|
577
|
+
/**
|
|
578
|
+
* Sets the space room nodes in the state
|
|
579
|
+
* @param roomNodes Array of room nodes
|
|
580
|
+
*/
|
|
581
|
+
declare function setSpaceRoomNodes(roomNodes: Array<RoomNode>): Promise<void>;
|
|
582
|
+
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, _roomNodes, initAtwinApi, getAtwinSdk, connectSpace, disconnectSpace, clearActionHistory, getSweeps, getCurrentSweep, getCurrentSweepPosition, moveToSweep, getNearbySweeps, getAllSweeps, getCurrentCameraPose, getCurrentCameraZoom, getCameraPosition, moveInDirection, cameraLookAt, cameraPan, cameraRotate, cameraSetRotation, getViewMode, setViewMode, captureSpaceScreenshot, captureScreenshotAndCameraDetails, 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, setLibrary, getLibrary, disposeModel, renderInSpaceMediaScreen, goToPosition, goToParticipant, getNearestSweepFromObject, cancelModelPlacement, renderViewpointMarker, toggleViewpointVisibility, convertDegRotationToEuler, 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, toggleFitToScreen, getFloors, getLabels, renderMeetingSidebar, createMeetingTemplate, joinMeetingTemplate, meet, dispatchSpaceEvent, subscribeSpaceEvent, unsubscribeSpaceEvent, registerCustomSpaceEvent, initSocketIo, socketEmit, getParticipants, followParticipant, unFollowParticipant, enableHUD, disableHUD, getMediaScreenHUDs, canSetHud, saveMediaScreenHud, removeMediaScreenHud, enableFitScreen, disableFitScreen, initToolbarUI, themeManager, convertToEuler, disableSweeps, enableSweep, disableSweep, tubeLineType, _sceneObject, _tubes, drawLine, renderPolygonFromPath, toggleSpaceNavigation, startDraw, exitDraw, cancelDraw, setPolygonPath, setTubeLinePath, getCurrentTubeLine, renderPolygon, setSpaceRoomNodes, getSpaceId, getCurrentPolygon };
|