@wovvmap/renderer-three 0.0.0-stage → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/controllers/ImageController.d.ts +95 -0
- package/dist/controllers/ImageController.d.ts.map +1 -0
- package/dist/controllers/ImageController.js +129 -0
- package/dist/controllers/ShapeController.d.ts +95 -0
- package/dist/controllers/ShapeController.d.ts.map +1 -0
- package/dist/controllers/ShapeController.js +139 -0
- package/dist/controllers/TextController.d.ts +120 -0
- package/dist/controllers/TextController.d.ts.map +1 -0
- package/dist/controllers/TextController.js +161 -0
- package/dist/controllers/ViewerElementsController.d.ts +254 -0
- package/dist/controllers/ViewerElementsController.d.ts.map +1 -0
- package/dist/controllers/ViewerElementsController.js +490 -0
- package/dist/engine/CameraFollow.d.ts +13 -0
- package/dist/engine/CameraFollow.d.ts.map +1 -0
- package/dist/engine/CameraFollow.js +52 -0
- package/dist/engine/CameraManager.d.ts +143 -0
- package/dist/engine/CameraManager.d.ts.map +1 -0
- package/dist/engine/CameraManager.js +566 -0
- package/dist/engine/ControlsManager.d.ts +123 -0
- package/dist/engine/ControlsManager.d.ts.map +1 -0
- package/dist/engine/ControlsManager.js +604 -0
- package/dist/engine/InteractionManager.d.ts +45 -0
- package/dist/engine/InteractionManager.d.ts.map +1 -0
- package/dist/engine/InteractionManager.js +99 -0
- package/dist/engine/LightingManager.d.ts +25 -0
- package/dist/engine/LightingManager.d.ts.map +1 -0
- package/dist/engine/LightingManager.js +74 -0
- package/dist/engine/MapViewerEngine.d.ts +350 -0
- package/dist/engine/MapViewerEngine.d.ts.map +1 -0
- package/dist/engine/MapViewerEngine.js +1041 -0
- package/dist/engine/RendererManager.d.ts +77 -0
- package/dist/engine/RendererManager.d.ts.map +1 -0
- package/dist/engine/RendererManager.js +243 -0
- package/dist/index.d.ts +40 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +39 -0
- package/dist/services/image-services/ImageCacheService.d.ts +49 -0
- package/dist/services/image-services/ImageCacheService.d.ts.map +1 -0
- package/dist/services/image-services/ImageCacheService.js +121 -0
- package/dist/services/image-services/ImagePlaneService.d.ts +29 -0
- package/dist/services/image-services/ImagePlaneService.d.ts.map +1 -0
- package/dist/services/image-services/ImagePlaneService.js +82 -0
- package/dist/services/image-services/ImageService.d.ts +170 -0
- package/dist/services/image-services/ImageService.d.ts.map +1 -0
- package/dist/services/image-services/ImageService.js +537 -0
- package/dist/services/image-services/ImageSpriteService.d.ts +39 -0
- package/dist/services/image-services/ImageSpriteService.d.ts.map +1 -0
- package/dist/services/image-services/ImageSpriteService.js +135 -0
- package/dist/services/routes/RouteArrows.d.ts +34 -0
- package/dist/services/routes/RouteArrows.d.ts.map +1 -0
- package/dist/services/routes/RouteArrows.js +157 -0
- package/dist/services/routes/RouteCursor.d.ts +19 -0
- package/dist/services/routes/RouteCursor.d.ts.map +1 -0
- package/dist/services/routes/RouteCursor.js +68 -0
- package/dist/services/routes/RouteMotion.d.ts +31 -0
- package/dist/services/routes/RouteMotion.d.ts.map +1 -0
- package/dist/services/routes/RouteMotion.js +132 -0
- package/dist/services/routes/RouteRenderer.d.ts +52 -0
- package/dist/services/routes/RouteRenderer.d.ts.map +1 -0
- package/dist/services/routes/RouteRenderer.js +445 -0
- package/dist/services/routes/RouteStepHighlight.d.ts +22 -0
- package/dist/services/routes/RouteStepHighlight.d.ts.map +1 -0
- package/dist/services/routes/RouteStepHighlight.js +84 -0
- package/dist/services/routes/routeMarkers.d.ts +6 -0
- package/dist/services/routes/routeMarkers.d.ts.map +1 -0
- package/dist/services/routes/routeMarkers.js +41 -0
- package/dist/services/selectionPaint.d.ts +12 -0
- package/dist/services/selectionPaint.d.ts.map +1 -0
- package/dist/services/selectionPaint.js +8 -0
- package/dist/services/shape-services/ExtrudeShapeService.d.ts +54 -0
- package/dist/services/shape-services/ExtrudeShapeService.d.ts.map +1 -0
- package/dist/services/shape-services/ExtrudeShapeService.js +204 -0
- package/dist/services/shape-services/FlatShapeService.d.ts +25 -0
- package/dist/services/shape-services/FlatShapeService.d.ts.map +1 -0
- package/dist/services/shape-services/FlatShapeService.js +49 -0
- package/dist/services/shape-services/IShapeService.d.ts +24 -0
- package/dist/services/shape-services/IShapeService.d.ts.map +1 -0
- package/dist/services/shape-services/IShapeService.js +6 -0
- package/dist/services/shape-services/MaterialUtils.d.ts +15 -0
- package/dist/services/shape-services/MaterialUtils.d.ts.map +1 -0
- package/dist/services/shape-services/MaterialUtils.js +71 -0
- package/dist/services/shape-services/ShapeFactory.d.ts +20 -0
- package/dist/services/shape-services/ShapeFactory.d.ts.map +1 -0
- package/dist/services/shape-services/ShapeFactory.js +28 -0
- package/dist/services/shape-services/ShapeHighlightService.d.ts +13 -0
- package/dist/services/shape-services/ShapeHighlightService.d.ts.map +1 -0
- package/dist/services/shape-services/ShapeHighlightService.js +57 -0
- package/dist/services/shape-services/ShapeService.d.ts +129 -0
- package/dist/services/shape-services/ShapeService.d.ts.map +1 -0
- package/dist/services/shape-services/ShapeService.js +480 -0
- package/dist/services/shape-services/preparedGeometry.d.ts +13 -0
- package/dist/services/shape-services/preparedGeometry.d.ts.map +1 -0
- package/dist/services/shape-services/preparedGeometry.js +37 -0
- package/dist/services/text-services/ITextRenderStrategy.d.ts +79 -0
- package/dist/services/text-services/ITextRenderStrategy.d.ts.map +1 -0
- package/dist/services/text-services/ITextRenderStrategy.js +7 -0
- package/dist/services/text-services/Text2DService.d.ts +66 -0
- package/dist/services/text-services/Text2DService.d.ts.map +1 -0
- package/dist/services/text-services/Text2DService.js +483 -0
- package/dist/services/text-services/Text3DService.d.ts +51 -0
- package/dist/services/text-services/Text3DService.d.ts.map +1 -0
- package/dist/services/text-services/Text3DService.js +246 -0
- package/dist/services/text-services/TextCollisionService.d.ts +29 -0
- package/dist/services/text-services/TextCollisionService.d.ts.map +1 -0
- package/dist/services/text-services/TextCollisionService.js +117 -0
- package/dist/services/text-services/TextService.d.ts +159 -0
- package/dist/services/text-services/TextService.d.ts.map +1 -0
- package/dist/services/text-services/TextService.js +398 -0
- package/dist/services/text-services/TextStrategyRegistry.d.ts +36 -0
- package/dist/services/text-services/TextStrategyRegistry.d.ts.map +1 -0
- package/dist/services/text-services/TextStrategyRegistry.js +44 -0
- package/dist/services/threeDisposeHelper.d.ts +12 -0
- package/dist/services/threeDisposeHelper.d.ts.map +1 -0
- package/dist/services/threeDisposeHelper.js +57 -0
- package/package.json +40 -3
- package/README.md +0 -3
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { TextService } from '../services/text-services/TextService.js';
|
|
2
|
+
/**
|
|
3
|
+
* Controller facade managing Three.js text labels (2D DOM / 3D Troika mesh) and camera collision decluttering.
|
|
4
|
+
* Maintains symmetric method signatures with ShapeController and ImageController.
|
|
5
|
+
*
|
|
6
|
+
* Three.js 2D/3D text labels aur collision ko manage karne wala controller facade.
|
|
7
|
+
*/
|
|
8
|
+
export class TextController {
|
|
9
|
+
textService;
|
|
10
|
+
constructor(textService) {
|
|
11
|
+
this.textService = textService || new TextService();
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Sets callback to trigger redraw when asynchronous text assets or flips occur.
|
|
15
|
+
* Asynchronous text assets sync hone par redraw trigger karne wala callback.
|
|
16
|
+
*/
|
|
17
|
+
setOnInvalidate(callback) {
|
|
18
|
+
this.textService.setOnInvalidate(callback);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Returns currently active text rendering type ('2D' or '3D').
|
|
22
|
+
* Active text type ('2D' ya '3D') prapt karein.
|
|
23
|
+
*/
|
|
24
|
+
getTextType() {
|
|
25
|
+
return this.textService.getTextType();
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Switches active text rendering type ('2D' or '3D').
|
|
29
|
+
* Active text type ('2D' ya '3D') set karein.
|
|
30
|
+
*/
|
|
31
|
+
setTextType(type) {
|
|
32
|
+
this.textService.setTextType(type);
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Constructs a text label for a node point.
|
|
36
|
+
* Node point ke liye text label create karein.
|
|
37
|
+
*/
|
|
38
|
+
createText(node, options) {
|
|
39
|
+
return this.textService.createText(node, options);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Retrieves floor-level container group for text labels.
|
|
43
|
+
* Floor level ke sabhi text labels ka container group prapt karein.
|
|
44
|
+
*/
|
|
45
|
+
getFloorTexts(z) {
|
|
46
|
+
return this.textService.getFloorTexts(z);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Convenience alias matching getFloorWiseShapes / getFloorWiseImages.
|
|
50
|
+
* getFloorTexts ka alias method.
|
|
51
|
+
*/
|
|
52
|
+
getFloorWiseTexts(z) {
|
|
53
|
+
return this.textService.getFloorWiseTexts(z);
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Returns all text label objects across all floors.
|
|
57
|
+
* Sabhi active text label objects ki array prapt karein.
|
|
58
|
+
*/
|
|
59
|
+
getAllTexts() {
|
|
60
|
+
return this.textService.getAllTexts();
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Looks up a text label object by node key.
|
|
64
|
+
* Unique key se specific text label dhoondein.
|
|
65
|
+
*/
|
|
66
|
+
getTextByKey(key) {
|
|
67
|
+
return this.textService.getTextByKey(key);
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Removes a text label and safely disposes its resources.
|
|
71
|
+
* Text label ko remove aur clean karein.
|
|
72
|
+
*/
|
|
73
|
+
removeText(key) {
|
|
74
|
+
return this.textService.removeText(key);
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Sets floor height scale across view modes (2D, 3D, or future custom modes).
|
|
78
|
+
* Mode ke aadhar par floor text labels ki vertical height set karein.
|
|
79
|
+
*/
|
|
80
|
+
setFloorScale(z, mode = '3D', depthConfig, animate = false, onUpdate, durationMs = 400, onComplete) {
|
|
81
|
+
const group = this.getFloorTexts(z);
|
|
82
|
+
if (group) {
|
|
83
|
+
if (animate) {
|
|
84
|
+
this.textService.animateViewModeToGroup(group, mode, depthConfig, onUpdate, durationMs, onComplete);
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
this.textService.applyViewModeToGroup(group, mode, depthConfig);
|
|
88
|
+
if (onComplete)
|
|
89
|
+
onComplete();
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
if (onComplete)
|
|
94
|
+
onComplete();
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Updates camera-driven label collision culling and auto-decluttering.
|
|
99
|
+
* Camera position ke mutabik labels ko auto-declutter karein.
|
|
100
|
+
*/
|
|
101
|
+
updateCollision(camera, activeFloor) {
|
|
102
|
+
this.textService.updateCollision(camera, activeFloor);
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Toggles visibility across all floor-level text label groups.
|
|
106
|
+
* Sabhi floor text label groups ki visibility toggle karein.
|
|
107
|
+
*/
|
|
108
|
+
toggleLabels(visible) {
|
|
109
|
+
this.textService.toggleLabels(visible);
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Updates text colors across active 3D Troika mesh labels.
|
|
113
|
+
* 3D text labels ka color update karein.
|
|
114
|
+
*/
|
|
115
|
+
updateTextColors(colorOrMap) {
|
|
116
|
+
this.textService.updateTextColors(colorOrMap);
|
|
117
|
+
}
|
|
118
|
+
/** Paint one selected label without rebuilding its text or changing visibility.
|
|
119
|
+
* Hinglish: Sirf purana/naya selected label badle; text geometry aur visibility same rahe. */
|
|
120
|
+
setSelection(key, colors) {
|
|
121
|
+
this.textService.setSelection(key, colors);
|
|
122
|
+
}
|
|
123
|
+
/** Project canonical selected keys without changing text geometry or layer visibility.
|
|
124
|
+
* Hinglish: Selected keys ka rang lagayein; text geometry aur hidden layers same rahein. */
|
|
125
|
+
setSelectionKeys(keys, colors) {
|
|
126
|
+
this.textService.setSelectionKeys(keys, colors);
|
|
127
|
+
}
|
|
128
|
+
/** Delegate resolved renderer paint to its existing feature owner.
|
|
129
|
+
* Hinglish: Resolved paint existing text service lagaye; role logic repeat nahi. */
|
|
130
|
+
setSelectionPaint(paint) {
|
|
131
|
+
this.textService.setSelectionPaint(paint);
|
|
132
|
+
}
|
|
133
|
+
updateTextRotation(rotation, activeFloor) {
|
|
134
|
+
this.textService.updateTextRotation(rotation, activeFloor);
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Schedules or executes text collision check.
|
|
138
|
+
* Compatibility facade delegating directly to updateCollision.
|
|
139
|
+
*
|
|
140
|
+
* Collision resolution execute karne wala facade method jo direct updateCollision ko delegate karta hai.
|
|
141
|
+
*/
|
|
142
|
+
scheduleCollision(camera, activeFloor) {
|
|
143
|
+
if (camera) {
|
|
144
|
+
this.updateCollision(camera, activeFloor);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Cleans and disposes all text labels, floor groups, and DOM elements.
|
|
149
|
+
* Sabhi labels aur DOM elements clear karein.
|
|
150
|
+
*/
|
|
151
|
+
clear() {
|
|
152
|
+
this.textService.clear();
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Cleans up orphaned DOM elements from the document tree.
|
|
156
|
+
* DOM tree se orphaned label elements remove karein.
|
|
157
|
+
*/
|
|
158
|
+
cleanupTextDOM() {
|
|
159
|
+
this.textService.cleanupTextDOM();
|
|
160
|
+
}
|
|
161
|
+
}
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file ViewerElementsController.ts
|
|
3
|
+
* @description Unified facade controller orchestrating Shapes, Images, and Text labels.
|
|
4
|
+
* Shapes, images aur text controllers ko ek sath coordinate karne wala unified facade controller.
|
|
5
|
+
*/
|
|
6
|
+
import type * as THREE from 'three';
|
|
7
|
+
import type { NodePoint, DynamicDepthConfig, MapViewMode, MapTheme, shapeDetail } from '@wovvmap/contracts';
|
|
8
|
+
import { ShapeController } from './ShapeController.js';
|
|
9
|
+
import { ImageController } from './ImageController.js';
|
|
10
|
+
import { TextController, type TextType } from './TextController.js';
|
|
11
|
+
export interface CreateElementsOptions {
|
|
12
|
+
depthConfig?: Partial<DynamicDepthConfig>;
|
|
13
|
+
viewMode?: MapViewMode;
|
|
14
|
+
forceCreateText?: boolean;
|
|
15
|
+
onInvalidate?: () => void;
|
|
16
|
+
theme?: MapTheme | string;
|
|
17
|
+
themeColor?: string;
|
|
18
|
+
themeColors?: Record<string, string>;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Orchestrates 3D store meshes, brand logo planes, transit sprites, and text labels (2D DOM / 3D Troika mesh).
|
|
22
|
+
* Maintains exact legacy parity with wovvmap_frontend ViewerElementsController while adhering to SOLID principles.
|
|
23
|
+
*
|
|
24
|
+
* Map ke 3D unit meshes, store logos aur text labels ko build aur coordinate karta hai.
|
|
25
|
+
*/
|
|
26
|
+
export declare class ViewerElementsController {
|
|
27
|
+
readonly shapeController: ShapeController;
|
|
28
|
+
readonly imageController: ImageController;
|
|
29
|
+
readonly textController: TextController;
|
|
30
|
+
private onInvalidate?;
|
|
31
|
+
private currentTheme;
|
|
32
|
+
private selectedNodeKeys;
|
|
33
|
+
private originNodeKeys;
|
|
34
|
+
private destinationNodeKeys;
|
|
35
|
+
private selectionPaint;
|
|
36
|
+
constructor(shapeController?: ShapeController, imageController?: ImageController, textController?: TextController, theme?: MapTheme | string);
|
|
37
|
+
/**
|
|
38
|
+
* Sets callback to trigger engine redraw when asynchronous assets (logos, 3D text) sync.
|
|
39
|
+
* Asynchronous assets sync hone par redraw trigger karne wala callback.
|
|
40
|
+
*/
|
|
41
|
+
setOnInvalidate(callback?: () => void): void;
|
|
42
|
+
/** Normal selection is a renderer projection; the SDK remains the selected-node owner.
|
|
43
|
+
* Hinglish: Renderer sirf selected key ka paint rakhta hai; domain selection SDK ki hi hai. */
|
|
44
|
+
setSelection(key: string | null): boolean;
|
|
45
|
+
/** Membership is renderer projection only; canonical group resolution remains in the SDK.
|
|
46
|
+
* Hinglish: Renderer sirf mili hui keys paint kare; group kaun sa hai ye SDK hi decide kare. */
|
|
47
|
+
setSelectionKeys(keys: readonly string[]): boolean;
|
|
48
|
+
/** Project endpoint roles without mutating ordinary selection, layer visibility or camera state.
|
|
49
|
+
* Hinglish: Start/end ka paint alag roles se aaye; normal selection, visibility aur camera na badlein. */
|
|
50
|
+
setEndpointSelectionKeys(origin: readonly string[], destination: readonly string[]): boolean;
|
|
51
|
+
private applySelection;
|
|
52
|
+
/**
|
|
53
|
+
* Switches active text label type ('2D' or '3D') across the text controller.
|
|
54
|
+
* Text label type ('2D' ya '3D') set karein.
|
|
55
|
+
*/
|
|
56
|
+
setTextType(type: TextType): void;
|
|
57
|
+
/**
|
|
58
|
+
* Returns current active text label type ('2D' or '3D').
|
|
59
|
+
* Active text label type prapt karein.
|
|
60
|
+
*/
|
|
61
|
+
getTextType(): TextType;
|
|
62
|
+
/**
|
|
63
|
+
* Determines whether a node point should generate a text label.
|
|
64
|
+
* If a point has brand images, it renders the logo plane instead of text by default.
|
|
65
|
+
*
|
|
66
|
+
* Node point ke liye text label banana chahiye ya logo plane render hoga.
|
|
67
|
+
*/
|
|
68
|
+
shouldCreateText(node: NodePoint, forceCreateText?: boolean): boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Builds the 3D unit mesh, brand logo plane / icon sprite, and text label for a node point.
|
|
71
|
+
* Ek node point ke liye shape, logo aur text label create karein.
|
|
72
|
+
*/
|
|
73
|
+
createElements(node: NodePoint, mallId?: string, options?: CreateElementsOptions): void;
|
|
74
|
+
/**
|
|
75
|
+
* Retrieves floor-level group for all 3D shapes.
|
|
76
|
+
* Kisi floor ke sabhi shapes ka container group prapt karein.
|
|
77
|
+
*/
|
|
78
|
+
getFloorWiseShapes(z: number): THREE.Group | undefined;
|
|
79
|
+
/**
|
|
80
|
+
* Returns all shape objects generated across all floors.
|
|
81
|
+
* Sabhi shapes ki array prapt karein.
|
|
82
|
+
*/
|
|
83
|
+
getAllShapes(): THREE.Object3D[];
|
|
84
|
+
/**
|
|
85
|
+
* Looks up a specific 3D shape mesh by its unique key.
|
|
86
|
+
* Unique key se specific store shape dhoondein.
|
|
87
|
+
*/
|
|
88
|
+
getShapeByKey(key: string): THREE.Object3D | undefined;
|
|
89
|
+
/**
|
|
90
|
+
* Removes a specific shape and cleans its WebGL memory.
|
|
91
|
+
* Shape ko delete aur memory free karein.
|
|
92
|
+
*/
|
|
93
|
+
removeShape(id: string): boolean;
|
|
94
|
+
/**
|
|
95
|
+
* Retrieves floor-level group for all brand logo planes and transit sprites.
|
|
96
|
+
* Kisi floor ke sabhi images ka container group prapt karein.
|
|
97
|
+
*/
|
|
98
|
+
getFloorWiseImages(z: number): THREE.Group | undefined;
|
|
99
|
+
/**
|
|
100
|
+
* Returns all image objects across all floors.
|
|
101
|
+
* Sabhi active image objects ki array prapt karein.
|
|
102
|
+
*/
|
|
103
|
+
getAllImages(): THREE.Object3D[];
|
|
104
|
+
/**
|
|
105
|
+
* Looks up an image object by node key.
|
|
106
|
+
* Unique key se specific image dhoondein.
|
|
107
|
+
*/
|
|
108
|
+
getImageByKey(key: string): THREE.Object3D | undefined;
|
|
109
|
+
/**
|
|
110
|
+
* Removes an image and releases its memory.
|
|
111
|
+
* Image ko remove karein.
|
|
112
|
+
*/
|
|
113
|
+
removeImage(id: string): boolean;
|
|
114
|
+
/**
|
|
115
|
+
* Flips planar roof logos horizontally when camera rotation is inverted to keep text readable.
|
|
116
|
+
* Camera rotation ke according store logos ko flip karein taaki text ulta na dikhe.
|
|
117
|
+
*/
|
|
118
|
+
updateImageRotation(rotation: number, activeFloor?: number): void;
|
|
119
|
+
/**
|
|
120
|
+
* Retrieves floor-level group for all text objects.
|
|
121
|
+
* Kisi floor ke sabhi text labels ka container group prapt karein.
|
|
122
|
+
*/
|
|
123
|
+
getFloorWiseTexts(z: number): THREE.Group | undefined;
|
|
124
|
+
/**
|
|
125
|
+
* Returns all text label objects across all floors.
|
|
126
|
+
* Sabhi active text label objects prapt karein.
|
|
127
|
+
*/
|
|
128
|
+
getAllTexts(): THREE.Object3D[];
|
|
129
|
+
/**
|
|
130
|
+
* Looks up a text label object by node key.
|
|
131
|
+
* Unique key se text label dhoondein.
|
|
132
|
+
*/
|
|
133
|
+
getTextByKey(key: string): THREE.Object3D | undefined;
|
|
134
|
+
/**
|
|
135
|
+
* Removes a text label and disposes its resources.
|
|
136
|
+
* Text label ko remove aur clean karein.
|
|
137
|
+
*/
|
|
138
|
+
removeText(id: string): boolean;
|
|
139
|
+
/**
|
|
140
|
+
* Checks all texts to see if they overlap heavily on screen relative to camera view.
|
|
141
|
+
* Camera frustum ke mutabik labels ko auto-declutter karein.
|
|
142
|
+
*/
|
|
143
|
+
updateTextCollision(camera: THREE.Camera, activeFloor?: number): void;
|
|
144
|
+
/**
|
|
145
|
+
* Schedules or executes text collision check.
|
|
146
|
+
* Text collision resolution run karne wala delegate method.
|
|
147
|
+
*/
|
|
148
|
+
scheduleTextCollision(camera: THREE.Camera | undefined, activeFloor?: number): void;
|
|
149
|
+
/**
|
|
150
|
+
* Utility facade to update both camera rotation and collision synchronously.
|
|
151
|
+
* Camera rotation update hone par logos aur 3D text flip karein.
|
|
152
|
+
*/
|
|
153
|
+
updateCameraRotation(rotation: number, activeFloor?: number): void;
|
|
154
|
+
/**
|
|
155
|
+
* Destroys existing text labels and regenerates them from a node collection.
|
|
156
|
+
* Sabhi text labels ko dubara generate karein.
|
|
157
|
+
*/
|
|
158
|
+
regenerateAllTexts(nodeMap: Map<string, NodePoint> | Record<string, NodePoint> | NodePoint[], mallId?: string, options?: CreateElementsOptions): void;
|
|
159
|
+
/**
|
|
160
|
+
* Safely disposes and removes lingering CSS2D DOM elements on floor switch.
|
|
161
|
+
* Floor switch hone par ghost HTML text divs ko document se clean karein.
|
|
162
|
+
*/
|
|
163
|
+
cleanupTextDOM(): void;
|
|
164
|
+
/**
|
|
165
|
+
* Updates material and colors for a specific store shape.
|
|
166
|
+
* Kisi specific shape ka theme color update karein.
|
|
167
|
+
*/
|
|
168
|
+
updateNodeTheme(key: string, shapeDetail: shapeDetail): void;
|
|
169
|
+
/**
|
|
170
|
+
* Iterates through shapes and updates materials based on the active theme.
|
|
171
|
+
* Sabhi shapes aur icon badges ka theme color update karein.
|
|
172
|
+
*/
|
|
173
|
+
updateAllThemes(nodeMap?: Map<string, NodePoint> | Record<string, NodePoint>, tintColor?: string): void;
|
|
174
|
+
/**
|
|
175
|
+
* Updates map theme across shapes, images, and text labels.
|
|
176
|
+
* English: Propagates current theme configuration to shape, image, and text controllers.
|
|
177
|
+
* Hinglish: Map theme ko elements controller ke zariye shapes, images aur text labels me apply karein.
|
|
178
|
+
*/
|
|
179
|
+
setTheme(theme: MapTheme | string): void;
|
|
180
|
+
/**
|
|
181
|
+
* Updates anchor store gradient fill colors.
|
|
182
|
+
* English: Updates gradient colors used to highlight anchor retail stores.
|
|
183
|
+
* Hinglish: Anchor retail stores ke liye gradient colors update karein.
|
|
184
|
+
*/
|
|
185
|
+
updateAnchorGradient(gradient?: [string, string]): void;
|
|
186
|
+
/**
|
|
187
|
+
* Toggles visibility of 3D unit shape meshes.
|
|
188
|
+
* English: Toggles visibility for all unit shape meshes in the scene.
|
|
189
|
+
* Hinglish: Sabhi unit shape meshes ki visibility toggle karein.
|
|
190
|
+
*/
|
|
191
|
+
toggleShapes(visible: boolean): void;
|
|
192
|
+
/**
|
|
193
|
+
* Toggles visibility of 2D DOM and 3D Troika text labels across all floors.
|
|
194
|
+
* English: Toggles visibility for all store text label groups across floors.
|
|
195
|
+
* Hinglish: Sabhi floors ke store text labels ki visibility toggle karein.
|
|
196
|
+
*/
|
|
197
|
+
toggleLabels(visible: boolean): void;
|
|
198
|
+
/**
|
|
199
|
+
* Updates text label colors globally or on a per-type basis.
|
|
200
|
+
* English: Updates 3D Troika mesh text colors globally or per unit category.
|
|
201
|
+
* Hinglish: Text labels ke rang globally ya per-unit type ke mutabik update karein.
|
|
202
|
+
*/
|
|
203
|
+
updateTextColors(colorOrMap?: string | number | Record<string, string | number>): void;
|
|
204
|
+
/**
|
|
205
|
+
* Updates custom per-unit shape colors.
|
|
206
|
+
* English: Applies customized fill colors to individual store shapes by node key.
|
|
207
|
+
* Hinglish: Specific store shapes ke liye custom colors map apply karein.
|
|
208
|
+
*/
|
|
209
|
+
updateShapeColors(colorsMap?: Record<string, string>): void;
|
|
210
|
+
/**
|
|
211
|
+
* Updates stroke edge line color on unit shapes.
|
|
212
|
+
* English: Updates stroke line edge colors on extruded store shapes.
|
|
213
|
+
* Hinglish: Store shapes ke kinaro (edges) ka outline stroke color update karein.
|
|
214
|
+
*/
|
|
215
|
+
updateEdgeColor(color?: string): void;
|
|
216
|
+
/**
|
|
217
|
+
* Updates circular background badge colors on icon sprites.
|
|
218
|
+
* English: Sets sprite background badge colors globally or per transit/amenity type.
|
|
219
|
+
* Hinglish: Transit/amenity sprites ke background circular badge colors update karein.
|
|
220
|
+
*/
|
|
221
|
+
updateSpriteThemes(colorOrMap?: string | Record<string, string>): void;
|
|
222
|
+
/**
|
|
223
|
+
* Toggles visibility and filtering of logos and sprites.
|
|
224
|
+
* English: Toggles visibility and filter criteria for brand logos and amenity icon sprites.
|
|
225
|
+
* Hinglish: Brand logos aur amenity icon sprites ki visibility aur filters toggle karein.
|
|
226
|
+
*/
|
|
227
|
+
toggleImages(visible: boolean, filter?: {
|
|
228
|
+
showSprites?: boolean;
|
|
229
|
+
showLogos?: boolean;
|
|
230
|
+
filterTypes?: string[];
|
|
231
|
+
}): void;
|
|
232
|
+
/**
|
|
233
|
+
* Coordinates 2D vs. 3D depth scaling across shapes, images, and labels.
|
|
234
|
+
* 2D aur 3D mode switch hone par shapes, images aur text ki vertical height sync karein.
|
|
235
|
+
*/
|
|
236
|
+
setShapeScale(z: number, mode?: MapViewMode, depth2D?: number, depth3D?: number, floorBaseDepth?: number, animate?: boolean, onUpdate?: () => void, durationMs?: number, onComplete?: () => void): void;
|
|
237
|
+
/**
|
|
238
|
+
* Sets floor height scale across all elements using the active depth configuration.
|
|
239
|
+
* English: Synchronizes floor elevation scaling using configured 2D and 3D depth limits.
|
|
240
|
+
* Hinglish: Active depth configuration ke mutabik floor ke sabhi elements ki height scale karein.
|
|
241
|
+
*/
|
|
242
|
+
setFloorScale(z: number, mode?: MapViewMode, depthConfig?: Partial<DynamicDepthConfig>, animate?: boolean, onUpdate?: () => void, durationMs?: number, onComplete?: () => void): void;
|
|
243
|
+
/**
|
|
244
|
+
* Clears and disposes all shapes, images, and texts.
|
|
245
|
+
* Sabhi resources ko completely clear karein.
|
|
246
|
+
*/
|
|
247
|
+
clear(): void;
|
|
248
|
+
/**
|
|
249
|
+
* Full disposal of all elements and WebGL/DOM resources.
|
|
250
|
+
* Sabhi elements ko dispose karein.
|
|
251
|
+
*/
|
|
252
|
+
dispose(): void;
|
|
253
|
+
}
|
|
254
|
+
//# sourceMappingURL=ViewerElementsController.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ViewerElementsController.d.ts","sourceRoot":"","sources":["../../src/controllers/ViewerElementsController.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAA;AACnC,OAAO,KAAK,EACV,SAAS,EACT,kBAAkB,EAClB,WAAW,EACX,QAAQ,EACR,WAAW,EACZ,MAAM,oBAAoB,CAAA;AAG3B,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,cAAc,EAAE,KAAK,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAEhE,MAAM,WAAW,qBAAqB;IACpC,WAAW,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAAA;IACzC,QAAQ,CAAC,EAAE,WAAW,CAAA;IACtB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAA;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