@smarterplan/ngx-smarterplan-core 1.4.22 → 1.4.23
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 +24 -24
- package/esm2022/lib/components/csv-export/csv-export.component.mjs +8 -4
- package/esm2022/lib/components/loader/loader.component.mjs +3 -3
- package/esm2022/lib/components/menu-bar/avatar/avatar.component.mjs +1 -1
- package/esm2022/lib/components/menu-bar/menu-bar.component.mjs +11 -7
- package/esm2022/lib/components/menu-bar/navigation-bar/navigation-bar.component.mjs +3 -3
- package/esm2022/lib/components/modal-switch-visit/modal-switch-visit.component.mjs +3 -3
- package/esm2022/lib/components/search-bar/search-bar.component.mjs +3 -3
- package/esm2022/lib/components/splat-viewer/splat-viewer.component.mjs +1 -1
- package/esm2022/lib/components/support-modal/support-modal.component.mjs +3 -3
- package/esm2022/lib/config.mjs +1 -1
- package/esm2022/lib/helpers.service.mjs +34 -1
- package/esm2022/lib/matterport-extensions/nest-thermostat/CanvasImage.mjs +1 -1
- package/esm2022/lib/matterport-extensions/nest-thermostat/CanvasRenderer.mjs +1 -1
- package/esm2022/lib/matterport-extensions/nest-thermostat/NestThermostat.mjs +1 -1
- package/esm2022/lib/matterport-extensions/nest-thermostat/PlaneRenderer.mjs +1 -1
- package/esm2022/lib/matterport-extensions/scene-component/SceneComponent.mjs +1 -1
- package/esm2022/lib/matterport-extensions/security-camera/SecurityCamera.mjs +22 -22
- package/esm2022/lib/matterport-extensions/tv-player/TvPlayer.mjs +1 -1
- package/esm2022/lib/matterport-extensions/view-frustum-mesh/ViewFrustumMesh.mjs +22 -22
- package/esm2022/lib/mattertagData.mjs +1 -1
- package/esm2022/lib/ngx-smarterplan-core.module.mjs +6 -2
- package/esm2022/lib/ngx-smarterplan-core.service.mjs +1 -1
- package/esm2022/lib/pipes/duration-to-string.pipe.mjs +1 -1
- package/esm2022/lib/pipes/format-date-number-to-digits.pipe.mjs +1 -1
- package/esm2022/lib/pipes/hashtag-from-id.pipe.mjs +1 -1
- package/esm2022/lib/pipes/safe-url.pipe.mjs +1 -1
- package/esm2022/lib/pipes/time-date-to-local-string.pipe.mjs +1 -1
- package/esm2022/lib/pipes/username-from-id.pipe.mjs +1 -1
- package/esm2022/lib/services/amplify-cache.service.mjs +1 -1
- package/esm2022/lib/services/base-tab.service.mjs +1 -1
- package/esm2022/lib/services/baseVisibility.service.mjs +1 -1
- package/esm2022/lib/services/content.service.mjs +1 -1
- package/esm2022/lib/services/filter.service.mjs +1 -1
- package/esm2022/lib/services/intervention.service.mjs +1 -1
- package/esm2022/lib/services/locale.service.mjs +1 -1
- package/esm2022/lib/services/matterport-import.service.mjs +1 -1
- package/esm2022/lib/services/matterport-measurement.service.mjs +1 -1
- package/esm2022/lib/services/matterport-navigation.service.mjs +1 -1
- package/esm2022/lib/services/matterport-object3d.service.mjs +1 -1
- package/esm2022/lib/services/matterport-pointer.service.mjs +6 -6
- package/esm2022/lib/services/matterport-tag-copy.service.mjs +1 -1
- package/esm2022/lib/services/matterport-tag.service.mjs +1 -1
- package/esm2022/lib/services/matterport.service.mjs +17 -17
- package/esm2022/lib/services/models/affectation.service.mjs +1 -1
- package/esm2022/lib/services/models/base-object.service.mjs +1 -1
- package/esm2022/lib/services/models/capture.service.mjs +1 -1
- package/esm2022/lib/services/models/comment.service.mjs +1 -1
- package/esm2022/lib/services/models/domain.service.mjs +1 -1
- package/esm2022/lib/services/models/equipment.service.mjs +1 -1
- package/esm2022/lib/services/models/event.service.mjs +1 -1
- package/esm2022/lib/services/models/feature.service.mjs +1 -1
- package/esm2022/lib/services/models/hashtag.service.mjs +1 -1
- package/esm2022/lib/services/models/layer.service.mjs +1 -1
- package/esm2022/lib/services/models/measurement.service.mjs +1 -1
- package/esm2022/lib/services/models/mission.service.mjs +1 -1
- package/esm2022/lib/services/models/navigation.service.mjs +1 -1
- package/esm2022/lib/services/models/node.service.mjs +1 -1
- package/esm2022/lib/services/models/object3D.service.mjs +1 -1
- package/esm2022/lib/services/models/operation.service.mjs +1 -1
- package/esm2022/lib/services/models/organisation.service.mjs +1 -1
- package/esm2022/lib/services/models/plan.service.mjs +46 -17
- package/esm2022/lib/services/models/poi.service.mjs +27 -27
- package/esm2022/lib/services/models/profile.service.mjs +1 -1
- package/esm2022/lib/services/models/property.service.mjs +1 -1
- package/esm2022/lib/services/models/space.service.mjs +1 -1
- package/esm2022/lib/services/models/template.service.mjs +1 -1
- package/esm2022/lib/services/models/ticket.service.mjs +7 -6
- package/esm2022/lib/services/models/visit.service.mjs +1 -1
- package/esm2022/lib/services/models/zone.service.mjs +1 -1
- package/esm2022/lib/services/navigator.service.mjs +1 -1
- package/esm2022/lib/services/obj-to-glb.mjs +1 -1
- package/esm2022/lib/services/s3.service.mjs +1 -1
- package/esm2022/lib/services/search.service.mjs +1 -1
- package/esm2022/lib/services/support.service.mjs +1 -1
- package/esm2022/lib/services/sweep-locator.service.mjs +1 -1
- package/esm2022/lib/services/tag.service.mjs +16 -16
- package/esm2022/lib/services/threejs-import.service.mjs +1 -1
- package/esm2022/lib/services/threejs.service.mjs +1 -1
- package/esm2022/lib/services/user.service.mjs +1 -1
- package/esm2022/lib/services/utils/matterport-framing.util.mjs +1 -1
- package/esm2022/lib/services/utils/matterport-transform.util.mjs +1 -1
- package/esm2022/lib/services/validators.service.mjs +1 -1
- package/esm2022/lib/services/viewer.service.mjs +1 -1
- package/esm2022/lib/services/zone-drawer.service.mjs +3 -3
- package/esm2022/lib/services/zoneChange.service.mjs +1 -1
- package/esm2022/lib/tokens/matterport-sdk-key.token.mjs +1 -1
- package/esm2022/lib/types.service.mjs +1 -1
- package/esm2022/lib/validators/email.directive.mjs +1 -1
- package/esm2022/lib/validators/no-empty.directive.mjs +1 -1
- package/esm2022/lib/validators/number.directive.mjs +1 -1
- package/esm2022/lib/validators/text.directive.mjs +1 -1
- package/esm2022/public-api.mjs +1 -1
- package/fesm2022/smarterplan-ngx-smarterplan-core.mjs +298 -228
- package/fesm2022/smarterplan-ngx-smarterplan-core.mjs.map +1 -1
- package/lib/components/csv-export/csv-export.component.d.ts +1 -0
- package/lib/components/menu-bar/menu-bar.component.d.ts +1 -0
- package/lib/helpers.service.d.ts +28 -0
- package/lib/ngx-smarterplan-core.module.d.ts +3 -2
- package/lib/services/models/plan.service.d.ts +10 -1
- package/lib/services/models/ticket.service.d.ts +5 -5
- package/package.json +2 -1
- package/src/assets/viewers/splat/convert.html +11 -11
- package/src/assets/viewers/splat/index.html +90 -90
- package/src/assets/viewers/splat/webp.wasm +0 -0
- package/src/assets/vs-app.json +67 -67
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
export declare class CsvExportComponent {
|
|
3
|
+
readonly fileDownloadIcon: import("../../helpers.service").IconifyIconData;
|
|
3
4
|
/** Header of the CSV, titles for each columns */
|
|
4
5
|
headers: string[];
|
|
5
6
|
/** Array of each rows (array of array of string), if it's not set, then the function getRows() will be used */
|
|
@@ -22,6 +22,7 @@ export declare class MenuBarComponent implements OnInit {
|
|
|
22
22
|
formatter: NgbDateParserFormatter;
|
|
23
23
|
private filterService;
|
|
24
24
|
private cacheService;
|
|
25
|
+
readonly checkIcon: import("../../helpers.service").IconifyIconData;
|
|
25
26
|
user: ProfileEntity;
|
|
26
27
|
mission: Mission;
|
|
27
28
|
isCollapsed: boolean;
|
package/lib/helpers.service.d.ts
CHANGED
|
@@ -143,3 +143,31 @@ export declare function pointToString(point: {
|
|
|
143
143
|
y: number;
|
|
144
144
|
z: number;
|
|
145
145
|
}): string;
|
|
146
|
+
/** Icon data as published by the @iconify/icons-* packages. */
|
|
147
|
+
export interface IconifyIconData {
|
|
148
|
+
body: string;
|
|
149
|
+
width?: number;
|
|
150
|
+
height?: number;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Icon data of an @iconify/icons-* import. Those packages are CommonJS: imported from a library
|
|
154
|
+
* bundle, the default import can be the whole module, with the data under `default`.
|
|
155
|
+
*/
|
|
156
|
+
export declare function iconData(icon: IconifyIconData | {
|
|
157
|
+
default: IconifyIconData;
|
|
158
|
+
}): IconifyIconData;
|
|
159
|
+
/**
|
|
160
|
+
* Bundled icons for the markers drawn on plans. The iconify API no longer serves the
|
|
161
|
+
* `prefix:name.svg` URLs they used to be loaded from, which left the markers blank.
|
|
162
|
+
*/
|
|
163
|
+
export declare const PLAN_ICONS: {
|
|
164
|
+
adjust: IconifyIconData;
|
|
165
|
+
closeCircleOutline: IconifyIconData;
|
|
166
|
+
};
|
|
167
|
+
/** Encodes an SVG as a data URL; parentheses are escaped so it also works in an unquoted url(). */
|
|
168
|
+
export declare function svgToDataUrl(svg: string): string;
|
|
169
|
+
/**
|
|
170
|
+
* Renders a bundled iconify icon as a data URL, without any request to the iconify API.
|
|
171
|
+
* @param size width and height in px, needed where the intrinsic size is read (canvas drawing)
|
|
172
|
+
*/
|
|
173
|
+
export declare function iconToDataUrl(icon: IconifyIconData, color?: string, size?: number): string;
|
|
@@ -20,10 +20,11 @@ import * as i16 from "@angular/forms";
|
|
|
20
20
|
import * as i17 from "@angular/common";
|
|
21
21
|
import * as i18 from "@angular/router";
|
|
22
22
|
import * as i19 from "@ng-bootstrap/ng-bootstrap";
|
|
23
|
-
import * as i20 from "@
|
|
23
|
+
import * as i20 from "@abhinavakhil/iconify-angular";
|
|
24
|
+
import * as i21 from "@ngx-translate/core";
|
|
24
25
|
export declare class NgxSmarterplanCoreModule {
|
|
25
26
|
static forRoot(config: Config): ModuleWithProviders<NgxSmarterplanCoreModule>;
|
|
26
27
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgxSmarterplanCoreModule, never>;
|
|
27
|
-
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.FormsModule, typeof i16.ReactiveFormsModule, typeof i17.CommonModule, typeof i18.RouterModule, typeof i19.NgbModule, typeof i20.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]>;
|
|
28
|
+
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.FormsModule, typeof i16.ReactiveFormsModule, typeof i17.CommonModule, typeof i18.RouterModule, typeof i19.NgbModule, typeof i20.IconModule, typeof i21.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]>;
|
|
28
29
|
static ɵinj: i0.ɵɵInjectorDeclaration<NgxSmarterplanCoreModule>;
|
|
29
30
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Subject } from 'rxjs';
|
|
2
2
|
import { Router } from '@angular/router';
|
|
3
|
+
import { TranslateService } from '@ngx-translate/core';
|
|
3
4
|
import { Plan, PoiType, Zone } from '../../types.service';
|
|
4
5
|
import { BaseVisibilityService } from '../baseVisibility.service';
|
|
5
6
|
import { MatterportService } from '../matterport.service';
|
|
@@ -18,6 +19,7 @@ export declare class PlanService {
|
|
|
18
19
|
private matterportService;
|
|
19
20
|
private visibilityService;
|
|
20
21
|
private contentService;
|
|
22
|
+
private translate;
|
|
21
23
|
chosenPlan: Plan;
|
|
22
24
|
currentPlan: Plan;
|
|
23
25
|
currentSweep: string;
|
|
@@ -28,6 +30,8 @@ export declare class PlanService {
|
|
|
28
30
|
panzoom: any;
|
|
29
31
|
isReady: boolean;
|
|
30
32
|
userPositionBtn: HTMLButtonElement;
|
|
33
|
+
/** Side of the current position marker, in px before scaling (tags are 10px). */
|
|
34
|
+
readonly userPositionSize = 16;
|
|
31
35
|
coeffPlanX: number;
|
|
32
36
|
coeffPlanY: number;
|
|
33
37
|
calibrationPlan: any;
|
|
@@ -67,7 +71,7 @@ export declare class PlanService {
|
|
|
67
71
|
};
|
|
68
72
|
focusMouseTagDiv: boolean;
|
|
69
73
|
API: any;
|
|
70
|
-
constructor(apiInjected: any, zoneService: ZoneService, navigationService: NavigationService, viewerService: ViewerService, router: Router, matterportService: MatterportService, visibilityService: BaseVisibilityService, contentService: ContentService);
|
|
74
|
+
constructor(apiInjected: any, zoneService: ZoneService, navigationService: NavigationService, viewerService: ViewerService, router: Router, matterportService: MatterportService, visibilityService: BaseVisibilityService, contentService: ContentService, translate: TranslateService);
|
|
71
75
|
createPlan(planInput: Plan): Promise<Plan>;
|
|
72
76
|
deletePlan(plan: Plan): Promise<Plan>;
|
|
73
77
|
getPlansForSpace(spaceID: string): Promise<Plan[]>;
|
|
@@ -87,6 +91,11 @@ export declare class PlanService {
|
|
|
87
91
|
drawPdf(currentPlan: Plan): Promise<void>;
|
|
88
92
|
drawElement(element: any, tagType: PoiType, currentPlan: Plan, tagService: BaseTagService, config: Config, sizeButton?: number): Promise<void>;
|
|
89
93
|
drawUserPosition(currentSweep?: string, sizeButton?: number): Promise<void>;
|
|
94
|
+
/**
|
|
95
|
+
* Builds the current position marker from the bundled mdi icon (no network request),
|
|
96
|
+
* as a white figure on a disc of the application's primary color.
|
|
97
|
+
*/
|
|
98
|
+
getUserPositionIcon(): string;
|
|
90
99
|
/**
|
|
91
100
|
* Center the view of the plan on coordinates
|
|
92
101
|
* @param coordinate Coordinate on the plan
|
|
@@ -43,11 +43,11 @@ export declare class TicketsService extends BaseObjectService {
|
|
|
43
43
|
private spaceSubscription;
|
|
44
44
|
dateFilter: Date[];
|
|
45
45
|
ticketTypeFilter: TicketType[];
|
|
46
|
-
reportingIcon: import("
|
|
47
|
-
maintenanceIcon: import("
|
|
48
|
-
workorderIcon: import("
|
|
49
|
-
informationIcon: import("
|
|
50
|
-
accidentIcon: import("
|
|
46
|
+
reportingIcon: import("../../helpers.service").IconifyIconData;
|
|
47
|
+
maintenanceIcon: import("../../helpers.service").IconifyIconData;
|
|
48
|
+
workorderIcon: import("../../helpers.service").IconifyIconData;
|
|
49
|
+
informationIcon: import("../../helpers.service").IconifyIconData;
|
|
50
|
+
accidentIcon: import("../../helpers.service").IconifyIconData;
|
|
51
51
|
updateDone: Subject<boolean>;
|
|
52
52
|
updating: Subject<boolean>;
|
|
53
53
|
API: any;
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smarterplan/ngx-smarterplan-core",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.23",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"tslib": "^2.5.0"
|
|
6
6
|
},
|
|
7
7
|
"peerDependencies": {
|
|
8
|
+
"@abhinavakhil/iconify-angular": "^16.0.0",
|
|
8
9
|
"@angular/common": "^17.0.0",
|
|
9
10
|
"@types/crypto-js": "^4.1.1",
|
|
10
11
|
"crypto-js": "^4.1.1",
|
|
@@ -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-4DRLH77X.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-4DRLH77X.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-W4X3FWQJ.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-W4X3FWQJ.js"></script>
|
|
89
|
+
</body>
|
|
90
|
+
</html>
|
|
File without changes
|
package/src/assets/vs-app.json
CHANGED
|
@@ -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
|
+
}
|