architwin 1.4.6 → 1.4.8
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 +7 -6
- package/lib/architwin.d.ts +21 -11
- package/lib/architwin.js +1 -1
- package/lib/atwinui/components/toolbar/actionBar.js +2 -0
- package/lib/atwinui/components/toolbar/card.js +5 -1
- package/lib/atwinui/components/toolbar/index.d.ts +2 -2
- package/lib/atwinui/components/toolbar/index.js +2 -2
- package/lib/atwinui/components/toolbar/modelControlsPane.js +1 -1
- package/lib/atwinui/events.js +19 -3
- package/lib/color.d.ts +1 -0
- package/lib/color.js +8 -0
- package/lib/loaders/eyeLoader.d.ts +32 -0
- package/lib/loaders/eyeLoader.js +63 -0
- package/lib/loaders/planeGeometry2.d.ts +18 -0
- package/lib/loaders/planeGeometry2.js +119 -44
- package/lib/loaders/viewpointLoader.d.ts +22 -1
- package/lib/loaders/viewpointLoader.js +125 -17
- package/lib/meeting/meetingSidebar.js +3 -1
- package/lib/minimap.d.ts +6 -1
- package/lib/minimap.js +9 -1
- package/lib/types.d.ts +34 -11
- package/lib/types.js +14 -0
- package/lib/utils.d.ts +3 -0
- package/lib/utils.js +6 -0
- package/lib/zoom.d.ts +147 -9
- package/lib/zoom.js +707 -202
- package/package.json +5 -3
package/README.md
CHANGED
|
@@ -4690,13 +4690,9 @@ This function captures a screenshot of a virtual space and retrieves details abo
|
|
|
4690
4690
|
|
|
4691
4691
|
*Function Signature*
|
|
4692
4692
|
```typescript
|
|
4693
|
-
function captureScreenshotAndCameraDetails(
|
|
4694
|
-
callback?: Function | null,
|
|
4695
|
-
resolution?: Renderer.Resolution,
|
|
4696
|
-
visibility?: Renderer.Visibility): Promise<{
|
|
4693
|
+
function captureScreenshotAndCameraDetails(callback?: Function | null, resolution?: Renderer.Resolution, visibility?: Renderer.Visibility, iframeId?: string): Promise<{
|
|
4697
4694
|
base64Screenshot: string;
|
|
4698
|
-
|
|
4699
|
-
cameraRotation: MpSdk.Vector2;
|
|
4695
|
+
cameraPose: MpSdk.Camera.Pose;
|
|
4700
4696
|
}>
|
|
4701
4697
|
```
|
|
4702
4698
|
|
|
@@ -4706,6 +4702,7 @@ function captureScreenshotAndCameraDetails(
|
|
|
4706
4702
|
| callback | Function | optional | | |
|
|
4707
4703
|
| resolution | Renderer.Resolution | optional | { width : 1920, height : 1080 } | { width : 600, height : 800 } or any values exceed to 4096 |
|
|
4708
4704
|
| visibility | Renderer.Visbility | optional | { mattertags : false, measurements : false, sweeps: false, views : false } | {mattertags : true, measurements : false, sweeps: false, views : true} |
|
|
4705
|
+
| iframeId | string | optional | | |
|
|
4709
4706
|
|
|
4710
4707
|
*Example:*
|
|
4711
4708
|
```typescript
|
|
@@ -4733,6 +4730,10 @@ async function captureScreenshotAndCameraDetails() {
|
|
|
4733
4730
|
// Without Parameters
|
|
4734
4731
|
const screenshotDetails = await atwin.captureScreenshotAndCameraDetails();
|
|
4735
4732
|
log.info("Screenshot Details: ", screenshotDetails)
|
|
4733
|
+
|
|
4734
|
+
// With iframe id
|
|
4735
|
+
const screenshotDetails = await atwin.captureScreenshotAndCameraDetails(iframeId: 'iframe-id');
|
|
4736
|
+
log.info("Screenshot Details: ", screenshotDetails)
|
|
4736
4737
|
}
|
|
4737
4738
|
```
|
|
4738
4739
|
|
package/lib/architwin.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AxiosInstance } from "axios";
|
|
2
2
|
import { MpSdk, Scene, Vector3, Vector2, Renderer } from "../bundle/sdk";
|
|
3
3
|
import { initToolbarUI } 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, SpaceAvatar, IMapConfig, MEETING_SIDEBAR, IO_ROLE, IO_SPACE_EVENTS, IO_MEETING_EVENTS, SCREEN_POSITIONS, ITagCategory, TagMessage } from "./types";
|
|
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
5
|
import * as minimap from './minimap';
|
|
6
6
|
import '../static/sidebar.css';
|
|
7
7
|
import '../static/map.css';
|
|
@@ -46,7 +46,7 @@ declare let state: State;
|
|
|
46
46
|
declare let domMousePosition: Vector3;
|
|
47
47
|
declare let isFitScreenOccupied: boolean;
|
|
48
48
|
declare let isCdnMapDataAvailable: boolean;
|
|
49
|
-
declare let
|
|
49
|
+
declare let _onMouseClickInstance: any;
|
|
50
50
|
declare let _modelDetails: MpSdk.Model.ModelDetails;
|
|
51
51
|
declare const tagColors: string[];
|
|
52
52
|
/**
|
|
@@ -71,7 +71,7 @@ declare function connectSpace(url: string, auth: {
|
|
|
71
71
|
onLoad: Function;
|
|
72
72
|
onStart: Function;
|
|
73
73
|
onPlay: Function;
|
|
74
|
-
}): Promise<
|
|
74
|
+
}): Promise<void>;
|
|
75
75
|
declare function getAtwinSdk(): MpSdk | null;
|
|
76
76
|
declare function getFloors(): IAtwinFloor[];
|
|
77
77
|
declare function getLabels(): IAtwinLabel[];
|
|
@@ -110,7 +110,7 @@ declare function getAllSweeps(): {
|
|
|
110
110
|
position: Vector3;
|
|
111
111
|
neighbors: string[];
|
|
112
112
|
}[];
|
|
113
|
-
declare function moveToSweep(sweepId: string, rotation?: Vector2,
|
|
113
|
+
declare function moveToSweep(sweepId: string, rotation?: Vector2, iframeId?: string): Promise<void>;
|
|
114
114
|
declare function getNearbySweeps(sweepId: string): Promise<any>;
|
|
115
115
|
/**
|
|
116
116
|
* Stores the selected object captured by the ClickSpy class attached to the object upon creation in
|
|
@@ -160,12 +160,12 @@ declare function captureSpaceScreenshot(callback?: Function | null, resolution?:
|
|
|
160
160
|
* @param callback - Optional callback function.
|
|
161
161
|
* @param resolution - Optional screenshot resolution. Default: { width: 1920, height: 1080 }.
|
|
162
162
|
* @param visibility - Optional visibility settings. Default: { mattertags: false, measurements: false, sweeps: false, views: false }.
|
|
163
|
+
* @param iframeId - Optional id of iframe
|
|
163
164
|
* @returns Object with screenshot and camera details.
|
|
164
165
|
*/
|
|
165
|
-
declare function captureScreenshotAndCameraDetails(callback?: Function | null, resolution?: Renderer.Resolution, visibility?: Renderer.Visibility): Promise<{
|
|
166
|
+
declare function captureScreenshotAndCameraDetails(callback?: Function | null, resolution?: Renderer.Resolution, visibility?: Renderer.Visibility, iframeId?: string): Promise<{
|
|
166
167
|
base64Screenshot: string;
|
|
167
|
-
|
|
168
|
-
cameraRotation: MpSdk.Vector2;
|
|
168
|
+
cameraPose: MpSdk.Camera.Pose;
|
|
169
169
|
}>;
|
|
170
170
|
/**
|
|
171
171
|
* Moves the camera position in the direction of the argument provided.
|
|
@@ -215,7 +215,16 @@ declare function setSpaceAvatar(avatar: {
|
|
|
215
215
|
* @param position - x,y,z position of the anchor of the marker
|
|
216
216
|
* @param rotation - (optional) x,y,z rotation of the anchor
|
|
217
217
|
*/
|
|
218
|
-
declare function renderViewpointMarker(
|
|
218
|
+
declare function renderViewpointMarker(transform: {
|
|
219
|
+
position: Vector3;
|
|
220
|
+
rotation?: Vector3;
|
|
221
|
+
}, options?: ComponentOptions): Promise<void>;
|
|
222
|
+
/**
|
|
223
|
+
* Toggle the visibility of a single, group, or all viewpoints. This method requires the object id of the viewpoint
|
|
224
|
+
* @param {number|Array<number>} viewpointIds - (optional) Pass as single or an array of ids of the viewpoints. If undefined will toggle all viewpoints' visibility instead
|
|
225
|
+
* @returns
|
|
226
|
+
*/
|
|
227
|
+
declare function toggleViewpointVisibility(viewpointIds?: number | Array<number>): void;
|
|
219
228
|
/**
|
|
220
229
|
* Creates a copy of an object in the 3D space. You can specify a custom offset position and rotation of the cloned object
|
|
221
230
|
* @param payload The object that you want to duplicate
|
|
@@ -259,16 +268,17 @@ declare function attachMediaScreenContent(mediaScreenId: number, mediaUrl: strin
|
|
|
259
268
|
* Controls video media displayed on an HTML video element, works on videos used as textures for meshes
|
|
260
269
|
* @param action Playback function, accepts play,pause,mute,unmute
|
|
261
270
|
* @param element HTML video element
|
|
271
|
+
* @param objectId id of the object
|
|
262
272
|
* @returns
|
|
263
273
|
*/
|
|
264
|
-
declare function setVideoPlayback(action: string, element: HTMLVideoElement, objectId?:
|
|
274
|
+
declare function setVideoPlayback(action: string, element: HTMLVideoElement | undefined, objectId: number, isMediascreenDocked?: boolean): void;
|
|
265
275
|
/**
|
|
266
276
|
* Set a model's visibility
|
|
267
277
|
* @param id - Object id
|
|
268
278
|
* @param visible - true or false
|
|
269
279
|
* @returns
|
|
270
280
|
*/
|
|
271
|
-
declare function setModelVisibility(id: number, visible
|
|
281
|
+
declare function setModelVisibility(id: number, visible?: boolean): void;
|
|
272
282
|
/**
|
|
273
283
|
* Toggles the display position of a media screen.
|
|
274
284
|
* @param {string} id - The id of the media screen model
|
|
@@ -493,4 +503,4 @@ declare function getMediaScreenHUDs(): {
|
|
|
493
503
|
declare function getParticipants(): Promise<import("./types").IO_Participant[]>;
|
|
494
504
|
declare function followParticipant(followParticipant: any): void;
|
|
495
505
|
declare function unFollowParticipant(unFollowParticipant: any): void;
|
|
496
|
-
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,
|
|
506
|
+
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, initAtwinApi, getAtwinSdk, connectSpace, disconnectSpace, clearActionHistory, getSweeps, getCurrentSweep, getCurrentSweepPosition, moveToSweep, getNearbySweeps, getAllSweeps, getCurrentCameraPose, getCameraPosition, moveInDirection, cameraLookAt, cameraPan, cameraRotate, 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, 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, isMeetingInitialized, getMeetingParticipants, createMeeting, startMeeting, stopMeeting, generateMeetingURL, updateMeetingTitle, updateMeetingStart, updateMeetingStatus, updateMeetingSpace, getMeeting, getSpaceMeetings, isMeetingExists, isMeetingActive, initSocketIo, socketEmit, getParticipants, followParticipant, unFollowParticipant, enableHUD, disableHUD, getMediaScreenHUDs, canSetHud, saveMediaScreenHud, removeMediaScreenHud, enableFitScreen, disableFitScreen, initToolbarUI, convertToEuler };
|