@smarterplan/ngx-smarterplan-core 1.4.27 → 1.4.28

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 (114) hide show
  1. package/README.md +24 -24
  2. package/esm2022/lib/components/checkbox-slider/checkbox-slider.component.mjs +33 -0
  3. package/esm2022/lib/components/csv-export/csv-export.component.mjs +3 -3
  4. package/esm2022/lib/components/inventory-runs/inventory-files.component.mjs +63 -63
  5. package/esm2022/lib/components/inventory-runs/inventory-launch.component.mjs +141 -0
  6. package/esm2022/lib/components/inventory-runs/inventory-runs.component.mjs +3 -3
  7. package/esm2022/lib/components/loader/loader.component.mjs +3 -3
  8. package/esm2022/lib/components/menu-bar/avatar/avatar.component.mjs +1 -1
  9. package/esm2022/lib/components/menu-bar/menu-bar.component.mjs +3 -3
  10. package/esm2022/lib/components/menu-bar/navigation-bar/navigation-bar.component.mjs +3 -3
  11. package/esm2022/lib/components/modal-switch-visit/modal-switch-visit.component.mjs +3 -3
  12. package/esm2022/lib/components/search-bar/search-bar.component.mjs +3 -3
  13. package/esm2022/lib/components/splat-viewer/splat-viewer.component.mjs +1 -1
  14. package/esm2022/lib/components/support-modal/support-modal.component.mjs +3 -3
  15. package/esm2022/lib/config.mjs +1 -1
  16. package/esm2022/lib/helpers.service.mjs +1 -1
  17. package/esm2022/lib/matterport-extensions/nest-thermostat/CanvasImage.mjs +1 -1
  18. package/esm2022/lib/matterport-extensions/nest-thermostat/CanvasRenderer.mjs +1 -1
  19. package/esm2022/lib/matterport-extensions/nest-thermostat/NestThermostat.mjs +1 -1
  20. package/esm2022/lib/matterport-extensions/nest-thermostat/PlaneRenderer.mjs +1 -1
  21. package/esm2022/lib/matterport-extensions/scene-component/SceneComponent.mjs +1 -1
  22. package/esm2022/lib/matterport-extensions/security-camera/SecurityCamera.mjs +22 -22
  23. package/esm2022/lib/matterport-extensions/tv-player/TvPlayer.mjs +1 -1
  24. package/esm2022/lib/matterport-extensions/view-frustum-mesh/ViewFrustumMesh.mjs +22 -22
  25. package/esm2022/lib/mattertagData.mjs +1 -1
  26. package/esm2022/lib/ngx-smarterplan-core.module.mjs +14 -4
  27. package/esm2022/lib/ngx-smarterplan-core.service.mjs +1 -1
  28. package/esm2022/lib/pipes/duration-to-string.pipe.mjs +1 -1
  29. package/esm2022/lib/pipes/format-date-number-to-digits.pipe.mjs +1 -1
  30. package/esm2022/lib/pipes/hashtag-from-id.pipe.mjs +1 -1
  31. package/esm2022/lib/pipes/safe-url.pipe.mjs +1 -1
  32. package/esm2022/lib/pipes/time-date-to-local-string.pipe.mjs +1 -1
  33. package/esm2022/lib/pipes/username-from-id.pipe.mjs +1 -1
  34. package/esm2022/lib/services/amplify-cache.service.mjs +1 -1
  35. package/esm2022/lib/services/base-tab.service.mjs +1 -1
  36. package/esm2022/lib/services/baseVisibility.service.mjs +1 -1
  37. package/esm2022/lib/services/content.service.mjs +1 -1
  38. package/esm2022/lib/services/filter.service.mjs +10 -3
  39. package/esm2022/lib/services/intervention.service.mjs +1 -1
  40. package/esm2022/lib/services/locale.service.mjs +1 -1
  41. package/esm2022/lib/services/matterport-import.service.mjs +1 -1
  42. package/esm2022/lib/services/matterport-measurement.service.mjs +1 -1
  43. package/esm2022/lib/services/matterport-navigation.service.mjs +1 -1
  44. package/esm2022/lib/services/matterport-object3d.service.mjs +1 -1
  45. package/esm2022/lib/services/matterport-pointer.service.mjs +6 -6
  46. package/esm2022/lib/services/matterport-tag-copy.service.mjs +1 -1
  47. package/esm2022/lib/services/matterport-tag.service.mjs +5 -1
  48. package/esm2022/lib/services/matterport.service.mjs +30 -25
  49. package/esm2022/lib/services/models/affectation.service.mjs +1 -1
  50. package/esm2022/lib/services/models/base-object.service.mjs +1 -1
  51. package/esm2022/lib/services/models/capture.service.mjs +1 -1
  52. package/esm2022/lib/services/models/comment.service.mjs +1 -1
  53. package/esm2022/lib/services/models/domain.service.mjs +1 -1
  54. package/esm2022/lib/services/models/equipment.service.mjs +22 -1
  55. package/esm2022/lib/services/models/event.service.mjs +1 -1
  56. package/esm2022/lib/services/models/feature.service.mjs +15 -1
  57. package/esm2022/lib/services/models/hashtag.service.mjs +1 -1
  58. package/esm2022/lib/services/models/inventory.service.mjs +3 -3
  59. package/esm2022/lib/services/models/layer.service.mjs +1 -1
  60. package/esm2022/lib/services/models/measurement.service.mjs +7 -1
  61. package/esm2022/lib/services/models/mission.service.mjs +1 -1
  62. package/esm2022/lib/services/models/navigation.service.mjs +1 -1
  63. package/esm2022/lib/services/models/node.service.mjs +1 -1
  64. package/esm2022/lib/services/models/object3D.service.mjs +1 -1
  65. package/esm2022/lib/services/models/operation.service.mjs +1 -1
  66. package/esm2022/lib/services/models/organisation.service.mjs +1 -1
  67. package/esm2022/lib/services/models/plan.service.mjs +1 -1
  68. package/esm2022/lib/services/models/poi.service.mjs +27 -27
  69. package/esm2022/lib/services/models/profile.service.mjs +1 -1
  70. package/esm2022/lib/services/models/property.service.mjs +1 -1
  71. package/esm2022/lib/services/models/space.service.mjs +1 -1
  72. package/esm2022/lib/services/models/template.service.mjs +1 -1
  73. package/esm2022/lib/services/models/ticket.service.mjs +6 -1
  74. package/esm2022/lib/services/models/visit.service.mjs +1 -1
  75. package/esm2022/lib/services/models/zone.service.mjs +1 -1
  76. package/esm2022/lib/services/navigator.service.mjs +1 -1
  77. package/esm2022/lib/services/obj-to-glb.mjs +1 -1
  78. package/esm2022/lib/services/s3.service.mjs +1 -1
  79. package/esm2022/lib/services/search.service.mjs +1 -1
  80. package/esm2022/lib/services/support.service.mjs +1 -1
  81. package/esm2022/lib/services/sweep-locator.service.mjs +1 -1
  82. package/esm2022/lib/services/tag.service.mjs +16 -16
  83. package/esm2022/lib/services/threejs-import.service.mjs +1 -1
  84. package/esm2022/lib/services/threejs.service.mjs +1 -1
  85. package/esm2022/lib/services/user.service.mjs +1 -1
  86. package/esm2022/lib/services/utils/matterport-framing.util.mjs +1 -1
  87. package/esm2022/lib/services/utils/matterport-transform.util.mjs +1 -1
  88. package/esm2022/lib/services/validators.service.mjs +1 -1
  89. package/esm2022/lib/services/viewer.service.mjs +3 -3
  90. package/esm2022/lib/services/zone-drawer.service.mjs +1 -1
  91. package/esm2022/lib/services/zoneChange.service.mjs +1 -1
  92. package/esm2022/lib/tokens/matterport-sdk-key.token.mjs +1 -1
  93. package/esm2022/lib/types.service.mjs +1 -1
  94. package/esm2022/lib/validators/email.directive.mjs +1 -1
  95. package/esm2022/lib/validators/no-empty.directive.mjs +1 -1
  96. package/esm2022/lib/validators/number.directive.mjs +1 -1
  97. package/esm2022/lib/validators/text.directive.mjs +1 -1
  98. package/esm2022/public-api.mjs +3 -1
  99. package/fesm2022/smarterplan-ngx-smarterplan-core.mjs +430 -200
  100. package/fesm2022/smarterplan-ngx-smarterplan-core.mjs.map +1 -1
  101. package/lib/components/checkbox-slider/checkbox-slider.component.d.ts +16 -0
  102. package/lib/components/inventory-runs/inventory-launch.component.d.ts +55 -0
  103. package/lib/ngx-smarterplan-core.module.d.ts +9 -7
  104. package/lib/services/matterport-tag.service.d.ts +2 -0
  105. package/lib/services/models/equipment.service.d.ts +7 -0
  106. package/lib/services/models/feature.service.d.ts +5 -0
  107. package/lib/services/models/measurement.service.d.ts +2 -0
  108. package/lib/services/models/ticket.service.d.ts +2 -0
  109. package/package.json +1 -1
  110. package/public-api.d.ts +2 -0
  111. package/src/assets/viewers/splat/convert.html +11 -11
  112. package/src/assets/viewers/splat/index.html +90 -90
  113. package/src/assets/viewers/splat/webp.wasm +0 -0
  114. package/src/assets/vs-app.json +67 -67
