architwin 1.12.4 → 1.13.0

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 (44) hide show
  1. package/CORE_FEATURES.md +35 -0
  2. package/ONBOARDING.md +115 -0
  3. package/lib/architwin.d.ts +98 -6
  4. package/lib/architwin.js +1 -1
  5. package/lib/atwinui/components/toolbar/collapse.d.ts +18 -0
  6. package/lib/atwinui/components/toolbar/collapse.js +62 -0
  7. package/lib/atwinui/components/toolbar/i18n.js +52 -2
  8. package/lib/atwinui/components/toolbar/index.js +11 -1
  9. package/lib/atwinui/components/toolbar/menuBar.d.ts +1 -0
  10. package/lib/atwinui/components/toolbar/menuBar.js +11 -0
  11. package/lib/atwinui/components/toolbar/pipeFormPane.d.ts +31 -0
  12. package/lib/atwinui/components/toolbar/pipeFormPane.js +545 -0
  13. package/lib/atwinui/components/toolbar/pipeListPane.d.ts +19 -0
  14. package/lib/atwinui/components/toolbar/pipeListPane.js +388 -0
  15. package/lib/atwinui/components/toolbar/spaceUserListPane.d.ts +3 -0
  16. package/lib/atwinui/components/toolbar/spaceUserListPane.js +95 -0
  17. package/lib/atwinui/components/toolbar/tagIotForm.d.ts +20 -0
  18. package/lib/atwinui/components/toolbar/tagIotForm.js +391 -0
  19. package/lib/atwinui/components/toolbar/tagIotFormPane.d.ts +62 -0
  20. package/lib/atwinui/components/toolbar/tagIotFormPane.js +606 -0
  21. package/lib/atwinui/components/toolbar/tagMessagingPane.d.ts +4 -0
  22. package/lib/atwinui/components/toolbar/tagMessagingPane.js +117 -10
  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 +106 -26
  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/tag.d.ts +1 -1
  39. package/lib/tag.js +2 -0
  40. package/lib/types.d.ts +80 -1
  41. package/lib/types.js +35 -0
  42. package/package.json +1 -1
  43. package/static/atwinui.css +267 -0
  44. package/static/utility.css +81 -1
