@realsee/dnalogel 3.77.5 → 3.77.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/CHANGELOG.md +17 -11
- package/dist/PanoTagPlugin/controller/Tag/BaseTag.d.ts +5 -1
- package/dist/PanoTagPlugin/controller/Tag/BoxTag.d.ts +119 -0
- package/dist/PanoTagPlugin/controller/Tag/MaskTag.d.ts +257 -0
- package/dist/PanoTagPlugin/controller/Tag/MaskTag.shaders.d.ts +10 -0
- package/dist/PanoTagPlugin/controller/Tag/PolygonTag.d.ts +112 -0
- package/dist/PanoTagPlugin/controller/TagRender.d.ts +1 -1
- package/dist/PanoTagPlugin/controller/index.d.ts +55 -2
- package/dist/PanoTagPlugin/typings/controller.d.ts +10 -0
- package/dist/PanoTagPlugin/typings/tag/Tag.d.ts +8 -3
- package/dist/PanoTagPlugin/typings/tag/Utils.d.ts +50 -1
- package/dist/PanoTagPlugin/utils/sculptDataToBoxPosition.d.ts +6 -0
- package/dist/PanoTagPlugin/utils/tag/tagCheck.d.ts +6 -0
- package/dist/PanoTagPlugin/utils/tagPosition.d.ts +12 -3
- package/dist/Sculpt/Meshes/Line.d.ts +4 -0
- package/dist/index.cjs.js +178 -95
- package/dist/index.js +11378 -9801
- package/dist/index.umd.js +173 -90
- package/dist/shared-utils/five/getFiveFromParentChain.d.ts +7 -0
- package/libs/AreaMakerPlugin/Controller.js +3 -2
- package/libs/AreaMakerPlugin/index.js +3 -2
- package/libs/AreaMakerPlugin/utils/Item.js +3 -2
- package/libs/CSS3DRenderPlugin/Controller.js +3 -2
- package/libs/CSS3DRenderPlugin/index.js +6 -5
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +39 -38
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DRender.js +10 -9
- package/libs/CruisePlugin/BaseController.js +5 -4
- package/libs/CruisePlugin/Move.js +8 -2
- package/libs/CruisePlugin/Work.js +8 -2
- package/libs/CruisePlugin/index.js +12 -6
- package/libs/CurrentPanoImagePlugin/Controller.js +15 -14
- package/libs/CurrentPanoImagePlugin/index.js +4 -3
- package/libs/GuideLinePlugin/Controller.js +10 -4
- package/libs/GuideLinePlugin/GuideLineItem.js +8 -2
- package/libs/GuideLinePlugin/GuideLineModeItem.js +8 -2
- package/libs/GuideLinePlugin/index.js +12 -6
- package/libs/MeasurePlugin/Controller.js +11 -10
- package/libs/MeasurePlugin/index.js +5 -4
- package/libs/MeasurePlugin/utils/MeasureMesh.js +3 -2
- package/libs/ModelChassisCompassPlugin/Plugin.js +4 -3
- package/libs/ModelChassisCompassPlugin/index.js +1 -0
- package/libs/ModelEntryDoorGuidePlugin/Plugin.js +6 -5
- package/libs/ModelEntryDoorGuidePlugin/index.js +1 -0
- package/libs/ModelMakerPlugin/Controller.js +3 -2
- package/libs/ModelMakerPlugin/index.js +3 -2
- package/libs/ModelMakerPlugin/item/baseItem.js +3 -2
- package/libs/ModelMakerPlugin/item/boxItem.js +3 -2
- package/libs/ModelMakerPlugin/item/polygonItem.js +3 -2
- package/libs/ModelMakerPlugin/item/prismItem.js +3 -2
- package/libs/ModelTVVideoPlugin/Plugin.js +4 -3
- package/libs/ModelTVVideoPlugin/index.js +3 -2
- package/libs/ModelViewPlugin/Plugin.js +20 -19
- package/libs/ModelViewPlugin/index.js +1 -0
- package/libs/Object3DHelperPlugin/Controller.js +3 -2
- package/libs/Object3DHelperPlugin/index.js +6 -5
- package/libs/PanoCompassPlugin/Controller.js +3 -2
- package/libs/PanoCompassPlugin/index.js +4 -3
- package/libs/PanoDoorLabelPlugin/Controller.js +24 -23
- package/libs/PanoDoorLabelPlugin/index.js +4 -3
- package/libs/PanoMeasurePlugin/Components/Controller0.js +3 -2
- package/libs/PanoMeasurePlugin/Components/Controller1.js +3 -2
- package/libs/PanoMeasurePlugin/Controller/EditController.js +3 -2
- package/libs/PanoMeasurePlugin/Controller/WatchController.js +3 -2
- package/libs/PanoMeasurePlugin/Controller/index.js +3 -2
- package/libs/PanoMeasurePlugin/Model/area.js +3 -2
- package/libs/PanoMeasurePlugin/Modules/Magnifier.js +1 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +16 -15
- package/libs/PanoMeasurePlugin/index.js +14 -13
- package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +3 -2
- package/libs/PanoRulerProPlugin/Controller.js +3 -2
- package/libs/PanoRulerProPlugin/RulerItems.js +42 -41
- package/libs/PanoRulerProPlugin/index.js +4 -3
- package/libs/PanoSpatialTagPlugin/Plugin.js +34 -33
- package/libs/PanoSpatialTagPlugin/index.js +1 -0
- package/libs/PanoTagPlugin/Components/Common/TagPoint.js +3 -2
- package/libs/PanoTagPlugin/Components/Common/TagPopover/PopoverContent.js +3 -2
- package/libs/PanoTagPlugin/Components/Common/TagPopover/TagPopoverToolBar.js +3 -2
- package/libs/PanoTagPlugin/Components/Common/TagPopover/index.js +3 -2
- package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +3 -2
- package/libs/PanoTagPlugin/Components/Tag/index.js +3 -2
- package/libs/PanoTagPlugin/Components/TagContainer.js +3 -2
- package/libs/PanoTagPlugin/Components/TagItem.js +125 -124
- package/libs/PanoTagPlugin/controller/Tag/BaseTag.d.ts +5 -1
- package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +321 -289
- package/libs/PanoTagPlugin/controller/Tag/BoxTag.d.ts +119 -0
- package/libs/PanoTagPlugin/controller/Tag/BoxTag.js +516 -0
- package/libs/PanoTagPlugin/controller/Tag/MaskTag.d.ts +257 -0
- package/libs/PanoTagPlugin/controller/Tag/MaskTag.js +816 -0
- package/libs/PanoTagPlugin/controller/Tag/MaskTag.shaders.d.ts +10 -0
- package/libs/PanoTagPlugin/controller/Tag/MaskTag.shaders.js +94 -0
- package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +3 -2
- package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +3 -2
- package/libs/PanoTagPlugin/controller/Tag/PointTag.js +3 -2
- package/libs/PanoTagPlugin/controller/Tag/PolygonTag.d.ts +112 -0
- package/libs/PanoTagPlugin/controller/Tag/PolygonTag.js +479 -0
- package/libs/PanoTagPlugin/controller/TagRender.d.ts +1 -1
- package/libs/PanoTagPlugin/controller/TagRender.js +3 -2
- package/libs/PanoTagPlugin/controller/TagUtil.js +22 -19
- package/libs/PanoTagPlugin/controller/index.d.ts +55 -2
- package/libs/PanoTagPlugin/controller/index.js +243 -129
- package/libs/PanoTagPlugin/index.js +17 -11
- package/libs/PanoTagPlugin/typings/controller.d.ts +10 -0
- package/libs/PanoTagPlugin/typings/tag/Tag.d.ts +8 -3
- package/libs/PanoTagPlugin/typings/tag/Utils.d.ts +50 -1
- package/libs/PanoTagPlugin/utils/addDebugPoints.js +27 -13
- package/libs/PanoTagPlugin/utils/index.js +29 -26
- package/libs/PanoTagPlugin/utils/sculptDataToBoxPosition.d.ts +6 -0
- package/libs/PanoTagPlugin/utils/sculptDataToBoxPosition.js +18 -0
- package/libs/PanoTagPlugin/utils/tag/calculateTagConfig.js +3 -2
- package/libs/PanoTagPlugin/utils/tag/format.js +3 -2
- package/libs/PanoTagPlugin/utils/tag/tagCheck.d.ts +6 -0
- package/libs/PanoTagPlugin/utils/tag/tagCheck.js +26 -14
- package/libs/PanoTagPlugin/utils/tagPosition.d.ts +12 -3
- package/libs/PanoTagPlugin/utils/tagPosition.js +49 -16
- package/libs/PanoVideoPlugin/Controller.js +9 -8
- package/libs/PanoVideoPlugin/VideoMeshController.js +3 -2
- package/libs/PanoVideoPlugin/index.js +6 -5
- package/libs/PipelinePlugin/Controller.js +3 -2
- package/libs/PipelinePlugin/index.js +4 -3
- package/libs/PipelinePlugin/utils/Objects/FlowPipe.js +3 -2
- package/libs/PipelinePlugin/utils/Objects/HighlightPipe.js +3 -2
- package/libs/PipelinePlugin/utils/Objects/Pipe.js +1 -0
- package/libs/Sculpt/Meshes/Line.d.ts +4 -0
- package/libs/Sculpt/Meshes/Line.js +85 -76
- package/libs/Sculpt/Meshes/Point.js +28 -28
- package/libs/Sculpt/Meshes/Polygon.js +43 -43
- package/libs/Sculpt/index.js +1 -1
- package/libs/Sculpt/utils/Modules/Cursor.js +7 -7
- package/libs/base/BasePlugin.js +1 -1
- package/libs/floorplan/FloorplanGuidePlugin/Controller.js +3 -2
- package/libs/floorplan/FloorplanGuidePlugin/index.js +4 -3
- package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +3 -2
- package/libs/floorplan/MapviewFloorplanPlugin/index.js +4 -3
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +3 -2
- package/libs/floorplan/ModelFloorplanPlugin/index.js +4 -3
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +3 -2
- package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +4 -3
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +3 -2
- package/libs/floorplan/TopviewFloorplanPlugin/index.js +4 -3
- package/libs/index.js +164 -158
- package/libs/shared-utils/five/getFiveFromParentChain.d.ts +7 -0
- package/libs/shared-utils/five/getFiveFromParentChain.js +15 -0
- package/libs/shared-utils/logger.js +1 -1
- package/libs/shared-utils/three/PointSelector/utils/PointHelper2.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
import type PanoTagPluginController from '..';
|
|
2
|
+
import type { TagContentType, Tag as TagData, TagInstance, TagClickParams } from '../..';
|
|
3
|
+
import { BaseTag } from './BaseTag';
|
|
4
|
+
import * as THREE from 'three';
|
|
5
|
+
import type { PartialObjectDeep } from '../../../typings/typings';
|
|
6
|
+
import type { Tag } from '../..';
|
|
7
|
+
import type { State as FiveState } from '@realsee/five';
|
|
8
|
+
import type { AnimeParams } from 'animejs';
|
|
9
|
+
export type MaskTagInterface<C extends TagContentType = TagContentType> = TagInstance<C, 'Mask'>;
|
|
10
|
+
/**
|
|
11
|
+
* Mask 类型的标签
|
|
12
|
+
* 基于全景图 mask 和颜色区域进行物体标记
|
|
13
|
+
*/
|
|
14
|
+
export declare class MaskTag<C extends TagContentType = TagContentType> extends BaseTag<C, 'Mask'> {
|
|
15
|
+
/**
|
|
16
|
+
* Mask 纹理缓存(静态,所有 MaskTag 实例共享)
|
|
17
|
+
* key: mask URL 或 canvas 的 symbol, value: { texture: THREE.Texture, refCount: number, abortController?: AbortController }
|
|
18
|
+
*/
|
|
19
|
+
private static maskTextureCache;
|
|
20
|
+
/**
|
|
21
|
+
* Canvas 到 Symbol 的映射(用于缓存 canvas 纹理)
|
|
22
|
+
*/
|
|
23
|
+
private static canvasSymbolMap;
|
|
24
|
+
/** 同点位共用 mesh:key = meshKey(panoIndex + maskKey), value = 共享数据 */
|
|
25
|
+
private static sharedMeshRegistry;
|
|
26
|
+
/**
|
|
27
|
+
* mask 图片 URL 或 Canvas 元素(2:1 全景图格式)
|
|
28
|
+
*/
|
|
29
|
+
maskUrl: string | HTMLCanvasElement;
|
|
30
|
+
/**
|
|
31
|
+
* 目标颜色(RGB 格式)
|
|
32
|
+
*/
|
|
33
|
+
targetColor: [number, number, number];
|
|
34
|
+
/**
|
|
35
|
+
* mask 渲染的 mesh 对象(使用 Sphere)
|
|
36
|
+
*/
|
|
37
|
+
maskMesh?: THREE.Mesh;
|
|
38
|
+
/**
|
|
39
|
+
* mask 纹理对象
|
|
40
|
+
*/
|
|
41
|
+
private maskTexture?;
|
|
42
|
+
/**
|
|
43
|
+
* 是否正在加载 mask
|
|
44
|
+
*/
|
|
45
|
+
private loadingMask;
|
|
46
|
+
/**
|
|
47
|
+
* 资源是否已释放
|
|
48
|
+
*/
|
|
49
|
+
private _disposed;
|
|
50
|
+
/**
|
|
51
|
+
* 标签样式配置
|
|
52
|
+
*/
|
|
53
|
+
private tagStyle?;
|
|
54
|
+
/**
|
|
55
|
+
* 点击事件清理函数
|
|
56
|
+
*/
|
|
57
|
+
private clickEventDispose?;
|
|
58
|
+
/** 当前 tag 在共享 style 纹理中的下标(color 即 id) */
|
|
59
|
+
private sharedStyleIndex;
|
|
60
|
+
/** 共享 mesh 的 registry key,用于 updateMaskStyle / dispose 查找 entry */
|
|
61
|
+
private _sharedMeshKey;
|
|
62
|
+
constructor(plugin: PanoTagPluginController, tagData: TagData);
|
|
63
|
+
private getColorKey;
|
|
64
|
+
/** 同点位共用一个 mesh,key 仅用 panoIndex(string/canvas 切换时不会因 key 不同而重复创建) */
|
|
65
|
+
private static getMeshKey;
|
|
66
|
+
/**
|
|
67
|
+
* 初始化/挂载到同点位共享 mesh,用 appendStyleToMaterial 注册本 tag 的 style(color 即 id)
|
|
68
|
+
*/
|
|
69
|
+
private initializeMaskMesh;
|
|
70
|
+
/** 构建用于 mergedTexture 的 style 对象(color 作 id),tolerance 0–255 */
|
|
71
|
+
private buildStyleForMaterial;
|
|
72
|
+
private static createSharedMesh;
|
|
73
|
+
/** 仅更新材质中某一 slot 的 style(用于 enable/disable/updateMaskStyle) */
|
|
74
|
+
private updateStyleSlotInMaterial;
|
|
75
|
+
private setupSharedMeshRaycast;
|
|
76
|
+
/**
|
|
77
|
+
* 计算法向量
|
|
78
|
+
* Mask 标签返回向上的法向量(因为是贴在 cube 面上)
|
|
79
|
+
*/
|
|
80
|
+
computeNormal(): THREE.Vector3;
|
|
81
|
+
/**
|
|
82
|
+
* 不把共享 mesh 作为 blink 目标,闪烁通过本 tag 的 style opacity 动画实现
|
|
83
|
+
*/
|
|
84
|
+
protected getAdditionalBlinkTargets(): any | any[] | null;
|
|
85
|
+
/**
|
|
86
|
+
* 闪烁仅针对本 tag:通过改变本 tag 在 merged texture 中的 opacity 实现
|
|
87
|
+
*/
|
|
88
|
+
blink(animeConfig?: Partial<AnimeParams>): Promise<void>;
|
|
89
|
+
/**
|
|
90
|
+
* 更新标签数据
|
|
91
|
+
*/
|
|
92
|
+
set(tag: PartialObjectDeep<Tag<C, 'Mask'>>, deepMerge?: boolean): void;
|
|
93
|
+
/** 供 rebuildEntryMaterial 使用:返回当前 tag 的 style 对象 */
|
|
94
|
+
getStyleForMaterial(): {
|
|
95
|
+
color: number[];
|
|
96
|
+
tolerance: number;
|
|
97
|
+
highlightColor: number[];
|
|
98
|
+
opacity: number;
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
* 重写 getVisible 方法
|
|
102
|
+
* Mask 标签仅在当前点位可见
|
|
103
|
+
*/
|
|
104
|
+
getVisible(fiveState?: Partial<FiveState>): boolean;
|
|
105
|
+
/**
|
|
106
|
+
* 重写 computeVisible 方法
|
|
107
|
+
* 增加 Mask 特有的可见性检查逻辑,用于 whyHide 功能
|
|
108
|
+
*/
|
|
109
|
+
protected computeVisible(_fiveState?: Partial<FiveState>): {
|
|
110
|
+
value: boolean;
|
|
111
|
+
reason?: any;
|
|
112
|
+
};
|
|
113
|
+
/**
|
|
114
|
+
* 点击事件处理
|
|
115
|
+
*/
|
|
116
|
+
onClick(params: Pick<TagClickParams, 'target'>): void;
|
|
117
|
+
/**
|
|
118
|
+
* 展开自己,收起其他标签
|
|
119
|
+
*/
|
|
120
|
+
unfoldAndFoldOthers(): void;
|
|
121
|
+
/**
|
|
122
|
+
* 展开标签详情
|
|
123
|
+
*/
|
|
124
|
+
unfold(): void;
|
|
125
|
+
/**
|
|
126
|
+
* 折叠标签详情
|
|
127
|
+
*/
|
|
128
|
+
fold(): void;
|
|
129
|
+
/**
|
|
130
|
+
* 设置展开/折叠状态
|
|
131
|
+
*/
|
|
132
|
+
setUnfold(unfolded: boolean): void;
|
|
133
|
+
/**
|
|
134
|
+
* 更新屏幕位置
|
|
135
|
+
*/
|
|
136
|
+
updateScreenPosition(): void;
|
|
137
|
+
/**
|
|
138
|
+
* 应用可见性变化(通过 style opacity 控制展示,共享 mesh 保持 visible)
|
|
139
|
+
*/
|
|
140
|
+
applyVisible(): void;
|
|
141
|
+
/**
|
|
142
|
+
* 更新 mesh 的位置和旋转(跟随观察者)
|
|
143
|
+
* 参考 itemMask 实现
|
|
144
|
+
*/
|
|
145
|
+
private updateMeshTransform;
|
|
146
|
+
/**
|
|
147
|
+
* 步骤1:从材质中解析出 styleList
|
|
148
|
+
* @param {THREE.ShaderMaterial} material - 目标材质
|
|
149
|
+
* @returns {Array} 解析后的 styleList
|
|
150
|
+
*/
|
|
151
|
+
private parseStyleListFromMaterial;
|
|
152
|
+
/**
|
|
153
|
+
* 步骤2:更新材质的样式纹理(追加新元素后)
|
|
154
|
+
* @param {THREE.ShaderMaterial} material - 目标材质
|
|
155
|
+
* @param {Array} newStyle - 要追加的新样式对象
|
|
156
|
+
*/
|
|
157
|
+
private appendStyleToMaterial;
|
|
158
|
+
/**
|
|
159
|
+
* 获取 Mask 样式配置(合并用户配置和默认值)
|
|
160
|
+
*/
|
|
161
|
+
private getMaskStyle;
|
|
162
|
+
/**
|
|
163
|
+
* 设置点击事件(仅当 raycast 命中本 tag 的 color 时触发)
|
|
164
|
+
*/
|
|
165
|
+
private setupClickEvents;
|
|
166
|
+
/**
|
|
167
|
+
* 清理点击事件
|
|
168
|
+
*/
|
|
169
|
+
private cleanupClickEvents;
|
|
170
|
+
/**
|
|
171
|
+
* 重新加载 mask 图:从旧点位 mesh 注销,再按新 maskUrl 初始化
|
|
172
|
+
*/
|
|
173
|
+
private reloadMask;
|
|
174
|
+
/**
|
|
175
|
+
* changeTagById 改 mask 时:只更新共享 mesh 的 texture,不 unregister
|
|
176
|
+
* 有 entry 则换图;无 entry 则走完整初始化
|
|
177
|
+
*/
|
|
178
|
+
private updateSharedMeshTexture;
|
|
179
|
+
/**
|
|
180
|
+
* 更新当前 tag 在共享材质中的 style slot(color/style 控制展示)
|
|
181
|
+
*/
|
|
182
|
+
updateMaskStyle(): void;
|
|
183
|
+
/**
|
|
184
|
+
* 更新 Canvas 纹理(仅当 maskUrl 为 Canvas 时有效)
|
|
185
|
+
* 当 canvas 内容发生变化时,调用此方法更新渲染
|
|
186
|
+
*/
|
|
187
|
+
updateCanvasTexture(): void;
|
|
188
|
+
/**
|
|
189
|
+
* 清理当前标签:从共享材质中删除本 tag 的样式槽,并更新材质;
|
|
190
|
+
* 若该点位已无其他 tag 则销毁 mesh 并释放纹理。
|
|
191
|
+
*/
|
|
192
|
+
private disposeMaskResources;
|
|
193
|
+
/**
|
|
194
|
+
* 清理 MaskTag 特有的资源(公开方法)
|
|
195
|
+
*/
|
|
196
|
+
dispose(): void;
|
|
197
|
+
/**
|
|
198
|
+
* 禁用标签(通过 style opacity=0 隐藏,不拆 mesh)
|
|
199
|
+
*/
|
|
200
|
+
disable(): void;
|
|
201
|
+
/**
|
|
202
|
+
* 启用标签(恢复 style 展示)
|
|
203
|
+
*/
|
|
204
|
+
enable(): void;
|
|
205
|
+
/**
|
|
206
|
+
* 销毁标签(重写父类方法)
|
|
207
|
+
*/
|
|
208
|
+
destroy(): void;
|
|
209
|
+
/**
|
|
210
|
+
* 清除所有点位共享 mesh(重新 load 数据前调用)
|
|
211
|
+
*/
|
|
212
|
+
static clearSharedMeshRegistry(): void;
|
|
213
|
+
/**
|
|
214
|
+
* 将 style 列表写入材质(用于重建材质)
|
|
215
|
+
*/
|
|
216
|
+
private static writeStyleListToMaterial;
|
|
217
|
+
/**
|
|
218
|
+
* destroy 后重建该点位材质,更新剩余 tag 的 styleIndex
|
|
219
|
+
*/
|
|
220
|
+
private static rebuildEntryMaterial;
|
|
221
|
+
/**
|
|
222
|
+
* 获取 mask 的缓存 key
|
|
223
|
+
* @param maskSource mask URL 或 Canvas
|
|
224
|
+
* @returns 缓存 key
|
|
225
|
+
*/
|
|
226
|
+
private static getMaskCacheKey;
|
|
227
|
+
/**
|
|
228
|
+
* 加载 Mask 纹理(静态方法,支持缓存和引用计数)
|
|
229
|
+
* @param maskSource mask 图片 URL 或 Canvas 元素
|
|
230
|
+
* @returns Promise<THREE.Texture>
|
|
231
|
+
*/
|
|
232
|
+
private static loadMaskTexture;
|
|
233
|
+
/**
|
|
234
|
+
* 释放 Mask 纹理(静态方法)
|
|
235
|
+
* @param maskSource mask 图片 URL 或 Canvas 元素
|
|
236
|
+
*/
|
|
237
|
+
private static releaseMaskTexture;
|
|
238
|
+
/**
|
|
239
|
+
* 获取当前缓存的纹理统计信息(用于性能监控和调试)
|
|
240
|
+
* @returns 缓存统计信息
|
|
241
|
+
*/
|
|
242
|
+
static getCacheStats(): {
|
|
243
|
+
totalCached: number;
|
|
244
|
+
totalRefCount: number;
|
|
245
|
+
estimatedMemoryMB: number;
|
|
246
|
+
cacheEntries: Array<{
|
|
247
|
+
source: string;
|
|
248
|
+
refCount: number;
|
|
249
|
+
sizeMB: number;
|
|
250
|
+
}>;
|
|
251
|
+
};
|
|
252
|
+
/**
|
|
253
|
+
* 强制清理所有缓存的纹理(用于内存管理,谨慎使用)
|
|
254
|
+
* 注意:这会释放所有纹理,即使它们仍在使用中
|
|
255
|
+
*/
|
|
256
|
+
static clearAllCache(): void;
|
|
257
|
+
}
|