@@ -0,0 +1,16 @@
1
+ import { EventEmitter } from "@angular/core";
2
+ import * as i0 from "@angular/core";
3
+ /**
4
+ * A checkbox drawn as an on/off slider, with its label: [(checked)]. The app's own, from when only
5
+ * its Equipments had one; here for the screens the libraries share.
6
+ */
7
+ export declare class CheckboxSliderComponent {
8
+ /** A key to translate. */
9
+ label: string;
10
+ checked: boolean;
11
+ disabled: boolean;
12
+ checkedChange: EventEmitter<boolean>;
13
+ onChange(event: Event): void;
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<CheckboxSliderComponent, never>;
15
+ static ɵcmp: i0.ɵɵComponentDeclaration<CheckboxSliderComponent, "lib-checkbox-slider", never, { "label": { "alias": "label"; "required": false; }; "checked": { "alias": "checked"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "checkedChange": "checkedChange"; }, never, never, false, never>;
16
+ }
@@ -0,0 +1,55 @@
1
+ import { EventEmitter, OnChanges, OnInit, SimpleChanges } from "@angular/core";
2
+ import { EquipmentService } from "../../services/models/equipment.service";
3
+ import { InventoryFiles, InventoryModel, InventoryService } from "../../services/models/inventory.service";
4
+ import * as i0 from "@angular/core";
5
+ /** A visit the AI inventory can look at: its node, its Matterport model (the folder of its files) and its name. */
6
+ export interface InventoryVisit {
7
+ nodeID: string;
8
+ model3D: string;
9
+ label: string;
10
+ }
11
+ /**
12
+ * Launches an AI inventory, of the visits given or of one panorama of the visit, saying first what
13
+ * it will do: what each visit has of what the inventory needs, and how many equipment the AI added
14
+ * before, when they are to be deleted. The location's Equipments and its 360° images both launch
15
+ * theirs from here, so that they offer the same.
16
+ */
17
+ export declare class InventoryLaunchComponent implements OnInit, OnChanges {
18
+ private inventoryService;
19
+ private equipmentService;
20
+ spaceID: string;
21
+ visits: InventoryVisit[];
22
+ /** Only this panorama of the visit, as it is named: 110ee452_sweep.jpeg. */
23
+ panorama: string;
24
+ /** Whether an inventory of the location is running: no other is launched meanwhile. */
25
+ running: boolean;
26
+ cancelled: EventEmitter<void>;
27
+ /** Said once an inventory is launched, for its progress to be looked at. */
28
+ launched: EventEmitter<void>;
29
+ models: InventoryModel[];
30
+ model: InventoryModel;
31
+ cutoffScores: string[];
32
+ cutoffScore: string;
33
+ /** Whether the equipment the AI added to the location before is deleted first. */
34
+ deletePrevious: boolean;
35
+ /** How many of the location's equipment the AI added, which deletePrevious deletes. */
36
+ aiEquipmentCount: number;
37
+ /** What each visit has of what the inventory needs, by its node; null when the bucket could not be read. */
38
+ visitFiles: Record<string, InventoryFiles>;
39
+ checkingFiles: boolean;
40
+ launching: boolean;
41
+ /** What went wrong, or why nothing was launched, as a key to translate. */
42
+ message: string;
43
+ constructor(inventoryService: InventoryService, equipmentService: EquipmentService);
44
+ ngOnInit(): Promise<void>;
45
+ ngOnChanges(changes: SimpleChanges): void;
46
+ private checkFiles;
47
+ /** The visits that will be analysed: those with nothing known to be missing. */
48
+ get launchableVisits(): InventoryVisit[];
49
+ get canLaunch(): boolean;
50
+ onDeletePreviousChange(deletePrevious: boolean): Promise<void>;
51
+ private aiEquipments;
52
+ onLaunchClick(): Promise<void>;
53
+ static ɵfac: i0.ɵɵFactoryDeclaration<InventoryLaunchComponent, never>;
54
+ static ɵcmp: i0.ɵɵComponentDeclaration<InventoryLaunchComponent, "lib-inventory-launch", never, { "spaceID": { "alias": "spaceID"; "required": false; }; "visits": { "alias": "visits"; "required": false; }; "panorama": { "alias": "panorama"; "required": false; }; "running": { "alias": "running"; "required": false; }; }, { "cancelled": "cancelled"; "launched": "launched"; }, never, never, false, never>;
55
+ }
@@ -18,15 +18,17 @@ import * as i14 from "./pipes/format-date-number-to-digits.pipe";
18
18
  import * as i15 from "./components/splat-viewer/splat-viewer.component";
19
19
  import * as i16 from "./components/inventory-runs/inventory-runs.component";
20
20
  import * as i17 from "./components/inventory-runs/inventory-files.component";
21
- import * as i18 from "@angular/forms";
22
- import * as i19 from "@angular/common";
23
- import * as i20 from "@angular/router";
24
- import * as i21 from "@ng-bootstrap/ng-bootstrap";
25
- import * as i22 from "@abhinavakhil/iconify-angular";
26
- import * as i23 from "@ngx-translate/core";
21
+ import * as i18 from "./components/inventory-runs/inventory-launch.component";
22
+ import * as i19 from "./components/checkbox-slider/checkbox-slider.component";
23
+ import * as i20 from "@angular/forms";
24
+ import * as i21 from "@angular/common";
25
+ import * as i22 from "@angular/router";
26
+ import * as i23 from "@ng-bootstrap/ng-bootstrap";
27
+ import * as i24 from "@abhinavakhil/iconify-angular";
28
+ import * as i25 from "@ngx-translate/core";
27
29
  export declare class NgxSmarterplanCoreModule {
28
30
  static forRoot(config: Config): ModuleWithProviders<NgxSmarterplanCoreModule>;
29
31
  static ɵfac: i0.ɵɵFactoryDeclaration<NgxSmarterplanCoreModule, never>;
30
- static ɵmod: i0.ɵɵNgModuleDeclaration<NgxSmarterplanCoreModule, [typeof i1.TimeDateToLocalStringPipe, typeof i2.SafeUrlPipe, typeof i3.HashtagFromIdPipe, typeof i4.DurationToStringPipe, typeof i5.CsvExportComponent, typeof i6.SearchBarComponent, typeof i7.UsernameFromIdPipe, typeof i8.ModalSwitchVisitComponent, typeof i9.MenuBarComponent, typeof i10.AvatarComponent, typeof i11.NavigationBarComponent, typeof i12.LoaderComponent, typeof i13.SupportModalComponent, typeof i14.FormatDateNumberToDigitsPipe, typeof i15.SplatViewerComponent, typeof i16.InventoryRunsComponent, typeof i17.InventoryFilesComponent], [typeof i18.FormsModule, typeof i18.ReactiveFormsModule, typeof i19.CommonModule, typeof i20.RouterModule, typeof i21.NgbModule, typeof i22.IconModule, typeof i23.TranslateModule], [typeof i5.CsvExportComponent, typeof i6.SearchBarComponent, typeof i1.TimeDateToLocalStringPipe, typeof i2.SafeUrlPipe, typeof i3.HashtagFromIdPipe, typeof i4.DurationToStringPipe, typeof i7.UsernameFromIdPipe, typeof i9.MenuBarComponent, typeof i12.LoaderComponent, typeof i13.SupportModalComponent, typeof i10.AvatarComponent, typeof i15.SplatViewerComponent, typeof i16.InventoryRunsComponent, typeof i17.InventoryFilesComponent]>;
32
+ static ɵmod: i0.ɵɵNgModuleDeclaration<NgxSmarterplanCoreModule, [typeof i1.TimeDateToLocalStringPipe, typeof i2.SafeUrlPipe, typeof i3.HashtagFromIdPipe, typeof i4.DurationToStringPipe, typeof i5.CsvExportComponent, typeof i6.SearchBarComponent, typeof i7.UsernameFromIdPipe, typeof i8.ModalSwitchVisitComponent, typeof i9.MenuBarComponent, typeof i10.AvatarComponent, typeof i11.NavigationBarComponent, typeof i12.LoaderComponent, typeof i13.SupportModalComponent, typeof i14.FormatDateNumberToDigitsPipe, typeof i15.SplatViewerComponent, typeof i16.InventoryRunsComponent, typeof i17.InventoryFilesComponent, typeof i18.InventoryLaunchComponent, typeof i19.CheckboxSliderComponent], [typeof i20.FormsModule, typeof i20.ReactiveFormsModule, typeof i21.CommonModule, typeof i22.RouterModule, typeof i23.NgbModule, typeof i24.IconModule, typeof i25.TranslateModule], [typeof i5.CsvExportComponent, typeof i6.SearchBarComponent, typeof i1.TimeDateToLocalStringPipe, typeof i2.SafeUrlPipe, typeof i3.HashtagFromIdPipe, typeof i4.DurationToStringPipe, typeof i7.UsernameFromIdPipe, typeof i9.MenuBarComponent, typeof i12.LoaderComponent, typeof i13.SupportModalComponent, typeof i10.AvatarComponent, typeof i15.SplatViewerComponent, typeof i16.InventoryRunsComponent, typeof i17.InventoryFilesComponent, typeof i18.InventoryLaunchComponent, typeof i19.CheckboxSliderComponent]>;
31
33
  static ɵinj: i0.ɵɵInjectorDeclaration<NgxSmarterplanCoreModule>;
32
34
  }
@@ -58,6 +58,8 @@ export declare class MatterportTagService {
58
58
  getTagModule(sdk: any, tagId: string): any;
59
59
  /** Icon name last applied to a tag, if any. */
60
60
  getCachedTagIcon(tagId: string): string | undefined;
61
+ /** Whether a tag can be opened, as updateTagsVisibilityForContext() last left it: yes until then. */
62
+ isTagEnabled(tagId: string): boolean;
61
63
  /** Applies an icon to a tag through its own module and remembers it on success. */
62
64
  editTagIcon(sdk: any, tagId: string, iconName: string): Promise<void>;
63
65
  /**
@@ -33,6 +33,11 @@ export declare class EquipmentService extends BaseObjectService {
33
33
  zonesMap: Map<string, Equipment[]>;
34
34
  };
35
35
  equipmentsTags: BehaviorSubject<Equipment[]>;
36
+ /**
37
+ * The space's equipment the user sees, whatever equipmentDomainFilter hides: what a domain
38
+ * filter has to offer, and how many of each. Null until they are known.
39
+ */
40
+ equipmentsUnfiltered: BehaviorSubject<Equipment[]>;
36
41
  zoneIDFilter: string;
37
42
  currentZone: Zone;
38
43
  currentSpaceID: string;
@@ -96,6 +101,8 @@ export declare class EquipmentService extends BaseObjectService {
96
101
  navigateToEquipmentIn3D(equipment: Equipment, forceSwitchVisit?: boolean): Promise<void>;
97
102
  updateEquipsForZone(): Promise<void>;
98
103
  updateDueToDelete(deletedEquipment: Equipment): void;
104
+ /** Keeps equipmentsUnfiltered up to date with an equipment created, changed or deleted. */
105
+ private updateUnfiltered;
99
106
  updateDueToCreate(createdEquip: Equipment): void;
100
107
  updateDueToEquipUpdated(updatedEquip: Equipment): void;
101
108
  initSubscriptions(): void;
@@ -29,6 +29,11 @@ export declare class FeatureService extends BaseObjectService {
29
29
  zone: Feature[];
30
30
  };
31
31
  featureTags: BehaviorSubject<Feature[]>;
32
+ /**
33
+ * The space's info points and desks the user sees, whatever featureDomainFilter and
34
+ * deskDomainFilter hide, for a filter to count them. Null until they are known.
35
+ */
36
+ featuresUnfiltered: BehaviorSubject<Feature[]>;
32
37
  featureFiltered: Feature[];
33
38
  updateDone: Subject<boolean>;
34
39
  zoneIDFilter: string;
@@ -22,6 +22,8 @@ export declare class MeasurementService {
22
22
  zone: Measurement[];
23
23
  };
24
24
  measurementsTags: BehaviorSubject<Comment[]>;
25
+ /** The space's measurements the user sees, whatever measurementFilter hides, for a filter to count them. Null until known. */
26
+ measurementsUnfiltered: BehaviorSubject<Measurement[]>;
25
27
  measurementsUpdated: Subject<{
26
28
  space: Measurement[];
27
29
  zone: Measurement[];
@@ -32,6 +32,8 @@ export declare class TicketsService extends BaseObjectService {
32
32
  space: Ticket[];
33
33
  };
34
34
  ticketTags: BehaviorSubject<Ticket[]>;
35
+ /** The space's tickets the user sees, whatever ticketTypeFilter hides, for a filter to count them. Null until known. */
36
+ ticketsUnfiltered: BehaviorSubject<Ticket[]>;
35
37
  ticketsFiltered: Ticket[];
36
38
  ticketsUpdated: Subject<{
37
39
  zone: Ticket[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smarterplan/ngx-smarterplan-core",
3
- "version": "1.4.27",
3
+ "version": "1.4.28",
4
4
  "dependencies": {
5
5
  "tslib": "^2.5.0"
6
6
  },
package/public-api.d.ts CHANGED
@@ -61,6 +61,8 @@ export * from './lib/components/loader/loader.component';
61
61
  export * from './lib/components/splat-viewer/splat-viewer.component';
62
62
  export * from './lib/components/inventory-runs/inventory-runs.component';
63
63
  export * from './lib/components/inventory-runs/inventory-files.component';
64
+ export * from './lib/components/inventory-runs/inventory-launch.component';
65
+ export * from './lib/components/checkbox-slider/checkbox-slider.component';
64
66
  export * from './lib/components/support-modal/support-modal.component';
65
67
  export * from './lib/components/menu-bar/avatar/avatar.component';
66
68
  export * from './lib/pipes/duration-to-string.pipe';
@@ -1,11 +1,11 @@
1
- <!doctype html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8">
5
- <title>SmarterPlan splat converter</title>
6
- </head>
7
- <body>
8
- <!-- Opened unseen by the app's 3D models form, which hands it a splat file to turn into .sog. -->
9
- <script type="module" src="convert-AJMRDWU6.js"></script>
10
- </body>
11
- </html>
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title>SmarterPlan splat converter</title>
6
+ </head>
7
+ <body>
8
+ <!-- Opened unseen by the app's 3D models form, which hands it a splat file to turn into .sog. -->
9
+ <script type="module" src="convert-AJMRDWU6.js"></script>
10
+ </body>
11
+ </html>
@@ -1,90 +1,90 @@
1
- <!doctype html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1">
6
- <title>SmarterPlan splat viewer</title>
7
- <!-- SuperSplat's viewer builds its controls inside #viewer; this is their stylesheet. -->
8
- <link rel="stylesheet" href="viewer.css">
9
- <style>
10
- /* The app's colours, which main.ts sets from those the page is opened with; these, the SmarterPlan
11
- app's, when it is not. The background is also the scene's where there are no splats. */
12
- :root { --app-accent: rgb(83, 182, 187); --app-background: #e0f7ff; }
13
- html, body { margin: 0; height: 100%; overflow: hidden; background: var(--app-background); }
14
- /* SuperSplat's controls in the app's colour rather than its orange. */
15
- :root .sse-viewer { --sse-accent: var(--app-accent); --sse-grip: color-mix(in srgb, var(--app-accent), white 15%); }
16
- #viewer { position: absolute; inset: 0; }
17
- /* The app's tags, over the scene, as Matterport draws them: a disc at the end of a stem standing
18
- out of the surface, and the tag's name in a bubble on hover. Only the discs take the pointer. */
19
- #tags { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 5; }
20
- #stems { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
21
- #stems line { stroke: #fff; stroke-width: 2; stroke-linecap: round; filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.6)); }
22
- .tag { position: absolute; left: 0; top: 0; width: 0; height: 0; display: none; }
23
- .disc {
24
- position: absolute; left: -14px; top: -14px; width: 28px; height: 28px; padding: 0;
25
- border: 2px solid #fff; border-radius: 50%; cursor: pointer; pointer-events: auto;
26
- background-size: 70%; background-position: center; background-repeat: no-repeat;
27
- box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5); transition: transform 0.15s ease-out;
28
- }
29
- .tag:hover .disc { transform: scale(1.3); }
30
- .bubble {
31
- position: absolute; bottom: 24px; left: 0; transform: translate(-50%, 6px); opacity: 0;
32
- padding: 6px 10px; border-radius: 6px; background: #fff; color: #222; font: 13px/1.3 sans-serif;
33
- white-space: nowrap; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35); pointer-events: none;
34
- transition: opacity 0.15s ease-out, transform 0.15s ease-out;
35
- }
36
- .bubble::after {
37
- content: ''; position: absolute; top: 100%; left: 50%; margin-left: -6px;
38
- border: 6px solid transparent; border-top-color: #fff;
39
- }
40
- .bubble:empty { display: none; }
41
- .tag:hover .bubble { opacity: 1; transform: translate(-50%, 0); }
42
- .tag.pointed .disc { animation: pointed 0.6s ease-in-out 3; }
43
- /* The tag following the pointer while one is placed: where a click would put it. */
44
- .tag.ghost { opacity: 0.75; }
45
- .tag.ghost .disc { pointer-events: none; background-color: #fff; border-color: #1E88E5; }
46
- #stems line.ghost { stroke-dasharray: 4 3; }
47
- /* While a tag is placed: over the whole scene, taking the click that picks its spot. */
48
- #placing { position: absolute; inset: 0; z-index: 6; display: none; cursor: crosshair; }
49
- /* The app shows how loading goes, as for its other viewers: the viewer's own bar would be a second one. */
50
- .sse-viewer .sse-loadingWrap { display: none !important; }
51
- #placing.missed { cursor: not-allowed; }
52
- /* A calibration, in the app's 3D viewer's colours: a green numbered pin where each matched tag
53
- really is, with a line to it from the tag, faded; and an amber ring round the tag being matched. */
54
- .pin {
55
- position: absolute; left: -12px; top: -12px; width: 24px; height: 24px; box-sizing: border-box;
56
- display: none; border: 2px solid #fff; border-radius: 50%; background: #1E9E5A; color: #fff;
57
- font: bold 13px/20px sans-serif; text-align: center; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
58
- pointer-events: none; z-index: 1000001;
59
- }
60
- #stems line.link { stroke: #1E9E5A; stroke-opacity: 0.75; stroke-dasharray: none; }
61
- .tag.matched, #stems line.matched { opacity: 0.4; }
62
- .tag.selected .disc { box-shadow: 0 0 0 4px #FFB103, 0 1px 4px rgba(0, 0, 0, 0.5); }
63
- /* A measurement, in the app's 3D viewer's colours: amber points and segments, each length on a dark label. */
64
- .measure-point {
65
- position: absolute; left: 0; top: 0; width: 12px; height: 12px; box-sizing: border-box; display: none;
66
- border: 2px solid #fff; border-radius: 50%; background: #FFB103; pointer-events: none; z-index: 1000002;
67
- }
68
- #stems line.measure { stroke: #FFB103; stroke-width: 3; filter: none; }
69
- #stems line.measure.rubber { stroke-opacity: 0.6; }
70
- .measure-label {
71
- position: absolute; left: 0; top: 0; display: none; padding: 3px 8px; border-radius: 9px;
72
- background: rgba(0, 0, 0, 0.78); color: #fff; font: bold 13px/18px sans-serif; white-space: nowrap;
73
- pointer-events: none; z-index: 1000003;
74
- }
75
- .measure-label.rubber { opacity: 0.85; }
76
- .tag.ghost.measure-ghost .disc { left: -6px; top: -6px; width: 12px; height: 12px; box-sizing: border-box; background: #FFB103; border-color: #fff; }
77
- .tag.ghost.pin-ghost .disc {
78
- left: -12px; top: -12px; width: 24px; height: 24px; box-sizing: border-box;
79
- background: #1E9E5A; border-color: #fff; color: #fff; font: bold 13px/20px sans-serif; text-align: center;
80
- }
81
- @keyframes pointed { 50% { box-shadow: 0 0 0 10px rgba(255, 255, 255, 0.6); } }
82
- </style>
83
- </head>
84
- <body>
85
- <div id="viewer"></div>
86
- <div id="tags"><svg id="stems"></svg></div>
87
- <div id="placing"></div>
88
- <script type="module" src="viewer-QLWW4L3N.js"></script>
89
- </body>
90
- </html>
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <title>SmarterPlan splat viewer</title>
7
+ <!-- SuperSplat's viewer builds its controls inside #viewer; this is their stylesheet. -->
8
+ <link rel="stylesheet" href="viewer.css">
9
+ <style>
10
+ /* The app's colours, which main.ts sets from those the page is opened with; these, the SmarterPlan
11
+ app's, when it is not. The background is also the scene's where there are no splats. */
12
+ :root { --app-accent: rgb(83, 182, 187); --app-background: #e0f7ff; }
13
+ html, body { margin: 0; height: 100%; overflow: hidden; background: var(--app-background); }
14
+ /* SuperSplat's controls in the app's colour rather than its orange. */
15
+ :root .sse-viewer { --sse-accent: var(--app-accent); --sse-grip: color-mix(in srgb, var(--app-accent), white 15%); }
16
+ #viewer { position: absolute; inset: 0; }
17
+ /* The app's tags, over the scene, as Matterport draws them: a disc at the end of a stem standing
18
+ out of the surface, and the tag's name in a bubble on hover. Only the discs take the pointer. */
19
+ #tags { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 5; }
20
+ #stems { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
21
+ #stems line { stroke: #fff; stroke-width: 2; stroke-linecap: round; filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.6)); }
22
+ .tag { position: absolute; left: 0; top: 0; width: 0; height: 0; display: none; }
23
+ .disc {
24
+ position: absolute; left: -14px; top: -14px; width: 28px; height: 28px; padding: 0;
25
+ border: 2px solid #fff; border-radius: 50%; cursor: pointer; pointer-events: auto;
26
+ background-size: 70%; background-position: center; background-repeat: no-repeat;
27
+ box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5); transition: transform 0.15s ease-out;
28
+ }
29
+ .tag:hover .disc { transform: scale(1.3); }
30
+ .bubble {
31
+ position: absolute; bottom: 24px; left: 0; transform: translate(-50%, 6px); opacity: 0;
32
+ padding: 6px 10px; border-radius: 6px; background: #fff; color: #222; font: 13px/1.3 sans-serif;
33
+ white-space: nowrap; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35); pointer-events: none;
34
+ transition: opacity 0.15s ease-out, transform 0.15s ease-out;
35
+ }
36
+ .bubble::after {
37
+ content: ''; position: absolute; top: 100%; left: 50%; margin-left: -6px;
38
+ border: 6px solid transparent; border-top-color: #fff;
39
+ }
40
+ .bubble:empty { display: none; }
41
+ .tag:hover .bubble { opacity: 1; transform: translate(-50%, 0); }
42
+ .tag.pointed .disc { animation: pointed 0.6s ease-in-out 3; }
43
+ /* The tag following the pointer while one is placed: where a click would put it. */
44
+ .tag.ghost { opacity: 0.75; }
45
+ .tag.ghost .disc { pointer-events: none; background-color: #fff; border-color: #1E88E5; }
46
+ #stems line.ghost { stroke-dasharray: 4 3; }
47
+ /* While a tag is placed: over the whole scene, taking the click that picks its spot. */
48
+ #placing { position: absolute; inset: 0; z-index: 6; display: none; cursor: crosshair; }
49
+ /* The app shows how loading goes, as for its other viewers: the viewer's own bar would be a second one. */
50
+ .sse-viewer .sse-loadingWrap { display: none !important; }
51
+ #placing.missed { cursor: not-allowed; }
52
+ /* A calibration, in the app's 3D viewer's colours: a green numbered pin where each matched tag
53
+ really is, with a line to it from the tag, faded; and an amber ring round the tag being matched. */
54
+ .pin {
55
+ position: absolute; left: -12px; top: -12px; width: 24px; height: 24px; box-sizing: border-box;
56
+ display: none; border: 2px solid #fff; border-radius: 50%; background: #1E9E5A; color: #fff;
57
+ font: bold 13px/20px sans-serif; text-align: center; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
58
+ pointer-events: none; z-index: 1000001;
59
+ }
60
+ #stems line.link { stroke: #1E9E5A; stroke-opacity: 0.75; stroke-dasharray: none; }
61
+ .tag.matched, #stems line.matched { opacity: 0.4; }
62
+ .tag.selected .disc { box-shadow: 0 0 0 4px #FFB103, 0 1px 4px rgba(0, 0, 0, 0.5); }
63
+ /* A measurement, in the app's 3D viewer's colours: amber points and segments, each length on a dark label. */
64
+ .measure-point {
65
+ position: absolute; left: 0; top: 0; width: 12px; height: 12px; box-sizing: border-box; display: none;
66
+ border: 2px solid #fff; border-radius: 50%; background: #FFB103; pointer-events: none; z-index: 1000002;
67
+ }
68
+ #stems line.measure { stroke: #FFB103; stroke-width: 3; filter: none; }
69
+ #stems line.measure.rubber { stroke-opacity: 0.6; }
70
+ .measure-label {
71
+ position: absolute; left: 0; top: 0; display: none; padding: 3px 8px; border-radius: 9px;
72
+ background: rgba(0, 0, 0, 0.78); color: #fff; font: bold 13px/18px sans-serif; white-space: nowrap;
73
+ pointer-events: none; z-index: 1000003;
74
+ }
75
+ .measure-label.rubber { opacity: 0.85; }
76
+ .tag.ghost.measure-ghost .disc { left: -6px; top: -6px; width: 12px; height: 12px; box-sizing: border-box; background: #FFB103; border-color: #fff; }
77
+ .tag.ghost.pin-ghost .disc {
78
+ left: -12px; top: -12px; width: 24px; height: 24px; box-sizing: border-box;
79
+ background: #1E9E5A; border-color: #fff; color: #fff; font: bold 13px/20px sans-serif; text-align: center;
80
+ }
81
+ @keyframes pointed { 50% { box-shadow: 0 0 0 10px rgba(255, 255, 255, 0.6); } }
82
+ </style>
83
+ </head>
84
+ <body>
85
+ <div id="viewer"></div>
86
+ <div id="tags"><svg id="stems"></svg></div>
87
+ <div id="placing"></div>
88
+ <script type="module" src="viewer-QLWW4L3N.js"></script>
89
+ </body>
90
+ </html>
File without changes
@@ -1,67 +1,67 @@
1
- {
2
- "version": "1.0",
3
- "payload": {
4
- "objects": [
5
- {
6
- "name": "slot_camera",
7
- "position": {
8
- "x": 2.8,
9
- "y": 2.4,
10
- "z": 10.71
11
- },
12
- "rotation": {
13
- "x": 0,
14
- "y": -22,
15
- "z": 0
16
- },
17
- "scale": {
18
- "x": 1,
19
- "y": 1,
20
- "z": 1
21
- },
22
- "components": [
23
- {
24
- "type": "mp.gltfLoader",
25
- "inputs": {
26
- "url": "https://static.matterport.com/showcase-sdk/examples/assets-1.0-2-g6b74572/assets/models/camera-1/scene.gltf",
27
- "localScale": { "x": 0.0008, "y": 0.0008, "z": 0.0008 },
28
- "localRotation": { "x": 0, "y": 90, "z": 0 }
29
- },
30
- "events": {
31
- "INTERACTION.CLICK": false,
32
- "INTERACTION.HOVER": false,
33
- "INTERACTION.DRAG": false
34
- }
35
- },
36
- {
37
- "type": "mp.securityCamera",
38
- "inputs": {
39
- "nearPlane": 0.1,
40
- "farPlane": 10,
41
- "horizontalFOV": 52,
42
- "aspect": 1.7777777777777777,
43
- "localPosition": {
44
- "x": 0,
45
- "y": 0.18,
46
- "z": -0.3
47
- },
48
- "localRotation": {
49
- "x": -15,
50
- "y": 0,
51
- "z": 0
52
- },
53
- "color": 65280,
54
- "panPeriod": 5,
55
- "panAngle": -45
56
- },
57
- "events": {
58
- "INTERACTION.CLICK": false,
59
- "INTERACTION.HOVER": false,
60
- "INTERACTION.DRAG": false
61
- }
62
- }
63
- ]
64
- }
65
- ]
66
- }
67
- }
1
+ {
2
+ "version": "1.0",
3
+ "payload": {
4
+ "objects": [
5
+ {
6
+ "name": "slot_camera",
7
+ "position": {
8
+ "x": 2.8,
9
+ "y": 2.4,
10
+ "z": 10.71
11
+ },
12
+ "rotation": {
13
+ "x": 0,
14
+ "y": -22,
15
+ "z": 0
16
+ },
17
+ "scale": {
18
+ "x": 1,
19
+ "y": 1,
20
+ "z": 1
21
+ },
22
+ "components": [
23
+ {
24
+ "type": "mp.gltfLoader",
25
+ "inputs": {
26
+ "url": "https://static.matterport.com/showcase-sdk/examples/assets-1.0-2-g6b74572/assets/models/camera-1/scene.gltf",
27
+ "localScale": { "x": 0.0008, "y": 0.0008, "z": 0.0008 },
28
+ "localRotation": { "x": 0, "y": 90, "z": 0 }
29
+ },
30
+ "events": {
31
+ "INTERACTION.CLICK": false,
32
+ "INTERACTION.HOVER": false,
33
+ "INTERACTION.DRAG": false
34
+ }
35
+ },
36
+ {
37
+ "type": "mp.securityCamera",
38
+ "inputs": {
39
+ "nearPlane": 0.1,
40
+ "farPlane": 10,
41
+ "horizontalFOV": 52,
42
+ "aspect": 1.7777777777777777,
43
+ "localPosition": {
44
+ "x": 0,
45
+ "y": 0.18,
46
+ "z": -0.3
47
+ },
48
+ "localRotation": {
49
+ "x": -15,
50
+ "y": 0,
51
+ "z": 0
52
+ },
53
+ "color": 65280,
54
+ "panPeriod": 5,
55
+ "panAngle": -45
56
+ },
57
+ "events": {
58
+ "INTERACTION.CLICK": false,
59
+ "INTERACTION.HOVER": false,
60
+ "INTERACTION.DRAG": false
61
+ }
62
+ }
63
+ ]
64
+ }
65
+ ]
66
+ }
67
+ }