@@ -0,0 +1,451 @@
1
+ import { Pane } from 'tweakpane';
2
+ import { dispatchSpaceEvent } from "../architwin";
3
+ import { SPACE_EVENTS } from "../types";
4
+ export class PathLine {
5
+ constructor(mpSdk) {
6
+ this.time = 0;
7
+ this.closed = false;
8
+ this.billboard = undefined;
9
+ this.hovered = false;
10
+ this.length = 0;
11
+ this.inputs = {
12
+ name: '',
13
+ label: 'Path Line',
14
+ description: '',
15
+ node: null,
16
+ tubes: null,
17
+ path: null,
18
+ enabled: true,
19
+ active: false,
20
+ editMode: false,
21
+ direction: -1,
22
+ curveType: 'catmullrom',
23
+ opacity: 0.3,
24
+ tubularSegments: 100,
25
+ radialSegments: 20,
26
+ fillColor: 'none',
27
+ textColor: 'rgb(255,255,255)',
28
+ text: '➡︎',
29
+ font: '48px sans-serif',
30
+ radius: 0.05,
31
+ scrollSpeed: 1.35,
32
+ collider: true,
33
+ visible: true,
34
+ pathOptions: null
35
+ };
36
+ //@ts-expect-error
37
+ this.outputs = {
38
+ length: 0,
39
+ gui: {},
40
+ };
41
+ this.emits = {
42
+ active: true,
43
+ destroyed: true,
44
+ };
45
+ this.events = {
46
+ 'INTERACTION.CLICK': true,
47
+ 'INTERACTION.HOVER': false,
48
+ };
49
+ this.onInit = () => {
50
+ const THREE = this.context.three;
51
+ this.groupedMesh = new THREE.Group();
52
+ if (this.inputs.active) {
53
+ //this.renderGUI();
54
+ }
55
+ if (this.inputs.path.length > 1) {
56
+ this.renderPathLine();
57
+ }
58
+ };
59
+ this.onInputsUpdated = (prevInputs) => {
60
+ if (this.inputs !== prevInputs) {
61
+ const THREE = this.context.three;
62
+ this.groupedMesh = new THREE.Group();
63
+ if (!this.inputs.active && this.panel) {
64
+ this.panel.dispose();
65
+ //@ts-expect-error
66
+ this.panel = false;
67
+ }
68
+ else {
69
+ if (!this.panel || this.inputs.label !== prevInputs.label) {
70
+ //console.log('Rendering GUI...');
71
+ // this.renderGUI();
72
+ }
73
+ }
74
+ if (this.inputs.pathOptions) {
75
+ const excludedKeys = ['id', 'pathOptions'];
76
+ for (let key in this.inputs) {
77
+ if (!excludedKeys.includes(key)) {
78
+ if (this.inputs.pathOptions[key]) {
79
+ this.inputs[key] = this.inputs.pathOptions[key];
80
+ }
81
+ }
82
+ }
83
+ }
84
+ if (this.inputs.path.length > 1) {
85
+ this.renderPathLine();
86
+ console.log("paths ", this.inputs.path);
87
+ }
88
+ }
89
+ };
90
+ this.renderPathLine = () => {
91
+ const THREE = this.context.three;
92
+ // Find Length
93
+ let sections = this.inputs.path.length - 1;
94
+ this.length = 0;
95
+ for (let i = 0; i < sections; i++) {
96
+ const start = new THREE.Vector3(this.inputs.path[i].x, this.inputs.path[i].y, this.inputs.path[i].z);
97
+ const end = new THREE.Vector3(this.inputs.path[i + 1].x, this.inputs.path[i + 1].y, this.inputs.path[i + 1].z);
98
+ this.length += start.distanceTo(end);
99
+ }
100
+ const ctx = document.createElement('canvas').getContext('2d');
101
+ if (!ctx) {
102
+ return;
103
+ }
104
+ ctx.canvas.width = 64;
105
+ ctx.canvas.height = 64;
106
+ if (this.inputs.fillColor == 'none') {
107
+ ctx.clearRect(0, 0, 64, 64);
108
+ }
109
+ else {
110
+ // background
111
+ let fillColorRGBA = this.inputs.fillColor.replace(/rgb/i, 'rgba');
112
+ fillColorRGBA = fillColorRGBA.replace(/\)/i, ',' + (this.hovered ? 0.9 : this.inputs.opacity) + ')');
113
+ ctx.fillStyle = fillColorRGBA;
114
+ ctx.fillRect(0, 0, 64, 64);
115
+ }
116
+ // render out text measurement in the rendered line
117
+ ctx.translate(32, 32);
118
+ ctx.fillStyle = this.inputs.textColor;
119
+ ctx.textAlign = 'center';
120
+ ctx.textBaseline = 'middle';
121
+ ctx.font = this.inputs.font;
122
+ ctx.fillText(this.inputs.text, 0, 0);
123
+ this.texture = new THREE.CanvasTexture(ctx.canvas);
124
+ this.texture.wrapS = THREE.RepeatWrapping;
125
+ this.texture.wrapT = THREE.RepeatWrapping;
126
+ this.texture.repeat.set(this.length, 3);
127
+ this.material = new THREE.MeshBasicMaterial({
128
+ map: this.texture,
129
+ side: THREE.DoubleSide,
130
+ depthWrite: false,
131
+ depthTest: true,
132
+ transparent: true,
133
+ //@ts-expect-error
134
+ flatShading: true,
135
+ emissive: 0x072534,
136
+ });
137
+ if (this.inputs.path !== null) {
138
+ this.tubeGeometry && this.tubeGeometry.dispose();
139
+ this.tubeGeometry = new THREE.TubeGeometry(new THREE.CatmullRomCurve3(this.inputs.path, false,
140
+ //@ts-expect-error
141
+ this.inputs.curveType, this.inputs.curveType == 'catmullrom' ? 0.25 : 0), this.inputs.tubularSegments, // tubularSegments
142
+ this.inputs.radius, this.inputs.radialSegments, // radialSegments
143
+ this.closed // closed
144
+ );
145
+ this.mesh = new THREE.Mesh(this.tubeGeometry, this.material);
146
+ }
147
+ this.mesh.name = this.inputs.name;
148
+ this.outputs.length = this.length;
149
+ this.groupedMesh.add(this.mesh);
150
+ this.mesh.visible = this.inputs.visible;
151
+ if (this.inputs.enabled) {
152
+ this.outputs.objectRoot = this.mesh;
153
+ this.outputs.collider = this.inputs.collider ? this.mesh : null;
154
+ }
155
+ else {
156
+ this.outputs.objectRoot = null;
157
+ this.outputs.collider = null;
158
+ }
159
+ if (this.panel) {
160
+ this.panel.refresh();
161
+ }
162
+ dispatchSpaceEvent(SPACE_EVENTS.PATH_UPDATED, {
163
+ path: this.inputs.path,
164
+ textColor: this.inputs.textColor
165
+ });
166
+ };
167
+ this.setBillboard = (value) => {
168
+ this.billboard = value;
169
+ };
170
+ //This is just a temp gui I need for debugging and experimentation purposes. Will be commented out once I am done
171
+ this.renderGUI = () => {
172
+ if (this.panel) {
173
+ this.panel.dispose();
174
+ }
175
+ this.panel = new Pane({
176
+ //width: 260,
177
+ title: 'Scrolling Tube Creator',
178
+ container: document.getElementById('objgui'),
179
+ });
180
+ const tab = this.panel.addTab({
181
+ pages: [{ title: 'Edit' }, { title: 'All Drawings' }],
182
+ });
183
+ const folder1 = tab.pages[0].addFolder({ title: 'Inputs' });
184
+ folder1.addBinding(this.inputs, 'name');
185
+ folder1.addBinding(this.inputs, 'label');
186
+ folder1.addBinding(this.inputs, 'description', {
187
+ readonly: false,
188
+ multiline: true,
189
+ rows: 5,
190
+ });
191
+ folder1.addBinding(this.inputs, 'text', {
192
+ options: { ' ': ' ', '➡︎': '➡︎', '✳': '✳', '☠': '☠' },
193
+ });
194
+ folder1.addBinding(this.inputs, 'textColor');
195
+ folder1.addBinding(this.inputs, 'fillColor');
196
+ folder1.addBinding(this.inputs, 'direction', {
197
+ options: { 'Left to Right': -1, 'Right to Left': 1 },
198
+ });
199
+ folder1.addBinding(this.outputs, 'length', {
200
+ readonly: true,
201
+ });
202
+ // If the node was passed as an input, we can run node.destroy();
203
+ if (this.inputs.node) {
204
+ const remove = folder1.addButton({ title: 'Remove', label: 'Remove' });
205
+ remove.on('click', () => {
206
+ //@ts-expect-error
207
+ this.notify('destroyed');
208
+ this.panel.dispose();
209
+ //@ts-expect-error
210
+ this.panel = false;
211
+ this.inputs.active = false;
212
+ this.inputs.node.stop();
213
+ });
214
+ }
215
+ const folder2 = tab.pages[0].addFolder({
216
+ title: 'Advanced',
217
+ expanded: true,
218
+ });
219
+ folder2.addBinding(this.inputs, 'enabled');
220
+ folder2.addBinding(this.inputs, 'opacity', { min: 0, max: 1, step: 0.05 });
221
+ folder2.addBinding(this.inputs, 'radius', {
222
+ min: 0.01,
223
+ max: 1,
224
+ step: 0.01,
225
+ });
226
+ folder2.addBinding(this.inputs, 'scrollSpeed', {
227
+ min: 0,
228
+ max: 5,
229
+ step: 0.05,
230
+ });
231
+ folder2.addBinding(this.inputs, 'tubularSegments', {
232
+ min: 1,
233
+ max: 100,
234
+ step: 1,
235
+ });
236
+ folder2.addBinding(this.inputs, 'radialSegments', {
237
+ min: 1,
238
+ max: 20,
239
+ step: 1,
240
+ });
241
+ folder2.addBinding(this.inputs, 'collider');
242
+ if (this.inputs.tubes !== null) {
243
+ const nodeIterator = this.inputs.tubes.nodeIterator();
244
+ let nodes = nodeIterator.next();
245
+ while (!nodes.done) {
246
+ const componentIterator = nodes.value.componentIterator();
247
+ let component = componentIterator.next();
248
+ nodes = nodeIterator.next();
249
+ const button = tab.pages[1].addButton({
250
+ title: component.value.inputs.label,
251
+ label: '=',
252
+ });
253
+ button.on('click', (data) => {
254
+ // This needs to be reviewed
255
+ if (!component.value.inputs.active) {
256
+ //@ts-expect-error
257
+ this.notify('active', { component: component.value });
258
+ }
259
+ });
260
+ }
261
+ }
262
+ };
263
+ this.mpSdk = mpSdk;
264
+ }
265
+ onEvent(eventType, data) {
266
+ if (eventType === 'INTERACTION.CLICK') {
267
+ //@ts-expect-error
268
+ this.notify('active', { component: this });
269
+ // Show a Tag Billboard with the info of this tube
270
+ if (!this.billboard) {
271
+ // Allow access to these variables within then callbacks.
272
+ var mpSdk = this.mpSdk;
273
+ mpSdk.Tag.toggleNavControls(false);
274
+ mpSdk.Tag.add({
275
+ label: this.inputs.label,
276
+ description: this.inputs.description +
277
+ ' - ' +
278
+ Math.round(this.length * 1000) / 1000 +
279
+ 'm',
280
+ anchorPosition: {
281
+ x: data.point.x,
282
+ y: data.point.y,
283
+ z: data.point.z,
284
+ },
285
+ stemVector: {
286
+ x: 0,
287
+ y: 0,
288
+ z: 0,
289
+ },
290
+ }).then((tags) => {
291
+ this.setBillboard(tags[0]);
292
+ mpSdk.Tag.allowAction(tags[0], {
293
+ opening: true,
294
+ navigating: true,
295
+ });
296
+ mpSdk.Tag.editOpacity(tags[0], 0);
297
+ mpSdk.Tag.open(tags[0]).then(() => {
298
+ let tagDestroyer = mpSdk.Tag.openTags.subscribe((newState) => {
299
+ if (newState.selected.size == 0) {
300
+ let thisTag = newState.selected;
301
+ //@ts-expect-error
302
+ if (thisTag != tags[0]) {
303
+ mpSdk.Tag.remove(tags[0]);
304
+ tagDestroyer.cancel();
305
+ this.setBillboard(false);
306
+ mpSdk.Tag.toggleNavControls(true);
307
+ }
308
+ }
309
+ });
310
+ });
311
+ });
312
+ }
313
+ }
314
+ }
315
+ onTick(tickDelta) {
316
+ if (this.inputs.scrollSpeed > 0) {
317
+ this.time += tickDelta;
318
+ if (this.texture) {
319
+ this.texture.offset.x =
320
+ (this.inputs.direction *
321
+ ((this.inputs.scrollSpeed * this.time) / 1000)) %
322
+ 1;
323
+ }
324
+ }
325
+ }
326
+ onDestroy() {
327
+ this.texture.dispose();
328
+ if (this.panel) {
329
+ this.panel.dispose();
330
+ //@ts-expect-error
331
+ this.panel = false;
332
+ }
333
+ if (this.billboard) {
334
+ this.mpSdk.Tag.remove(this.billboard);
335
+ console.log('Nav Controls On');
336
+ this.mpSdk.Tag.toggleNavControls(true);
337
+ }
338
+ }
339
+ }
340
+ export const pathLineType = 'pathLine';
341
+ export const pathLineFactory = function (mpSdk) {
342
+ return function () {
343
+ return new PathLine(mpSdk);
344
+ };
345
+ };
346
+ export class PathPoint {
347
+ constructor(mpSdk) {
348
+ this.inputs = {
349
+ index: null,
350
+ radius: 0.05,
351
+ position: null,
352
+ fillColor: 'rgb(11,57,72)',
353
+ hoverColor: 'rgb(255,0,0)',
354
+ ringVisibility: false
355
+ };
356
+ this.emits = {
357
+ active: true,
358
+ changed: true,
359
+ };
360
+ this.events = {
361
+ 'INTERACTION.DRAG': true,
362
+ 'INTERACTION.DRAG_BEGIN': true,
363
+ 'INTERACTION.DRAG_END': true,
364
+ 'INTERACTION.HOVER': true,
365
+ };
366
+ this.onInputsUpdated = (prevInputs) => {
367
+ this.renderVertice(false);
368
+ };
369
+ this.onInit = () => {
370
+ this.renderVertice();
371
+ };
372
+ this.renderVertice = (hovered = false) => {
373
+ const THREE = this.context.three;
374
+ const group = new THREE.Group();
375
+ //This is just a visual marker so that the user can see the points they have already marked
376
+ this.geometry = new THREE.SphereGeometry(this.inputs.radius, 16, 16);
377
+ this.material = new THREE.MeshBasicMaterial({
378
+ color: (hovered ? this.inputs.hoverColor : this.inputs.fillColor),
379
+ transparent: true,
380
+ opacity: 0.6,
381
+ });
382
+ this.mesh = new THREE.Mesh(this.geometry, this.material);
383
+ this.mesh.position.set(this.inputs.position.x, this.inputs.position.y, this.inputs.position.z);
384
+ this.outputs.objectRoot = this.mesh;
385
+ this.outputs.collider = this.mesh;
386
+ };
387
+ this.mpSdk = mpSdk;
388
+ }
389
+ onEvent(eventType, data) {
390
+ var _a;
391
+ if (eventType === 'INTERACTION.DRAG') {
392
+ //this.pointerIntersection.object === 'intersectedobject.model'
393
+ //this.pointerIntersection.object
394
+ console.log("group this.pointerIntersection ", this.pointerIntersection);
395
+ if (this.pointerIntersection.object === 'intersectedobject.model') {
396
+ let e = Object.assign({}, this.pointerIntersection.position);
397
+ this.mesh.position.set(e.x, e.y, e.z);
398
+ //this.mesh.children[0].position.set(e.x, e.y, e.z)
399
+ //@ts-expect-error
400
+ this.notify('changed', {
401
+ index: this.inputs.index,
402
+ position: this.mesh.position,
403
+ collider: null,
404
+ });
405
+ }
406
+ }
407
+ if (eventType === 'INTERACTION.DRAG_BEGIN') {
408
+ this.mpSdk.Pointer.setVisible(false);
409
+ //@ts-expect-error
410
+ this.mesh.material.opacity = 0.5;
411
+ //this.mesh.children[0].material.opacity = 0.5
412
+ // will make it smaller later. Setting this to 0.5 to make it easier to see in the space
413
+ this.mesh.scale.set(0.5, 0.5, 0.5);
414
+ if (this.pointerSub == null) {
415
+ this.pointerSub = this.mpSdk.Pointer.intersection.subscribe((data) => {
416
+ this.pointerIntersection = data;
417
+ });
418
+ }
419
+ //@ts-expect-error
420
+ this.notify('changed', {
421
+ index: this.inputs.index,
422
+ position: this.mesh.position,
423
+ collider: false,
424
+ });
425
+ }
426
+ if (eventType === 'INTERACTION.DRAG_END') {
427
+ //@ts-expect-error
428
+ this.mesh.material.opacity = 1;
429
+ this.mesh.scale.set(1, 1, 1);
430
+ this.mpSdk.Pointer.setVisible(true);
431
+ (_a = this.pointerSub) === null || _a === void 0 ? void 0 : _a.cancel();
432
+ //renderPolygonFromPath()
433
+ //@ts-expect-error
434
+ this.notify('changed', {
435
+ index: this.inputs.index,
436
+ position: this.mesh.position,
437
+ collider: false,
438
+ });
439
+ dispatchSpaceEvent(SPACE_EVENTS.VERTEX_DRAG_END, {
440
+ index: this.inputs.index,
441
+ position: this.mesh.position
442
+ });
443
+ }
444
+ }
445
+ }
446
+ export const pathPointType = 'pathPoint';
447
+ export const pathPointFactory = function (mpSdk) {
448
+ return function () {
449
+ return new PathPoint(mpSdk);
450
+ };
451
+ };
package/lib/tag.d.ts CHANGED
@@ -28,7 +28,7 @@ declare function attachTagMedia(payload: {
28
28
  sdk: MpSdk;
29
29
  tag: MpSdk.Tag.TagData;
30
30
  attachments: string[];
31
- }): Promise<void>;
31
+ }): Promise<string[]>;
32
32
  declare function detachTagMedia(payload: {
33
33
  sdk: MpSdk;
34
34
  tag: ITag;
package/lib/tag.js CHANGED
@@ -136,10 +136,12 @@ function attachTagMedia(payload) {
136
136
  payload.tag.attachments = [];
137
137
  for (let i in payload.attachments) {
138
138
  const [attachmentId] = yield payload.sdk.Tag.registerAttachment(payload.attachments[i]);
139
+ log.info("media attachmentId ", attachmentId);
139
140
  payload.tag.attachments.push(attachmentId);
140
141
  }
141
142
  yield payload.sdk.Tag.attach(payload.tag.id, ...payload.tag.attachments);
142
143
  log.info('__@ Attach successfully');
144
+ return payload.tag.attachments;
143
145
  });
144
146
  }
