@smarterplan/ngx-smarterplan-core 1.4.16 → 1.4.17
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/esm2022/lib/services/filter.service.mjs +11 -1
- package/esm2022/lib/services/matterport.service.mjs +13 -2
- package/esm2022/lib/services/models/base-object.service.mjs +31 -4
- package/esm2022/lib/services/models/equipment.service.mjs +14 -13
- package/esm2022/lib/services/models/feature.service.mjs +8 -7
- package/esm2022/lib/services/models/space.service.mjs +25 -2
- package/esm2022/lib/services/models/ticket.service.mjs +27 -8
- package/esm2022/lib/services/navigator.service.mjs +14 -1
- package/esm2022/lib/services/threejs.service.mjs +316 -35
- package/esm2022/lib/services/viewer.service.mjs +147 -8
- package/esm2022/lib/services/zoneChange.service.mjs +10 -1
- package/esm2022/lib/types.service.mjs +1 -1
- package/fesm2022/smarterplan-ngx-smarterplan-core.mjs +4376 -3848
- package/fesm2022/smarterplan-ngx-smarterplan-core.mjs.map +1 -1
- package/lib/services/models/base-object.service.d.ts +11 -1
- package/lib/services/models/equipment.service.d.ts +2 -1
- package/lib/services/models/feature.service.d.ts +2 -1
- package/lib/services/models/space.service.d.ts +7 -0
- package/lib/services/models/ticket.service.d.ts +4 -1
- package/lib/services/threejs.service.d.ts +103 -5
- package/lib/services/viewer.service.d.ts +39 -1
- package/lib/services/zoneChange.service.d.ts +9 -0
- package/lib/types.service.d.ts +8 -0
- package/package.json +1 -1
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { Equipment, Feature, POI, Ticket } from "../../types.service";
|
|
2
2
|
import { NavigationService } from "./navigation.service";
|
|
3
3
|
import { PoiService } from "./poi.service";
|
|
4
|
+
import { VisitService } from "./visit.service";
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
6
|
export declare class BaseObjectService {
|
|
6
7
|
protected poiService: PoiService;
|
|
7
8
|
private navigationService;
|
|
8
|
-
|
|
9
|
+
private visitService;
|
|
10
|
+
constructor(poiService: PoiService, navigationService: NavigationService, visitService: VisitService);
|
|
9
11
|
getModel3dAndSweep(object: Feature | Ticket | Equipment): Promise<{
|
|
10
12
|
model3D: string;
|
|
11
13
|
sweep: string;
|
|
@@ -14,6 +16,14 @@ export declare class BaseObjectService {
|
|
|
14
16
|
y: number;
|
|
15
17
|
};
|
|
16
18
|
} | void>;
|
|
19
|
+
/**
|
|
20
|
+
* The space's 3D visit, or null when it has none.
|
|
21
|
+
*
|
|
22
|
+
* Takes the first one the database returns. That is not the space's chosen default - the
|
|
23
|
+
* default ordering lives in SpaceService, which cannot be injected here. The POI does not record
|
|
24
|
+
* which capture it was placed in, so with several 3D models this is a guess either way.
|
|
25
|
+
*/
|
|
26
|
+
private getThreeJsVisitForSpace;
|
|
17
27
|
updateIconForAllObjects(objects: Ticket[] | Feature[] | Equipment[], tagIcon: string): Promise<POI[]>;
|
|
18
28
|
static ɵfac: i0.ɵɵFactoryDeclaration<BaseObjectService, never>;
|
|
19
29
|
static ɵprov: i0.ɵɵInjectableDeclaration<BaseObjectService>;
|
|
@@ -10,6 +10,7 @@ import { BaseObjectService } from './base-object.service';
|
|
|
10
10
|
import { NavigationService } from './navigation.service';
|
|
11
11
|
import { OperationService } from './operation.service';
|
|
12
12
|
import { PoiService } from './poi.service';
|
|
13
|
+
import { VisitService } from './visit.service';
|
|
13
14
|
import { TicketsService } from './ticket.service';
|
|
14
15
|
import { ZoneChangeService } from "../zoneChange.service";
|
|
15
16
|
import * as i0 from "@angular/core";
|
|
@@ -49,7 +50,7 @@ export declare class EquipmentService extends BaseObjectService {
|
|
|
49
50
|
awsKinesisAnalytics: any;
|
|
50
51
|
isMuseumUser: boolean;
|
|
51
52
|
private destroy$;
|
|
52
|
-
constructor(apiInjected: any, awsKinesisAnalyticsInjected: any, poiService: PoiService, navigationService: NavigationService, operationService: OperationService, ticketsService: TicketsService, navigatorService: NavigatorService, filterService: FilterService, userService: BaseUserService, viewerService: ViewerService, modalService: NgbModal, zoneChangeService: ZoneChangeService);
|
|
53
|
+
constructor(apiInjected: any, awsKinesisAnalyticsInjected: any, poiService: PoiService, navigationService: NavigationService, visitService: VisitService, operationService: OperationService, ticketsService: TicketsService, navigatorService: NavigatorService, filterService: FilterService, userService: BaseUserService, viewerService: ViewerService, modalService: NgbModal, zoneChangeService: ZoneChangeService);
|
|
53
54
|
readEquipment(id: string): Promise<Equipment>;
|
|
54
55
|
createEquipment(equip: Equipment, imageFile: File, documentFile: File): Promise<Equipment | void>;
|
|
55
56
|
getSignedUrlsForEquipment(equip: Equipment): Promise<Equipment>;
|
|
@@ -9,6 +9,7 @@ import { CommentService } from "./comment.service";
|
|
|
9
9
|
import { HashtagService } from "./hashtag.service";
|
|
10
10
|
import { NavigationService } from "./navigation.service";
|
|
11
11
|
import { PoiService } from "./poi.service";
|
|
12
|
+
import { VisitService } from "./visit.service";
|
|
12
13
|
import { ZoneChangeService } from "../zoneChange.service";
|
|
13
14
|
import * as i0 from "@angular/core";
|
|
14
15
|
export declare class FeatureService extends BaseObjectService {
|
|
@@ -40,7 +41,7 @@ export declare class FeatureService extends BaseObjectService {
|
|
|
40
41
|
currentHashtags: Hashtag[];
|
|
41
42
|
createObservable: Subject<Feature>;
|
|
42
43
|
deleteObservable: Subject<Feature>;
|
|
43
|
-
constructor(apiInjected: any, navigatorService: NavigatorService, filterService: FilterService, poiService: PoiService, commentService: CommentService, userService: BaseUserService, navigationService: NavigationService, hashtagService: HashtagService, zoneChangeService: ZoneChangeService);
|
|
44
|
+
constructor(apiInjected: any, navigatorService: NavigatorService, filterService: FilterService, poiService: PoiService, commentService: CommentService, userService: BaseUserService, navigationService: NavigationService, visitService: VisitService, hashtagService: HashtagService, zoneChangeService: ZoneChangeService);
|
|
44
45
|
createFeature(feature: Feature): Promise<Feature>;
|
|
45
46
|
deleteFeature(feature: Feature): Promise<Feature>;
|
|
46
47
|
updateFeature(feature: any): Promise<Feature>;
|
|
@@ -47,6 +47,13 @@ export declare class SpaceService {
|
|
|
47
47
|
* viewer offers them as a list, so the caller needs all of them rather than just the first.
|
|
48
48
|
*/
|
|
49
49
|
getAllowedVisitsForSpace(spaceID: string): Promise<Visit[]>;
|
|
50
|
+
/**
|
|
51
|
+
* Sets which capture a visitor opens by default for this space.
|
|
52
|
+
*
|
|
53
|
+
* Pass null to clear it. Writing a single field on the space is what keeps the answer unique:
|
|
54
|
+
* there is nothing to clear elsewhere, and no way for two captures to both claim it.
|
|
55
|
+
*/
|
|
56
|
+
setDefaultCapture(spaceID: string, captureID: string | null): Promise<Space>;
|
|
50
57
|
getAllowedModel3DForSpace(spaceID: string): Promise<string>;
|
|
51
58
|
softDeleteSpace(spaceID: string): Promise<void>;
|
|
52
59
|
/**
|
|
@@ -10,6 +10,7 @@ import { BaseObjectService } from './base-object.service';
|
|
|
10
10
|
import { NavigationService } from './navigation.service';
|
|
11
11
|
import { OperationService } from './operation.service';
|
|
12
12
|
import { PoiService } from './poi.service';
|
|
13
|
+
import { VisitService } from './visit.service';
|
|
13
14
|
import { EventService } from './event.service';
|
|
14
15
|
import { InterventionService } from '../intervention.service';
|
|
15
16
|
import { AffectationService } from './affectation.service';
|
|
@@ -38,6 +39,8 @@ export declare class TicketsService extends BaseObjectService {
|
|
|
38
39
|
}>;
|
|
39
40
|
currentSpaceID: string;
|
|
40
41
|
zoneIDFilter: string;
|
|
42
|
+
/** Set while a viewer without zone navigation (Three.js) is showing a space. */
|
|
43
|
+
private spaceSubscription;
|
|
41
44
|
dateFilter: Date[];
|
|
42
45
|
ticketTypeFilter: TicketType[];
|
|
43
46
|
reportingIcon: import("@iconify/types").IconifyIcon;
|
|
@@ -55,7 +58,7 @@ export declare class TicketsService extends BaseObjectService {
|
|
|
55
58
|
floorsPerSpace: Zone[];
|
|
56
59
|
selectedFloor: Zone;
|
|
57
60
|
private destroy$;
|
|
58
|
-
constructor(awsKinesisAnalyticsInjected: any, apiInjected: any, operationService: OperationService, eventService: EventService, affectationService: AffectationService, poiService: PoiService, userService: BaseUserService, navigatorService: NavigatorService, filterService: FilterService, interventionService: InterventionService, navigationService: NavigationService, viewerService: ViewerService, zoneChangeService: ZoneChangeService, modalService: NgbModal);
|
|
61
|
+
constructor(awsKinesisAnalyticsInjected: any, apiInjected: any, operationService: OperationService, eventService: EventService, affectationService: AffectationService, poiService: PoiService, userService: BaseUserService, navigatorService: NavigatorService, filterService: FilterService, interventionService: InterventionService, navigationService: NavigationService, visitService: VisitService, viewerService: ViewerService, zoneChangeService: ZoneChangeService, modalService: NgbModal);
|
|
59
62
|
initTickets(): Promise<void>;
|
|
60
63
|
adaptTicket(ticket: Ticket): Promise<Ticket>;
|
|
61
64
|
getPriorityColor(ticket: Ticket): string;
|
|
@@ -20,6 +20,8 @@ export interface ThreeJsTag {
|
|
|
20
20
|
};
|
|
21
21
|
/** Drives both the click route and type filtering, so it travels with the tag. */
|
|
22
22
|
poiType?: PoiType | null;
|
|
23
|
+
/** Shown on hover. A marker with no identity is just a dot on a wall. */
|
|
24
|
+
label?: string | null;
|
|
23
25
|
/** Icon drawn on the tag. Falls back to a plain disc when absent or it fails to load. */
|
|
24
26
|
iconUrl?: string | null;
|
|
25
27
|
/** Tint for the fallback disc, as a CSS colour. */
|
|
@@ -49,6 +51,8 @@ export interface ThreeJsTagPlacement {
|
|
|
49
51
|
y: number;
|
|
50
52
|
z: number;
|
|
51
53
|
};
|
|
54
|
+
/** What the placement was armed for, so the caller knows which creation form to open. */
|
|
55
|
+
poiType?: PoiType | null;
|
|
52
56
|
}
|
|
53
57
|
/** One tag seen in both spaces: where it is stored, and where it really sits on the model. */
|
|
54
58
|
export interface ThreeJsAlignmentPair {
|
|
@@ -114,6 +118,11 @@ export declare class ThreeJsService {
|
|
|
114
118
|
objectClicked$: Subject<string>;
|
|
115
119
|
/** Emits when the user clicks a tag, mirroring Matterport's tag click. */
|
|
116
120
|
tagClicked$: Subject<ThreeJsTagClick>;
|
|
121
|
+
/** Emits a tag's label while the pointer is over it, and null when it leaves. */
|
|
122
|
+
tagHovered$: Subject<{
|
|
123
|
+
label: string;
|
|
124
|
+
event: MouseEvent;
|
|
125
|
+
}>;
|
|
117
126
|
private tagGroup;
|
|
118
127
|
private tagSprites;
|
|
119
128
|
private canvasResizeObserver?;
|
|
@@ -122,10 +131,30 @@ export declare class ThreeJsService {
|
|
|
122
131
|
private modelRoot?;
|
|
123
132
|
/** True while the next click on the model places a tag instead of orbiting. */
|
|
124
133
|
private placingTag;
|
|
134
|
+
/** What the armed placement is for, echoed back when the spot is picked. */
|
|
135
|
+
private placementPoiType;
|
|
125
136
|
/** Position and normal of the last placed tag, in model space, awaiting commit to a POI. */
|
|
126
137
|
private pendingTagPlacement;
|
|
138
|
+
/** Pointer position waiting for a preview pick, coalesced to one per frame. */
|
|
139
|
+
private pendingPreviewEvent;
|
|
140
|
+
/**
|
|
141
|
+
* Layer carrying the model alone, so the depth pick can render it without the tags.
|
|
142
|
+
*
|
|
143
|
+
* Layers are tested per object at render time and children are traversed regardless of whether
|
|
144
|
+
* their parent passed, so marking the model's own meshes is enough - no re-parenting.
|
|
145
|
+
*/
|
|
146
|
+
private static readonly PICK_LAYER;
|
|
147
|
+
/** Cache Storage bucket holding downloaded models, and how many to keep. */
|
|
148
|
+
private static readonly MODEL_CACHE;
|
|
149
|
+
private static readonly MODEL_CACHE_SIZE;
|
|
150
|
+
private pickTarget?;
|
|
151
|
+
private pickCamera?;
|
|
152
|
+
private pickDepthMaterial?;
|
|
153
|
+
private readonly pickPixel;
|
|
127
154
|
/** Emits once a tag is dropped on the model, so the UI can confirm and persist it. */
|
|
128
155
|
tagPlaced$: Subject<ThreeJsTagPlacement>;
|
|
156
|
+
/** Emits when the calibration walkthrough is abandoned, so the panel driving it can close. */
|
|
157
|
+
alignmentCancelled$: Subject<void>;
|
|
129
158
|
/** Translucent marker shown under the cursor while placing. */
|
|
130
159
|
private placementPreview?;
|
|
131
160
|
private aligning;
|
|
@@ -191,7 +220,7 @@ export declare class ThreeJsService {
|
|
|
191
220
|
x: number;
|
|
192
221
|
y: number;
|
|
193
222
|
z: number;
|
|
194
|
-
}): void;
|
|
223
|
+
}, cacheKey?: string): void;
|
|
195
224
|
/**
|
|
196
225
|
* Stops the model download in progress, if any.
|
|
197
226
|
*
|
|
@@ -225,6 +254,25 @@ export declare class ThreeJsService {
|
|
|
225
254
|
* stream reports it as it happens rather than in one jump at the end.
|
|
226
255
|
*/
|
|
227
256
|
private fetchWithProgress;
|
|
257
|
+
/**
|
|
258
|
+
* The model store, or null where the browser will not give us one.
|
|
259
|
+
*
|
|
260
|
+
* Cache Storage needs a secure context, so it is absent over plain http and in some embedded
|
|
261
|
+
* webviews. Every caller treats that as a miss - caching is an optimisation, never a requirement.
|
|
262
|
+
*/
|
|
263
|
+
private openModelCache;
|
|
264
|
+
/**
|
|
265
|
+
* A cached copy of this model, if one was stored.
|
|
266
|
+
*
|
|
267
|
+
* Keyed by the S3 key rather than the URL it is fetched from: that URL is signed, so it carries a
|
|
268
|
+
* fresh signature and expiry every time and would never match twice. The browser's own HTTP cache
|
|
269
|
+
* misses for the same reason, which is why this exists at all.
|
|
270
|
+
*/
|
|
271
|
+
private readModelFromCache;
|
|
272
|
+
/** Stores a model for next time, evicting the oldest once a few are held. */
|
|
273
|
+
private writeModelToCache;
|
|
274
|
+
/** Cache Storage keys on a URL, so the S3 key is expressed as one. It is never requested. */
|
|
275
|
+
private modelCacheUrl;
|
|
228
276
|
/**
|
|
229
277
|
* Fits the camera's clipping planes to how big the model actually is.
|
|
230
278
|
*
|
|
@@ -326,6 +374,16 @@ export declare class ThreeJsService {
|
|
|
326
374
|
startTagAlignment(): void;
|
|
327
375
|
cancelTagAlignment(): void;
|
|
328
376
|
isAligningTags(): boolean;
|
|
377
|
+
/**
|
|
378
|
+
* Whether the pointer should be showing the placement ghost.
|
|
379
|
+
*
|
|
380
|
+
* True while placing a tag, and while calibrating once a tag has been picked - that second click
|
|
381
|
+
* is the same question ("where on the model?") and deserves the same aiming aid. Not true for the
|
|
382
|
+
* first half of a pair, which is a click on a tag, not on the model.
|
|
383
|
+
*/
|
|
384
|
+
private isPreviewingPlacement;
|
|
385
|
+
/** Whether a tag is currently registered for this element. */
|
|
386
|
+
hasTag(elementId: string): boolean;
|
|
329
387
|
/**
|
|
330
388
|
* Solves and applies the alignment collected so far, returning it so the caller can persist it.
|
|
331
389
|
*
|
|
@@ -336,7 +394,7 @@ export declare class ThreeJsService {
|
|
|
336
394
|
/** Handles a click while the alignment walkthrough is running. */
|
|
337
395
|
private handleAlignmentClick;
|
|
338
396
|
/** Arms tag placement: the next click on the model drops a tag instead of being ignored. */
|
|
339
|
-
startTagPlacement(): void;
|
|
397
|
+
startTagPlacement(poiType?: PoiType | null): void;
|
|
340
398
|
/** Leaves placement mode without placing anything. */
|
|
341
399
|
cancelTagPlacement(): void;
|
|
342
400
|
/**
|
|
@@ -346,6 +404,21 @@ export declare class ThreeJsService {
|
|
|
346
404
|
* sprite that gets removed the moment the real tag takes its place.
|
|
347
405
|
*/
|
|
348
406
|
private updatePlacementPreview;
|
|
407
|
+
/**
|
|
408
|
+
* The point under the cursor, read from the depth buffer instead of raycast, in tag space.
|
|
409
|
+
*
|
|
410
|
+
* A raycast walks every triangle of the mesh it hits: on a captured model that is millions of
|
|
411
|
+
* them, tens of milliseconds, every time the pointer moves. Coalescing to one per frame did not
|
|
412
|
+
* help, because the cost is the pick itself - it simply became one slow frame instead of several.
|
|
413
|
+
*
|
|
414
|
+
* Rendering the model's depth into a single pixel under the cursor answers the same question on
|
|
415
|
+
* the GPU in constant time, whatever the model's size. The camera's view offset is what narrows
|
|
416
|
+
* the whole image down to that one pixel, so the value read back is the depth the cursor is over.
|
|
417
|
+
*
|
|
418
|
+
* Used for the ghost only. The click that actually places a tag still raycasts: it is one pick,
|
|
419
|
+
* its cost does not matter, and it yields the surface normal, which depth alone cannot give.
|
|
420
|
+
*/
|
|
421
|
+
private pickPointOnGpu;
|
|
349
422
|
private removePlacementPreview;
|
|
350
423
|
/** Shows or hides one tag, leaving it registered so it can be brought back without reloading. */
|
|
351
424
|
setTagVisibility(elementId: string, visible: boolean): void;
|
|
@@ -370,12 +443,30 @@ export declare class ThreeJsService {
|
|
|
370
443
|
/** The spot picked by the last placement, for whoever commits it to a POI. */
|
|
371
444
|
getPendingTagPlacement(): ThreeJsTagPlacement | null;
|
|
372
445
|
/**
|
|
373
|
-
*
|
|
446
|
+
* Raycasts a click against the model's geometry and returns the hit, in world space.
|
|
374
447
|
*
|
|
375
|
-
* Returns null when the click missed
|
|
376
|
-
*
|
|
448
|
+
* Returns null when the click missed, which is a normal outcome - the user clicked the sky - and
|
|
449
|
+
* leaves whatever mode is armed still armed, so they can simply try again.
|
|
450
|
+
*/
|
|
451
|
+
private raycastModel;
|
|
452
|
+
/**
|
|
453
|
+
* Turns a click into a point on the model, in the frame tag coordinates are persisted in.
|
|
454
|
+
*
|
|
455
|
+
* That frame is the tag group's, not the model's. A stored coordinate is read back as a sprite
|
|
456
|
+
* position inside that group, so a coordinate captured in any other frame comes back displaced by
|
|
457
|
+
* exactly however far the alignment moves the group. The two frames agree only while the
|
|
458
|
+
* alignment is identity, which is why this stayed invisible until a model was calibrated.
|
|
377
459
|
*/
|
|
378
460
|
private pickPlacementOnModel;
|
|
461
|
+
/**
|
|
462
|
+
* Where the user says a tag really belongs, in the space the solved alignment maps onto.
|
|
463
|
+
*
|
|
464
|
+
* setTagAlignment writes the solution to the tag group's own transform, which is expressed
|
|
465
|
+
* relative to its parent - so the target has to be in the parent's frame. Measuring it in the
|
|
466
|
+
* group's own frame instead would fold the current alignment into the answer, making each
|
|
467
|
+
* calibration depend on the one before it.
|
|
468
|
+
*/
|
|
469
|
+
private pickAlignmentTarget;
|
|
379
470
|
/**
|
|
380
471
|
* Sets the transform mapping captured tag coordinates onto this model's space.
|
|
381
472
|
*
|
|
@@ -416,6 +507,13 @@ export declare class ThreeJsService {
|
|
|
416
507
|
updateObjsToScene(objsAdded: ObjAdded[]): void;
|
|
417
508
|
private onMouseMove;
|
|
418
509
|
private onMouseClick;
|
|
510
|
+
/**
|
|
511
|
+
* Escape cancels whatever the pointer is currently committed to.
|
|
512
|
+
*
|
|
513
|
+
* Emits through the same subjects the explicit Cancel buttons use, so the UI driving them follows
|
|
514
|
+
* along instead of being left showing a mode that is no longer armed.
|
|
515
|
+
*/
|
|
516
|
+
private onKeyDown;
|
|
419
517
|
private animate;
|
|
420
518
|
destroy(): void;
|
|
421
519
|
static ɵfac: i0.ɵɵFactoryDeclaration<ThreeJsService, never>;
|
|
@@ -4,9 +4,11 @@ import { ThreeJsService } from './threejs.service';
|
|
|
4
4
|
import { BaseTagService } from './tag.service';
|
|
5
5
|
import { DbObjectType, POI, PoiType, Comment, Equipment, Ticket, Feature, SpModule } from '../types.service';
|
|
6
6
|
import { PoiService } from './models/poi.service';
|
|
7
|
+
import { Config } from '../config';
|
|
7
8
|
import * as i0 from "@angular/core";
|
|
8
9
|
export declare class ViewerService {
|
|
9
10
|
private readonly sdkKey;
|
|
11
|
+
private readonly config;
|
|
10
12
|
private poiService;
|
|
11
13
|
private matterportService;
|
|
12
14
|
private threeJsService;
|
|
@@ -25,6 +27,14 @@ export declare class ViewerService {
|
|
|
25
27
|
dataIsLoaded: Subject<boolean>;
|
|
26
28
|
isLoaded: boolean;
|
|
27
29
|
showingViewer: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* The space being viewed, whichever viewer is showing it.
|
|
32
|
+
*
|
|
33
|
+
* MatterportService carries its own copy, set while its SDK connects - which never happens in
|
|
34
|
+
* Three.js mode. Anything that reads only that one silently does nothing for a 3D model, and the
|
|
35
|
+
* lists that feed tags are exactly that.
|
|
36
|
+
*/
|
|
37
|
+
currentSpaceID: string | null;
|
|
28
38
|
sweepToMove: string | null;
|
|
29
39
|
rotationToMove: {
|
|
30
40
|
x: number;
|
|
@@ -52,7 +62,7 @@ export declare class ViewerService {
|
|
|
52
62
|
};
|
|
53
63
|
};
|
|
54
64
|
private isObjectLoaded;
|
|
55
|
-
constructor(sdkKey: string, poiService: PoiService, matterportService: MatterportService, threeJsService: ThreeJsService);
|
|
65
|
+
constructor(sdkKey: string, config: Config, poiService: PoiService, matterportService: MatterportService, threeJsService: ThreeJsService);
|
|
56
66
|
checkMode(indexMode: string): boolean;
|
|
57
67
|
setMode(indexMode: string): void;
|
|
58
68
|
setTourUrl(options: {
|
|
@@ -92,6 +102,16 @@ export declare class ViewerService {
|
|
|
92
102
|
* of the pipeline that already drives Matterport.
|
|
93
103
|
*/
|
|
94
104
|
private addThreeJsTagFromPOI;
|
|
105
|
+
/**
|
|
106
|
+
* The image to draw a tag with, mirroring what Matterport shows for the same POI.
|
|
107
|
+
*
|
|
108
|
+
* Matterport registers one texture per type (`icon-ticket`, `icon-equipment`...) from the same
|
|
109
|
+
* config entries used here, and overrides it with the POI's own icon when it has one. Reading the
|
|
110
|
+
* same two sources is what keeps a tag looking like itself across the two viewers.
|
|
111
|
+
*/
|
|
112
|
+
private resolveTagIconUrl;
|
|
113
|
+
/** The configured icon for a POI type, or null when that type has none. */
|
|
114
|
+
private defaultTagIconUrl;
|
|
95
115
|
/** Moves the Three.js camera to frame a tag, mirroring Matterport's goToTag. */
|
|
96
116
|
goToThreeJsTag(elementId: string): void;
|
|
97
117
|
/** Shows only tags of the given POI types; null clears the filter. */
|
|
@@ -124,6 +144,11 @@ export declare class ViewerService {
|
|
|
124
144
|
get threeJsModelLoadCancelled$(): Subject<void>;
|
|
125
145
|
/** Stops the Three.js model download in progress. */
|
|
126
146
|
cancelThreeJsModelLoad(): void;
|
|
147
|
+
/** Emits a tag's label while the pointer is over it in the Three.js scene. */
|
|
148
|
+
get threeJsTagHovered$(): Subject<{
|
|
149
|
+
label: string;
|
|
150
|
+
event: MouseEvent;
|
|
151
|
+
}>;
|
|
127
152
|
/** Emits the element id of a tag clicked in the Three.js scene. */
|
|
128
153
|
get threeJsTagClicked$(): Subject<import("./threejs.service").ThreeJsTagClick>;
|
|
129
154
|
/**
|
|
@@ -161,8 +186,21 @@ export declare class ViewerService {
|
|
|
161
186
|
* a tag created here show up in the right place there - and the other way round.
|
|
162
187
|
*/
|
|
163
188
|
private commitThreeJsTagPlacement;
|
|
189
|
+
/**
|
|
190
|
+
* Creates the POI for an element just placed in the Three.js scene.
|
|
191
|
+
*
|
|
192
|
+
* The Matterport path reaches the same result through its tag dictionary - the tag exists first
|
|
193
|
+
* and carries the coordinates. Three.js has no such object, so the placement captured at click
|
|
194
|
+
* time is the only record of where the user pointed, and it has to become a POI here or it is
|
|
195
|
+
* lost when the form closes.
|
|
196
|
+
*
|
|
197
|
+
* Returns null when there is no pending placement, which is the normal case in Matterport mode.
|
|
198
|
+
*/
|
|
199
|
+
createPoiForThreeJsPlacement(element: DbObjectType, poiType: PoiType): Promise<POI | null>;
|
|
164
200
|
/** Emits when a tag is dropped on the model in the Three.js scene. */
|
|
165
201
|
get threeJsTagPlaced$(): Subject<import("./threejs.service").ThreeJsTagPlacement>;
|
|
202
|
+
/** Emits when the calibration walkthrough is abandoned, including via Escape. */
|
|
203
|
+
get threeJsAlignmentCancelled$(): Subject<void>;
|
|
166
204
|
/** Leaves Three.js tag placement mode without placing anything. */
|
|
167
205
|
cancelThreeJsTagPlacement(): void;
|
|
168
206
|
editOnlyTagStyleForPoi(poi: POI, object: DbObjectType): void;
|
|
@@ -8,6 +8,15 @@ import * as i0 from "@angular/core";
|
|
|
8
8
|
export declare class ZoneChangeService {
|
|
9
9
|
zoneChange: Subject<Zone | null>;
|
|
10
10
|
zonesForUserChange: Subject<Zone[] | null>;
|
|
11
|
+
/**
|
|
12
|
+
* Emits the space opened by a viewer that has no zone navigation (Three.js), or null when it
|
|
13
|
+
* closes.
|
|
14
|
+
*
|
|
15
|
+
* Zones are defined by the sweeps they contain, so they only mean something in a Matterport tour.
|
|
16
|
+
* A 3D model has no sweeps: it shows the whole space at once, and the services that load data
|
|
17
|
+
* listen here instead of to `zoneChange` to know which space they are looking at.
|
|
18
|
+
*/
|
|
19
|
+
spaceWithoutZones: Subject<string | null>;
|
|
11
20
|
private currentZone;
|
|
12
21
|
private currentZones;
|
|
13
22
|
floorHasChanged: EventEmitter<Zone>;
|
package/lib/types.service.d.ts
CHANGED
|
@@ -570,6 +570,14 @@ export type Space = {
|
|
|
570
570
|
status?: SpaceStatus | null;
|
|
571
571
|
guestLink?: string | null;
|
|
572
572
|
signedImageUrl?: string | null;
|
|
573
|
+
/**
|
|
574
|
+
* The capture a visitor opens by default, of any viewer type.
|
|
575
|
+
*
|
|
576
|
+
* Kept on the space rather than as a flag on each capture: there is one field, so there can only
|
|
577
|
+
* be one answer, whichever screen set it. A flag per capture would let two of them claim the
|
|
578
|
+
* default and put the choice back where it started - undefined.
|
|
579
|
+
*/
|
|
580
|
+
defaultCaptureID?: string | null;
|
|
573
581
|
zones?: {
|
|
574
582
|
__typename?: 'ModelZoneConnection';
|
|
575
583
|
items?: Array<Zone | null> | null;
|