architwin 1.0.33 → 1.0.36
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 +595 -86
- package/lib/architwin.d.ts +150 -27
- package/lib/architwin.min.js +1 -1
- package/lib/common/architwin.min.js +1 -1
- package/lib/common/architwin.min.js.LICENSE.txt +0 -23
- package/lib/convert.d.ts +2 -0
- package/lib/convert.js +18 -0
- package/lib/loaders/boxLoader.d.ts +47 -0
- package/lib/loaders/boxLoader.js +102 -0
- package/lib/loaders/gltfLoader.d.ts +60 -0
- package/lib/loaders/gltfLoader.js +168 -0
- package/lib/loaders/index.d.ts +5 -0
- package/lib/loaders/index.js +5 -0
- package/lib/loaders/planeGeometry.d.ts +29 -0
- package/lib/loaders/planeGeometry.js +119 -0
- package/lib/loaders/textLoader.d.ts +35 -0
- package/lib/loaders/textLoader.js +113 -0
- package/lib/map.d.ts +1 -0
- package/lib/map.js +77 -0
- package/lib/minimap.d.ts +5 -0
- package/lib/minimap.js +300 -0
- package/lib/superviz.d.ts +19 -0
- package/lib/superviz.js +337 -0
- package/lib/supervizTypes.js +95 -0
- package/lib/types.d.ts +199 -15
- package/lib/types.js +0 -4
- package/package.json +1 -1
- package/tsconfig.json +1 -1
- package/webpack.config.js +0 -25
package/README.md
CHANGED
|
@@ -35,9 +35,23 @@ ArchiTwin Library
|
|
|
35
35
|
- [Adding a Media Screen](#adding-a-media-screen)
|
|
36
36
|
- [Media Screen Parameter Reference](#media-screen-parameter-reference)
|
|
37
37
|
- [Attaching an image or video to a Media Screen](#attaching-an-image-or-video-to-a-media-screen)
|
|
38
|
+
- [Delete Media Screen](#delete-media-screen)
|
|
38
39
|
- [Getting the coordinates of a clicked area in the 3D space](#getting-the-coordinates-of-a-clicked-area-in-the-3d-space)
|
|
39
40
|
- [Setting Video Playback in the Space](#setting-video-playback-in-the-space)
|
|
40
41
|
- [Setting Animation Control in the Space](#setting-animation-control-in-the-space)
|
|
42
|
+
- [Meeting Guide](#meeting-guide)
|
|
43
|
+
- [Create Meeting](#create-meeting)
|
|
44
|
+
- [Start Meeting](#start-meeting)
|
|
45
|
+
- [Stop Meeting](#stop-meeting)
|
|
46
|
+
- [Utility Methods](#utility-methods)
|
|
47
|
+
- [Update Meeting Details](#update-meeting-details)
|
|
48
|
+
- [Meeting Info](#meeting-info)
|
|
49
|
+
- [Meeting Config Options](#meeting-config-options)
|
|
50
|
+
- [Meeting Custom Colors](#meeting-custom-colors)
|
|
51
|
+
- [Meeting Custom Avatars](#meeting-custom-avatar)
|
|
52
|
+
- [Meeting Device Control](#meeting-custom-control)
|
|
53
|
+
- [Meeting Bar Position](#meeting-bar-position)
|
|
54
|
+
- [Meeting Status](#meeting-status)
|
|
41
55
|
- [Function Reference](#function-reference)
|
|
42
56
|
- [Tags](#tags)
|
|
43
57
|
- [Sweeps](#sweeps)
|
|
@@ -45,6 +59,9 @@ ArchiTwin Library
|
|
|
45
59
|
- [Navigation](#navigation)
|
|
46
60
|
- [Camera](#camera)
|
|
47
61
|
- [Objects](#objects)
|
|
62
|
+
- [Meeting](#meeting)
|
|
63
|
+
|
|
64
|
+
|
|
48
65
|
## Installation
|
|
49
66
|
---------------------
|
|
50
67
|
### Install Using NPM
|
|
@@ -527,7 +544,12 @@ Space can also contain Image Slideshow Screens. This is similar to the Video Scr
|
|
|
527
544
|
Clicking on the right section of the current slide image will display the next slide.
|
|
528
545
|
Clicking on the the left section will display the previous slide.
|
|
529
546
|
|
|
530
|
-
The slideshow can be auto played in whole by clicking the lower-right corner.
|
|
547
|
+
The slideshow can be auto played in whole by clicking the lower-right corner.
|
|
548
|
+
|
|
549
|
+
**Meeting**
|
|
550
|
+
Space meeting feature introduces immersive way to conduct virtual gatherings and collaborative sessions. This innovative feature allows users to convene inside a Space, where participants represented by an avatar and can interact, communicate, and share ideas in a more lifelike and engaging manner.
|
|
551
|
+
|
|
552
|
+
Please check [Meeting Guide](#meeting-guide) to know how to use Meeting feature.
|
|
531
553
|
|
|
532
554
|
## Points of Interest
|
|
533
555
|
Tags are primarily use to mark locations or objects in space for quick and direct navigation.
|
|
@@ -917,90 +939,6 @@ function myCallbackFunction(clickedPosition){
|
|
|
917
939
|
atwin.getTargetPosition(myCallbackFunction)
|
|
918
940
|
```
|
|
919
941
|
|
|
920
|
-
#### Attaching an image or video to a Media Screen
|
|
921
|
-
You can think of a media screen as a blank canvas whose content is totally up to you. If you wish to set the content of the media screen, you may use the `attachMediaScreenContent()` method.
|
|
922
|
-
|
|
923
|
-
**Attach Media Screen Parameters**
|
|
924
|
-
|
|
925
|
-
| parameter | type | required | default | values |
|
|
926
|
-
| :----: | :----: | :---: | :---: | :---: |
|
|
927
|
-
| mediaScreenId | number | yes | none | id of object |
|
|
928
|
-
| mediaUrl | string | yes | none | valid public url to the media|
|
|
929
|
-
| mediaType | string | no | image | 'image' or 'video' |
|
|
930
|
-
|
|
931
|
-
**IMPORTANT:** The link to your media you provide to the mediaUrl **MUST** be publicly accessible and have the appropriate CORS headers, otherwise, your media will not load into the media screen.
|
|
932
|
-
|
|
933
|
-
In this example, we are using a link pointing to the media stored in an s3 bucket as the mediaUrl and a random media screen id. You will have to substitute the id with an actual id of a **rendered** media screen.
|
|
934
|
-
|
|
935
|
-
Example with image:
|
|
936
|
-
```typescript
|
|
937
|
-
const targetMediaScreenId = 12
|
|
938
|
-
const validUrl = 'https://stg-feelpet.s3.ap-northeast-1.amazonaws.com/0CB45E51-EC48-4727-906A-4CD8A13C0770.jpg'
|
|
939
|
-
|
|
940
|
-
atwin.attachMediaScreenContent(targetMediaScreenId,validUrl,'image')
|
|
941
|
-
```
|
|
942
|
-
|
|
943
|
-
Example with video:
|
|
944
|
-
```typescript
|
|
945
|
-
const targetMediaScreenId = 12
|
|
946
|
-
const validUrl = 'https://stg-feelpet.s3.ap-northeast-1.amazonaws.com/VID_20230203_165202.mp4'
|
|
947
|
-
|
|
948
|
-
atwin.attachMediaScreenContent(targetMediaScreenId,validUrl,'video')
|
|
949
|
-
```
|
|
950
|
-
|
|
951
|
-
When setting a video as the media screen content. You can use the `setVideoPlayback()` method to programmatically play,pause,mute,and unmute a video. You can navigate to the [playback controls section](#setting-video-playback-in-the-space) to learn more about the method. Here is an example on how to use it.
|
|
952
|
-
|
|
953
|
-
In this example, we are getting a random media screen from the `atwin._3DXObjects` array which contains all the objects rendered in the space. Media screens whose media type is a video will have a variable called `planeElement` inside the object's `component` which contains an HTML video element that we can manipulate using the `setVideoPlayback()` method. Please take note that this variable is not accessible if the media type of the media screen content is an image.
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
*Interface used* (TS)
|
|
957
|
-
```typescript
|
|
958
|
-
export interface IObjectData {
|
|
959
|
-
collider?: any
|
|
960
|
-
object: IShowcaseObject
|
|
961
|
-
component: Scene.IComponent
|
|
962
|
-
node: Scene.INode
|
|
963
|
-
type?: string
|
|
964
|
-
}
|
|
965
|
-
```
|
|
966
|
-
|
|
967
|
-
*Example*
|
|
968
|
-
```typescript
|
|
969
|
-
const randomMediaScreen:IObjectData = atwin._3DXObjects.find(obj => obj.object.object_data.object_type == 'FRAME')
|
|
970
|
-
|
|
971
|
-
setVideoPlayback('play',randomMediaScreen.component.planeElement)
|
|
972
|
-
```
|
|
973
|
-
|
|
974
|
-
You can use the [transform controls](#transforming-objects) to change the position, scale, and rotation of the media screen using the mouse cursor.
|
|
975
|
-
|
|
976
|
-
### Getting the coordinates of a clicked area in the 3D space
|
|
977
|
-
|
|
978
|
-
The 3D space you walk around in is a three dimensional mesh under the hood. Every point in this space has an x,y,z coordinate. These coordinates are important since it allows us to anchor objects into the 3D space and navigate around it. You may at times need the ability to get the coordinates of an area in the space. You can do this by utilizing the `getTargetPosition()` method.
|
|
979
|
-
|
|
980
|
-
**Parameter Reference**
|
|
981
|
-
| parameter | type | required | default | values |
|
|
982
|
-
| :----: | :----: | :---: | :---: | :---: |
|
|
983
|
-
| callback | Function | no | none | any valid function|
|
|
984
|
-
|
|
985
|
-
You can invoke the method by doing the following
|
|
986
|
-
|
|
987
|
-
```typescript
|
|
988
|
-
//pass a callback function to the method below to get
|
|
989
|
-
//the coordinates once the user has clicked on an area
|
|
990
|
-
function myCallbackFunction(coords){
|
|
991
|
-
//Line of code to do something else
|
|
992
|
-
return coords
|
|
993
|
-
}
|
|
994
|
-
|
|
995
|
-
atwin.getTargetPosition(myCallbackFunction)
|
|
996
|
-
```
|
|
997
|
-
|
|
998
|
-
The method accepts a callback function that is triggered once the user has clicked on an area in the space. The methods passes the x,y,z coordinates of the clicked position to the callback function you have passed into the method. When the method is invoked the original white circle pointer is replaced with the target pointer pictured below
|
|
999
|
-
|
|
1000
|
-
<img src="https://drive.google.com/uc?id=1vD4ELNj_rjBVh3hOyYjMcO12Ffmse2Rz" width="50" height="50" />
|
|
1001
|
-
|
|
1002
|
-
The pointer goes back to normal after the user has clicked on any area inside the 3D space
|
|
1003
|
-
|
|
1004
942
|
### Setting Video Playback in the Space
|
|
1005
943
|
|
|
1006
944
|
Setting video playback refers to the act of adjusting various controls associated with the playback of a video in the space. It involves manipulating controls such as pause, play, mute, and unmute to modify the playback behavior according to user's preferences.
|
|
@@ -1057,6 +995,435 @@ If you wish to pause the Animation of the 3D object, change the parameter to 'pa
|
|
|
1057
995
|
atwin.setAnimationState('pause',17)
|
|
1058
996
|
```
|
|
1059
997
|
|
|
998
|
+
## Meeting Guide
|
|
999
|
+
|
|
1000
|
+
Hosting Live Virtual Meetings in 3D Space
|
|
1001
|
+
|
|
1002
|
+
The meeting feature in ArchiTwin Library is a virtual meeting inside a 3D Space. Each participant in the virtual meeting is represented by a 3D object called an avatar. The meeting feature enables an immersive way to conduct virtual gatherings and collaborative sessions inside a 3D Space. A popular application of this virtual meeting feature is for architectural design reviews. Architects, designers, and clients can gather in the shared 3D Space as avatars to explore and discuss the virtual representation of a building or project. This immersive approach allows stakeholders to experience the design from various perspectives, collaborate in real-time, and make informed decisions more efficiently, regardless of their physical locations.
|
|
1003
|
+
|
|
1004
|
+
The next few sections will explain how you can get started in creating or hosting your own virtual meeting inside your 3D Spaces.
|
|
1005
|
+
|
|
1006
|
+
### Create Meeting
|
|
1007
|
+
|
|
1008
|
+
Before you can start hosting your virtual meeting, we must first create a meeting.
|
|
1009
|
+
|
|
1010
|
+
````typescript
|
|
1011
|
+
atwin.createMeeting(
|
|
1012
|
+
spaceId: string,
|
|
1013
|
+
hostName: string,
|
|
1014
|
+
title: string,
|
|
1015
|
+
meetingStart: Date,
|
|
1016
|
+
meetingStatus: MeetingStatus
|
|
1017
|
+
duration: number,
|
|
1018
|
+
password: string,
|
|
1019
|
+
)
|
|
1020
|
+
````
|
|
1021
|
+
|
|
1022
|
+
The `createMeeting` method requires the following parameters to work.
|
|
1023
|
+
|
|
1024
|
+
| parameter | type | required | values |
|
|
1025
|
+
| :----: | :----: | :---: | :---: |
|
|
1026
|
+
| spaceId | string | yes | any string |
|
|
1027
|
+
| hostName | string | yes | any string|
|
|
1028
|
+
| title | string | yes | any string |
|
|
1029
|
+
| meetingStart | string | yes | any string |
|
|
1030
|
+
| meetingStatus | string | yes | '0', '1', '2', or '3'|
|
|
1031
|
+
| duration | number | yes | any number |
|
|
1032
|
+
| password | string | no | any string|
|
|
1033
|
+
|
|
1034
|
+
`spaceId` : string - The ID of the Space where the meeting will take place.
|
|
1035
|
+
|
|
1036
|
+
`hostName` : string - The meeting's host name.
|
|
1037
|
+
|
|
1038
|
+
`title` : string - The title of the meeting.
|
|
1039
|
+
|
|
1040
|
+
`meetingStart` : string - The date and time when meeting will start, `meetingStart` will follow ISO 8601 (e.g, '2023-07-19T17:34').
|
|
1041
|
+
format.
|
|
1042
|
+
|
|
1043
|
+
`meetingStatus` : [Meeting Status](#meeting-status) - The initial status of meeting will automatically set to `STARTED` if `meetingStart` is empty or null.
|
|
1044
|
+
|
|
1045
|
+
`duration` : number - Duration of the meeting in hour (e.g, 3, 2.5).
|
|
1046
|
+
|
|
1047
|
+
Note: `duration` can accept floating numbers like `1.5`. `1.5` is equivalent to 1 hour and 30 minutes.
|
|
1048
|
+
|
|
1049
|
+
`password` : string - Password of the meeting.
|
|
1050
|
+
|
|
1051
|
+
*Example:*
|
|
1052
|
+
````typescript
|
|
1053
|
+
<script lang='ts'>
|
|
1054
|
+
import * as atwin from 'architwin';
|
|
1055
|
+
|
|
1056
|
+
atwin.createMeeting(
|
|
1057
|
+
'1',
|
|
1058
|
+
'John Doe',
|
|
1059
|
+
'Daily Meeting',
|
|
1060
|
+
'2023-07-19T17:34',
|
|
1061
|
+
1.5,
|
|
1062
|
+
'password123',
|
|
1063
|
+
)
|
|
1064
|
+
|
|
1065
|
+
</script>
|
|
1066
|
+
````
|
|
1067
|
+
|
|
1068
|
+
Successfuly invoking the `createMeeting` method will return an object containing the meeting password, and meeting URL for host and guest which is used in another method called [startMeeting](#start-meeting).
|
|
1069
|
+
|
|
1070
|
+
*Return Example:*
|
|
1071
|
+
````json
|
|
1072
|
+
{
|
|
1073
|
+
"host": "http://localhost:5173/?meetingId=290d9f7d-fb14-4c8f-9d95-695cac59e44b&role=host",
|
|
1074
|
+
"guest": "http://localhost:5173/?meetingId=290d9f7d-fb14-4c8f-9d95-695cac59e44b&role=guest",
|
|
1075
|
+
"meeting_id": "290d9f7d-fb14-4c8f-9d95-695cac59e44b",
|
|
1076
|
+
"meeting_password" : "password123"
|
|
1077
|
+
}
|
|
1078
|
+
````
|
|
1079
|
+
|
|
1080
|
+
### Start Meeting
|
|
1081
|
+
|
|
1082
|
+
Star the meeting using `startMeeting` method.
|
|
1083
|
+
````typescript
|
|
1084
|
+
atwin.startMeeting(meetingUrl: string, meetingPassword?: string, meetingConfig?: MeetingConfig)
|
|
1085
|
+
````
|
|
1086
|
+
The `startMeeting` method requires the following parameters to work.
|
|
1087
|
+
|
|
1088
|
+
| parameter | type | required | values |
|
|
1089
|
+
| :----: | :----: | :---: | :---: |
|
|
1090
|
+
| meetingUrl | string | yes | valid public URL |
|
|
1091
|
+
| meetingPassword | string | no | any string|
|
|
1092
|
+
| meetingConfig | MeetingConfig | no | MeetingConfig object |
|
|
1093
|
+
|
|
1094
|
+
This `startMeeting` method will initialize the meeting and display pre-meeting settings.
|
|
1095
|
+
|
|
1096
|
+
`meetingUrl` : string - The URL that is generated from `createMeeting` method.
|
|
1097
|
+
|
|
1098
|
+
`meetingPassword` : string - The password set during creation of the meeting.
|
|
1099
|
+
|
|
1100
|
+
`meetingConfig` : [MeetingConfig](#meeting-config-options) - You can pass `MeetingConfig` object to configure and customize the meeting experience.
|
|
1101
|
+
|
|
1102
|
+
NOTE: Please check [MeetingConfig](#meeting-config-options) interface to see more customization options.
|
|
1103
|
+
|
|
1104
|
+
*Example:*
|
|
1105
|
+
````typescript
|
|
1106
|
+
atwin.startMeeting(
|
|
1107
|
+
meetingUrl: "http://localhost:5173/?meetingId=290d9f7d-fb14-4c8f-9d95-695cac59e44b&role=host",
|
|
1108
|
+
meetingPassword: 'password123',
|
|
1109
|
+
meetingConfig: {
|
|
1110
|
+
customColors: {
|
|
1111
|
+
primary900: '16 29 70',
|
|
1112
|
+
primary200: '141 164 239',
|
|
1113
|
+
primary: '58 92 204',
|
|
1114
|
+
}
|
|
1115
|
+
deviceControl: {
|
|
1116
|
+
videoInput: false,
|
|
1117
|
+
audioInput: true,
|
|
1118
|
+
audioOutput: true
|
|
1119
|
+
},
|
|
1120
|
+
meetingBarPosition: 'top',
|
|
1121
|
+
}
|
|
1122
|
+
)
|
|
1123
|
+
````
|
|
1124
|
+
Successfuly invoking the `startMeeting` method will start the meeting.
|
|
1125
|
+
|
|
1126
|
+
### Stop Meeting
|
|
1127
|
+
````typescript
|
|
1128
|
+
atwin.stopMeeting()
|
|
1129
|
+
````
|
|
1130
|
+
To end the current or initialized meeting use `stopMeeting` method.
|
|
1131
|
+
|
|
1132
|
+
Note: `stopMeeting` method will have the same result of using hang-up button in meeting session control.
|
|
1133
|
+
|
|
1134
|
+
### Utility Methods
|
|
1135
|
+
|
|
1136
|
+
**Get Meeting Participants**
|
|
1137
|
+
````typescript
|
|
1138
|
+
atwin.getMeetingParticipants()
|
|
1139
|
+
````
|
|
1140
|
+
This method will return the current meeting participants' space data (e.g, position and rotation).
|
|
1141
|
+
|
|
1142
|
+
*Return Example:*
|
|
1143
|
+
````json
|
|
1144
|
+
[
|
|
1145
|
+
{
|
|
1146
|
+
id: 123,
|
|
1147
|
+
name: "John Doe",
|
|
1148
|
+
avatar: {
|
|
1149
|
+
model: "myAvatar.gltf",
|
|
1150
|
+
},
|
|
1151
|
+
avatarConfig: {
|
|
1152
|
+
scale: 1,
|
|
1153
|
+
height: 0,
|
|
1154
|
+
laserOrigin: { x: 0, y: 0, z: 0 },
|
|
1155
|
+
},
|
|
1156
|
+
position: { x: 1, y: 2, z: 1 },
|
|
1157
|
+
rotation: { x: 1, y: 1 },
|
|
1158
|
+
},
|
|
1159
|
+
]
|
|
1160
|
+
````
|
|
1161
|
+
|
|
1162
|
+
**Get all meeting in specific Space**
|
|
1163
|
+
````typescript
|
|
1164
|
+
atwin.getSpaceMeetings(spaceId: string)
|
|
1165
|
+
````
|
|
1166
|
+
This function will return a list of all meeting in a specific Space.
|
|
1167
|
+
|
|
1168
|
+
*Example:*
|
|
1169
|
+
````typescript
|
|
1170
|
+
atwin.getSpaceMeetings(spaceId: 1)
|
|
1171
|
+
````
|
|
1172
|
+
|
|
1173
|
+
*Return Example:*
|
|
1174
|
+
````json
|
|
1175
|
+
{
|
|
1176
|
+
"status": "success",
|
|
1177
|
+
"data": [
|
|
1178
|
+
{
|
|
1179
|
+
"id": 9,
|
|
1180
|
+
"space_id": "1",
|
|
1181
|
+
"meeting_id": "04acd056-e563-46bb-a585-9069c4e75160",
|
|
1182
|
+
"host_name": "John Doe",
|
|
1183
|
+
"title": "Meeting in Space",
|
|
1184
|
+
"meeting_start": "2023-07-30 15:50:00",
|
|
1185
|
+
"meeting_status": 3,
|
|
1186
|
+
"duration": null,
|
|
1187
|
+
"password": null,
|
|
1188
|
+
"created_on": "2023-07-19 05:21:24",
|
|
1189
|
+
"created_by": 5,
|
|
1190
|
+
"modified_on": "2023-07-21 09:06:54",
|
|
1191
|
+
"modified_by": 5,
|
|
1192
|
+
"deleted_on": "2023-07-21 09:06:54",
|
|
1193
|
+
"deleted_by": 5,
|
|
1194
|
+
"is_deleted": false,
|
|
1195
|
+
"is_read": null,
|
|
1196
|
+
"is_new": null
|
|
1197
|
+
},
|
|
1198
|
+
{
|
|
1199
|
+
"id": 10,
|
|
1200
|
+
"space_id": "1",
|
|
1201
|
+
"meeting_id": "35520e9d-1f1e-4135-9f7b-0e55cb7b9e05",
|
|
1202
|
+
"host_name": "John Smith",
|
|
1203
|
+
"title": "Space Meeting",
|
|
1204
|
+
"meeting_start": "2023-07-19 13:30:00",
|
|
1205
|
+
"meeting_status": 1,
|
|
1206
|
+
"duration": null,
|
|
1207
|
+
"password": null,
|
|
1208
|
+
"created_on": "2023-07-19 05:21:44",
|
|
1209
|
+
"created_by": 5,
|
|
1210
|
+
"modified_on": "2023-07-19 05:21:44",
|
|
1211
|
+
"modified_by": 5,
|
|
1212
|
+
"deleted_on": "2023-07-19 05:21:44",
|
|
1213
|
+
"deleted_by": 5,
|
|
1214
|
+
"is_deleted": false,
|
|
1215
|
+
"is_read": null,
|
|
1216
|
+
"is_new": null
|
|
1217
|
+
},
|
|
1218
|
+
]
|
|
1219
|
+
}
|
|
1220
|
+
````
|
|
1221
|
+
|
|
1222
|
+
**Get Meeting**
|
|
1223
|
+
````typescript
|
|
1224
|
+
atwin.getMeeting(meetingId: string)
|
|
1225
|
+
````
|
|
1226
|
+
This method will return meeting details.
|
|
1227
|
+
|
|
1228
|
+
*Example:*
|
|
1229
|
+
````typescript
|
|
1230
|
+
atwin.getMeeting(meetingId: 'bac67012-d2ff-47f6-b427-fc2538caac2b')
|
|
1231
|
+
````
|
|
1232
|
+
|
|
1233
|
+
*Return Example:*
|
|
1234
|
+
````json
|
|
1235
|
+
{
|
|
1236
|
+
"status": "success",
|
|
1237
|
+
"data": {
|
|
1238
|
+
"id": 16,
|
|
1239
|
+
"space_id": "2",
|
|
1240
|
+
"meeting_id": "bac67012-d2ff-47f6-b427-fc2538caac2b",
|
|
1241
|
+
"host_name": "John Doe",
|
|
1242
|
+
"title": "Meeting in Space",
|
|
1243
|
+
"meeting_start": null,
|
|
1244
|
+
"meeting_status": 1,
|
|
1245
|
+
"duration": null,
|
|
1246
|
+
"password": null,
|
|
1247
|
+
"created_on": "2023-07-20 08:40:32",
|
|
1248
|
+
"created_by": 5,
|
|
1249
|
+
"modified_on": "2023-07-20 08:40:32",
|
|
1250
|
+
"modified_by": 5,
|
|
1251
|
+
"deleted_on": "2023-07-20 08:40:32",
|
|
1252
|
+
"deleted_by": 5,
|
|
1253
|
+
"is_deleted": false,
|
|
1254
|
+
"is_read": null,
|
|
1255
|
+
"is_new": null
|
|
1256
|
+
}
|
|
1257
|
+
}
|
|
1258
|
+
````
|
|
1259
|
+
|
|
1260
|
+
**Check meeting if exist**
|
|
1261
|
+
````typescript
|
|
1262
|
+
atwin.isMeetingExist(meetingId: string)
|
|
1263
|
+
````
|
|
1264
|
+
This method will check if meeting exists and returns a boolean.
|
|
1265
|
+
|
|
1266
|
+
**Check meeting if active**
|
|
1267
|
+
````typescript
|
|
1268
|
+
atwin.isMeetingActive(meetingId: string)
|
|
1269
|
+
````
|
|
1270
|
+
This method will check if meeting is active and return a boolean.
|
|
1271
|
+
|
|
1272
|
+
Note: Active meeting refers to `MeetingStatus.STARTED` or `MeetingStatus.SCHEDULED`.
|
|
1273
|
+
|
|
1274
|
+
### Update Meeting Details
|
|
1275
|
+
|
|
1276
|
+
Methods to update meeting details.
|
|
1277
|
+
|
|
1278
|
+
All update methods will return a response.
|
|
1279
|
+
|
|
1280
|
+
````typescript
|
|
1281
|
+
atwin.updateMeetingTitle(meetingId: string, meetingTitle: string)
|
|
1282
|
+
````
|
|
1283
|
+
|
|
1284
|
+
````typescript
|
|
1285
|
+
atwin.updateMeetingStart(meetingId: string, meetingStart: string)
|
|
1286
|
+
````
|
|
1287
|
+
|
|
1288
|
+
````typescript
|
|
1289
|
+
atwin.updateMeetingStatus(meetingId: string, meetingStatus: string)
|
|
1290
|
+
````
|
|
1291
|
+
|
|
1292
|
+
````typescript
|
|
1293
|
+
atwin.updateMeetingSpace(meetingId: string, spaceId: string)
|
|
1294
|
+
````
|
|
1295
|
+
|
|
1296
|
+
### Meeting Info
|
|
1297
|
+
````typescript
|
|
1298
|
+
export interface MeetingInfo {
|
|
1299
|
+
space_id: number;
|
|
1300
|
+
meeting_id?: string;
|
|
1301
|
+
host_name?: string;
|
|
1302
|
+
title?: string;
|
|
1303
|
+
meeting_start?: Date;
|
|
1304
|
+
meeting_status?: MeetingStatus;
|
|
1305
|
+
duration?: number;
|
|
1306
|
+
password?: string;
|
|
1307
|
+
}
|
|
1308
|
+
````
|
|
1309
|
+
|
|
1310
|
+
`space_id` : number - The id of the Space.
|
|
1311
|
+
|
|
1312
|
+
`meeting_id` : string - The meeting ID.
|
|
1313
|
+
|
|
1314
|
+
`host_name` : string - The name of host of the meeting.
|
|
1315
|
+
|
|
1316
|
+
`title` : string - The title of the meeting.
|
|
1317
|
+
|
|
1318
|
+
`meeting_start` : Date - The date when meeting expected to start.
|
|
1319
|
+
|
|
1320
|
+
`meeting_status` : [MeetingStatus](#meeting-status) - The status of the meeting.
|
|
1321
|
+
|
|
1322
|
+
`duration` : number - The duration of the meeting.
|
|
1323
|
+
|
|
1324
|
+
`password` : string - The password of the meeting.
|
|
1325
|
+
|
|
1326
|
+
### Meeting Config Options
|
|
1327
|
+
````typescript
|
|
1328
|
+
export interface MeetingConfig {
|
|
1329
|
+
customColors?: MeetingCustomColors;
|
|
1330
|
+
customAvatars?: Avatar[];
|
|
1331
|
+
deviceControl?: MeetingDeviceControl;
|
|
1332
|
+
meetingBarPosition?: MeetingBarPosition;
|
|
1333
|
+
}
|
|
1334
|
+
````
|
|
1335
|
+
|
|
1336
|
+
`customColors` : [MeetingCustomColors](#meeting-custom-colors) - This property allows you to personalize the theme of the meeting bar or modals by providing custom colors.
|
|
1337
|
+
|
|
1338
|
+
`customAvatars` : [Avatar](#meeting-custom-avatar)[ ] - This property allows you to have the option to use your own avatars in the meeting.
|
|
1339
|
+
|
|
1340
|
+
Note: You cannot have both the default avatars and custom avatar in avatar selection.
|
|
1341
|
+
|
|
1342
|
+
`deviceControl` : [MeetingDeviceControl](#meeting-device-control) - This property allows you to determine whether participants can use their video input, audio input, and audio output devices during the meeting.
|
|
1343
|
+
|
|
1344
|
+
`meetingBarPosition` : [MeetingBarPosition](#meeting-bar-position) - This property allows you to specify the position of the meeting bar or modals during the meeting.
|
|
1345
|
+
|
|
1346
|
+
#### Meeting Custom Colors
|
|
1347
|
+
````typescript
|
|
1348
|
+
export interface MeetingCustomColors {
|
|
1349
|
+
primary?: string,
|
|
1350
|
+
primary900?: string,
|
|
1351
|
+
primary200?: string,
|
|
1352
|
+
secondary?: string,
|
|
1353
|
+
gray?: string,
|
|
1354
|
+
success?: string,
|
|
1355
|
+
danger?: string,
|
|
1356
|
+
black?: string,
|
|
1357
|
+
white?: string,
|
|
1358
|
+
gray100?: string,
|
|
1359
|
+
gray200?: string,
|
|
1360
|
+
gray300?: string,
|
|
1361
|
+
gray400?: string,
|
|
1362
|
+
gray500?: string,
|
|
1363
|
+
gray600?: string,
|
|
1364
|
+
gray700?: string,
|
|
1365
|
+
gray800?: string,
|
|
1366
|
+
}
|
|
1367
|
+
````
|
|
1368
|
+
|
|
1369
|
+
*Example:*
|
|
1370
|
+
````typescript
|
|
1371
|
+
const meetingCustomColors: MeetingCustomColors = {
|
|
1372
|
+
primary900: '16 29 70',
|
|
1373
|
+
primary200: '141 164 239',
|
|
1374
|
+
primary: '58 92 204',
|
|
1375
|
+
gray800: '250 250 252',
|
|
1376
|
+
gray700: '233 229 239',
|
|
1377
|
+
gray600: '201 196 209',
|
|
1378
|
+
gray500: '174 169 184',
|
|
1379
|
+
gray400: '126 122 136',
|
|
1380
|
+
gray300: '87 83 95',
|
|
1381
|
+
gray200: '57 54 62',
|
|
1382
|
+
gray100: '38 36 42',
|
|
1383
|
+
}
|
|
1384
|
+
````
|
|
1385
|
+
|
|
1386
|
+
#### Meeting Custom Avatar
|
|
1387
|
+
````typescript
|
|
1388
|
+
export interface Avatar {
|
|
1389
|
+
model: string;
|
|
1390
|
+
thumbnail: string;
|
|
1391
|
+
}
|
|
1392
|
+
````
|
|
1393
|
+
`model` : string - Source link of the GLB file or 3d model object.
|
|
1394
|
+
|
|
1395
|
+
`thumbnail` : string - Source link of the thumbnail image.
|
|
1396
|
+
|
|
1397
|
+
|
|
1398
|
+
#### Meeting Device Control
|
|
1399
|
+
````typescript
|
|
1400
|
+
export interface MeetingDeviceControl {
|
|
1401
|
+
videoInput: boolean;
|
|
1402
|
+
audioInput: boolean;
|
|
1403
|
+
audioOutput: boolean;
|
|
1404
|
+
}
|
|
1405
|
+
````
|
|
1406
|
+
`videoInput` : boolean - Enable or disable video input device.
|
|
1407
|
+
|
|
1408
|
+
`audioInput` : boolean - Enable or disable audio input device.
|
|
1409
|
+
|
|
1410
|
+
`audioOutput` : boolean - Enable or disable audio output device.
|
|
1411
|
+
|
|
1412
|
+
#### Meeting Bar Position
|
|
1413
|
+
````typescript
|
|
1414
|
+
export type MeetingBarPosition = 'left' | 'right' | 'top' | 'bottom';
|
|
1415
|
+
````
|
|
1416
|
+
|
|
1417
|
+
#### Meeting Status
|
|
1418
|
+
````typescript
|
|
1419
|
+
export const enum MeetingStatus {
|
|
1420
|
+
SCHEDULED = 0,
|
|
1421
|
+
STARTED = 1,
|
|
1422
|
+
STOPPED = 2,
|
|
1423
|
+
CANCELLED = 3,
|
|
1424
|
+
}
|
|
1425
|
+
````
|
|
1426
|
+
|
|
1060
1427
|
## Function Reference
|
|
1061
1428
|
|
|
1062
1429
|
Some Functions are **async**; when invoking them, Use keyword **await** or **.then** syntax
|
|
@@ -1386,6 +1753,148 @@ showObjectDimensions(selected:IObjectData)
|
|
|
1386
1753
|
</script>
|
|
1387
1754
|
````
|
|
1388
1755
|
|
|
1756
|
+
### Meeting
|
|
1757
|
+
|
|
1758
|
+
````typescript
|
|
1759
|
+
|
|
1760
|
+
createMeeting(
|
|
1761
|
+
spaceId: string,
|
|
1762
|
+
hostName: string,
|
|
1763
|
+
title: string,
|
|
1764
|
+
meetingStart: string,
|
|
1765
|
+
meetingStatus: MeetingStatus
|
|
1766
|
+
duration: string,
|
|
1767
|
+
password: string,
|
|
1768
|
+
)
|
|
1769
|
+
|
|
1770
|
+
// returns an object consist of meeting URL, meeting ID, meeting password
|
|
1771
|
+
// this is an async function that returns a Promise
|
|
1772
|
+
|
|
1773
|
+
startMeeting(meetingUrl: string, meetingPassword?: string, meetingConfig: MeetingConfig)
|
|
1774
|
+
// meetingUrl - URL generated by `createMeeting` function
|
|
1775
|
+
// meetingPassword - optional but default is null
|
|
1776
|
+
// meetingConfig - optional but default is null
|
|
1777
|
+
// this is an void async function
|
|
1778
|
+
|
|
1779
|
+
stopMeeting()
|
|
1780
|
+
// this is an async function
|
|
1781
|
+
|
|
1782
|
+
getMeetingParticipants()
|
|
1783
|
+
// return a list of participants
|
|
1784
|
+
// this is an async function
|
|
1785
|
+
|
|
1786
|
+
getSpaceMeetings(spaceId: string)
|
|
1787
|
+
// spaceId - the id of Space
|
|
1788
|
+
// returns a list if meetings
|
|
1789
|
+
// this is an async function
|
|
1790
|
+
|
|
1791
|
+
getMeeting(meetingId: string)
|
|
1792
|
+
// meetingId - the id of the meeting
|
|
1793
|
+
// returns a meeting
|
|
1794
|
+
// this is an async function
|
|
1795
|
+
|
|
1796
|
+
isMeetingExist(meetingId: string)
|
|
1797
|
+
// meetingId - the id of the meeting
|
|
1798
|
+
// returns a boolean
|
|
1799
|
+
// this is an async function
|
|
1800
|
+
|
|
1801
|
+
isMeetingActive(meetingId: string)
|
|
1802
|
+
// meetingId - the id of the meeting
|
|
1803
|
+
// returns a boolean
|
|
1804
|
+
// this is an async function
|
|
1805
|
+
|
|
1806
|
+
updateMeetingTitle(meetingId: string, meetingTitle: string)
|
|
1807
|
+
// meetingId - the id of the meeting
|
|
1808
|
+
// meetingTitle - the new meeting title
|
|
1809
|
+
// returns a response status
|
|
1810
|
+
// this is an async function
|
|
1811
|
+
|
|
1812
|
+
updateMeetingStart(meetingId: string, meetingStart: string)
|
|
1813
|
+
// meetingId - the id of the meeting
|
|
1814
|
+
// meetingStart - the new date when meeting scheduled to start
|
|
1815
|
+
// returns a response status
|
|
1816
|
+
// this is an async function
|
|
1817
|
+
|
|
1818
|
+
updateMeetingStatus(meetingId: string, meetingStatus: string)
|
|
1819
|
+
// meetingId - the id of the meeting
|
|
1820
|
+
// meetingStatus - can be 0 for SCHEDULED, 1 for STARTED, 2 for STOPPED, 3 for CANCELLED
|
|
1821
|
+
// returns a response status
|
|
1822
|
+
// this is an async function
|
|
1823
|
+
|
|
1824
|
+
updateMeetingSpace(meetingId: string, spaceId: string)
|
|
1825
|
+
// meetingId - the id of the meeting
|
|
1826
|
+
// spaceId - the ID of the new Space
|
|
1827
|
+
// returns a response status
|
|
1828
|
+
// this is an async function
|
|
1829
|
+
````
|
|
1830
|
+
|
|
1831
|
+
**Example**
|
|
1832
|
+
````typescript
|
|
1833
|
+
<script lang="ts">
|
|
1834
|
+
import * as atwin from 'architwin';
|
|
1835
|
+
...
|
|
1836
|
+
|
|
1837
|
+
// create a meeting and generate meeting URL
|
|
1838
|
+
atwin.createMeeting(
|
|
1839
|
+
'1',
|
|
1840
|
+
'John Doe',
|
|
1841
|
+
'Daily Meeting',
|
|
1842
|
+
'2023-07-19T17:34',
|
|
1843
|
+
1.5,
|
|
1844
|
+
'password123',
|
|
1845
|
+
)
|
|
1846
|
+
|
|
1847
|
+
// start a meeting
|
|
1848
|
+
atwin.startMeeting(
|
|
1849
|
+
meetingUrl: "http://www.example.com/?meetingId=290d9f7d-fb14-4c8f-9d95-695cac59e44b&role=host",
|
|
1850
|
+
meetingPassword: 'password123',
|
|
1851
|
+
meetingConfig: {
|
|
1852
|
+
customColors: {
|
|
1853
|
+
primary900: '16 29 70',
|
|
1854
|
+
primary200: '141 164 239',
|
|
1855
|
+
primary: '58 92 204',
|
|
1856
|
+
}
|
|
1857
|
+
deviceControl: {
|
|
1858
|
+
videoInput: false,
|
|
1859
|
+
audioInput: true,
|
|
1860
|
+
audioOutput: true
|
|
1861
|
+
},
|
|
1862
|
+
meetingBarPosition: 'top',
|
|
1863
|
+
}
|
|
1864
|
+
)
|
|
1865
|
+
|
|
1866
|
+
// stop current or initialized meeting
|
|
1867
|
+
atwin.stopMeeting()
|
|
1868
|
+
|
|
1869
|
+
// get all current meeting's participant
|
|
1870
|
+
atwin.getMeetingParticipants()
|
|
1871
|
+
|
|
1872
|
+
// get all meetings in specific Space
|
|
1873
|
+
atwin.getSpaceMeetings(spaceId: 1)
|
|
1874
|
+
|
|
1875
|
+
// get specific meeting
|
|
1876
|
+
await atwin.getMeeting(meetingId: 'bac67012-d2ff-47f6-b427-fc2538caac2b')
|
|
1877
|
+
|
|
1878
|
+
// check if meeting exist
|
|
1879
|
+
atwin.isMeetingExist(meetingId: 'bac67012-d2ff-47f6-b427-fc2538caac2b')
|
|
1880
|
+
|
|
1881
|
+
// check if meeting is active or on-going
|
|
1882
|
+
atwin.isMeetingActive(meetingId: 'bac67012-d2ff-47f6-b427-fc2538caac2b')
|
|
1883
|
+
|
|
1884
|
+
// updates the meeting title
|
|
1885
|
+
atwin.updateMeetingTitle(meetingId: 'bac67012-d2ff-47f6-b427-fc2538caac2b', meetingTitle: 'New Meeting Title')
|
|
1886
|
+
|
|
1887
|
+
// updates the date when the meeting schedule to start
|
|
1888
|
+
atwin.updateMeetingStart(meetingId: 'bac67012-d2ff-47f6-b427-fc2538caac2b', meetingStart: '2023-07-19T17:34')
|
|
1889
|
+
|
|
1890
|
+
// updates the meeting status
|
|
1891
|
+
atwin.updateMeetingStatus(meetingId: 'bac67012-d2ff-47f6-b427-fc2538caac2b', meetingStatus: '0')
|
|
1892
|
+
|
|
1893
|
+
// updates the meeting space ID
|
|
1894
|
+
atwin.updateMeetingSpace(meetingId: 'bac67012-d2ff-47f6-b427-fc2538caac2b', spaceId: 2)
|
|
1895
|
+
|
|
1896
|
+
</script>
|
|
1897
|
+
````
|
|
1389
1898
|
**To Do:**
|
|
1390
1899
|
* when adding an object it should specify the position, scale, rotate of the object
|
|
1391
1900
|
for example:
|
|
@@ -1413,4 +1922,4 @@ for example:
|
|
|
1413
1922
|
* we can do this by returning the media screen payload from addMediaScreen()
|
|
1414
1923
|
|
|
1415
1924
|
* deleteMediaScreen()
|
|
1416
|
-
* hideMediaScreen()
|
|
1925
|
+
* hideMediaScreen()
|