145
147
  function detachTagMedia(payload) {
package/lib/types.d.ts CHANGED
@@ -446,6 +446,8 @@ export interface ComponentOptions {
446
446
  polygonData?: PolygonData | undefined;
447
447
  wallHeight?: number | undefined;
448
448
  floorLevel?: number | undefined;
449
+ lineComponentType?: string | undefined;
450
+ id?: number | undefined;
449
451
  }
450
452
  export interface VectorCoords {
451
453
  object_position: Vector3;
@@ -730,7 +732,24 @@ export declare enum SPACE_EVENTS {
730
732
  CUSTOM_SWEEP_OFFSETX_UPDATED = "CUSTOM_SWEEP_OFFSETX_UPDATED",
731
733
  CUSTOM_SWEEP_OFFSETY_UPDATED = "CUSTOM_SWEEP_OFFSETY_UPDATED",
732
734
  CUSTOM_MAP_SETTINGS_UPDATED = "CUSTOM_MAP_SETTINGS_UPDATED",
733
- SPACE_METADATA_RETRIEVED = "SPACE_METADATA_RETRIEVED"
735
+ SPACE_METADATA_RETRIEVED = "SPACE_METADATA_RETRIEVED",
736
+ RENDER_PIPE_CATEGORY = "RENDER_PIPE_CATEGORY",
737
+ PIPE_CATEGORY_REMOVED = "PIPE_CATEGORY_REMOVED",
738
+ PIPE_CATEGORY_SAVED = "PIPE_CATEGORY_SAVED",
739
+ PIPE_CATEGORY_SELECTED = "PIPE_CATEGORY_SELECTED",
740
+ PIPE_CATEGORY_ON_CHANGE = "PIPE_CATEGORY_ON_CHANGE",
741
+ PIPE_SAVED = "PIPE_SAVED",
742
+ PIPE_REMOVED = "PIPE_REMOVED",
743
+ PIPE_ON_CHANGE = "PIPE_ON_CHANGE",
744
+ PIPE_CLICKED = "PIPE_CLICKED",
745
+ PIPE_ADD = "PIPE_ADD",
746
+ PIPE_SELECTED = "PIPE_SELECTED",
747
+ DRAW_PIPE = "DRAW_PIPE",
748
+ DRAW_PIPE_UNDO = "DRAW_PIPE_UNDO",
749
+ DRAW_PIPE_REDO = "DRAW_PIPE_REDO",
750
+ PIPE_VERTEX_REMOVED = "PIPE_VERTEX_REMOVED",
751
+ TAG_MESSAGE_UNSEND = "TAG_MESSAGE_UNSEND",
752
+ PATH_UPDATED = "PATH_UPDATED"
734
753
  }
735
754
  export declare const enum TAG_COLOR {
736
755
  MAROON = "MAROON",
@@ -884,6 +903,7 @@ export interface IToolbarConfig {
884
903
  includeMeasurements?: boolean;
885
904
  includeViews?: boolean;
886
905
  };
906
+ pipe?: boolean;
887
907
  models?: boolean;
888
908
  minimap?: boolean;
889
909
  theme?: boolean;
@@ -1279,6 +1299,18 @@ export interface SpaceMetadata {
1279
1299
  };
1280
1300
  };
1281
1301
  }
1302
+ export interface PathConfig {
1303
+ lineType: string;
1304
+ verticeType: string;
1305
+ lineTypeComponentConfig?: ComponentOptions;
1306
+ verticeTypeComponentConfig?: ComponentOptions;
1307
+ }
1308
+ export interface ModelPayload {
1309
+ mediaUrl: string;
1310
+ objectType: string;
1311
+ config?: ObjectConfig;
1312
+ object_data?: I3DObject;
1313
+ }
1282
1314
  export declare enum COORDINATE_SYSTEM {
1283
1315
  MATTERPORT = "YUP",
1284
1316
  BIM = "ZUP"
@@ -1303,3 +1335,50 @@ export declare enum MAP_OPTIONS {
1303
1335
  DEFAULT_MAP = "Default Minimap",
1304
1336
  CUSTOM_MAP = "Custom Minimap"
1305
1337
  }
1338
+ export interface VetexData {
1339
+ uuid: string;
1340
+ name: string;
1341
+ path: Array<Vector3>;
1342
+ }
1343
+ export interface IPipeCategory {
1344
+ uuid: string;
1345
+ space_uuid: string;
1346
+ name: string;
1347
+ parent_uuid: string;
1348
+ json_data: string;
1349
+ color?: string;
1350
+ pipes: Array<IPipe>;
1351
+ owner_uuid?: string;
1352
+ created_on: Date;
1353
+ }
1354
+ export interface IPipe {
1355
+ uuid: string;
1356
+ space_uuid: string;
1357
+ name: string;
1358
+ category_uuid: string;
1359
+ json_data: string;
1360
+ created_on: Date;
1361
+ }
1362
+ export declare enum COLLAPSE {
1363
+ TOGGLE_ID = "at-collapse-toggle-btn",
1364
+ CONTENT_ID = "at-collapse-content",
1365
+ ACTIVE = "active",
1366
+ EXPAND = "expand",
1367
+ TOGGLE = "toggle",
1368
+ INACTIVE = "inactive",
1369
+ LIST = "at-collapse-list",
1370
+ HEADER = "at-collapse-header",
1371
+ FORM = "at-collapse-form",
1372
+ ITEM = "item"
1373
+ }
1374
+ export declare enum DRAWING_MODE {
1375
+ ACTIVE = "active",
1376
+ INACTIVE = "inactive"
1377
+ }
1378
+ export interface PipePayload {
1379
+ uuid?: string | undefined;
1380
+ space_uuid?: string | undefined;
1381
+ name?: string | undefined;
1382
+ parent_uuid?: string | undefined;
1383
+ json_data: PolygonData;
1384
+ }
package/lib/types.js CHANGED
@@ -107,6 +107,23 @@ export var SPACE_EVENTS;
107
107
  SPACE_EVENTS["CUSTOM_SWEEP_OFFSETY_UPDATED"] = "CUSTOM_SWEEP_OFFSETY_UPDATED";
108
108
  SPACE_EVENTS["CUSTOM_MAP_SETTINGS_UPDATED"] = "CUSTOM_MAP_SETTINGS_UPDATED";
109
109
  SPACE_EVENTS["SPACE_METADATA_RETRIEVED"] = "SPACE_METADATA_RETRIEVED";
110
+ SPACE_EVENTS["RENDER_PIPE_CATEGORY"] = "RENDER_PIPE_CATEGORY";
111
+ SPACE_EVENTS["PIPE_CATEGORY_REMOVED"] = "PIPE_CATEGORY_REMOVED";
112
+ SPACE_EVENTS["PIPE_CATEGORY_SAVED"] = "PIPE_CATEGORY_SAVED";
113
+ SPACE_EVENTS["PIPE_CATEGORY_SELECTED"] = "PIPE_CATEGORY_SELECTED";
114
+ SPACE_EVENTS["PIPE_CATEGORY_ON_CHANGE"] = "PIPE_CATEGORY_ON_CHANGE";
115
+ SPACE_EVENTS["PIPE_SAVED"] = "PIPE_SAVED";
116
+ SPACE_EVENTS["PIPE_REMOVED"] = "PIPE_REMOVED";
117
+ SPACE_EVENTS["PIPE_ON_CHANGE"] = "PIPE_ON_CHANGE";
118
+ SPACE_EVENTS["PIPE_CLICKED"] = "PIPE_CLICKED";
119
+ SPACE_EVENTS["PIPE_ADD"] = "PIPE_ADD";
120
+ SPACE_EVENTS["PIPE_SELECTED"] = "PIPE_SELECTED";
121
+ SPACE_EVENTS["DRAW_PIPE"] = "DRAW_PIPE";
122
+ SPACE_EVENTS["DRAW_PIPE_UNDO"] = "DRAW_PIPE_UNDO";
123
+ SPACE_EVENTS["DRAW_PIPE_REDO"] = "DRAW_PIPE_REDO";
124
+ SPACE_EVENTS["PIPE_VERTEX_REMOVED"] = "PIPE_VERTEX_REMOVED";
125
+ SPACE_EVENTS["TAG_MESSAGE_UNSEND"] = "TAG_MESSAGE_UNSEND";
126
+ SPACE_EVENTS["PATH_UPDATED"] = "PATH_UPDATED";
110
127
  })(SPACE_EVENTS || (SPACE_EVENTS = {}));
