@smarterplan/ngx-smarterplan-core 1.4.6 → 1.4.7
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/helpers.service.mjs +27 -20
- package/esm2022/lib/mattertagData.mjs +84 -84
- package/esm2022/lib/pipes/time-date-to-local-string.pipe.mjs +3 -8
- package/esm2022/lib/services/locale.service.mjs +3 -5
- package/esm2022/lib/services/matterport-import.service.mjs +3 -3
- package/esm2022/lib/services/matterport-measurement.service.mjs +78 -0
- package/esm2022/lib/services/matterport-navigation.service.mjs +157 -0
- package/esm2022/lib/services/matterport-object3d.service.mjs +234 -0
- package/esm2022/lib/services/matterport-pointer.service.mjs +130 -0
- package/esm2022/lib/services/matterport-tag.service.mjs +458 -0
- package/esm2022/lib/services/matterport.service.mjs +427 -988
- package/esm2022/lib/services/models/equipment.service.mjs +3 -4
- package/esm2022/lib/services/models/feature.service.mjs +3 -3
- package/esm2022/lib/services/models/measurement.service.mjs +3 -3
- package/esm2022/lib/services/models/ticket.service.mjs +3 -4
- package/esm2022/lib/services/navigator.service.mjs +10 -2
- package/esm2022/lib/services/tag.service.mjs +45 -19
- package/esm2022/lib/services/viewer.service.mjs +51 -16
- package/esm2022/lib/types.service.mjs +1 -1
- package/fesm2022/smarterplan-ngx-smarterplan-core.mjs +2028 -1490
- package/fesm2022/smarterplan-ngx-smarterplan-core.mjs.map +1 -1
- package/lib/helpers.service.d.ts +6 -0
- package/lib/mattertagData.d.ts +52 -10
- package/lib/services/matterport-measurement.service.d.ts +35 -0
- package/lib/services/matterport-navigation.service.d.ts +38 -0
- package/lib/services/matterport-object3d.service.d.ts +31 -0
- package/lib/services/matterport-pointer.service.d.ts +31 -0
- package/lib/services/matterport-tag.service.d.ts +104 -0
- package/lib/services/matterport.service.d.ts +91 -92
- package/lib/services/models/equipment.service.d.ts +2 -2
- package/lib/services/models/feature.service.d.ts +2 -2
- package/lib/services/models/measurement.service.d.ts +2 -2
- package/lib/services/models/ticket.service.d.ts +2 -2
- package/lib/services/tag.service.d.ts +4 -0
- package/lib/services/viewer.service.d.ts +1 -1
- package/lib/types.service.d.ts +2 -0
- package/package.json +1 -1
- package/esm2022/lib/matterport-extensions/hsl-loader/HlsLoader.mjs +0 -66
- package/esm2022/lib/matterport-extensions/video-renderer/VideoRenderer.mjs +0 -63
- package/lib/matterport-extensions/hsl-loader/HlsLoader.d.ts +0 -26
- package/lib/matterport-extensions/video-renderer/VideoRenderer.d.ts +0 -26
package/lib/helpers.service.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ export declare function openModalForVisitSwitch(modalService: NgbModal, model3D:
|
|
|
29
29
|
sweepToMove: string;
|
|
30
30
|
rotation: any;
|
|
31
31
|
} | null): void;
|
|
32
|
+
export declare function getCurrentLang(translate: TranslateService): string;
|
|
32
33
|
/**
|
|
33
34
|
* Return a string of a given date time in local format.
|
|
34
35
|
* The format is determined by the current language.
|
|
@@ -77,3 +78,8 @@ export declare function isEmptyObject(object: any): boolean;
|
|
|
77
78
|
export declare function shuffleArray(array: any[]): any[];
|
|
78
79
|
export declare function numberToDateString(timestamp: number): string;
|
|
79
80
|
export declare function durationToString(duration: number, translate: TranslateService): string;
|
|
81
|
+
export declare function pointToString(point: {
|
|
82
|
+
x: number;
|
|
83
|
+
y: number;
|
|
84
|
+
z: number;
|
|
85
|
+
}): string;
|
package/lib/mattertagData.d.ts
CHANGED
|
@@ -10,10 +10,11 @@ export declare class MattertagData {
|
|
|
10
10
|
customIconIndex: number;
|
|
11
11
|
private rotation;
|
|
12
12
|
private poi;
|
|
13
|
+
private matterportSid;
|
|
13
14
|
constructor(type: PoiType);
|
|
14
15
|
setType(type: PoiType): void;
|
|
15
16
|
setObject(object: DbObjectType, tagType: PoiType): void;
|
|
16
|
-
setElementID(
|
|
17
|
+
setElementID(id: string): void;
|
|
17
18
|
setPosition(position: {
|
|
18
19
|
x: number;
|
|
19
20
|
y: number;
|
|
@@ -31,6 +32,7 @@ export declare class MattertagData {
|
|
|
31
32
|
y: number;
|
|
32
33
|
}): void;
|
|
33
34
|
setPoi(poi: POI): void;
|
|
35
|
+
setMatterportSid(sid: string): void;
|
|
34
36
|
getData(): {
|
|
35
37
|
label: string;
|
|
36
38
|
description: string;
|
|
@@ -49,22 +51,62 @@ export declare class MattertagData {
|
|
|
49
51
|
g: number;
|
|
50
52
|
b: number;
|
|
51
53
|
};
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Get the descriptor for sdk.Tag.add(...descriptor)
|
|
57
|
+
* Format : [{ label, description, anchorPosition, stemVector, color, id? }]
|
|
58
|
+
* If matterportSid is defined (already known tag) we send it so the SDK
|
|
59
|
+
* reuse it instead of trying to create a new one and generate an error : "already in use".
|
|
60
|
+
*/
|
|
61
|
+
getMattertagDescriptor(): [Record<string, any>];
|
|
62
|
+
/**
|
|
63
|
+
* Get data for sdk.Tag.editPosition() or sdk.Tag.editBillboard().
|
|
64
|
+
*/
|
|
65
|
+
getTagSdkData(): {
|
|
66
|
+
anchorPosition: {
|
|
67
|
+
x: number;
|
|
68
|
+
y: number;
|
|
69
|
+
z: number;
|
|
70
|
+
};
|
|
71
|
+
stemVector: {
|
|
72
|
+
x: number;
|
|
73
|
+
y: number;
|
|
74
|
+
z: number;
|
|
55
75
|
};
|
|
56
76
|
};
|
|
77
|
+
/** Load the matterportSid from the poi metadata */
|
|
78
|
+
loadSidFromPoi(poi: POI): void;
|
|
79
|
+
/** Get the stem vector for the tag */
|
|
80
|
+
getStemVector(): {
|
|
81
|
+
x: number;
|
|
82
|
+
y: number;
|
|
83
|
+
z: number;
|
|
84
|
+
};
|
|
57
85
|
getType(): PoiType;
|
|
58
|
-
getNormal():
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
86
|
+
getNormal(): {
|
|
87
|
+
x: number;
|
|
88
|
+
y: number;
|
|
89
|
+
z: number;
|
|
90
|
+
};
|
|
91
|
+
getPosition(): {
|
|
92
|
+
x: number;
|
|
93
|
+
y: number;
|
|
94
|
+
z: number;
|
|
95
|
+
};
|
|
63
96
|
getSweepID(): string;
|
|
64
97
|
getObject(): any;
|
|
65
98
|
getRotation(): {
|
|
66
99
|
x: number;
|
|
67
100
|
y: number;
|
|
68
|
-
};
|
|
101
|
+
} | null;
|
|
69
102
|
getPoi(): POI;
|
|
103
|
+
getMatterportSid(): string | null;
|
|
104
|
+
/** Get the action mode for the tag */
|
|
105
|
+
getCallbackActionMode(): MattertagActionMode;
|
|
106
|
+
/** Get the icon for the tag */
|
|
107
|
+
getIcon(): string;
|
|
108
|
+
/** Get the coordinate string for the tag */
|
|
109
|
+
getCoordinateString(): string;
|
|
110
|
+
/** Get the metadata string for the tag */
|
|
111
|
+
getMetadataString(): string;
|
|
70
112
|
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Router } from '@angular/router';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class MatterportMeasurementService {
|
|
4
|
+
private router;
|
|
5
|
+
private lastMeasure;
|
|
6
|
+
private distancesLastMeasure;
|
|
7
|
+
private lastScreenshotUri;
|
|
8
|
+
private resolution;
|
|
9
|
+
private visibility;
|
|
10
|
+
constructor(router: Router);
|
|
11
|
+
/**
|
|
12
|
+
* Callback after measurement is performed
|
|
13
|
+
*/
|
|
14
|
+
getDistanceForLastMeasurement(sdk: any, currentSpaceID: string): void;
|
|
15
|
+
getLastDistances(): number[];
|
|
16
|
+
/**
|
|
17
|
+
* Takes screenshot and saves base64 in lastScreenshotUri
|
|
18
|
+
* @param sdk Matterport SDK
|
|
19
|
+
* @returns Promise
|
|
20
|
+
*/
|
|
21
|
+
takeScreenShot(sdk: any): Promise<void>;
|
|
22
|
+
getScreenShotUri(): any;
|
|
23
|
+
getLastMeasurement(poseCamera: any): any;
|
|
24
|
+
setLastMeasure(points: any[]): void;
|
|
25
|
+
getResolution(): {
|
|
26
|
+
width: number;
|
|
27
|
+
height: number;
|
|
28
|
+
};
|
|
29
|
+
getVisibility(): {
|
|
30
|
+
mattertags: boolean;
|
|
31
|
+
sweeps: boolean;
|
|
32
|
+
};
|
|
33
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MatterportMeasurementService, never>;
|
|
34
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MatterportMeasurementService>;
|
|
35
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Subject } from 'rxjs';
|
|
2
|
+
import { CameraMode } from '../types.service';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class MatterportNavigationService {
|
|
5
|
+
sweepCollection: any;
|
|
6
|
+
sweeps: Array<string> | null;
|
|
7
|
+
floors: Array<{
|
|
8
|
+
id: string;
|
|
9
|
+
name: string;
|
|
10
|
+
sequence: number;
|
|
11
|
+
}> | null;
|
|
12
|
+
forbiddenSweeps: string[];
|
|
13
|
+
currentSweep: Subject<string>;
|
|
14
|
+
onCameraModeChanged: Subject<CameraMode>;
|
|
15
|
+
/** Emits whenever the set of current rooms changes (sdk.Room.current). */
|
|
16
|
+
onRoomChanged: Subject<any[]>;
|
|
17
|
+
inTransitionMode: boolean;
|
|
18
|
+
inTransitionSweep: boolean;
|
|
19
|
+
currentCameraMode: CameraMode;
|
|
20
|
+
currentRooms: any[];
|
|
21
|
+
/** Sequence number of the floor currently visible in sdk.Floor.current (null = single-floor or unknown). */
|
|
22
|
+
currentFloorSequence: number | null;
|
|
23
|
+
constructor();
|
|
24
|
+
action_toolbox_floorplan(sdk: any): Promise<void>;
|
|
25
|
+
action_toolbox_inside_view(sdk: any): void;
|
|
26
|
+
actionShowAllFloors(sdk: any): void;
|
|
27
|
+
action_toolbox_dollhouse(sdk: any): Promise<void>;
|
|
28
|
+
action_go_to_floor(sdk: any, floorName: string, matterportFloorSequence?: number): Promise<void>;
|
|
29
|
+
action_go_to_sweep(sdk: any, sweep: string, rotation?: {
|
|
30
|
+
x: number;
|
|
31
|
+
y: number;
|
|
32
|
+
} | null): Promise<void>;
|
|
33
|
+
removeForbiddenSweeps(sdk: any, forbiddenSweeps: string[]): Promise<void>;
|
|
34
|
+
getCurrentSweep(poseCamera: any): string | null;
|
|
35
|
+
setCameraMode(mode: string): void;
|
|
36
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MatterportNavigationService, never>;
|
|
37
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MatterportNavigationService>;
|
|
38
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { IObject3D, PoiType, POI, DbObjectType } from '../types.service';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class MatterportObject3DService {
|
|
4
|
+
dictionnaryObjects3D: Map<string, any>;
|
|
5
|
+
dictionnarySceneObjects3D: Map<string, any>;
|
|
6
|
+
lastObject3D: any;
|
|
7
|
+
objectControl: any;
|
|
8
|
+
securityCameraAnimator: any;
|
|
9
|
+
azimuthalCrown: any;
|
|
10
|
+
threeJSScene: any;
|
|
11
|
+
noLightForObjects: boolean;
|
|
12
|
+
constructor();
|
|
13
|
+
init3DObjectViewer(sdk: any): Promise<void>;
|
|
14
|
+
add3DObject(sdk: any, obj: IObject3D, mode?: 'translate' | 'rotate'): Promise<any>;
|
|
15
|
+
deleteObject3D(uuid: string): Promise<void>;
|
|
16
|
+
getObject3DModelNodeFromDictionnary(uuid: string): any;
|
|
17
|
+
toggleObjectVisibility(objectId: any): void;
|
|
18
|
+
isObjectVisible(objectId: any): boolean;
|
|
19
|
+
pointCameraTo3DObject(sdk: any, objectId: any, createTagCallback: (tagType: PoiType, object: DbObjectType, poi: POI) => Promise<any>, goToTagCallback: (sid: string) => Promise<any>, deleteLastTagCallback: () => void, getTagFromElementId: (id: string) => {
|
|
20
|
+
tag: string;
|
|
21
|
+
sweep: string;
|
|
22
|
+
}): Promise<void>;
|
|
23
|
+
getSceneNodeFromObject3DId(uuid: string): any;
|
|
24
|
+
displayAzimutalCrown(poseCamera: any): Promise<void>;
|
|
25
|
+
attachGizmoControlTo3DObject(sdk: any, modelNode: any, sceneObject: any, mode: 'translate' | 'rotate' | 'scale', visible: boolean, isNewObject: boolean): Promise<any>;
|
|
26
|
+
removeGizmoFromLastObject(): void;
|
|
27
|
+
toggleViewFrustum(): void;
|
|
28
|
+
clear(): void;
|
|
29
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MatterportObject3DService, never>;
|
|
30
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MatterportObject3DService>;
|
|
31
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class MatterportPointerService {
|
|
3
|
+
private pointerButton;
|
|
4
|
+
private getCursorPositionButton;
|
|
5
|
+
private textDisplayCursorPositionPanel;
|
|
6
|
+
private cursorPositionButtonDisplayed;
|
|
7
|
+
private intervalCursorPointerPosition;
|
|
8
|
+
private timerPointer;
|
|
9
|
+
private oldPoseMatterportPosition;
|
|
10
|
+
constructor();
|
|
11
|
+
init(container: HTMLElement, pointerButton: HTMLElement, getCursorPositionButton: HTMLElement, textDisplayCursorPositionPanel: HTMLElement, callbacks: {
|
|
12
|
+
onLeftClick: (evt: MouseEvent) => void;
|
|
13
|
+
onRightClick: (evt: MouseEvent) => void;
|
|
14
|
+
onMiddleClick: (evt: MouseEvent) => void;
|
|
15
|
+
}): void;
|
|
16
|
+
startPointerTrick(sdk: any, container: any, getPose: () => any, getPoseCamera: () => any, getInteractionMode: () => number, getMattertagToFollow: () => string | null): void;
|
|
17
|
+
stopPointerTrick(): void;
|
|
18
|
+
startAdminCursorTracker(sdk: any, container: any, getPose: () => any, getPoseCamera: () => any): void;
|
|
19
|
+
stopAdminCursorTracker(): void;
|
|
20
|
+
updatePointerTrick(sdk: any, container: any, poseMatterport: any, poseCamera: any, interactionMode: number, mattertagToFollow: string | null): void;
|
|
21
|
+
getDistPosition(sdk: any, container: any, poseCamera: any, pos1: any, pos2: any): number;
|
|
22
|
+
updateCursorDisplay(poseMatterport: any): void;
|
|
23
|
+
clear(callbacks: {
|
|
24
|
+
onLeftClick: (evt: MouseEvent) => void;
|
|
25
|
+
onRightClick: (evt: MouseEvent) => void;
|
|
26
|
+
onMiddleClick: (evt: MouseEvent) => void;
|
|
27
|
+
}): void;
|
|
28
|
+
setCursorPositionButtonDisplayed(value: boolean): void;
|
|
29
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MatterportPointerService, never>;
|
|
30
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MatterportPointerService>;
|
|
31
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { Subject } from 'rxjs';
|
|
2
|
+
import { MattertagData } from '../mattertagData';
|
|
3
|
+
import { PoiType, DbObjectType, POI, CameraMode } from '../types.service';
|
|
4
|
+
import { MatterportNavigationService } from './matterport-navigation.service';
|
|
5
|
+
import { BaseTagService } from './tag.service';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class MatterportTagService {
|
|
8
|
+
private navigationService;
|
|
9
|
+
dictionnaryTags: Map<string, MattertagData>;
|
|
10
|
+
tagAddQueue: Promise<any>;
|
|
11
|
+
mattertagToFollow: string | null;
|
|
12
|
+
onGoToTag: Subject<string>;
|
|
13
|
+
mattertagIDs: Array<string>;
|
|
14
|
+
tagsAttachments: Object;
|
|
15
|
+
tagMessengerOn: boolean;
|
|
16
|
+
tagService: BaseTagService | null;
|
|
17
|
+
private tagsCurrentOpacity;
|
|
18
|
+
private tagsCurrentEnabled;
|
|
19
|
+
constructor(navigationService: MatterportNavigationService);
|
|
20
|
+
setTagService(service: BaseTagService): void;
|
|
21
|
+
/** Opens a specific tag in the Matterport viewer by its ID. */
|
|
22
|
+
goToTag(sdk: any, sid: string): Promise<any>;
|
|
23
|
+
/** Opens the most recently created tag in the viewer. */
|
|
24
|
+
goToLastTag(sdk: any): Promise<any>;
|
|
25
|
+
/**
|
|
26
|
+
* Adds a Mattertag to the viewer, serializing calls to prevent SDK race conditions.
|
|
27
|
+
* Reuses existing IDs if the tag is already present in the session.
|
|
28
|
+
*/
|
|
29
|
+
addMattertagToViewer(sdk: any, mattertagData: MattertagData): Promise<string | null>;
|
|
30
|
+
/**
|
|
31
|
+
* Internal method to add and configure a Mattertag with icon, opacity, and HTML content.
|
|
32
|
+
* Handles existing tags gracefully and queues operations to avoid SDK conflicts.
|
|
33
|
+
*/
|
|
34
|
+
_doAddMattertag(sdk: any, mattertagData: MattertagData, setTagIconAndOpacity: (sid: string, mt: MattertagData) => Promise<void>, injectHtmlInTag: (type: PoiType, obj: DbObjectType, sid: string) => Promise<void>): Promise<string>;
|
|
35
|
+
getDistance(p1: any, p2: any): number;
|
|
36
|
+
/**
|
|
37
|
+
* Checks if a tag is within the bounding box of any active room (adding a slight margin to account for wall-mounted tags).
|
|
38
|
+
* If there are no active rooms (e.g., hallway), falls back to returning true.
|
|
39
|
+
*/
|
|
40
|
+
isTagInRooms(mattertagData: MattertagData, rooms: any[]): boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Computes the final context-aware opacity for a single tag.
|
|
43
|
+
* @param currentFloorSequence Authoritative current floor sequence from sdk.Floor.current
|
|
44
|
+
* (null = single-floor model or unknown).
|
|
45
|
+
* @param currentRooms Array of active rooms the camera is in.
|
|
46
|
+
*/
|
|
47
|
+
/** Returns the ID of the most recently added tag. */
|
|
48
|
+
getLastTag(): string | null;
|
|
49
|
+
/**
|
|
50
|
+
* Updates the visibility (opacity) of all tags based on the current camera mode,
|
|
51
|
+
* floor and room context. Must be called after each sweep, floor or mode change.
|
|
52
|
+
*
|
|
53
|
+
* Rules:
|
|
54
|
+
* - DOLLHOUSE / FLOORPLAN → all tags hidden (opacity 0).
|
|
55
|
+
* - INSIDE → only tags whose sweep belongs to the current floor are shown;
|
|
56
|
+
* proximity-based opacity is applied via computeTagOpacity().
|
|
57
|
+
* Tags on other floors are hidden (opacity 0).
|
|
58
|
+
* - TRANSITIONING → no change (skip update to avoid flickering).
|
|
59
|
+
*
|
|
60
|
+
* @param sdk Matterport SDK instance.
|
|
61
|
+
* @param poseCamera Current camera pose.
|
|
62
|
+
* @param sweepCollection Full collection of sweeps.
|
|
63
|
+
* @param currentCameraMode Current camera mode.
|
|
64
|
+
* @param mattertagToFollow ID of the cursor tag (never touched).
|
|
65
|
+
*/
|
|
66
|
+
updateTagsVisibilityForContext(sdk: any, sweepCollection: any, currentCameraMode: CameraMode, mattertagToFollow: string | null, currentFloorSequence?: number | null, currentRooms?: any[]): Promise<void>;
|
|
67
|
+
/** Removes a specific tag from the viewer and local dictionaries. */
|
|
68
|
+
deleteMattertagFromId(sdk: any, mattertagID: string): Promise<void>;
|
|
69
|
+
/** Removes the last added tag from the viewer. */
|
|
70
|
+
deleteLastMattertag(sdk: any): Promise<void>;
|
|
71
|
+
/** Clears all tags from the viewer and resets local state. */
|
|
72
|
+
action_delete_all_mattertags(sdk: any): Promise<void>;
|
|
73
|
+
/**
|
|
74
|
+
* Creates and configures a Mattertag from a POI, handling coordinates, normals, and sweep ID.
|
|
75
|
+
* Skips creation if a tag for the object already exists.
|
|
76
|
+
*/
|
|
77
|
+
createMattertagFromPOI(sdk: any, tagType: PoiType, object: DbObjectType, poi: POI, poseCamera: any, getTagFromElementId: (id: string) => {
|
|
78
|
+
tag: string;
|
|
79
|
+
sweep: string;
|
|
80
|
+
}, setTagIconAndOpacity: (sid: string, mt: MattertagData) => Promise<void>, injectHtmlInTag: (type: PoiType, obj: DbObjectType, sid: string) => Promise<void>): Promise<any>;
|
|
81
|
+
/** Updates the icon, opacity, and HTML content of an existing tag. */
|
|
82
|
+
updateMatterTagContentForTagID(sdk: any, mattertagID: string, object: DbObjectType, poiType: PoiType, setTagIconAndOpacity: (sid: string, mt: MattertagData) => Promise<void>, injectHtmlInTag: (type: PoiType, obj: DbObjectType, sid: string) => Promise<void>): Promise<any>;
|
|
83
|
+
/** Registers a custom texture and applies it to a tag, optionally adjusting opacity. */
|
|
84
|
+
addNewIconAndSetForTag(sdk: any, mattertagID: string, iconPath: string, applyOpacity: boolean, opacity: number): Promise<void>;
|
|
85
|
+
/** Finds the tag ID and sweep ID associated with a specific element ID. */
|
|
86
|
+
getTagFromElementId(elementID: string, sweeps: string[] | null): {
|
|
87
|
+
tag: string | null;
|
|
88
|
+
sweep: string | null;
|
|
89
|
+
};
|
|
90
|
+
/** Retrieves the floor identifier associated with a tag based on its sweep data.
|
|
91
|
+
* Handles both the object form ({ floorInfo: { id, sequence }, floor: { id } })
|
|
92
|
+
* and the primitive form (floor: number) used by Matterport SDK v3.
|
|
93
|
+
*/
|
|
94
|
+
getFloorIdForTag(mattertagData: MattertagData, sweepCollection: any): string | null;
|
|
95
|
+
/**
|
|
96
|
+
* Injects custom HTML or fallback billboard media into a Mattertag sandbox.
|
|
97
|
+
* Attaches event listeners for interactive elements within the tag.
|
|
98
|
+
*/
|
|
99
|
+
injectHtmlInTag(sdk: any, tagType: PoiType, object: DbObjectType, tagID: string): Promise<void>;
|
|
100
|
+
/** Clears all local tag data and resets the addition queue. */
|
|
101
|
+
clear(): void;
|
|
102
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MatterportTagService, never>;
|
|
103
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MatterportTagService>;
|
|
104
|
+
}
|
|
@@ -7,6 +7,11 @@ import { BaseTagService } from './tag.service';
|
|
|
7
7
|
import { BaseVisibilityService } from './baseVisibility.service';
|
|
8
8
|
import { Config } from '../config';
|
|
9
9
|
import { CameraMode } from '../types.service';
|
|
10
|
+
import { MatterportMeasurementService } from './matterport-measurement.service';
|
|
11
|
+
import { MatterportNavigationService } from './matterport-navigation.service';
|
|
12
|
+
import { MatterportPointerService } from './matterport-pointer.service';
|
|
13
|
+
import { MatterportObject3DService } from './matterport-object3d.service';
|
|
14
|
+
import { MatterportTagService } from './matterport-tag.service';
|
|
10
15
|
import * as i0 from "@angular/core";
|
|
11
16
|
/**
|
|
12
17
|
* Custom Threejs Object 3D interface
|
|
@@ -42,8 +47,11 @@ export declare class MatterportService {
|
|
|
42
47
|
private activeRoute;
|
|
43
48
|
private visibilityService;
|
|
44
49
|
private ngZone;
|
|
45
|
-
private
|
|
46
|
-
private
|
|
50
|
+
private measurementService;
|
|
51
|
+
private navigationService;
|
|
52
|
+
private pointerService;
|
|
53
|
+
private object3DService;
|
|
54
|
+
private matterportTagService;
|
|
47
55
|
sdk: any;
|
|
48
56
|
private container;
|
|
49
57
|
private poseMatterport;
|
|
@@ -53,77 +61,81 @@ export declare class MatterportService {
|
|
|
53
61
|
sweep: any;
|
|
54
62
|
};
|
|
55
63
|
lastCameraPosition: any;
|
|
56
|
-
private azimuthalCrown;
|
|
57
|
-
private pointerButton;
|
|
58
|
-
private getCursorPositionButton;
|
|
59
|
-
private cursorPositionButtonDisplayed;
|
|
60
|
-
private intervalCursorPointerPosition;
|
|
61
|
-
private textDisplayCursorPositionPanel;
|
|
62
|
-
private oldPoseMatterportPosition;
|
|
63
64
|
private isMeasureModeOn;
|
|
64
65
|
private interactionMode;
|
|
65
|
-
private
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
sweeps: Array<string> | null;
|
|
77
|
-
|
|
66
|
+
private cameraMode;
|
|
67
|
+
get mattertagIDs(): Array<string>;
|
|
68
|
+
set mattertagIDs(value: Array<string>);
|
|
69
|
+
get dictionnaryTags(): Map<string, MattertagData>;
|
|
70
|
+
get dictionnaryObjects3D(): Map<string, any>;
|
|
71
|
+
get dictionnarySceneObjects3D(): Map<string, any>;
|
|
72
|
+
get threeJSScene(): any;
|
|
73
|
+
set threeJSScene(value: any);
|
|
74
|
+
get azimuthalCrown(): any;
|
|
75
|
+
set azimuthalCrown(value: any);
|
|
76
|
+
get tagsAttachments(): Object;
|
|
77
|
+
get sweeps(): Array<string> | null;
|
|
78
|
+
set sweeps(value: Array<string> | null);
|
|
79
|
+
get sweepCollection(): any;
|
|
80
|
+
set sweepCollection(value: any);
|
|
81
|
+
get currentSweep(): Subject<string>;
|
|
78
82
|
currentCameraPose: Subject<any>;
|
|
79
|
-
|
|
83
|
+
get floors(): Array<{
|
|
84
|
+
id: string;
|
|
85
|
+
name: string;
|
|
86
|
+
sequence: number;
|
|
87
|
+
}> | null;
|
|
88
|
+
set floors(value: Array<{
|
|
89
|
+
id: string;
|
|
90
|
+
name: string;
|
|
91
|
+
sequence: number;
|
|
92
|
+
}> | null);
|
|
80
93
|
private _currentSpaceID;
|
|
81
|
-
|
|
82
|
-
|
|
94
|
+
get lastObject3D(): any;
|
|
95
|
+
set lastObject3D(value: any);
|
|
96
|
+
get currentRooms(): any[];
|
|
97
|
+
set currentRooms(value: any[]);
|
|
83
98
|
get currentSpaceID(): string;
|
|
84
99
|
set currentSpaceID(value: string);
|
|
85
|
-
|
|
86
|
-
forbiddenSweeps: string[];
|
|
100
|
+
get forbiddenSweeps(): string[];
|
|
101
|
+
set forbiddenSweeps(value: string[]);
|
|
87
102
|
tagAction: Subject<{
|
|
88
103
|
action: string;
|
|
89
104
|
data: string;
|
|
90
105
|
}>;
|
|
91
|
-
mattertagToFollow: string | null;
|
|
106
|
+
get mattertagToFollow(): string | null;
|
|
107
|
+
set mattertagToFollow(value: string | null);
|
|
108
|
+
get inTransitionMode(): boolean;
|
|
109
|
+
set inTransitionMode(value: boolean);
|
|
110
|
+
get inTransitionSweep(): boolean;
|
|
111
|
+
set inTransitionSweep(value: boolean);
|
|
112
|
+
private noLightForObjects;
|
|
113
|
+
get currentCameraMode(): CameraMode;
|
|
114
|
+
set currentCameraMode(value: CameraMode);
|
|
115
|
+
get onCameraModeChanged(): Subject<CameraMode>;
|
|
116
|
+
get onRoomChanged(): Subject<any[]>;
|
|
117
|
+
get onGoToTag(): Subject<string>;
|
|
92
118
|
tagService: BaseTagService;
|
|
93
119
|
config: Config;
|
|
94
|
-
inTransitionMode: boolean;
|
|
95
|
-
inTransitionSweep: boolean;
|
|
96
|
-
private noLightForObjects;
|
|
97
|
-
currentCameraMode: CameraMode;
|
|
98
|
-
onCameraModeChanged: Subject<CameraMode>;
|
|
99
|
-
onGoToTag: Subject<string>;
|
|
100
|
-
tagMessengerOn: boolean;
|
|
101
120
|
SPModule: SpModule;
|
|
102
|
-
objectControl: any;
|
|
103
|
-
|
|
121
|
+
get objectControl(): any;
|
|
122
|
+
get securityCameraAnimator(): any;
|
|
104
123
|
/**
|
|
105
124
|
* Actions on left click when positioning mattertag in visit
|
|
106
125
|
*/
|
|
107
|
-
pointerLeftClickHandler: () => void;
|
|
126
|
+
pointerLeftClickHandler: (evt: MouseEvent) => void;
|
|
108
127
|
pointerRightClickHandler: (e: any) => void;
|
|
109
128
|
pointerMiddleClickHandler: (e: any) => void;
|
|
110
|
-
constructor(config: Config, router: Router, activeRoute: ActivatedRoute, visibilityService: BaseVisibilityService, ngZone: NgZone);
|
|
129
|
+
constructor(config: Config, router: Router, activeRoute: ActivatedRoute, visibilityService: BaseVisibilityService, ngZone: NgZone, measurementService: MatterportMeasurementService, navigationService: MatterportNavigationService, pointerService: MatterportPointerService, object3DService: MatterportObject3DService, matterportTagService: MatterportTagService);
|
|
111
130
|
/**
|
|
112
|
-
* Initializes Matterport and
|
|
113
|
-
* @param tagService
|
|
114
|
-
* @param module
|
|
115
|
-
* @returns
|
|
131
|
+
* Initializes the Matterport SDK, sets up event listeners, and configures assets.
|
|
132
|
+
* @param tagService Service used to generate and inject HTML into tags.
|
|
133
|
+
* @param module Application module (e.g., IMMO, MUSEUM) to enable specific features.
|
|
134
|
+
* @returns Promise resolving to true when initialization is complete.
|
|
116
135
|
*/
|
|
117
136
|
initSdk(tagService: BaseTagService, module?: SpModule): Promise<boolean>;
|
|
137
|
+
getSweepUUIDForSid(sid: string): string | null;
|
|
118
138
|
setLightingOff(): void;
|
|
119
|
-
pointToString(point: {
|
|
120
|
-
x: number;
|
|
121
|
-
y: number;
|
|
122
|
-
z: number;
|
|
123
|
-
}): string;
|
|
124
|
-
/**
|
|
125
|
-
* Callback after measurement is performed
|
|
126
|
-
*/
|
|
127
139
|
getDistanceForLastMeasurement(): void;
|
|
128
140
|
getLastDistances(): number[];
|
|
129
141
|
/**
|
|
@@ -133,10 +145,17 @@ export declare class MatterportService {
|
|
|
133
145
|
takeScreenShot(): Promise<any>;
|
|
134
146
|
getScreenShotUri(): any;
|
|
135
147
|
getLastMeasurement(): Object;
|
|
148
|
+
private getFloorIdForTag;
|
|
136
149
|
/**
|
|
137
150
|
* Styling of pointer
|
|
138
151
|
*/
|
|
139
152
|
updatePointerTrick(): void;
|
|
153
|
+
/**
|
|
154
|
+
* Triggers a tag visibility refresh based on current camera mode, floor and sweep.
|
|
155
|
+
* Delegates all logic to MatterportTagService.updateTagsVisibilityForContext().
|
|
156
|
+
* Called automatically on Mode, Sweep, Floor and Room changes.
|
|
157
|
+
*/
|
|
158
|
+
refreshTagsVisibility(): void;
|
|
140
159
|
/**
|
|
141
160
|
* Realtime mattertag following the cursor
|
|
142
161
|
* @param mattertag string
|
|
@@ -149,51 +168,31 @@ export declare class MatterportService {
|
|
|
149
168
|
* @param pos2
|
|
150
169
|
*/
|
|
151
170
|
getDistPosition(pos1: any, pos2: any): number;
|
|
152
|
-
/**
|
|
153
|
-
* Creates the Mattertag that will follow the cursor
|
|
154
|
-
* @param mattertagData MattertagData
|
|
155
|
-
*/
|
|
171
|
+
/** Creates a temporary Mattertag that follows the user's cursor for positioning. */
|
|
156
172
|
addCursorMattertag(mattertagData: MattertagData): Promise<void>;
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
* (position, injected html, set icon)
|
|
160
|
-
* @param mattertagData
|
|
161
|
-
* returns mattertagID
|
|
162
|
-
*/
|
|
173
|
+
get tagAddQueue(): Promise<any>;
|
|
174
|
+
set tagAddQueue(value: Promise<any>);
|
|
163
175
|
addMattertagToViewer(mattertagData: MattertagData): Promise<string | null>;
|
|
164
|
-
/**
|
|
165
|
-
* Actions when position of mattertag is validated by left click
|
|
166
|
-
*/
|
|
176
|
+
/** Triggers callback actions after a tag's position is validated by a left click. */
|
|
167
177
|
onValidatedMattertag(): void;
|
|
168
|
-
/**
|
|
169
|
-
* Registers new icon (path to image) and set its for Mattertag
|
|
170
|
-
* @param mattertagID string
|
|
171
|
-
* @param iconPath string
|
|
172
|
-
*/
|
|
178
|
+
/** Registers a new icon texture and applies it to a specific Mattertag. */
|
|
173
179
|
addNewIconAndSetForTag(mattertagID: string, iconPath: string): Promise<void>;
|
|
174
|
-
/**
|
|
175
|
-
* Changes icon of Mattertag (the iconName should be registered = one of default ones)
|
|
176
|
-
* @param mattertagID string
|
|
177
|
-
* @param iconName string
|
|
178
|
-
*/
|
|
180
|
+
/** Applies a pre-registered icon to a Mattertag. */
|
|
179
181
|
setRegistredIconForTag(mattertagID: string, iconName: string): Promise<void>;
|
|
180
|
-
/**
|
|
181
|
-
* Sets default icon for a tag (registered in initSdk) OR uses tagIcon from POI (available from MattertagData)
|
|
182
|
-
* @param mattertagID string
|
|
183
|
-
* @param mattertagData MattertagData
|
|
184
|
-
* @returns
|
|
185
|
-
*/
|
|
182
|
+
/** Sets the appropriate icon and opacity for a tag based on its type and POI metadata. */
|
|
186
183
|
setTagIconAndOpacity(mattertagID: string, mattertagData: MattertagData): Promise<void>;
|
|
187
|
-
/**
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
goToLastTag(): void;
|
|
191
|
-
/**
|
|
192
|
-
* Moves viewer to Mattertag with ID provided
|
|
193
|
-
* @param mattertagID string
|
|
194
|
-
* @returns
|
|
195
|
-
*/
|
|
184
|
+
/** Navigates the camera to the most recently created tag. */
|
|
185
|
+
goToLastTag(): Promise<void>;
|
|
186
|
+
/** Navigates the camera to a specific Mattertag by its ID. */
|
|
196
187
|
goToTag(mattertagID: string): Promise<void>;
|
|
188
|
+
/**
|
|
189
|
+
* Computes the context-aware opacity for a single tag at the moment it is rendered.
|
|
190
|
+
* - Cursor tag: always use provided defaultOpacity.
|
|
191
|
+
* - DOLLHOUSE / FLOORPLAN: 0 (hidden).
|
|
192
|
+
* - INSIDE: floor-filtered proximity opacity via MatterportTagService.
|
|
193
|
+
* - Other / unknown: defaultOpacity.
|
|
194
|
+
*/
|
|
195
|
+
private addCustomCss;
|
|
197
196
|
/**
|
|
198
197
|
* Updates content of Mattertag with mattertagID (billboard, injected html, tag icon)
|
|
199
198
|
* @param mattertagID string
|
|
@@ -216,7 +215,7 @@ export declare class MatterportService {
|
|
|
216
215
|
/**
|
|
217
216
|
* Deletes latest created mattertag
|
|
218
217
|
*/
|
|
219
|
-
deleteLastMattertag(): void
|
|
218
|
+
deleteLastMattertag(): Promise<void>;
|
|
220
219
|
/**
|
|
221
220
|
* Legacy: used to be called action_add_mattertag_from_POI
|
|
222
221
|
* Adds and configures Mattertag for an object (Ticket, Equipment, Feature, etc) that corresponds to POI (coordinates, tagIcon)
|
|
@@ -238,7 +237,7 @@ export declare class MatterportService {
|
|
|
238
237
|
* Deletes Mattertag from visit associated with object ID (ticketID, etc)
|
|
239
238
|
* @param elementID string
|
|
240
239
|
*/
|
|
241
|
-
deleteMattertagForObject(elementID: string): Promise<
|
|
240
|
+
deleteMattertagForObject(elementID: string): Promise<any>;
|
|
242
241
|
/**
|
|
243
242
|
* uuid from threejs
|
|
244
243
|
* @param uuid
|
|
@@ -306,7 +305,7 @@ export declare class MatterportService {
|
|
|
306
305
|
action_go_to_sweep(sweep: string, rotation?: {
|
|
307
306
|
x: number;
|
|
308
307
|
y: number;
|
|
309
|
-
}): Promise<void>;
|
|
308
|
+
} | null): Promise<void>;
|
|
310
309
|
getCurrentSweep(): string | null;
|
|
311
310
|
getCurrentCameraPosition(): {
|
|
312
311
|
rotation: any;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
|
|
2
|
-
import { Subject } from 'rxjs';
|
|
2
|
+
import { BehaviorSubject, Subject } from 'rxjs';
|
|
3
3
|
import { MattertagData } from '../../mattertagData';
|
|
4
4
|
import { Note, Zone, Equipment, EquipmentDocument, Ticket, TypeNote, Mission, Operation, POI } from '../../types.service';
|
|
5
5
|
import { FilterService } from '../filter.service';
|
|
@@ -31,7 +31,7 @@ export declare class EquipmentService extends BaseObjectService {
|
|
|
31
31
|
space: Equipment[];
|
|
32
32
|
zonesMap: Map<string, Equipment[]>;
|
|
33
33
|
};
|
|
34
|
-
equipmentsTags:
|
|
34
|
+
equipmentsTags: BehaviorSubject<Equipment[]>;
|
|
35
35
|
zoneIDFilter: string;
|
|
36
36
|
currentZone: Zone;
|
|
37
37
|
currentSpaceID: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Subject } from "rxjs";
|
|
1
|
+
import { BehaviorSubject, Subject } from "rxjs";
|
|
2
2
|
import { MattertagData } from "../../mattertagData";
|
|
3
3
|
import { Feature, Hashtag, POI, Event } from "../../types.service";
|
|
4
4
|
import { FilterService } from "../filter.service";
|
|
@@ -27,7 +27,7 @@ export declare class FeatureService extends BaseObjectService {
|
|
|
27
27
|
space: Feature[];
|
|
28
28
|
zone: Feature[];
|
|
29
29
|
};
|
|
30
|
-
featureTags:
|
|
30
|
+
featureTags: BehaviorSubject<Feature[]>;
|
|
31
31
|
featureFiltered: Feature[];
|
|
32
32
|
updateDone: Subject<boolean>;
|
|
33
33
|
zoneIDFilter: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Subject } from 'rxjs';
|
|
1
|
+
import { BehaviorSubject, Subject } from 'rxjs';
|
|
2
2
|
import { Measurement, Comment, Zone } from '../../types.service';
|
|
3
3
|
import { FilterService } from '../filter.service';
|
|
4
4
|
import { NavigatorService } from '../navigator.service';
|
|
@@ -21,7 +21,7 @@ export declare class MeasurementService {
|
|
|
21
21
|
space: Measurement[];
|
|
22
22
|
zone: Measurement[];
|
|
23
23
|
};
|
|
24
|
-
measurementsTags:
|
|
24
|
+
measurementsTags: BehaviorSubject<Comment[]>;
|
|
25
25
|
measurementsUpdated: Subject<{
|
|
26
26
|
space: Measurement[];
|
|
27
27
|
zone: Measurement[];
|