iflow-engine-base 3.12.9 → 3.12.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -1
- package/dist/bim-engine-sdk.es.js +8 -8
- package/dist/bim-engine-sdk.umd.js +1403 -941
- package/dist/chunks/{engine-2d-oKaknhEB.js → engine-2d-DAbgkG5J.js} +4 -4
- package/dist/chunks/{engine-3d-B_ZxiLB1.js → engine-3d-BKWXyaNA.js} +5227 -3768
- package/dist/chunks/{engine-720-kOT12cTn.js → engine-720-CXjyLM8c.js} +2 -2
- package/dist/chunks/{engine-gaussian-B6tci_07.js → engine-gaussian-DbfS0JjT.js} +2 -4
- package/dist/chunks/{engine-gis-CAoh6itw.js → engine-gis-BpVRGups.js} +3 -3
- package/dist/chunks/{sdk-assets-CKily9AX.js → sdk-assets-CgQD9F3v.js} +7 -7
- package/dist/chunks/{sdk-runtime-Be2ihgV0.js → sdk-runtime-Dy2AkU3-.js} +3 -3
- package/dist/chunks/{sdk-vendor-BBjHmqe0.js → sdk-vendor-CMEVZEox.js} +1 -1
- package/dist/chunks/three-vendor-CB3x8EQd.js +45039 -0
- package/dist/index.d.ts +565 -174
- package/package.json +1 -1
- package/dist/chunks/three-vendor-rsPdPJ6s.js +0 -43957
package/dist/index.d.ts
CHANGED
|
@@ -24,7 +24,6 @@ declare class Annotation3d {
|
|
|
24
24
|
private readonly engine;
|
|
25
25
|
private readonly rootGroup;
|
|
26
26
|
private readonly records;
|
|
27
|
-
private readonly textureLoader;
|
|
28
27
|
private readonly occlusionRaycaster;
|
|
29
28
|
private readonly normalizer;
|
|
30
29
|
private readonly materialFactory;
|
|
@@ -38,6 +37,8 @@ declare class Annotation3d {
|
|
|
38
37
|
constructor(engine: any);
|
|
39
38
|
add(config: Annotation3dData): string;
|
|
40
39
|
addMany(configs: Annotation3dData[]): string[];
|
|
40
|
+
/** 将 PathDraw 的通用路径数据转换为可持久化的 Annotation3D 折线标记。 */
|
|
41
|
+
addPath(pathData: PathDrawData, options?: Annotation3dPathOptions): string;
|
|
41
42
|
pickPoint(): Promise<AnnotationPoint3d | null>;
|
|
42
43
|
update(id: string, patch: Partial<Annotation3dData>): boolean;
|
|
43
44
|
remove(id: string): boolean;
|
|
@@ -80,9 +81,6 @@ export declare interface Annotation3dEffect {
|
|
|
80
81
|
glow?: AnnotationGlowEffect;
|
|
81
82
|
flow?: AnnotationFlowEffect;
|
|
82
83
|
pulse?: AnnotationPulseEffect;
|
|
83
|
-
ripple?: AnnotationRippleEffect;
|
|
84
|
-
pillar?: AnnotationPillarEffect;
|
|
85
|
-
baseRing?: AnnotationBaseRingEffect;
|
|
86
84
|
layers?: AnnotationLayersEffect;
|
|
87
85
|
scan?: AnnotationScanEffect;
|
|
88
86
|
}
|
|
@@ -120,6 +118,18 @@ export declare interface Annotation3dPanel {
|
|
|
120
118
|
actions?: Record<string, (ctx: AnnotationActionContext) => void>;
|
|
121
119
|
}
|
|
122
120
|
|
|
121
|
+
/** 将 PathDraw 路径转换为 Annotation3D 线标记时使用的配置。 */
|
|
122
|
+
export declare interface Annotation3dPathOptions {
|
|
123
|
+
id?: string;
|
|
124
|
+
pointSource?: 'samples' | 'points';
|
|
125
|
+
visible?: boolean;
|
|
126
|
+
selectable?: boolean;
|
|
127
|
+
style?: Annotation3dStyle;
|
|
128
|
+
effect?: Annotation3dEffect;
|
|
129
|
+
panel?: Annotation3dPanel;
|
|
130
|
+
data?: any;
|
|
131
|
+
}
|
|
132
|
+
|
|
123
133
|
/** 点线面体统一样式。 */
|
|
124
134
|
export declare interface Annotation3dStyle {
|
|
125
135
|
color?: string;
|
|
@@ -129,7 +139,11 @@ export declare interface Annotation3dStyle {
|
|
|
129
139
|
lineWidth?: number;
|
|
130
140
|
fillColor?: string;
|
|
131
141
|
fillOpacity?: number;
|
|
132
|
-
|
|
142
|
+
iconPoint?: AnnotationIconPointStyle;
|
|
143
|
+
textPoint?: AnnotationTextPointStyle;
|
|
144
|
+
iconTextPoint?: AnnotationIconTextPointStyle;
|
|
145
|
+
ripplePoint?: AnnotationRipplePointStyle;
|
|
146
|
+
pillarPoint?: AnnotationPillarPointStyle;
|
|
133
147
|
leaderPoint?: AnnotationLeaderPointStyle;
|
|
134
148
|
line?: AnnotationLineStyle;
|
|
135
149
|
curve?: AnnotationCurveStyle;
|
|
@@ -138,7 +152,7 @@ export declare interface Annotation3dStyle {
|
|
|
138
152
|
}
|
|
139
153
|
|
|
140
154
|
/** 支持的三维标记类型。 */
|
|
141
|
-
export declare type Annotation3dType = '
|
|
155
|
+
export declare type Annotation3dType = 'iconPoint' | 'textPoint' | 'iconTextPoint' | 'ripplePoint' | 'pillarPoint' | 'leaderPoint' | 'polyline' | 'curve3d' | 'polygon' | 'extrudePolygon' | 'box';
|
|
142
156
|
|
|
143
157
|
/** 面板 action 回调上下文。 */
|
|
144
158
|
export declare interface AnnotationActionContext {
|
|
@@ -150,13 +164,6 @@ export declare interface AnnotationActionContext {
|
|
|
150
164
|
originalEvent: MouseEvent;
|
|
151
165
|
}
|
|
152
166
|
|
|
153
|
-
/** 底环效果配置。 */
|
|
154
|
-
declare interface AnnotationBaseRingEffect {
|
|
155
|
-
enabled: boolean;
|
|
156
|
-
radius?: number;
|
|
157
|
-
rotateSpeed?: number;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
167
|
/**
|
|
161
168
|
* 标注联合类型
|
|
162
169
|
*/
|
|
@@ -171,6 +178,13 @@ declare interface AnnotationCurveStyle {
|
|
|
171
178
|
closed?: boolean;
|
|
172
179
|
}
|
|
173
180
|
|
|
181
|
+
/** DOM 点标记相对三维锚点的屏幕布局。 */
|
|
182
|
+
declare interface AnnotationDomPointLayoutStyle {
|
|
183
|
+
screenAnchor?: 'center' | 'top' | 'right' | 'bottom' | 'left';
|
|
184
|
+
offsetX?: number;
|
|
185
|
+
offsetY?: number;
|
|
186
|
+
}
|
|
187
|
+
|
|
174
188
|
/** 流动效果配置。 */
|
|
175
189
|
declare interface AnnotationFlowEffect {
|
|
176
190
|
enabled: boolean;
|
|
@@ -200,6 +214,40 @@ declare interface AnnotationGradientStop {
|
|
|
200
214
|
alpha?: number;
|
|
201
215
|
}
|
|
202
216
|
|
|
217
|
+
/** 纯图标点标记样式,尺寸单位为屏幕像素。 */
|
|
218
|
+
declare interface AnnotationIconPointStyle extends AnnotationDomPointLayoutStyle {
|
|
219
|
+
icon?: string;
|
|
220
|
+
width?: number;
|
|
221
|
+
height?: number;
|
|
222
|
+
opacity?: number;
|
|
223
|
+
rotation?: number;
|
|
224
|
+
objectFit?: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down';
|
|
225
|
+
background?: AnnotationPointBackgroundStyle;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
/** 图标与文字组合点标记样式。 */
|
|
229
|
+
declare interface AnnotationIconTextPointStyle extends AnnotationDomPointLayoutStyle {
|
|
230
|
+
icon?: string;
|
|
231
|
+
iconWidth?: number;
|
|
232
|
+
iconHeight?: number;
|
|
233
|
+
iconOpacity?: number;
|
|
234
|
+
iconObjectFit?: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down';
|
|
235
|
+
text?: string;
|
|
236
|
+
textColor?: string;
|
|
237
|
+
fontSize?: number;
|
|
238
|
+
fontFamily?: string;
|
|
239
|
+
fontWeight?: number | string;
|
|
240
|
+
lineHeight?: number;
|
|
241
|
+
maxTextWidth?: number;
|
|
242
|
+
textAlign?: 'left' | 'center' | 'right';
|
|
243
|
+
whiteSpace?: 'normal' | 'nowrap' | 'pre-line';
|
|
244
|
+
placement?: 'top' | 'right' | 'bottom' | 'left';
|
|
245
|
+
gap?: number;
|
|
246
|
+
align?: 'start' | 'center' | 'end';
|
|
247
|
+
backgroundScope?: 'none' | 'text' | 'all';
|
|
248
|
+
background?: AnnotationPointBackgroundStyle;
|
|
249
|
+
}
|
|
250
|
+
|
|
203
251
|
/**
|
|
204
252
|
* 标注实例(包含 DOM 元素)
|
|
205
253
|
*/
|
|
@@ -250,6 +298,13 @@ declare interface AnnotationLeaderPointStyle {
|
|
|
250
298
|
anchorRingColor?: string;
|
|
251
299
|
iconBackgroundColor?: string;
|
|
252
300
|
iconBackgroundOpacity?: number;
|
|
301
|
+
icon?: string;
|
|
302
|
+
iconWidth?: number;
|
|
303
|
+
iconHeight?: number;
|
|
304
|
+
text?: string;
|
|
305
|
+
textColor?: string;
|
|
306
|
+
fontSize?: number;
|
|
307
|
+
fontWeight?: number | string;
|
|
253
308
|
}
|
|
254
309
|
|
|
255
310
|
/** 线样式。 */
|
|
@@ -390,11 +445,34 @@ declare interface AnnotationPanelOffset3d {
|
|
|
390
445
|
z?: number;
|
|
391
446
|
}
|
|
392
447
|
|
|
393
|
-
/**
|
|
394
|
-
declare interface
|
|
395
|
-
enabled: boolean;
|
|
448
|
+
/** 独立光柱点标记样式,几何尺寸使用世界单位。 */
|
|
449
|
+
declare interface AnnotationPillarPointStyle {
|
|
396
450
|
height?: number;
|
|
397
|
-
|
|
451
|
+
radiusTop?: number;
|
|
452
|
+
radiusBottom?: number;
|
|
453
|
+
radialSegments?: number;
|
|
454
|
+
openEnded?: boolean;
|
|
455
|
+
color?: string;
|
|
456
|
+
opacity?: number;
|
|
457
|
+
gradientStartColor?: string;
|
|
458
|
+
gradientEndColor?: string;
|
|
459
|
+
gradientStartAlpha?: number;
|
|
460
|
+
gradientEndAlpha?: number;
|
|
461
|
+
glowIntensity?: number;
|
|
462
|
+
pulseEnabled?: boolean;
|
|
463
|
+
pulseSpeed?: number;
|
|
464
|
+
pulseMinOpacity?: number;
|
|
465
|
+
pulseMaxOpacity?: number;
|
|
466
|
+
showBaseRing?: boolean;
|
|
467
|
+
baseRingInnerRadius?: number;
|
|
468
|
+
baseRingOuterRadius?: number;
|
|
469
|
+
baseRingColor?: string;
|
|
470
|
+
baseRingOpacity?: number;
|
|
471
|
+
baseRingSegments?: number;
|
|
472
|
+
baseRingPulseSpeed?: number;
|
|
473
|
+
offsetX?: number;
|
|
474
|
+
offsetY?: number;
|
|
475
|
+
offsetZ?: number;
|
|
398
476
|
}
|
|
399
477
|
|
|
400
478
|
/** 三维空间点。 */
|
|
@@ -404,14 +482,17 @@ declare interface AnnotationPoint3d {
|
|
|
404
482
|
z: number;
|
|
405
483
|
}
|
|
406
484
|
|
|
407
|
-
/**
|
|
408
|
-
declare interface
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
485
|
+
/** 文字或图文点标记使用的背景样式。 */
|
|
486
|
+
declare interface AnnotationPointBackgroundStyle {
|
|
487
|
+
enabled?: boolean;
|
|
488
|
+
color?: string;
|
|
489
|
+
opacity?: number;
|
|
490
|
+
borderColor?: string;
|
|
491
|
+
borderWidth?: number;
|
|
492
|
+
borderRadius?: number;
|
|
493
|
+
paddingX?: number;
|
|
494
|
+
paddingY?: number;
|
|
495
|
+
boxShadow?: string;
|
|
415
496
|
}
|
|
416
497
|
|
|
417
498
|
/** 面样式。 */
|
|
@@ -438,12 +519,26 @@ declare interface AnnotationPulseEffect {
|
|
|
438
519
|
maxOpacity?: number;
|
|
439
520
|
}
|
|
440
521
|
|
|
441
|
-
/**
|
|
442
|
-
declare interface
|
|
443
|
-
|
|
522
|
+
/** 独立扩散波纹点标记样式,半径与线宽使用世界单位。 */
|
|
523
|
+
declare interface AnnotationRipplePointStyle {
|
|
524
|
+
color?: string;
|
|
525
|
+
opacity?: number;
|
|
444
526
|
count?: number;
|
|
445
527
|
speed?: number;
|
|
528
|
+
startRadius?: number;
|
|
446
529
|
maxRadius?: number;
|
|
530
|
+
ringWidth?: number;
|
|
531
|
+
segments?: number;
|
|
532
|
+
showCenter?: boolean;
|
|
533
|
+
centerRadius?: number;
|
|
534
|
+
centerColor?: string;
|
|
535
|
+
centerOpacity?: number;
|
|
536
|
+
rotationX?: number;
|
|
537
|
+
rotationY?: number;
|
|
538
|
+
rotationZ?: number;
|
|
539
|
+
offsetX?: number;
|
|
540
|
+
offsetY?: number;
|
|
541
|
+
offsetZ?: number;
|
|
447
542
|
}
|
|
448
543
|
|
|
449
544
|
/** 扫描效果配置。 */
|
|
@@ -453,6 +548,20 @@ declare interface AnnotationScanEffect {
|
|
|
453
548
|
width?: number;
|
|
454
549
|
}
|
|
455
550
|
|
|
551
|
+
/** 纯文字点标记样式。 */
|
|
552
|
+
declare interface AnnotationTextPointStyle extends AnnotationDomPointLayoutStyle {
|
|
553
|
+
text?: string;
|
|
554
|
+
color?: string;
|
|
555
|
+
fontSize?: number;
|
|
556
|
+
fontFamily?: string;
|
|
557
|
+
fontWeight?: number | string;
|
|
558
|
+
lineHeight?: number;
|
|
559
|
+
maxWidth?: number;
|
|
560
|
+
textAlign?: 'left' | 'center' | 'right';
|
|
561
|
+
whiteSpace?: 'normal' | 'nowrap' | 'pre-line';
|
|
562
|
+
background?: AnnotationPointBackgroundStyle;
|
|
563
|
+
}
|
|
564
|
+
|
|
456
565
|
/**
|
|
457
566
|
* 标注类型枚举
|
|
458
567
|
*/
|
|
@@ -693,6 +802,7 @@ declare type CalibrationVector3Array = [number, number, number];
|
|
|
693
802
|
declare class CameraModule {
|
|
694
803
|
private static readonly MIN_VISIBLE_HEIGHT;
|
|
695
804
|
private static readonly MIN_CAMERA_DISTANCE;
|
|
805
|
+
private static readonly CAMERA_ANIMATION_IDLE_EXEMPT_REASON;
|
|
696
806
|
private engine;
|
|
697
807
|
perspectiveCamera: THREE.PerspectiveCamera;
|
|
698
808
|
orthographicCamera: THREE.OrthographicCamera;
|
|
@@ -2469,6 +2579,7 @@ declare class EngineKernelV2 {
|
|
|
2469
2579
|
private _fpsLastSwitch;
|
|
2470
2580
|
private _lowFpsCount;
|
|
2471
2581
|
private _highFpsCount;
|
|
2582
|
+
private frameLockEnabled;
|
|
2472
2583
|
private readonly _idleFrameInterval;
|
|
2473
2584
|
private _lastIdleFrameTime;
|
|
2474
2585
|
private readonly _idleFrameRateExemptionReasons;
|
|
@@ -2544,6 +2655,7 @@ declare class EngineKernelV2 {
|
|
|
2544
2655
|
modelExplode: ModelExplode;
|
|
2545
2656
|
/** 材质编辑器,提供 DOM 面板、材质修改记录读取和一键还原能力。 */
|
|
2546
2657
|
materialTool: MaterialTool;
|
|
2658
|
+
pathDraw: PathDrawManager;
|
|
2547
2659
|
rxQuotaListMapper: RxQuotaListMapper;
|
|
2548
2660
|
filterLoaderModel: FilterLoaderModel;
|
|
2549
2661
|
models: any[];
|
|
@@ -2560,14 +2672,23 @@ declare class EngineKernelV2 {
|
|
|
2560
2672
|
updateVersionDisplay(): void;
|
|
2561
2673
|
bindControlEvents(control: any): void;
|
|
2562
2674
|
requestComposerRender(): void;
|
|
2675
|
+
/**
|
|
2676
|
+
* 设置自动锁帧状态;开启后引擎空闲时限制为 1 FPS,关闭后持续全帧渲染。
|
|
2677
|
+
*/
|
|
2678
|
+
setFrameLock(enabled: boolean): void;
|
|
2679
|
+
/**
|
|
2680
|
+
* 获取自动锁帧状态。
|
|
2681
|
+
*/
|
|
2682
|
+
isFrameLockEnabled(): boolean;
|
|
2563
2683
|
/**
|
|
2564
2684
|
* 为持续交互或动画登记空闲限帧豁免;同一原因可重复设置,多个原因会独立共存。
|
|
2565
2685
|
*/
|
|
2566
2686
|
setIdleFrameRateExempt(reason: string, exempt: boolean): void;
|
|
2567
2687
|
/**
|
|
2568
2688
|
* 通过 viewToken 解析 3D 模型地址,再复用现有 loaderModule URL 加载逻辑。
|
|
2689
|
+
* 解析得到多个模型地址时,共用同一份加载选项,包括是否加载边线。
|
|
2569
2690
|
*/
|
|
2570
|
-
loadModelByViewToken(viewToken: string, options?:
|
|
2691
|
+
loadModelByViewToken(viewToken: string, options?: LoadModelOptions): Promise<void>;
|
|
2571
2692
|
/**
|
|
2572
2693
|
* 对指定 url 的 3D 模型应用整体校准矩阵。
|
|
2573
2694
|
*/
|
|
@@ -4066,7 +4187,7 @@ declare class InteractionModule {
|
|
|
4066
4187
|
handelKeyEscDown(): void;
|
|
4067
4188
|
handleMouseMove(event: any): void;
|
|
4068
4189
|
handleMouseUp(event: any): void;
|
|
4069
|
-
getCatchMeshs(event: any, retainShow?: boolean): THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>, THREE.Material | THREE.Material[], THREE.Object3DEventMap>[] | null;
|
|
4190
|
+
getCatchMeshs(event: any, retainShow?: boolean): THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>, THREE.Material<THREE.MaterialEventMap> | THREE.Material<THREE.MaterialEventMap>[], THREE.Object3DEventMap>[] | null;
|
|
4070
4191
|
handleMouseClick(event: any): void;
|
|
4071
4192
|
/** 根据模型地址和运行时节点 ID 获取点击构件的 GUID。 */
|
|
4072
4193
|
private getNodeGuid;
|
|
@@ -4146,18 +4267,34 @@ declare interface InteractionOptions720 {
|
|
|
4146
4267
|
maxFov?: number;
|
|
4147
4268
|
}
|
|
4148
4269
|
|
|
4149
|
-
/**
|
|
4150
|
-
* 播放配置接口
|
|
4151
|
-
*/
|
|
4270
|
+
/** 漫游播放配置;duration 仅统计运动时间,不包含关键帧停留时间。 */
|
|
4152
4271
|
declare interface IPlayOptions {
|
|
4153
|
-
/** 总播放时长(毫秒),不包括停留时间 */
|
|
4154
4272
|
duration?: number;
|
|
4155
|
-
|
|
4273
|
+
speed?: number;
|
|
4274
|
+
playbackRate?: number;
|
|
4275
|
+
/** @deprecated 保留旧调用兼容,当前时间轴固定按距离分配。 */
|
|
4276
|
+
timing?: RoamingTimingMode;
|
|
4277
|
+
/** @deprecated 保留旧调用兼容,当前位置固定使用直线插值。 */
|
|
4278
|
+
positionInterpolation?: RoamingPositionInterpolation;
|
|
4279
|
+
/** @deprecated 保留旧调用兼容,当前朝向固定使用方向向量线性插值。 */
|
|
4280
|
+
rotationInterpolation?: RoamingRotationInterpolation;
|
|
4281
|
+
/** @deprecated 保留旧调用兼容,当前播放固定使用线性时间。 */
|
|
4282
|
+
easing?: RoamingEasing;
|
|
4283
|
+
/** @deprecated 当前播放不再生成平滑曲线。 */
|
|
4284
|
+
smoothTension?: number;
|
|
4285
|
+
/** @deprecated 旋转量不再参与移动时长计算。 */
|
|
4286
|
+
rotationWeight?: number;
|
|
4156
4287
|
loop?: boolean;
|
|
4157
|
-
|
|
4158
|
-
|
|
4159
|
-
|
|
4288
|
+
loopMode?: RoamingLoopMode;
|
|
4289
|
+
loopCount?: number;
|
|
4290
|
+
direction?: RoamingDirection;
|
|
4291
|
+
maxFrameDelta?: number;
|
|
4292
|
+
onUpdate?: (state: IRoamingPlaybackState) => void;
|
|
4160
4293
|
onPointComplete?: (pointIndex: number) => void;
|
|
4294
|
+
onLoop?: (loopIndex: number) => void;
|
|
4295
|
+
onComplete?: () => void;
|
|
4296
|
+
onStateChange?: (state: IRoamingPlaybackState) => void;
|
|
4297
|
+
onError?: (error: Error) => void;
|
|
4161
4298
|
}
|
|
4162
4299
|
|
|
4163
4300
|
declare interface IPoint3 {
|
|
@@ -4166,13 +4303,25 @@ declare interface IPoint3 {
|
|
|
4166
4303
|
z: number;
|
|
4167
4304
|
}
|
|
4168
4305
|
|
|
4169
|
-
/**
|
|
4170
|
-
|
|
4171
|
-
|
|
4172
|
-
|
|
4306
|
+
/** 对外只读的播放状态快照。 */
|
|
4307
|
+
declare interface IRoamingPlaybackState {
|
|
4308
|
+
status: RoamingStatus;
|
|
4309
|
+
progress: number;
|
|
4310
|
+
currentTime: number;
|
|
4311
|
+
totalTime: number;
|
|
4312
|
+
playbackRate: number;
|
|
4313
|
+
loopIndex: number;
|
|
4314
|
+
fromPointIndex: number | null;
|
|
4315
|
+
toPointIndex: number | null;
|
|
4316
|
+
}
|
|
4317
|
+
|
|
4318
|
+
/** 单个漫游关键帧,duration 表示从上一关键帧到当前关键帧的运动时长。 */
|
|
4173
4319
|
declare interface IRoamingPoint extends ICameraPose {
|
|
4174
|
-
|
|
4320
|
+
id?: string;
|
|
4321
|
+
name?: string;
|
|
4175
4322
|
stayTime?: number;
|
|
4323
|
+
duration?: number;
|
|
4324
|
+
easing?: RoamingEasing;
|
|
4176
4325
|
}
|
|
4177
4326
|
|
|
4178
4327
|
declare interface IssueCameraPose {
|
|
@@ -4813,7 +4962,7 @@ declare class LoaderModule {
|
|
|
4813
4962
|
private engine;
|
|
4814
4963
|
constructor(engine: any);
|
|
4815
4964
|
/**
|
|
4816
|
-
*
|
|
4965
|
+
* 按独立批次加载模型 URL,并在当前批次注册完成后统一启动首轮加载。
|
|
4817
4966
|
*/
|
|
4818
4967
|
loadModels(urls: string[], options?: LoadModelOptions): Promise<void>;
|
|
4819
4968
|
/**
|
|
@@ -5030,6 +5179,8 @@ declare type LoadingStyle2d = 1 | 2;
|
|
|
5030
5179
|
export declare interface LoadModelOptions {
|
|
5031
5180
|
/** URL 是否为未加密的轻量化整包 ZIP;开启后会先解压并转成本地虚拟 URL 再加载 */
|
|
5032
5181
|
isZipPackage?: boolean;
|
|
5182
|
+
/** 是否加载轻量化模型边线;默认为 true,关闭后不会请求 edge 数据包 */
|
|
5183
|
+
loadEdge?: boolean;
|
|
5033
5184
|
/** 是否要加载解单定额映射数据 */
|
|
5034
5185
|
loadQuotaList?: boolean;
|
|
5035
5186
|
/** 自定义模型 ID,若不提供则自动生成 UUID */
|
|
@@ -5571,6 +5722,20 @@ declare class MiniMap {
|
|
|
5571
5722
|
dispose(): void;
|
|
5572
5723
|
}
|
|
5573
5724
|
|
|
5725
|
+
export declare interface ModelAnimationInfo {
|
|
5726
|
+
name: string;
|
|
5727
|
+
duration: number;
|
|
5728
|
+
}
|
|
5729
|
+
|
|
5730
|
+
export declare interface ModelAnimationOptions {
|
|
5731
|
+
loop?: boolean;
|
|
5732
|
+
repetitions?: number;
|
|
5733
|
+
timeScale?: number;
|
|
5734
|
+
clampWhenFinished?: boolean;
|
|
5735
|
+
fadeIn?: number;
|
|
5736
|
+
stopOthers?: boolean;
|
|
5737
|
+
}
|
|
5738
|
+
|
|
5574
5739
|
/** 三维模型点击事件中的单个构件数据。 */
|
|
5575
5740
|
export declare interface ModelClickEventItem {
|
|
5576
5741
|
url: string;
|
|
@@ -5767,6 +5932,8 @@ declare class ModelEdge {
|
|
|
5767
5932
|
private groupVisibleBeforeExplode;
|
|
5768
5933
|
private highlightVisibleBeforeExplode;
|
|
5769
5934
|
private getModelEntry;
|
|
5935
|
+
/** 判断模型是否允许加载边线;旧模型记录未包含该字段时按允许处理。 */
|
|
5936
|
+
private shouldLoadModelEdge;
|
|
5770
5937
|
private getFilteredIdSet;
|
|
5771
5938
|
private getOrCreateItemIndex;
|
|
5772
5939
|
private getEdgePointsByIndex;
|
|
@@ -6206,9 +6373,12 @@ declare class ModelMapperBatch {
|
|
|
6206
6373
|
/** 管理独立于 BIM 主模型的第三方 GLB 摆放、编辑与场景持久化。 */
|
|
6207
6374
|
declare class ModelPlace {
|
|
6208
6375
|
private readonly engine;
|
|
6209
|
-
private
|
|
6376
|
+
private loader;
|
|
6377
|
+
private dracoLoader;
|
|
6378
|
+
private dracoDecoderPath;
|
|
6210
6379
|
private readonly modelList;
|
|
6211
6380
|
private readonly modelTransforms;
|
|
6381
|
+
private readonly animationClock;
|
|
6212
6382
|
private transformControl;
|
|
6213
6383
|
private transformHelper;
|
|
6214
6384
|
private selectedModelId;
|
|
@@ -6217,6 +6387,7 @@ declare class ModelPlace {
|
|
|
6217
6387
|
private isRestoring;
|
|
6218
6388
|
private isUndoing;
|
|
6219
6389
|
private isPasting;
|
|
6390
|
+
private activeLoadCount;
|
|
6220
6391
|
private readonly pendingModelIds;
|
|
6221
6392
|
private bimHighlightDisabledBeforeEditing;
|
|
6222
6393
|
private selectionPointerDown;
|
|
@@ -6226,7 +6397,14 @@ declare class ModelPlace {
|
|
|
6226
6397
|
constructor(engine: any);
|
|
6227
6398
|
/** 释放控制柄、事件和已加载模型;引擎销毁时应调用。 */
|
|
6228
6399
|
dispose(): void;
|
|
6229
|
-
/**
|
|
6400
|
+
/**
|
|
6401
|
+
* 设置 Draco 解码器目录;相对路径会按 SDK 静态资源规则解析。
|
|
6402
|
+
* 路径应指向包含 draco_decoder.js、draco_wasm_wrapper.js 和 draco_decoder.wasm 的目录。
|
|
6403
|
+
*/
|
|
6404
|
+
setDracoDecoderPath(path?: string | null): void;
|
|
6405
|
+
/** 获取当前实际使用的 Draco 解码器目录。 */
|
|
6406
|
+
getDracoDecoderPath(): string;
|
|
6407
|
+
/** 每帧同步控制柄并推进第三方模型动画。 */
|
|
6230
6408
|
update(): void;
|
|
6231
6409
|
/**
|
|
6232
6410
|
* 加载 GLB 并放入场景。未指定 position 时,调用方需在开启捕捉的视图中单击确认落点。
|
|
@@ -6251,6 +6429,21 @@ declare class ModelPlace {
|
|
|
6251
6429
|
materialIndex: number;
|
|
6252
6430
|
materialName: string;
|
|
6253
6431
|
}>;
|
|
6432
|
+
/** 查询 GLB 内可播放的动画片段;数组首项即默认动画。 */
|
|
6433
|
+
getModelAnimations(modelId: string): ModelAnimationInfo[];
|
|
6434
|
+
/** 播放指定动画;未传名称时播放 GLB 的第一个默认片段。 */
|
|
6435
|
+
playAnimation(modelId: string, animationName?: string, options?: ModelAnimationOptions): ModelAnimationInfo;
|
|
6436
|
+
/** 停止指定动画;未传名称时停止该模型的全部动画。 */
|
|
6437
|
+
stopAnimation(modelId: string, animationName?: string): void;
|
|
6438
|
+
/**
|
|
6439
|
+
* 实时更新模型位置和方向,不写入撤销历史,适用于遥测刷新和路径动画。
|
|
6440
|
+
* direction 默认把模型本地 +Z 轴对准目标方向,可通过 forwardAxis 调整模型前向轴。
|
|
6441
|
+
*/
|
|
6442
|
+
updateModelPose(modelId: string, pose: ModelPoseOptions): SceneModelData;
|
|
6443
|
+
/** 高频更新模型位置的便捷接口。 */
|
|
6444
|
+
updateModelPosition(modelId: string, position: THREE.Vector3Tuple): SceneModelData;
|
|
6445
|
+
/** 高频更新模型方向的便捷接口。 */
|
|
6446
|
+
updateModelDirection(modelId: string, direction: THREE.Vector3Tuple, forwardAxis?: THREE.Vector3Tuple): SceneModelData;
|
|
6254
6447
|
/** 删除模型及其场景对象。 */
|
|
6255
6448
|
deleteModel(modelId: string): void;
|
|
6256
6449
|
/** 清空场景中的全部第三方模型并释放资源;该操作可通过 undo 撤回。 */
|
|
@@ -6266,6 +6459,11 @@ declare class ModelPlace {
|
|
|
6266
6459
|
/** 撤回最近一次会改变模型状态的操作。 */
|
|
6267
6460
|
undo(): Promise<boolean>;
|
|
6268
6461
|
private loadRecord;
|
|
6462
|
+
/** 创建挂载 Draco 解码能力的 GLTFLoader,普通 GLB 仍沿用同一加载入口。 */
|
|
6463
|
+
private createGltfLoader;
|
|
6464
|
+
/** 创建独立解码器实例,便于管理器销毁或切换资源目录时释放 worker。 */
|
|
6465
|
+
private createDracoLoader;
|
|
6466
|
+
private resolveDracoDecoderPath;
|
|
6269
6467
|
/** 加载模型资源并创建记录,调用方可决定何时正式加入模型列表。 */
|
|
6270
6468
|
private createRecord;
|
|
6271
6469
|
/** 将已加载对象登记为正式模型,使其可被选中、导出和撤回。 */
|
|
@@ -6312,6 +6510,8 @@ declare class ModelPlace {
|
|
|
6312
6510
|
private normalizeData;
|
|
6313
6511
|
private cloneData;
|
|
6314
6512
|
private createId;
|
|
6513
|
+
/** 统一停止动画并释放模型资源,避免模型删除后动画混合器继续持有场景对象。 */
|
|
6514
|
+
private removeRecord;
|
|
6315
6515
|
private removeObject;
|
|
6316
6516
|
private requestRender;
|
|
6317
6517
|
}
|
|
@@ -6333,6 +6533,13 @@ export declare interface ModelPlaceSelectionEvent {
|
|
|
6333
6533
|
object: THREE.Object3D;
|
|
6334
6534
|
}
|
|
6335
6535
|
|
|
6536
|
+
export declare interface ModelPoseOptions {
|
|
6537
|
+
position?: THREE.Vector3Tuple;
|
|
6538
|
+
rotation?: THREE.EulerTuple;
|
|
6539
|
+
direction?: THREE.Vector3Tuple;
|
|
6540
|
+
forwardAxis?: THREE.Vector3Tuple;
|
|
6541
|
+
}
|
|
6542
|
+
|
|
6336
6543
|
declare class ModelProperties {
|
|
6337
6544
|
private engine;
|
|
6338
6545
|
extended: Map<string, any>;
|
|
@@ -6351,9 +6558,19 @@ declare class ModelToolModule {
|
|
|
6351
6558
|
private engine;
|
|
6352
6559
|
private highlightMaterial;
|
|
6353
6560
|
private translucentMaterial;
|
|
6561
|
+
private pickBoxMaterial;
|
|
6354
6562
|
private customModelColorRecords;
|
|
6355
6563
|
private customInstanceColorBatches;
|
|
6356
6564
|
constructor(engine_: any);
|
|
6565
|
+
/**
|
|
6566
|
+
* 为名称匹配的普通构件新增透明拾取 Box,并追加到原节点 infos 中。
|
|
6567
|
+
* @param names 构件名称关键词,任一关键词被包含即视为匹配
|
|
6568
|
+
* @param minSize Box 三个方向的最小尺寸,单位为米
|
|
6569
|
+
* @returns 成功新增的拾取 Box 数量
|
|
6570
|
+
*/
|
|
6571
|
+
addPickBoxByNames(names: string[], minSize?: number): number;
|
|
6572
|
+
/** 合并节点已有的本地包围盒,作为拾取 Box 的位置和尺寸来源。 */
|
|
6573
|
+
private getNodeLocalBox;
|
|
6357
6574
|
split_merge_model(model: any): void;
|
|
6358
6575
|
un_split_merge_model(model: any): void;
|
|
6359
6576
|
private shouldKeepSplitState;
|
|
@@ -6931,157 +7148,317 @@ declare class PanoramaLoader {
|
|
|
6931
7148
|
dispose(): void;
|
|
6932
7149
|
}
|
|
6933
7150
|
|
|
7151
|
+
/** 可序列化的通用路径数据,不包含 Three.js 运行时对象。 */
|
|
7152
|
+
export declare interface PathDrawData {
|
|
7153
|
+
version: 1;
|
|
7154
|
+
id: string;
|
|
7155
|
+
lineType: PathDrawLineType;
|
|
7156
|
+
coordinateSystem: 'world';
|
|
7157
|
+
closed: false;
|
|
7158
|
+
roundedRadius: number;
|
|
7159
|
+
points: PathDrawPointData[];
|
|
7160
|
+
samples: PathDrawVector3[];
|
|
7161
|
+
length: number;
|
|
7162
|
+
}
|
|
7163
|
+
|
|
7164
|
+
export declare type PathDrawLineType = 'bezier' | 'straight' | 'rounded';
|
|
7165
|
+
|
|
7166
|
+
/** 管理模型表面采点、路径预览、点位编辑和通用数据导出。 */
|
|
7167
|
+
declare class PathDrawManager {
|
|
7168
|
+
readonly type = "path-draw";
|
|
7169
|
+
private readonly engine;
|
|
7170
|
+
private readonly root;
|
|
7171
|
+
private readonly pointsGroup;
|
|
7172
|
+
private readonly points;
|
|
7173
|
+
private readonly history;
|
|
7174
|
+
private options;
|
|
7175
|
+
private lineType;
|
|
7176
|
+
private roundedRadius;
|
|
7177
|
+
private line;
|
|
7178
|
+
private previewLine;
|
|
7179
|
+
private previewMarker;
|
|
7180
|
+
private transformControl;
|
|
7181
|
+
private transformHelper;
|
|
7182
|
+
private selectedPointId;
|
|
7183
|
+
private panel;
|
|
7184
|
+
private pointsList;
|
|
7185
|
+
private statusElement;
|
|
7186
|
+
private addButton;
|
|
7187
|
+
private completeButton;
|
|
7188
|
+
private radiusInput;
|
|
7189
|
+
private mode;
|
|
7190
|
+
private active;
|
|
7191
|
+
private closing;
|
|
7192
|
+
private transformDragging;
|
|
7193
|
+
private suppressNextCanvasClick;
|
|
7194
|
+
private controlsEnabledBeforeDrag;
|
|
7195
|
+
private pointSequence;
|
|
7196
|
+
private pathId;
|
|
7197
|
+
private readonly onKeyDown;
|
|
7198
|
+
constructor(engine: any);
|
|
7199
|
+
/** 打开路径编辑器;重复打开会先彻底清理上一次会话。 */
|
|
7200
|
+
open(options?: PathDrawOptions): void;
|
|
7201
|
+
/** 点击“添加点”后进入单次拾取,成功落点会立即回到编辑状态。 */
|
|
7202
|
+
startAddPoint(): boolean;
|
|
7203
|
+
/** 切换路径线型并记录为一条可撤销操作。 */
|
|
7204
|
+
setLineType(lineType: PathDrawLineType): void;
|
|
7205
|
+
/** 撤销最近一次采点、删点、移动、坐标或线型修改。 */
|
|
7206
|
+
undo(): boolean;
|
|
7207
|
+
/** 清空当前路径但保留编辑器,清空操作本身可以撤销。 */
|
|
7208
|
+
clear(): void;
|
|
7209
|
+
/** 返回与 Three.js 解耦的路径快照;少于两个点时路径尚未成立。 */
|
|
7210
|
+
getPathData(): PathDrawData | null;
|
|
7211
|
+
/** 完成并返回路径数据,回调结束后关闭编辑器和所有临时对象。 */
|
|
7212
|
+
complete(): PathDrawData | null;
|
|
7213
|
+
/** 判断编辑器当前是否处于打开状态。 */
|
|
7214
|
+
isActive(): boolean;
|
|
7215
|
+
/** 关闭功能并清除点位、UI、线条、操作柄、历史和事件监听。 */
|
|
7216
|
+
close(): void;
|
|
7217
|
+
private closeInternal;
|
|
7218
|
+
/** 引擎销毁时释放长期持有的 Three.js 资源。 */
|
|
7219
|
+
dispose(): void;
|
|
7220
|
+
/** 相机类型切换后同步操作柄相机,保证正交与透视视图都可编辑。 */
|
|
7221
|
+
update(): void;
|
|
7222
|
+
/** 行为系统切换到其他工具时,按关闭语义清理整个路径会话。 */
|
|
7223
|
+
disActive(): void;
|
|
7224
|
+
/** 拾取状态更新虚线预览;编辑状态不接管模型悬浮反馈。 */
|
|
7225
|
+
handleMouseMove(event: any): void;
|
|
7226
|
+
/** 拾取状态提交一个点,编辑状态则选择场景中的点位。 */
|
|
7227
|
+
handleMouseClick(event: any): void;
|
|
7228
|
+
/** Esc 只退出本次拾取;再次操作仍保留已绘制路径。 */
|
|
7229
|
+
handelKeyEscDown(): void;
|
|
7230
|
+
private activateBehavior;
|
|
7231
|
+
private restoreDefaultBehavior;
|
|
7232
|
+
private ensureTransformControl;
|
|
7233
|
+
private detachTransformControl;
|
|
7234
|
+
private createPointRecord;
|
|
7235
|
+
private selectPoint;
|
|
7236
|
+
private clearSelection;
|
|
7237
|
+
private getSelectedPoint;
|
|
7238
|
+
private getCatchPoint;
|
|
7239
|
+
private pickPointMesh;
|
|
7240
|
+
private updatePreview;
|
|
7241
|
+
private clearPreview;
|
|
7242
|
+
private refreshAll;
|
|
7243
|
+
private refreshLine;
|
|
7244
|
+
/** 使用 Line2 保证 WebGL 环境下的像素线宽真实生效。 */
|
|
7245
|
+
private updateLineObject;
|
|
7246
|
+
private syncLineResolution;
|
|
7247
|
+
private disposeLine;
|
|
7248
|
+
private buildSamplePoints;
|
|
7249
|
+
/** 使用 De Casteljau 算法支持任意数量的贝塞尔控制点。 */
|
|
7250
|
+
private sampleBezier;
|
|
7251
|
+
/** 每个折点分别截取进出线段,并用二次曲线生成稳定圆角。 */
|
|
7252
|
+
private sampleRoundedPolyline;
|
|
7253
|
+
private calculateLength;
|
|
7254
|
+
private getPointRole;
|
|
7255
|
+
private getRoleLabel;
|
|
7256
|
+
private saveHistory;
|
|
7257
|
+
private createSnapshot;
|
|
7258
|
+
private restoreSnapshot;
|
|
7259
|
+
private clearPointRecords;
|
|
7260
|
+
private removePoint;
|
|
7261
|
+
private updatePointCoordinate;
|
|
7262
|
+
private createPanel;
|
|
7263
|
+
private createIconButton;
|
|
7264
|
+
private refreshPanel;
|
|
7265
|
+
private renderPointRows;
|
|
7266
|
+
private setButtonDisabled;
|
|
7267
|
+
private setStatus;
|
|
7268
|
+
private handleKeyDown;
|
|
7269
|
+
private isTextInputTarget;
|
|
7270
|
+
private emitChange;
|
|
7271
|
+
private requestRender;
|
|
7272
|
+
private toPlainVector;
|
|
7273
|
+
}
|
|
7274
|
+
|
|
7275
|
+
export declare interface PathDrawOptions {
|
|
7276
|
+
id?: string;
|
|
7277
|
+
lineType?: PathDrawLineType;
|
|
7278
|
+
lineColor?: string;
|
|
7279
|
+
previewColor?: string;
|
|
7280
|
+
pointColor?: string;
|
|
7281
|
+
selectedPointColor?: string;
|
|
7282
|
+
pointSize?: number;
|
|
7283
|
+
/** 线条屏幕宽度,单位为 CSS 像素。 */
|
|
7284
|
+
lineWidth?: number;
|
|
7285
|
+
sampleCount?: number;
|
|
7286
|
+
roundedRadius?: number;
|
|
7287
|
+
historyLimit?: number;
|
|
7288
|
+
onChange?: (data: PathDrawData | null) => void;
|
|
7289
|
+
onComplete?: (data: PathDrawData) => void;
|
|
7290
|
+
}
|
|
7291
|
+
|
|
7292
|
+
export declare interface PathDrawPointData {
|
|
7293
|
+
id: string;
|
|
7294
|
+
order: number;
|
|
7295
|
+
role: PathDrawPointRole;
|
|
7296
|
+
position: PathDrawVector3;
|
|
7297
|
+
}
|
|
7298
|
+
|
|
7299
|
+
export declare type PathDrawPointRole = 'start' | 'control' | 'end';
|
|
7300
|
+
|
|
7301
|
+
export declare interface PathDrawVector3 {
|
|
7302
|
+
x: number;
|
|
7303
|
+
y: number;
|
|
7304
|
+
z: number;
|
|
7305
|
+
}
|
|
7306
|
+
|
|
6934
7307
|
/**
|
|
6935
|
-
*
|
|
7308
|
+
* 商业级关键帧漫游时间轴。
|
|
6936
7309
|
*
|
|
6937
|
-
*
|
|
6938
|
-
* 1. 保存相机点位(包括位置、旋转、目标点)
|
|
6939
|
-
* 2. 删除点位
|
|
6940
|
-
* 3. 跳转到指定点位
|
|
6941
|
-
* 4. 完整播放路径动画
|
|
6942
|
-
* 5. 设置每个点位的停留时间
|
|
7310
|
+
* 所有运动、停留和循环统一由一个播放头驱动;关键帧在播放前编译,运行期间不修改源数据。
|
|
6943
7311
|
*/
|
|
6944
7312
|
declare class PathRoaming {
|
|
6945
|
-
private engine;
|
|
6946
|
-
/** 点位列表 */
|
|
7313
|
+
private readonly engine;
|
|
6947
7314
|
private points;
|
|
6948
|
-
|
|
6949
|
-
private
|
|
6950
|
-
|
|
7315
|
+
private status;
|
|
7316
|
+
private options;
|
|
7317
|
+
private activePointIndices;
|
|
7318
|
+
private activePoints;
|
|
7319
|
+
private segments;
|
|
6951
7320
|
private animationFrameId;
|
|
6952
|
-
|
|
6953
|
-
private
|
|
6954
|
-
|
|
6955
|
-
private
|
|
6956
|
-
private
|
|
6957
|
-
|
|
6958
|
-
private
|
|
6959
|
-
|
|
6960
|
-
private stayTimerId;
|
|
6961
|
-
/** 播放范围的结束索引 */
|
|
6962
|
-
private playRangeToIndex;
|
|
7321
|
+
private animationSessionId;
|
|
7322
|
+
private lastFrameTime;
|
|
7323
|
+
private playhead;
|
|
7324
|
+
private totalTime;
|
|
7325
|
+
private loopIndex;
|
|
7326
|
+
private currentPose;
|
|
7327
|
+
private completedSegmentIndices;
|
|
7328
|
+
private orientationUp;
|
|
6963
7329
|
constructor(engine: any);
|
|
6964
|
-
/**
|
|
6965
|
-
* 初始化管理器
|
|
6966
|
-
*/
|
|
7330
|
+
/** 初始化漫游管理器。 */
|
|
6967
7331
|
init(): void;
|
|
6968
|
-
/**
|
|
6969
|
-
* 获取当前相机点位
|
|
6970
|
-
* @returns 当前相机的姿态信息
|
|
6971
|
-
*/
|
|
7332
|
+
/** 读取当前相机并生成可持久化关键帧。 */
|
|
6972
7333
|
getCurrentPoint(): IRoamingPoint;
|
|
6973
|
-
/**
|
|
6974
|
-
* 添加点位
|
|
6975
|
-
* @param point 可选,如果不传则使用当前相机位置
|
|
6976
|
-
* @param stayTime 停留时间(毫秒),默认0
|
|
6977
|
-
* @returns 添加后的点位列表长度
|
|
6978
|
-
*/
|
|
7334
|
+
/** 将当前相机姿态添加为关键帧。 */
|
|
6979
7335
|
addPoint(stayTime?: number): number;
|
|
6980
|
-
/**
|
|
6981
|
-
|
|
6982
|
-
|
|
6983
|
-
* @returns 添加后的点位列表长度
|
|
6984
|
-
*/
|
|
7336
|
+
/** 添加一个指定姿态的关键帧。 */
|
|
7337
|
+
addKeyframe(point: IRoamingPoint): number;
|
|
7338
|
+
/** 批量追加关键帧。 */
|
|
6985
7339
|
addPoints(points: IRoamingPoint[]): number;
|
|
6986
|
-
/**
|
|
6987
|
-
* 保存点位清单(别名方法)
|
|
6988
|
-
* @param points 点位数组
|
|
6989
|
-
* @returns 添加后的点位列表长度
|
|
6990
|
-
*/
|
|
7340
|
+
/** 兼容旧接口,继续采用追加语义。 */
|
|
6991
7341
|
savePoints(points: IRoamingPoint[]): number;
|
|
6992
|
-
/**
|
|
6993
|
-
|
|
6994
|
-
|
|
6995
|
-
* @returns 是否删除成功
|
|
6996
|
-
*/
|
|
7342
|
+
/** 使用新关键帧集合完整替换当前数据。 */
|
|
7343
|
+
setPoints(points: IRoamingPoint[]): number;
|
|
7344
|
+
/** 删除指定关键帧。 */
|
|
6997
7345
|
removePoint(index: number): boolean;
|
|
6998
|
-
/**
|
|
6999
|
-
* 清空所有点位
|
|
7000
|
-
*/
|
|
7346
|
+
/** 清空全部关键帧。 */
|
|
7001
7347
|
clearPoints(): void;
|
|
7002
|
-
/**
|
|
7003
|
-
* 获取所有点位
|
|
7004
|
-
* @returns 点位数组
|
|
7005
|
-
*/
|
|
7348
|
+
/** 返回关键帧深拷贝,调用方修改结果不会污染内部时间轴。 */
|
|
7006
7349
|
getPoints(): IRoamingPoint[];
|
|
7007
|
-
/**
|
|
7008
|
-
* 获取点位数量
|
|
7009
|
-
* @returns 点位数量
|
|
7010
|
-
*/
|
|
7350
|
+
/** 获取关键帧数量。 */
|
|
7011
7351
|
getPointCount(): number;
|
|
7012
|
-
/**
|
|
7013
|
-
* 更新指定索引的点位
|
|
7014
|
-
* @param index 点位索引
|
|
7015
|
-
* @param point 新的点位信息
|
|
7016
|
-
* @returns 是否更新成功
|
|
7017
|
-
*/
|
|
7352
|
+
/** 更新指定关键帧。 */
|
|
7018
7353
|
updatePoint(index: number, point: IRoamingPoint): boolean;
|
|
7019
|
-
/**
|
|
7020
|
-
|
|
7021
|
-
|
|
7022
|
-
|
|
7023
|
-
|
|
7354
|
+
/** 更新关键帧的停留时间。 */
|
|
7355
|
+
setPointStayTime(index: number, stayTime: number): boolean;
|
|
7356
|
+
/** 将关键帧序列化为 JSON。 */
|
|
7357
|
+
serialize(pretty?: boolean): string;
|
|
7358
|
+
/** 从 JSON 导入关键帧;replace=false 时采用追加模式。 */
|
|
7359
|
+
deserialize(serialized: string, replace?: boolean): number;
|
|
7360
|
+
/** 无动画跳转到指定关键帧。 */
|
|
7024
7361
|
jumpToPoint(index: number): boolean;
|
|
7025
|
-
/**
|
|
7026
|
-
* 播放路径动画
|
|
7027
|
-
* @param options 播放配置
|
|
7028
|
-
* @returns 是否开始播放
|
|
7029
|
-
*/
|
|
7362
|
+
/** 从第一帧到最后一帧播放完整时间轴。 */
|
|
7030
7363
|
play(options?: IPlayOptions): boolean;
|
|
7031
|
-
/**
|
|
7032
|
-
* 播放指定范围的路径
|
|
7033
|
-
* @param fromIndex 起始索引
|
|
7034
|
-
* @param toIndex 结束索引
|
|
7035
|
-
* @param options 播放配置
|
|
7036
|
-
* @returns 是否开始播放
|
|
7037
|
-
*/
|
|
7364
|
+
/** 播放指定关键帧范围,支持正向和反向。 */
|
|
7038
7365
|
playRange(fromIndex: number, toIndex: number, options?: IPlayOptions): boolean;
|
|
7039
|
-
/**
|
|
7040
|
-
|
|
7041
|
-
|
|
7366
|
+
/** 暂停并保留播放头、当前姿态和循环状态。 */
|
|
7367
|
+
pause(): boolean;
|
|
7368
|
+
/** 从暂停位置继续播放。 */
|
|
7369
|
+
resume(): boolean;
|
|
7370
|
+
/** 停止在当前姿态,并把最终状态一次性同步给控制器。 */
|
|
7042
7371
|
stop(): void;
|
|
7043
|
-
/**
|
|
7044
|
-
|
|
7045
|
-
|
|
7046
|
-
|
|
7047
|
-
/**
|
|
7048
|
-
|
|
7049
|
-
|
|
7372
|
+
/** 设置播放倍速,运行中即时生效。 */
|
|
7373
|
+
setPlaybackRate(playbackRate: number): boolean;
|
|
7374
|
+
/** 跳到时间轴归一化进度;默认不补发跨越关键帧的完成回调。 */
|
|
7375
|
+
seek(progress: number, emitPointCallbacks?: boolean): boolean;
|
|
7376
|
+
/** 获取当前播放状态快照。 */
|
|
7377
|
+
getState(): IRoamingPlaybackState;
|
|
7378
|
+
/** 兼容旧接口。 */
|
|
7050
7379
|
getIsPlaying(): boolean;
|
|
7051
|
-
/**
|
|
7052
|
-
* 动画循环
|
|
7053
|
-
*/
|
|
7054
|
-
private readonly animate;
|
|
7055
|
-
/**
|
|
7056
|
-
* 段播放完成处理
|
|
7057
|
-
*/
|
|
7058
|
-
private onSegmentComplete;
|
|
7059
|
-
/**
|
|
7060
|
-
* 移动到下一段
|
|
7061
|
-
*/
|
|
7062
|
-
private moveToNextSegment;
|
|
7063
|
-
/**
|
|
7064
|
-
* 播放完成处理
|
|
7065
|
-
*/
|
|
7066
|
-
private onPlayComplete;
|
|
7067
|
-
/**
|
|
7068
|
-
* 插值计算两个相机姿态之间的中间姿态
|
|
7069
|
-
* @param from 起始姿态
|
|
7070
|
-
* @param to 结束姿态
|
|
7071
|
-
* @param t 进度(0-1)
|
|
7072
|
-
* @returns 插值后的姿态
|
|
7073
|
-
*/
|
|
7074
|
-
private interpolatePose;
|
|
7075
|
-
/**
|
|
7076
|
-
* 缓入缓出函数(三次方)
|
|
7077
|
-
* @param t 输入值(0-1)
|
|
7078
|
-
* @returns 缓动后的值
|
|
7079
|
-
*/
|
|
7080
|
-
private easeInOutCubic;
|
|
7081
|
-
/**
|
|
7082
|
-
* 销毁管理器
|
|
7083
|
-
*/
|
|
7380
|
+
/** 释放动画和关键帧数据。 */
|
|
7084
7381
|
dispose(): void;
|
|
7382
|
+
/** 校验范围、编译时间轴并启动播放。 */
|
|
7383
|
+
private startPlayback;
|
|
7384
|
+
/** 使用帧间增量推进全局播放头,浏览器失焦后限制单次跳跃。 */
|
|
7385
|
+
private readonly animate;
|
|
7386
|
+
/** 根据循环策略重建下一轮时间轴。 */
|
|
7387
|
+
private advanceLoop;
|
|
7388
|
+
/** 完成播放并保持终点姿态。 */
|
|
7389
|
+
private completePlayback;
|
|
7390
|
+
/** 将当前关键帧顺序编译成包含运动和停留的不可变片段。 */
|
|
7391
|
+
private compileTimeline;
|
|
7392
|
+
/** 只按相机直线移动距离分配时间,旋转量不再改变移动速度。 */
|
|
7393
|
+
private getSegmentWeights;
|
|
7394
|
+
/** 按折线累计距离生成全局匀速时间轴;原地转向仅占一个最小帧时长。 */
|
|
7395
|
+
private getSegmentDurations;
|
|
7396
|
+
/** 根据播放头计算并应用当前姿态。 */
|
|
7397
|
+
private applyPlayhead;
|
|
7398
|
+
/** 位置、目标点和方向向量全部按同一个线性进度插值。 */
|
|
7399
|
+
private interpolateSegment;
|
|
7400
|
+
/** 所有空间向量统一使用直线插值,不再生成曲线或过冲。 */
|
|
7401
|
+
private interpolateTrackVector;
|
|
7402
|
+
/** 将关键帧观察向量线性插值后归一化,再据此生成相机姿态。 */
|
|
7403
|
+
private interpolateDirectionRotation;
|
|
7404
|
+
/** 记录首帧参考上方向,整段动画不再额外插值滚转角。 */
|
|
7405
|
+
private prepareOrientationTrack;
|
|
7406
|
+
/** 关键帧端点也按方向向量生成姿态,避免端点采用另一套旋转规则。 */
|
|
7407
|
+
private createEndpointPose;
|
|
7408
|
+
/** 使用位置到目标点的方向向量生成相机姿态。 */
|
|
7409
|
+
private createLookAtQuaternion;
|
|
7410
|
+
/** 使用相机本地 -Z 轴对准方向,并在接近极点时保持右方向连续。 */
|
|
7411
|
+
private createDirectionQuaternion;
|
|
7412
|
+
/** 直接更新相机;只有相机类型切换时才调用完整恢复流程。 */
|
|
7413
|
+
private applyPose;
|
|
7414
|
+
/** 返回给定播放时间所在片段,停留时间属于其前面的运动片段。 */
|
|
7415
|
+
private findSegment;
|
|
7416
|
+
/** 补发播放头跨越的关键帧完成事件,并保证每轮只触发一次。 */
|
|
7417
|
+
private reportCompletedSegments;
|
|
7418
|
+
/** 跳播回退时重建已完成集合,避免后续回调丢失或重复。 */
|
|
7419
|
+
private rebuildCompletedSegments;
|
|
7420
|
+
/** 规范化播放配置,并兼容旧版 loop 布尔值。 */
|
|
7421
|
+
private resolvePlayOptions;
|
|
7422
|
+
/** 规范化外部关键帧,并以四元数作为旋转的权威数据。 */
|
|
7423
|
+
private normalizePoint;
|
|
7424
|
+
/** 当外部四元数无效时才回退到欧拉角,避免 NaN 进入渲染循环。 */
|
|
7425
|
+
private normalizeQuaternion;
|
|
7426
|
+
/** 创建连续关键帧索引,并按播放方向排序。 */
|
|
7427
|
+
private createPointIndexRange;
|
|
7428
|
+
/** 播放期间修改关键帧会先停止时间轴,避免编译数据与源数据不一致。 */
|
|
7429
|
+
private stopForMutation;
|
|
7430
|
+
/** 源关键帧变化后立即失效编译缓存,禁止旧时间轴继续 seek 或 resume。 */
|
|
7431
|
+
private invalidateTimeline;
|
|
7432
|
+
/** 切换状态并通知外部。 */
|
|
7433
|
+
private setStatus;
|
|
7434
|
+
/** 发送逐帧更新。 */
|
|
7435
|
+
private emitUpdate;
|
|
7436
|
+
/** 发送状态变更。 */
|
|
7437
|
+
private emitStateChange;
|
|
7438
|
+
/** 统一报告配置或数据错误。 */
|
|
7439
|
+
private emitError;
|
|
7440
|
+
/** 播放启动失败时优先使用本次调用提供的错误回调。 */
|
|
7441
|
+
private failPlayback;
|
|
7442
|
+
/** 用户回调异常不能中断引擎动画循环。 */
|
|
7443
|
+
private invokeCallback;
|
|
7444
|
+
/** 取消当前动画帧。 */
|
|
7445
|
+
private cancelAnimationFrame;
|
|
7446
|
+
/** 播放期间解除引擎空闲限帧。 */
|
|
7447
|
+
private setFrameRateExempt;
|
|
7448
|
+
private isValidPointIndex;
|
|
7449
|
+
private isEasing;
|
|
7450
|
+
private interpolateOptionalNumber;
|
|
7451
|
+
private clonePoint;
|
|
7452
|
+
private normalizeVector;
|
|
7453
|
+
private normalizeDirection;
|
|
7454
|
+
private normalizeOptionalPositiveNumber;
|
|
7455
|
+
private toFiniteNumber;
|
|
7456
|
+
private toPositiveNumber;
|
|
7457
|
+
private toNonNegativeNumber;
|
|
7458
|
+
private toVector3;
|
|
7459
|
+
private fromVector3;
|
|
7460
|
+
private toQuaternion;
|
|
7461
|
+
private fromQuaternion;
|
|
7085
7462
|
}
|
|
7086
7463
|
|
|
7087
7464
|
/**
|
|
@@ -7524,6 +7901,20 @@ declare class RenderModuleGaussian {
|
|
|
7524
7901
|
*/
|
|
7525
7902
|
export declare function resolveSdkAsset(path: string, moduleUrl?: string): string;
|
|
7526
7903
|
|
|
7904
|
+
declare type RoamingDirection = 'forward' | 'backward';
|
|
7905
|
+
|
|
7906
|
+
declare type RoamingEasing = 'linear' | 'easeIn' | 'easeOut' | 'easeInOut';
|
|
7907
|
+
|
|
7908
|
+
declare type RoamingLoopMode = 'none' | 'repeat' | 'pingPong';
|
|
7909
|
+
|
|
7910
|
+
declare type RoamingPositionInterpolation = 'linear' | 'smooth';
|
|
7911
|
+
|
|
7912
|
+
declare type RoamingRotationInterpolation = 'direction' | 'auto' | 'lookAt' | 'slerp' | 'euler';
|
|
7913
|
+
|
|
7914
|
+
declare type RoamingStatus = 'idle' | 'playing' | 'paused';
|
|
7915
|
+
|
|
7916
|
+
declare type RoamingTimingMode = 'uniform' | 'distance' | 'keyframe';
|
|
7917
|
+
|
|
7527
7918
|
/** 漫游视角拖拽方向:1 为默认方向,-1 为反向。 */
|
|
7528
7919
|
export declare interface RoamLookDirection {
|
|
7529
7920
|
horizontal?: 1 | -1;
|