111
128
  export var MEETING_SIDEBAR;
112
129
  (function (MEETING_SIDEBAR) {
@@ -150,3 +167,21 @@ export var MAP_OPTIONS;
150
167
  MAP_OPTIONS["DEFAULT_MAP"] = "Default Minimap";
151
168
  MAP_OPTIONS["CUSTOM_MAP"] = "Custom Minimap";
152
169
  })(MAP_OPTIONS || (MAP_OPTIONS = {}));
170
+ export var COLLAPSE;
171
+ (function (COLLAPSE) {
172
+ COLLAPSE["TOGGLE_ID"] = "at-collapse-toggle-btn";
173
+ COLLAPSE["CONTENT_ID"] = "at-collapse-content";
174
+ COLLAPSE["ACTIVE"] = "active";
175
+ COLLAPSE["EXPAND"] = "expand";
176
+ COLLAPSE["TOGGLE"] = "toggle";
177
+ COLLAPSE["INACTIVE"] = "inactive";
178
+ COLLAPSE["LIST"] = "at-collapse-list";
179
+ COLLAPSE["HEADER"] = "at-collapse-header";
180
+ COLLAPSE["FORM"] = "at-collapse-form";
181
+ COLLAPSE["ITEM"] = "item";
182
+ })(COLLAPSE || (COLLAPSE = {}));
183
+ export var DRAWING_MODE;
184
+ (function (DRAWING_MODE) {
185
+ DRAWING_MODE["ACTIVE"] = "active";
186
+ DRAWING_MODE["INACTIVE"] = "inactive";
187
+ })(DRAWING_MODE || (DRAWING_MODE = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "architwin",
3
- "version": "1.12.4",
3
+ "version": "1.13.0",
4
4
  "description": "ArchiTwin Library for Matterport",
5
5
  "main": "./lib/architwin.js",
6
6
  "types": "./lib/architwin.d.ts",