vrtalk-web-sdk 0.1.592 → 0.1.594
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/src/index.d.ts +1 -0
- package/dist/src/model/vr/vr-content-data.d.ts +2 -12
- package/dist/src/model/vr-component/index.d.ts +1 -0
- package/dist/src/model/vr-component/vr-component-data.d.ts +2 -0
- package/dist/src/model/vr-component/vr-path-design.d.ts +92 -0
- package/dist/src/parent/com-command/index.d.ts +1 -0
- package/dist/src/parent/com-command/parent-com-command-path-design.d.ts +65 -0
- package/dist/src/parent/com-message/index.d.ts +1 -0
- package/dist/src/parent/com-message/parent-com-message-path-design.d.ts +52 -0
- package/dist/src/parent/vrtalk-editable-player.d.ts +4 -2
- package/dist/src/player/com-command/index.d.ts +1 -0
- package/dist/src/player/com-command/player-com-command-path-design.d.ts +54 -0
- package/dist/src/player/com-command/player-com-command.d.ts +13 -1
- package/dist/src/player/com-message/index.d.ts +1 -0
- package/dist/src/player/com-message/player-com-message-path-design.d.ts +46 -0
- package/dist/src/player/com-message/player-com-message.d.ts +9 -1
- package/dist/src/player/player-controller.d.ts +4 -2
- package/dist/src/utils/path-keyframe-generator.d.ts +66 -0
- package/dist/vrtalk-web-sdk.js +1 -1
- package/package.json +1 -1
package/dist/src/index.d.ts
CHANGED
|
@@ -8,3 +8,4 @@ export { migrateXrMonitorMultiScene } from './utils/xr-monitor-multi-scene-migra
|
|
|
8
8
|
export { buildExpressionFromTree, extractConditionTreeDependencies, EXPRESSION_FUNC_NAME, type ConditionFunctionDependency, type ConditionFunctionDepSpec, type ConditionTreeDependencies, } from './utils/xr-condition-tree-builder';
|
|
9
9
|
export { pickMultiLanguageStr, normalizeMultiLanguageStr, createMultiLanguageStr, normalizeBrowserLanguage, pickCurrentLanguage, } from './utils/multi-language-str-util';
|
|
10
10
|
export { computeProgressBarFillStyle, PROGRESS_BAR_KEYFRAMES_CSS, type ProgressBarFillOptions, } from './utils/progress-bar-style';
|
|
11
|
+
export { generatePathKeyframes, samplePathDesign, buildKeyframesFromSampling, suggestedPlayCompleteProcessType, simplifyPathPoints, type PathGroundSnapFn, type PathSample, type PathSamplingResult, type PathGenerateStats, type PathGenerateResult, } from './utils/path-keyframe-generator';
|
|
@@ -63,18 +63,9 @@ export declare class VrIntroduceItem {
|
|
|
63
63
|
title: string;
|
|
64
64
|
description: string;
|
|
65
65
|
}
|
|
66
|
-
export declare class ArMultisetSettings {
|
|
67
|
-
mapCode: string;
|
|
68
|
-
isSingleFrame: boolean;
|
|
69
|
-
frameCount: number;
|
|
70
|
-
frameInterval: number;
|
|
71
|
-
enableBlurCheck: boolean;
|
|
72
|
-
confidenceThreshold: number;
|
|
73
|
-
backgroundCorrectionInterval: number;
|
|
74
|
-
}
|
|
75
66
|
/**
|
|
76
|
-
* AR 通用设置(与定位方式无关,定位成功后的渲染/加载控制;
|
|
77
|
-
*
|
|
67
|
+
* AR 通用设置(与定位方式无关,定位成功后的渲染/加载控制;Vuforia / PositionX 共用)。
|
|
68
|
+
* 这些是「定位之后」的事,独立于具体定位算法。
|
|
78
69
|
*/
|
|
79
70
|
export declare class ArCommonSettings {
|
|
80
71
|
nearDistanceMax: number;
|
|
@@ -179,7 +170,6 @@ export declare class VrContentData {
|
|
|
179
170
|
vrPlayerUiSettings: VrPlayerUiSettings;
|
|
180
171
|
hamburgerMenu: XrHamburgerMenu;
|
|
181
172
|
vrInfoTemplateSettings: VrInfoTemplateSettings;
|
|
182
|
-
arMultisetSettings: ArMultisetSettings;
|
|
183
173
|
arCommonSettings: ArCommonSettings;
|
|
184
174
|
arPositionXSettings: ArPositionXSettings;
|
|
185
175
|
vrRenderSettings: VrRenderSettings;
|
|
@@ -5,6 +5,7 @@ import { VrComponentAudioSource } from '../vr';
|
|
|
5
5
|
import { VRTalkBaseData } from '../general/vrtalk-base-data';
|
|
6
6
|
import { MultiLanguageStr } from '../general';
|
|
7
7
|
import { XrVariable } from '../vr/xr-logic';
|
|
8
|
+
import { VrTransitionAnimationPathDesign } from './vr-path-design';
|
|
8
9
|
/**
|
|
9
10
|
* VR组件类型
|
|
10
11
|
*/
|
|
@@ -148,6 +149,7 @@ export declare class VrComponentTransitionAnimation {
|
|
|
148
149
|
description: string;
|
|
149
150
|
playCompleteProcessType: VrComponentTransitionAnimationPlayCompleteProcessType;
|
|
150
151
|
keyFrameList: VrComponentTransitionAnimationKeyframe[];
|
|
152
|
+
pathDesign: VrTransitionAnimationPathDesign | null;
|
|
151
153
|
}
|
|
152
154
|
/**
|
|
153
155
|
* 组件过渡动画关键帧
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { Vector3 } from '../general/vector';
|
|
2
|
+
/**
|
|
3
|
+
* 路径设计模式:贴地 / 空中
|
|
4
|
+
*/
|
|
5
|
+
export declare type VrPathDesignMode = 'ground' | 'air';
|
|
6
|
+
export declare class VrPathDesignModeDefine {
|
|
7
|
+
static readonly GROUND: VrPathDesignMode;
|
|
8
|
+
static readonly AIR: VrPathDesignMode;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* 沿路径的朝向模式
|
|
12
|
+
*/
|
|
13
|
+
export declare type VrPathOrientMode = 'yaw' | 'full' | 'none';
|
|
14
|
+
export declare class VrPathOrientModeDefine {
|
|
15
|
+
static readonly YAW: VrPathOrientMode;
|
|
16
|
+
static readonly FULL: VrPathOrientMode;
|
|
17
|
+
static readonly NONE: VrPathOrientMode;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* 往返模式
|
|
21
|
+
*/
|
|
22
|
+
export declare type VrPathRoundTrip = 'none' | 'back-once' | 'back-loop';
|
|
23
|
+
export declare class VrPathRoundTripDefine {
|
|
24
|
+
static readonly NONE: VrPathRoundTrip;
|
|
25
|
+
static readonly BACK_ONCE: VrPathRoundTrip;
|
|
26
|
+
static readonly BACK_LOOP: VrPathRoundTrip;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* 路径平滑方式
|
|
30
|
+
*/
|
|
31
|
+
export declare type VrPathSmoothing = 'linear' | 'smooth';
|
|
32
|
+
export declare class VrPathSmoothingDefine {
|
|
33
|
+
static readonly LINEAR: VrPathSmoothing;
|
|
34
|
+
static readonly SMOOTH: VrPathSmoothing;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* 路径起播方式
|
|
38
|
+
*/
|
|
39
|
+
export declare type VrPathStartMode = 'teleport' | 'walk-in';
|
|
40
|
+
export declare class VrPathStartModeDefine {
|
|
41
|
+
static readonly TELEPORT: VrPathStartMode;
|
|
42
|
+
static readonly WALK_IN: VrPathStartMode;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* 路径设计模式下的 3D 交互工具
|
|
46
|
+
* add=点击放点;select=点选/拖动已有点;pick-start/pick-end=为 PositionX 导航拾取起/终点
|
|
47
|
+
*/
|
|
48
|
+
export declare type VrPathDesignTool = 'add' | 'select' | 'pick-start' | 'pick-end';
|
|
49
|
+
/**
|
|
50
|
+
* 路径设计模式下的观察视角
|
|
51
|
+
* inside=全景漫游;dollhouse=鸟瞰模型;floorplan=正交平面图
|
|
52
|
+
*/
|
|
53
|
+
export declare type VrPathDesignView = 'inside' | 'dollhouse' | 'floorplan';
|
|
54
|
+
/**
|
|
55
|
+
* 路径设计点(控制点)
|
|
56
|
+
*/
|
|
57
|
+
export declare class VrPathDesignPoint {
|
|
58
|
+
id: string;
|
|
59
|
+
position: Vector3;
|
|
60
|
+
hoverMs: number;
|
|
61
|
+
speedOverrideMps: number | null;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* 路径设计草稿的 PositionX 导航来源参数(便于一键重算)
|
|
65
|
+
*/
|
|
66
|
+
export declare class VrPathDesignPositionXSource {
|
|
67
|
+
planId: string;
|
|
68
|
+
start: Vector3;
|
|
69
|
+
end: Vector3;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* 过渡动画的路径设计草稿
|
|
73
|
+
* 仅编辑器(vrtalk-console + player 编辑模式)读写;player 运行时完全不读此字段。
|
|
74
|
+
* 生成关键帧是显式单向烘焙:keyFrameList 被整体替换,本草稿保留以便再次修改/重新生成。
|
|
75
|
+
*/
|
|
76
|
+
export declare class VrTransitionAnimationPathDesign {
|
|
77
|
+
mode: VrPathDesignMode;
|
|
78
|
+
source: 'manual' | 'positionx';
|
|
79
|
+
points: VrPathDesignPoint[];
|
|
80
|
+
speedMps: number;
|
|
81
|
+
orientMode: VrPathOrientMode;
|
|
82
|
+
forwardYawOffsetDeg: number;
|
|
83
|
+
autoGroundOffset: boolean;
|
|
84
|
+
groundOffset: number;
|
|
85
|
+
smoothing: VrPathSmoothing;
|
|
86
|
+
sampleStepM: number;
|
|
87
|
+
closed: boolean;
|
|
88
|
+
roundTrip: VrPathRoundTrip;
|
|
89
|
+
turnDurationMs: number;
|
|
90
|
+
startMode: VrPathStartMode;
|
|
91
|
+
positionx: VrPathDesignPositionXSource | null;
|
|
92
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { VrPathDesignTool, VrPathDesignView, VrTransitionAnimationPathDesign } from '../../model';
|
|
2
|
+
import { VRTalkEditablePlayer } from '../vrtalk-editable-player';
|
|
3
|
+
/**
|
|
4
|
+
* 向播放器发送过渡动画路径设计相关命令
|
|
5
|
+
*/
|
|
6
|
+
export declare class ParentComCommandPathDesign {
|
|
7
|
+
private player;
|
|
8
|
+
constructor(player: VRTalkEditablePlayer);
|
|
9
|
+
/**
|
|
10
|
+
* 进入路径设计模式(player 进入后自动回传 PATH_DESIGN_BOUNDS 包围盒信息)
|
|
11
|
+
* @param componentId 被编辑的组件id
|
|
12
|
+
* @param animationId 被编辑的过渡动画id
|
|
13
|
+
* @param pathDesign 路径设计草稿
|
|
14
|
+
*/
|
|
15
|
+
enter(componentId: string, animationId: string, pathDesign: VrTransitionAnimationPathDesign): void;
|
|
16
|
+
/**
|
|
17
|
+
* 退出路径设计模式(还原组件姿态与视角)
|
|
18
|
+
*/
|
|
19
|
+
exit(): void;
|
|
20
|
+
/**
|
|
21
|
+
* 草稿更新(参数或点位变化后整体推送,player 重绘路径并回传最新统计)
|
|
22
|
+
* @param pathDesign 路径设计草稿
|
|
23
|
+
* @param resnapPoints 是否对所有控制点重新贴地(PositionX 导入 / 撤销重做后使用)
|
|
24
|
+
*/
|
|
25
|
+
update(pathDesign: VrTransitionAnimationPathDesign, resnapPoints?: boolean): void;
|
|
26
|
+
/**
|
|
27
|
+
* 切换 3D 交互工具
|
|
28
|
+
*/
|
|
29
|
+
setTool(tool: VrPathDesignTool): void;
|
|
30
|
+
/**
|
|
31
|
+
* 切换观察视角(全景漫游/鸟瞰/平面图)
|
|
32
|
+
*/
|
|
33
|
+
setView(view: VrPathDesignView): void;
|
|
34
|
+
/**
|
|
35
|
+
* 选中/取消选中路径点
|
|
36
|
+
* @param pointId 点id,null=取消选中
|
|
37
|
+
*/
|
|
38
|
+
selectPoint(pointId: string | null): void;
|
|
39
|
+
/**
|
|
40
|
+
* 预览进度拖拽(player 把组件本体摆到路径对应位置与姿态)
|
|
41
|
+
* @param progress 0~1
|
|
42
|
+
*/
|
|
43
|
+
scrub(progress: number): void;
|
|
44
|
+
/**
|
|
45
|
+
* 试播(player 内部烘临时关键帧走真实播放链路)
|
|
46
|
+
*/
|
|
47
|
+
previewPlay(): void;
|
|
48
|
+
/**
|
|
49
|
+
* 停止试播(还原组件姿态)
|
|
50
|
+
*/
|
|
51
|
+
previewStop(): void;
|
|
52
|
+
/**
|
|
53
|
+
* 生成关键帧(player 采样+贴地+烘焙后通过 PATH_DESIGN_KEYFRAMES 回传)
|
|
54
|
+
*/
|
|
55
|
+
generate(): void;
|
|
56
|
+
/**
|
|
57
|
+
* 一发式生成关键帧(AI 工具用,不进入交互模式)
|
|
58
|
+
* player 直接采样+贴地+烘焙,回传带 requestId 的 PATH_DESIGN_KEYFRAMES 消息
|
|
59
|
+
*/
|
|
60
|
+
generateOneshot(requestId: string, componentId: string, pathDesign: VrTransitionAnimationPathDesign): void;
|
|
61
|
+
/**
|
|
62
|
+
* 把组件本体移到路径起点(含朝向),player 通过 COMPONENT_UPDATE 消息回传新姿态
|
|
63
|
+
*/
|
|
64
|
+
moveComponentToStart(): void;
|
|
65
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { VRTalkEditablePlayer } from '../vrtalk-editable-player';
|
|
2
|
+
import { VrComponentTransitionAnimationKeyframe, VrPathDesignPoint, VrPathDesignTool, Vector3 } from '../../model';
|
|
3
|
+
import type { PathGenerateStats } from '../../utils/path-keyframe-generator';
|
|
4
|
+
/**
|
|
5
|
+
* 父层关于ComMessage的接收
|
|
6
|
+
* 过渡动画路径设计相关
|
|
7
|
+
*/
|
|
8
|
+
export declare class ParentComMessagePathDesign {
|
|
9
|
+
private player;
|
|
10
|
+
constructor(player: VRTalkEditablePlayer);
|
|
11
|
+
/**
|
|
12
|
+
* 用户在 3D 中增/删/插/拖点后回传最新控制点列表
|
|
13
|
+
*/
|
|
14
|
+
onPointsUpdate(callback: (points: VrPathDesignPoint[]) => void): void;
|
|
15
|
+
/**
|
|
16
|
+
* 3D 中选中点变化
|
|
17
|
+
*/
|
|
18
|
+
onSelectionUpdate(callback: (pointId: string | null) => void): void;
|
|
19
|
+
/**
|
|
20
|
+
* 组件包围盒信息(进入模式后自动回传)
|
|
21
|
+
* bottomToPivot = 组件 pivot 到包围盒底部的世界距离(自动离地偏移的来源)
|
|
22
|
+
*/
|
|
23
|
+
onBounds(callback: (data: {
|
|
24
|
+
bottomToPivot: number;
|
|
25
|
+
size: {
|
|
26
|
+
x: number;
|
|
27
|
+
y: number;
|
|
28
|
+
z: number;
|
|
29
|
+
};
|
|
30
|
+
}) => void): void;
|
|
31
|
+
/**
|
|
32
|
+
* 路径统计(任何变化后回传)
|
|
33
|
+
*/
|
|
34
|
+
onStats(callback: (stats: PathGenerateStats) => void): void;
|
|
35
|
+
/**
|
|
36
|
+
* 生成关键帧结果
|
|
37
|
+
* @param callback requestId 非 null 时为一发式生成(AI 工具)的结果,交互面板应忽略
|
|
38
|
+
*/
|
|
39
|
+
onKeyframes(callback: (keyFrameList: VrComponentTransitionAnimationKeyframe[], stats: PathGenerateStats, requestId: string | null) => void): void;
|
|
40
|
+
/**
|
|
41
|
+
* 起/终点拾取结果(PositionX 导航起终点选择)
|
|
42
|
+
*/
|
|
43
|
+
onPickResult(callback: (tool: VrPathDesignTool, position: Vector3) => void): void;
|
|
44
|
+
/**
|
|
45
|
+
* player 内按下 Ctrl+Z / Ctrl+Shift+Z(撤销栈在 console 侧)
|
|
46
|
+
*/
|
|
47
|
+
onUndoRequest(callback: (redo: boolean) => void): void;
|
|
48
|
+
/**
|
|
49
|
+
* 试播/scrub 状态回传
|
|
50
|
+
*/
|
|
51
|
+
onPreviewState(callback: (playing: boolean, progress: number) => void): void;
|
|
52
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ParentComMessagePlayer } from './com-message/parent-com-message-player';
|
|
2
2
|
import { PlayerComMessage, PlayerComMessageType } from '..//player/com-message/player-com-message';
|
|
3
3
|
import { PlayerComCommand } from '../player/com-command/player-com-command';
|
|
4
|
-
import { ParentComCommandAssetLabel, ParentComCommandAssetPointMark, ParentComCommandAssetVolumeMark, ParentComCommandAudio, ParentComCommandCamera, ParentComCommandComponent, ParentComCommandCover, ParentComCommandFloor, ParentComCommandFov, ParentComCommandInformation, ParentComCommandInfoTemplate, ParentComCommandLayer, ParentComCommandLight, ParentComCommandMarker, ParentComCommandNavigation, ParentComCommandObstacle, ParentComCommandPlayer, ParentComCommandSpaceFence, ParentComCommandRenderer, ParentComCommandSticker, ParentComCommandSweep, ParentComCommandTarget, ParentComCommandTrimmer, ParentComCommandUi, ParentComCommandWormhole, ParentComCommandMonitor, ParentComCommandMessageCard, ParentComCommandDollyPath, ParentComCommandHamburgerMenu } from './com-command';
|
|
5
|
-
import { ParentComMessageAssetLabel, ParentComMessageAssetPointMark, ParentComMessageAssetVolumeMark, ParentComMessageCamera, ParentComMessageComponent, ParentComMessageFloor, ParentComMessageFov, ParentComMessageNavigation, ParentComMessageObstacle, ParentComMessageRenderer, ParentComMessageSpaceFence, ParentComMessageSticker, ParentComMessageSweep, ParentComMessageTarget, ParentComMessageTrimmer, ParentComMessageWormhole, ParentComMessageDollyPath } from './com-message';
|
|
4
|
+
import { ParentComCommandAssetLabel, ParentComCommandAssetPointMark, ParentComCommandAssetVolumeMark, ParentComCommandAudio, ParentComCommandCamera, ParentComCommandComponent, ParentComCommandCover, ParentComCommandFloor, ParentComCommandFov, ParentComCommandInformation, ParentComCommandInfoTemplate, ParentComCommandLayer, ParentComCommandLight, ParentComCommandMarker, ParentComCommandNavigation, ParentComCommandObstacle, ParentComCommandPlayer, ParentComCommandSpaceFence, ParentComCommandRenderer, ParentComCommandSticker, ParentComCommandSweep, ParentComCommandTarget, ParentComCommandTrimmer, ParentComCommandUi, ParentComCommandWormhole, ParentComCommandMonitor, ParentComCommandMessageCard, ParentComCommandDollyPath, ParentComCommandHamburgerMenu, ParentComCommandPathDesign } from './com-command';
|
|
5
|
+
import { ParentComMessageAssetLabel, ParentComMessageAssetPointMark, ParentComMessageAssetVolumeMark, ParentComMessageCamera, ParentComMessageComponent, ParentComMessageFloor, ParentComMessageFov, ParentComMessageNavigation, ParentComMessageObstacle, ParentComMessageRenderer, ParentComMessageSpaceFence, ParentComMessageSticker, ParentComMessageSweep, ParentComMessageTarget, ParentComMessageTrimmer, ParentComMessageWormhole, ParentComMessageDollyPath, ParentComMessagePathDesign } from './com-message';
|
|
6
6
|
export declare class VRTalkEditablePlayer {
|
|
7
7
|
serviceRegion: string;
|
|
8
8
|
iframeElement: HTMLIFrameElement | null;
|
|
@@ -25,6 +25,7 @@ export declare class VRTalkEditablePlayer {
|
|
|
25
25
|
messageWormhole: ParentComMessageWormhole;
|
|
26
26
|
messageSpaceFence: ParentComMessageSpaceFence;
|
|
27
27
|
messageDollyPath: ParentComMessageDollyPath;
|
|
28
|
+
messagePathDesign: ParentComMessagePathDesign;
|
|
28
29
|
commandPlayer: ParentComCommandPlayer;
|
|
29
30
|
commandCover: ParentComCommandCover;
|
|
30
31
|
commandUi: ParentComCommandUi;
|
|
@@ -54,6 +55,7 @@ export declare class VRTalkEditablePlayer {
|
|
|
54
55
|
commandMessageCard: ParentComCommandMessageCard;
|
|
55
56
|
commandDollyPath: ParentComCommandDollyPath;
|
|
56
57
|
commandHamburgerMenu: ParentComCommandHamburgerMenu;
|
|
58
|
+
commandPathDesign: ParentComCommandPathDesign;
|
|
57
59
|
constructor(serviceRegion: string, iframeElement: HTMLIFrameElement);
|
|
58
60
|
/**
|
|
59
61
|
* 注册Player消息监听器
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { VrPathDesignTool, VrPathDesignView, VrTransitionAnimationPathDesign } from '../../model';
|
|
2
|
+
/**
|
|
3
|
+
* 播放器监听过渡动画路径设计相关命令
|
|
4
|
+
*/
|
|
5
|
+
export declare class PlayerComCommandPathDesign {
|
|
6
|
+
/**
|
|
7
|
+
* 监听命令 进入路径设计模式
|
|
8
|
+
*/
|
|
9
|
+
onEnter(callback: (componentId: string, animationId: string, pathDesign: VrTransitionAnimationPathDesign) => void): void;
|
|
10
|
+
/**
|
|
11
|
+
* 监听命令 退出路径设计模式
|
|
12
|
+
*/
|
|
13
|
+
onExit(callback: () => void): void;
|
|
14
|
+
/**
|
|
15
|
+
* 监听命令 草稿更新
|
|
16
|
+
*/
|
|
17
|
+
onUpdate(callback: (pathDesign: VrTransitionAnimationPathDesign, resnapPoints: boolean) => void): void;
|
|
18
|
+
/**
|
|
19
|
+
* 监听命令 切换 3D 交互工具
|
|
20
|
+
*/
|
|
21
|
+
onSetTool(callback: (tool: VrPathDesignTool) => void): void;
|
|
22
|
+
/**
|
|
23
|
+
* 监听命令 切换观察视角
|
|
24
|
+
*/
|
|
25
|
+
onSetView(callback: (view: VrPathDesignView) => void): void;
|
|
26
|
+
/**
|
|
27
|
+
* 监听命令 选中/取消选中路径点
|
|
28
|
+
*/
|
|
29
|
+
onSelectPoint(callback: (pointId: string | null) => void): void;
|
|
30
|
+
/**
|
|
31
|
+
* 监听命令 预览进度拖拽
|
|
32
|
+
*/
|
|
33
|
+
onScrub(callback: (progress: number) => void): void;
|
|
34
|
+
/**
|
|
35
|
+
* 监听命令 试播
|
|
36
|
+
*/
|
|
37
|
+
onPreviewPlay(callback: () => void): void;
|
|
38
|
+
/**
|
|
39
|
+
* 监听命令 停止试播
|
|
40
|
+
*/
|
|
41
|
+
onPreviewStop(callback: () => void): void;
|
|
42
|
+
/**
|
|
43
|
+
* 监听命令 生成关键帧
|
|
44
|
+
*/
|
|
45
|
+
onGenerate(callback: () => void): void;
|
|
46
|
+
/**
|
|
47
|
+
* 监听命令 一发式生成关键帧(AI 工具用,不进入交互模式)
|
|
48
|
+
*/
|
|
49
|
+
onGenerateOneshot(callback: (requestId: string, componentId: string, pathDesign: VrTransitionAnimationPathDesign) => void): void;
|
|
50
|
+
/**
|
|
51
|
+
* 监听命令 把组件本体移到路径起点
|
|
52
|
+
*/
|
|
53
|
+
onMoveComponentToStart(callback: () => void): void;
|
|
54
|
+
}
|
|
@@ -11,7 +11,7 @@ export declare class PlayerComCommand {
|
|
|
11
11
|
/**
|
|
12
12
|
* VR播放器向父层发送的消息类型
|
|
13
13
|
*/
|
|
14
|
-
export declare type PlayerComCommandType = 'vrtalk_cmd_player_start' | 'vrtalk_cmd_player_mode_update' | 'vrtalk_cmd_player_xr_prepare_preview' | 'vrtalk_cmd_player_prepare_settings_update' | 'vrtalk_cmd_cover_settings_update' | 'vrtalk_cmd_ui_settings_update' | 'vrtalk_cmd_info_template_settings_update' | 'vrtalk_cmd_component_create' | 'vrtalk_cmd_component_update' | 'vrtalk_cmd_component_delete' | 'vrtalk_cmd_component_follow_mouse' | 'vrtalk_cmd_component_controller' | 'vrtalk_cmd_component_play_transition_animation' | 'vrtalk_cmd_component_stop_transition_animation' | 'vrtalk_cmd_component_3d_model_play_animation_clip' | 'vrtalk_cmd_component_3d_model_stop_animation_clip' | 'vrtalk_cmd_component_2d_text_auto_fit' | 'vrtalk_cmd_fov_enter_shot_mode' | 'vrtalk_cmd_fov_exit_shot_mode' | 'vrtalk_cmd_fov_update' | 'vrtalk_cmd_fov_delete' | 'vrtalk_cmd_layer_update' | 'vrtalk_cmd_layer_delete' | 'vrtalk_cmd_layer_visible' | 'vrtalk_cmd_information_content_card_update' | 'vrtalk_cmd_information_content_card_delete' | 'vrtalk_cmd_marker_update' | 'vrtalk_cmd_marker_delete' | 'vrtalk_cmd_marker_group_update' | 'vrtalk_cmd_marker_group_delete' | 'vrtalk_cmd_sweep_update_all' | 'vrtalk_cmd_sweep_update' | 'vrtalk_cmd_sweep_delete_virtual' | 'vrtalk_cmd_sweep_update_render_flag_visible' | 'vrtalk_cmd_light_create' | 'vrtalk_cmd_light_update' | 'vrtalk_cmd_light_delete' | 'vrtalk_cmd_trimmer_create' | 'vrtalk_cmd_trimmer_update' | 'vrtalk_cmd_trimmer_delete' | 'vrtalk_cmd_trimmer_controller' | 'vrtalk_cmd_trimmer_editing_state_update' | 'vrtalk_cmd_sticker_create' | 'vrtalk_cmd_sticker_update' | 'vrtalk_cmd_sticker_delete' | 'vrtalk_cmd_sticker_controller' | 'vrtalk_cmd_sticker_editing_state_update' | 'vrtalk_cmd_target_create' | 'vrtalk_cmd_target_update' | 'vrtalk_cmd_target_delete' | 'vrtalk_cmd_target_controller' | 'vrtalk_cmd_target_editing_state_update' | 'vrtalk_cmd_target_group_visible_update' | 'vrtalk_cmd_obstacle_create' | 'vrtalk_cmd_obstacle_update' | 'vrtalk_cmd_obstacle_delete' | 'vrtalk_cmd_obstacle_controller' | 'vrtalk_cmd_obstacle_editing_state_update' | 'vrtalk_cmd_obstacle_group_visible_update' | 'vrtalk_cmd_space_fence_create' | 'vrtalk_cmd_space_fence_update' | 'vrtalk_cmd_space_fence_delete' | 'vrtalk_cmd_space_fence_controller' | 'vrtalk_cmd_space_fence_editing_state_update' | 'vrtalk_cmd_space_fence_group_visible_update' | 'vrtalk_cmd_space_fence_group_color_update' | 'vrtalk_cmd_wormhole_create' | 'vrtalk_cmd_wormhole_update' | 'vrtalk_cmd_wormhole_delete' | 'vrtalk_cmd_wormhole_controller' | 'vrtalk_cmd_wormhole_editing_state_update' | 'vrtalk_cmd_wormhole_group_visible_update' | 'vrtalk_cmd_asset_label_create' | 'vrtalk_cmd_asset_label_update' | 'vrtalk_cmd_asset_label_delete' | 'vrtalk_cmd_asset_label_controller' | 'vrtalk_cmd_asset_label_editing_state_update' | 'vrtalk_cmd_asset_point_mark_create' | 'vrtalk_cmd_asset_point_mark_update' | 'vrtalk_cmd_asset_point_mark_delete' | 'vrtalk_cmd_asset_point_mark_controller' | 'vrtalk_cmd_asset_point_mark_editing_state_update' | 'vrtalk_cmd_asset_volume_mark_create' | 'vrtalk_cmd_asset_volume_mark_update' | 'vrtalk_cmd_asset_volume_mark_delete' | 'vrtalk_cmd_asset_volume_mark_controller' | 'vrtalk_cmd_asset_volume_mark_editing_state_update' | 'vrtalk_cmd_floor_update' | 'vrtalk_cmd_camera_move_to' | 'vrtalk_cmd_camera_move_to_inside' | 'vrtalk_cmd_camera_move_to_vr_fov' | 'vrtalk_cmd_camera_move_to_near_component' | 'vrtalk_cmd_camera_move_to_watch_position' | 'vrtalk_cmd_camera_request_deeplink_params' | 'vrtalk_cmd_renderer_take_screenshot' | 'vrtalk_cmd_renderer_get_panorama_image' | 'vrtalk_cmd_renderer_settings_update' | 'vrtalk_cmd_renderer_color_space_settings_update' | 'vrtalk_cmd_navigation_request' | 'vrtalk_cmd_navigation_start' | 'vrtalk_cmd_navigation_cancel' | 'vrtalk_cmd_audio_update' | 'vrtalk_cmd_audio_delete' | 'vrtalk_cmd_audio_list_update' | 'vrtalk_cmd_audio_list_delete' | 'vrtalk_cmd_audio_center_player_show_play_control_update' | 'vrtalk_cmd_audio_center_player_show_volume_control_update' | 'vrtalk_cmd_audio_center_player_volume_update' | 'vrtalk_cmd_monitor_list_update' | 'vrtalk_cmd_dolly_path_capture_destination' | 'vrtalk_cmd_dolly_path_preview' | 'vrtalk_cmd_dolly_path_stop_preview' | 'vrtalk_cmd_message_card_preview' | 'vrtalk_cmd_hamburger_menu_update';
|
|
14
|
+
export declare type PlayerComCommandType = 'vrtalk_cmd_player_start' | 'vrtalk_cmd_player_mode_update' | 'vrtalk_cmd_player_xr_prepare_preview' | 'vrtalk_cmd_player_prepare_settings_update' | 'vrtalk_cmd_cover_settings_update' | 'vrtalk_cmd_ui_settings_update' | 'vrtalk_cmd_info_template_settings_update' | 'vrtalk_cmd_component_create' | 'vrtalk_cmd_component_update' | 'vrtalk_cmd_component_delete' | 'vrtalk_cmd_component_follow_mouse' | 'vrtalk_cmd_component_controller' | 'vrtalk_cmd_component_play_transition_animation' | 'vrtalk_cmd_component_stop_transition_animation' | 'vrtalk_cmd_component_3d_model_play_animation_clip' | 'vrtalk_cmd_component_3d_model_stop_animation_clip' | 'vrtalk_cmd_component_2d_text_auto_fit' | 'vrtalk_cmd_fov_enter_shot_mode' | 'vrtalk_cmd_fov_exit_shot_mode' | 'vrtalk_cmd_fov_update' | 'vrtalk_cmd_fov_delete' | 'vrtalk_cmd_layer_update' | 'vrtalk_cmd_layer_delete' | 'vrtalk_cmd_layer_visible' | 'vrtalk_cmd_information_content_card_update' | 'vrtalk_cmd_information_content_card_delete' | 'vrtalk_cmd_marker_update' | 'vrtalk_cmd_marker_delete' | 'vrtalk_cmd_marker_group_update' | 'vrtalk_cmd_marker_group_delete' | 'vrtalk_cmd_sweep_update_all' | 'vrtalk_cmd_sweep_update' | 'vrtalk_cmd_sweep_delete_virtual' | 'vrtalk_cmd_sweep_update_render_flag_visible' | 'vrtalk_cmd_light_create' | 'vrtalk_cmd_light_update' | 'vrtalk_cmd_light_delete' | 'vrtalk_cmd_trimmer_create' | 'vrtalk_cmd_trimmer_update' | 'vrtalk_cmd_trimmer_delete' | 'vrtalk_cmd_trimmer_controller' | 'vrtalk_cmd_trimmer_editing_state_update' | 'vrtalk_cmd_sticker_create' | 'vrtalk_cmd_sticker_update' | 'vrtalk_cmd_sticker_delete' | 'vrtalk_cmd_sticker_controller' | 'vrtalk_cmd_sticker_editing_state_update' | 'vrtalk_cmd_target_create' | 'vrtalk_cmd_target_update' | 'vrtalk_cmd_target_delete' | 'vrtalk_cmd_target_controller' | 'vrtalk_cmd_target_editing_state_update' | 'vrtalk_cmd_target_group_visible_update' | 'vrtalk_cmd_obstacle_create' | 'vrtalk_cmd_obstacle_update' | 'vrtalk_cmd_obstacle_delete' | 'vrtalk_cmd_obstacle_controller' | 'vrtalk_cmd_obstacle_editing_state_update' | 'vrtalk_cmd_obstacle_group_visible_update' | 'vrtalk_cmd_space_fence_create' | 'vrtalk_cmd_space_fence_update' | 'vrtalk_cmd_space_fence_delete' | 'vrtalk_cmd_space_fence_controller' | 'vrtalk_cmd_space_fence_editing_state_update' | 'vrtalk_cmd_space_fence_group_visible_update' | 'vrtalk_cmd_space_fence_group_color_update' | 'vrtalk_cmd_wormhole_create' | 'vrtalk_cmd_wormhole_update' | 'vrtalk_cmd_wormhole_delete' | 'vrtalk_cmd_wormhole_controller' | 'vrtalk_cmd_wormhole_editing_state_update' | 'vrtalk_cmd_wormhole_group_visible_update' | 'vrtalk_cmd_asset_label_create' | 'vrtalk_cmd_asset_label_update' | 'vrtalk_cmd_asset_label_delete' | 'vrtalk_cmd_asset_label_controller' | 'vrtalk_cmd_asset_label_editing_state_update' | 'vrtalk_cmd_asset_point_mark_create' | 'vrtalk_cmd_asset_point_mark_update' | 'vrtalk_cmd_asset_point_mark_delete' | 'vrtalk_cmd_asset_point_mark_controller' | 'vrtalk_cmd_asset_point_mark_editing_state_update' | 'vrtalk_cmd_asset_volume_mark_create' | 'vrtalk_cmd_asset_volume_mark_update' | 'vrtalk_cmd_asset_volume_mark_delete' | 'vrtalk_cmd_asset_volume_mark_controller' | 'vrtalk_cmd_asset_volume_mark_editing_state_update' | 'vrtalk_cmd_floor_update' | 'vrtalk_cmd_camera_move_to' | 'vrtalk_cmd_camera_move_to_inside' | 'vrtalk_cmd_camera_move_to_vr_fov' | 'vrtalk_cmd_camera_move_to_near_component' | 'vrtalk_cmd_camera_move_to_watch_position' | 'vrtalk_cmd_camera_request_deeplink_params' | 'vrtalk_cmd_renderer_take_screenshot' | 'vrtalk_cmd_renderer_get_panorama_image' | 'vrtalk_cmd_renderer_settings_update' | 'vrtalk_cmd_renderer_color_space_settings_update' | 'vrtalk_cmd_navigation_request' | 'vrtalk_cmd_navigation_start' | 'vrtalk_cmd_navigation_cancel' | 'vrtalk_cmd_audio_update' | 'vrtalk_cmd_audio_delete' | 'vrtalk_cmd_audio_list_update' | 'vrtalk_cmd_audio_list_delete' | 'vrtalk_cmd_audio_center_player_show_play_control_update' | 'vrtalk_cmd_audio_center_player_show_volume_control_update' | 'vrtalk_cmd_audio_center_player_volume_update' | 'vrtalk_cmd_monitor_list_update' | 'vrtalk_cmd_dolly_path_capture_destination' | 'vrtalk_cmd_dolly_path_preview' | 'vrtalk_cmd_dolly_path_stop_preview' | 'vrtalk_cmd_path_design_enter' | 'vrtalk_cmd_path_design_exit' | 'vrtalk_cmd_path_design_update' | 'vrtalk_cmd_path_design_set_tool' | 'vrtalk_cmd_path_design_set_view' | 'vrtalk_cmd_path_design_select_point' | 'vrtalk_cmd_path_design_scrub' | 'vrtalk_cmd_path_design_preview_play' | 'vrtalk_cmd_path_design_preview_stop' | 'vrtalk_cmd_path_design_generate' | 'vrtalk_cmd_path_design_generate_oneshot' | 'vrtalk_cmd_path_design_move_component_to_start' | 'vrtalk_cmd_message_card_preview' | 'vrtalk_cmd_hamburger_menu_update';
|
|
15
15
|
export declare class PlayerComCommandTypeDefine {
|
|
16
16
|
static readonly PLAYER_START: PlayerComCommandType;
|
|
17
17
|
static readonly PLAYER_MODE_UPDATE: PlayerComCommandType;
|
|
@@ -123,6 +123,18 @@ export declare class PlayerComCommandTypeDefine {
|
|
|
123
123
|
static readonly DOLLY_PATH_CAPTURE_DESTINATION: PlayerComCommandType;
|
|
124
124
|
static readonly DOLLY_PATH_PREVIEW: PlayerComCommandType;
|
|
125
125
|
static readonly DOLLY_PATH_STOP_PREVIEW: PlayerComCommandType;
|
|
126
|
+
static readonly PATH_DESIGN_ENTER: PlayerComCommandType;
|
|
127
|
+
static readonly PATH_DESIGN_EXIT: PlayerComCommandType;
|
|
128
|
+
static readonly PATH_DESIGN_UPDATE: PlayerComCommandType;
|
|
129
|
+
static readonly PATH_DESIGN_SET_TOOL: PlayerComCommandType;
|
|
130
|
+
static readonly PATH_DESIGN_SET_VIEW: PlayerComCommandType;
|
|
131
|
+
static readonly PATH_DESIGN_SELECT_POINT: PlayerComCommandType;
|
|
132
|
+
static readonly PATH_DESIGN_SCRUB: PlayerComCommandType;
|
|
133
|
+
static readonly PATH_DESIGN_PREVIEW_PLAY: PlayerComCommandType;
|
|
134
|
+
static readonly PATH_DESIGN_PREVIEW_STOP: PlayerComCommandType;
|
|
135
|
+
static readonly PATH_DESIGN_GENERATE: PlayerComCommandType;
|
|
136
|
+
static readonly PATH_DESIGN_GENERATE_ONESHOT: PlayerComCommandType;
|
|
137
|
+
static readonly PATH_DESIGN_MOVE_COMPONENT_TO_START: PlayerComCommandType;
|
|
126
138
|
static readonly MESSAGE_CARD_PREVIEW: PlayerComCommandType;
|
|
127
139
|
static readonly HAMBURGER_MENU_UPDATE: PlayerComCommandType;
|
|
128
140
|
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { VrComponentTransitionAnimationKeyframe, VrPathDesignPoint, VrPathDesignTool, Vector3 } from '../../model';
|
|
2
|
+
import type { PathGenerateStats } from '../../utils/path-keyframe-generator';
|
|
3
|
+
/**
|
|
4
|
+
* 播放器发送过渡动画路径设计相关消息
|
|
5
|
+
*/
|
|
6
|
+
export declare class PlayerComMessagePathDesign {
|
|
7
|
+
/**
|
|
8
|
+
* 发送最新控制点列表(3D 中增/删/插/拖点后)
|
|
9
|
+
*/
|
|
10
|
+
sendPointsUpdate(points: VrPathDesignPoint[]): void;
|
|
11
|
+
/**
|
|
12
|
+
* 发送选中点变化
|
|
13
|
+
*/
|
|
14
|
+
sendSelectionUpdate(pointId: string | null): void;
|
|
15
|
+
/**
|
|
16
|
+
* 发送组件包围盒信息
|
|
17
|
+
* @param bottomToPivot 组件 pivot 到包围盒底部的世界距离
|
|
18
|
+
* @param size 包围盒尺寸
|
|
19
|
+
*/
|
|
20
|
+
sendBounds(bottomToPivot: number, size: {
|
|
21
|
+
x: number;
|
|
22
|
+
y: number;
|
|
23
|
+
z: number;
|
|
24
|
+
}): void;
|
|
25
|
+
/**
|
|
26
|
+
* 发送路径统计
|
|
27
|
+
*/
|
|
28
|
+
sendStats(stats: PathGenerateStats): void;
|
|
29
|
+
/**
|
|
30
|
+
* 发送生成关键帧结果
|
|
31
|
+
* @param requestId 一发式生成的请求id(交互模式生成不带)
|
|
32
|
+
*/
|
|
33
|
+
sendKeyframes(keyFrameList: VrComponentTransitionAnimationKeyframe[], stats: PathGenerateStats, requestId?: string): void;
|
|
34
|
+
/**
|
|
35
|
+
* 发送起/终点拾取结果
|
|
36
|
+
*/
|
|
37
|
+
sendPickResult(tool: VrPathDesignTool, position: Vector3): void;
|
|
38
|
+
/**
|
|
39
|
+
* 发送撤销/重做请求(撤销栈在 console 侧)
|
|
40
|
+
*/
|
|
41
|
+
sendUndoRequest(redo: boolean): void;
|
|
42
|
+
/**
|
|
43
|
+
* 发送试播/scrub 状态
|
|
44
|
+
*/
|
|
45
|
+
sendPreviewState(playing: boolean, progress: number): void;
|
|
46
|
+
}
|
|
@@ -11,7 +11,7 @@ export declare class PlayerComMessage {
|
|
|
11
11
|
/**
|
|
12
12
|
* VR播放器向父层发送的消息类型
|
|
13
13
|
*/
|
|
14
|
-
export declare type PlayerComMessageType = 'vrtalk_msg_player_ready' | 'vrtalk_msg_player_status_update' | 'vrtalk_msg_component_update' | 'vrtalk_msg_component_on_click' | 'vrtalk_msg_component_controller_focus_update' | 'vrtalk_msg_component_transition_animation_finished' | 'vrtalk_msg_fov_shot_result' | 'vrtalk_msg_trimmer_update' | 'vrtalk_msg_trimmer_on_click' | 'vrtalk_msg_sticker_update' | 'vrtalk_msg_sticker_on_click' | 'vrtalk_msg_target_update' | 'vrtalk_msg_target_on_click' | 'vrtalk_msg_obstacle_update' | 'vrtalk_msg_obstacle_on_click' | 'vrtalk_msg_space_fence_update' | 'vrtalk_msg_space_fence_on_click' | 'vrtalk_msg_wormhole_update' | 'vrtalk_msg_wormhole_on_click' | 'vrtalk_msg_asset_label_update' | 'vrtalk_msg_asset_label_on_click' | 'vrtalk_msg_asset_point_mark_update' | 'vrtalk_msg_asset_point_mark_on_click' | 'vrtalk_msg_asset_volume_mark_update' | 'vrtalk_msg_asset_volume_mark_on_click' | 'vrtalk_msg_sweep_import_from_matterport' | 'vrtalk_msg_sweep_sync_matterport_enabled_state' | 'vrtalk_msg_sweep_request_modify_enabled' | 'vrtalk_msg_floor_import_from_matterport' | 'vrtalk_msg_floor_enter' | 'vrtalk_msg_floor_leave' | 'vrtalk_msg_camera_pose_update' | 'vrtalk_msg_camera_deeplink_params_ready' | 'vrtalk_msg_renderer_screenshot_ready' | 'vrtalk_msg_renderer_panorama_image_ready' | 'vrtalk_msg_renderer_world_size_ready' | 'vrtalk_msg_dolly_path_destination_captured' | 'vrtalk_msg_navigation_result_ready' | 'vrtalk_msg_navigation_start' | 'vrtalk_msg_navigation_end' | 'vrtalk_msg_navigation_cancel';
|
|
14
|
+
export declare type PlayerComMessageType = 'vrtalk_msg_player_ready' | 'vrtalk_msg_player_status_update' | 'vrtalk_msg_component_update' | 'vrtalk_msg_component_on_click' | 'vrtalk_msg_component_controller_focus_update' | 'vrtalk_msg_component_transition_animation_finished' | 'vrtalk_msg_fov_shot_result' | 'vrtalk_msg_trimmer_update' | 'vrtalk_msg_trimmer_on_click' | 'vrtalk_msg_sticker_update' | 'vrtalk_msg_sticker_on_click' | 'vrtalk_msg_target_update' | 'vrtalk_msg_target_on_click' | 'vrtalk_msg_obstacle_update' | 'vrtalk_msg_obstacle_on_click' | 'vrtalk_msg_space_fence_update' | 'vrtalk_msg_space_fence_on_click' | 'vrtalk_msg_wormhole_update' | 'vrtalk_msg_wormhole_on_click' | 'vrtalk_msg_asset_label_update' | 'vrtalk_msg_asset_label_on_click' | 'vrtalk_msg_asset_point_mark_update' | 'vrtalk_msg_asset_point_mark_on_click' | 'vrtalk_msg_asset_volume_mark_update' | 'vrtalk_msg_asset_volume_mark_on_click' | 'vrtalk_msg_sweep_import_from_matterport' | 'vrtalk_msg_sweep_sync_matterport_enabled_state' | 'vrtalk_msg_sweep_request_modify_enabled' | 'vrtalk_msg_floor_import_from_matterport' | 'vrtalk_msg_floor_enter' | 'vrtalk_msg_floor_leave' | 'vrtalk_msg_camera_pose_update' | 'vrtalk_msg_camera_deeplink_params_ready' | 'vrtalk_msg_renderer_screenshot_ready' | 'vrtalk_msg_renderer_panorama_image_ready' | 'vrtalk_msg_renderer_world_size_ready' | 'vrtalk_msg_dolly_path_destination_captured' | 'vrtalk_msg_path_design_points_update' | 'vrtalk_msg_path_design_selection_update' | 'vrtalk_msg_path_design_bounds' | 'vrtalk_msg_path_design_stats' | 'vrtalk_msg_path_design_keyframes' | 'vrtalk_msg_path_design_pick_result' | 'vrtalk_msg_path_design_undo_request' | 'vrtalk_msg_path_design_preview_state' | 'vrtalk_msg_navigation_result_ready' | 'vrtalk_msg_navigation_start' | 'vrtalk_msg_navigation_end' | 'vrtalk_msg_navigation_cancel';
|
|
15
15
|
export declare class PlayerComMessageTypeDefine {
|
|
16
16
|
static readonly PLAYER_READY: PlayerComMessageType;
|
|
17
17
|
static readonly PLAYER_STATUS_UPDATE: PlayerComMessageType;
|
|
@@ -49,6 +49,14 @@ export declare class PlayerComMessageTypeDefine {
|
|
|
49
49
|
static readonly RENDERER_PANORAMA_IMAGE_READY: PlayerComMessageType;
|
|
50
50
|
static readonly RENDERER_WORLD_SIZE_READY: PlayerComMessageType;
|
|
51
51
|
static readonly DOLLY_PATH_DESTINATION_CAPTURED: PlayerComMessageType;
|
|
52
|
+
static readonly PATH_DESIGN_POINTS_UPDATE: PlayerComMessageType;
|
|
53
|
+
static readonly PATH_DESIGN_SELECTION_UPDATE: PlayerComMessageType;
|
|
54
|
+
static readonly PATH_DESIGN_BOUNDS: PlayerComMessageType;
|
|
55
|
+
static readonly PATH_DESIGN_STATS: PlayerComMessageType;
|
|
56
|
+
static readonly PATH_DESIGN_KEYFRAMES: PlayerComMessageType;
|
|
57
|
+
static readonly PATH_DESIGN_PICK_RESULT: PlayerComMessageType;
|
|
58
|
+
static readonly PATH_DESIGN_UNDO_REQUEST: PlayerComMessageType;
|
|
59
|
+
static readonly PATH_DESIGN_PREVIEW_STATE: PlayerComMessageType;
|
|
52
60
|
static readonly NAVIGATION_RESULT_READY: PlayerComMessageType;
|
|
53
61
|
static readonly NAVIGATION_START: PlayerComMessageType;
|
|
54
62
|
static readonly NAVIGATION_END: PlayerComMessageType;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PlayerComCommand, PlayerComCommandAssetLabel, PlayerComCommandAssetPointMark, PlayerComCommandAssetVolumeMark, PlayerComCommandAudio, PlayerComCommandCamera, PlayerComCommandComponent, PlayerComCommandCover, PlayerComCommandFloor, PlayerComCommandFov, PlayerComCommandInformation, PlayerComCommandInfoTemplate, PlayerComCommandLayer, PlayerComCommandLight, PlayerComCommandMarker, PlayerComCommandNavigation, PlayerComCommandObstacle, PlayerComCommandPlayer, PlayerComCommandRenderer, PlayerComCommandSpaceFence, PlayerComCommandSticker, PlayerComCommandTarget, PlayerComCommandTrimmer, PlayerComCommandType, PlayerComCommandUi, PlayerComCommandWormhole, PlayerComCommandMonitor, PlayerComCommandMessageCard, PlayerComCommandDollyPath, PlayerComCommandHamburgerMenu } from './com-command';
|
|
2
|
-
import { PlayerComMessageAssetLabel, PlayerComMessageAssetPointMark, PlayerComMessageAssetVolumeMark, PlayerComMessageCamera, PlayerComMessageComponent, PlayerComMessageFloor, PlayerComMessageFov, PlayerComMessageNavigation, PlayerComMessageObstacle, PlayerComMessagePlayer, PlayerComMessageRenderer, PlayerComMessageSpaceFence, PlayerComMessageSticker, PlayerComMessageSweep, PlayerComMessageTarget, PlayerComMessageTrimmer, PlayerComMessageWormhole, PlayerComMessageDollyPath } from './com-message';
|
|
1
|
+
import { PlayerComCommand, PlayerComCommandAssetLabel, PlayerComCommandAssetPointMark, PlayerComCommandAssetVolumeMark, PlayerComCommandAudio, PlayerComCommandCamera, PlayerComCommandComponent, PlayerComCommandCover, PlayerComCommandFloor, PlayerComCommandFov, PlayerComCommandInformation, PlayerComCommandInfoTemplate, PlayerComCommandLayer, PlayerComCommandLight, PlayerComCommandMarker, PlayerComCommandNavigation, PlayerComCommandObstacle, PlayerComCommandPlayer, PlayerComCommandRenderer, PlayerComCommandSpaceFence, PlayerComCommandSticker, PlayerComCommandTarget, PlayerComCommandTrimmer, PlayerComCommandType, PlayerComCommandUi, PlayerComCommandWormhole, PlayerComCommandMonitor, PlayerComCommandMessageCard, PlayerComCommandDollyPath, PlayerComCommandHamburgerMenu, PlayerComCommandPathDesign } from './com-command';
|
|
2
|
+
import { PlayerComMessageAssetLabel, PlayerComMessageAssetPointMark, PlayerComMessageAssetVolumeMark, PlayerComMessageCamera, PlayerComMessageComponent, PlayerComMessageFloor, PlayerComMessageFov, PlayerComMessageNavigation, PlayerComMessageObstacle, PlayerComMessagePlayer, PlayerComMessageRenderer, PlayerComMessageSpaceFence, PlayerComMessageSticker, PlayerComMessageSweep, PlayerComMessageTarget, PlayerComMessageTrimmer, PlayerComMessageWormhole, PlayerComMessageDollyPath, PlayerComMessagePathDesign } from './com-message';
|
|
3
3
|
import { PlayerComCommandSweep } from './com-command/player-com-command-sweep';
|
|
4
4
|
/**
|
|
5
5
|
* Player控制器
|
|
@@ -36,6 +36,7 @@ export declare class PlayerController {
|
|
|
36
36
|
static commandMessageCard: PlayerComCommandMessageCard;
|
|
37
37
|
static commandDollyPath: PlayerComCommandDollyPath;
|
|
38
38
|
static commandHamburgerMenu: PlayerComCommandHamburgerMenu;
|
|
39
|
+
static commandPathDesign: PlayerComCommandPathDesign;
|
|
39
40
|
static messageCamera: PlayerComMessageCamera;
|
|
40
41
|
static messageComponent: PlayerComMessageComponent;
|
|
41
42
|
static messageFov: PlayerComMessageFov;
|
|
@@ -54,6 +55,7 @@ export declare class PlayerController {
|
|
|
54
55
|
static messageWormhole: PlayerComMessageWormhole;
|
|
55
56
|
static messageSpaceFence: PlayerComMessageSpaceFence;
|
|
56
57
|
static messageDollyPath: PlayerComMessageDollyPath;
|
|
58
|
+
static messagePathDesign: PlayerComMessagePathDesign;
|
|
57
59
|
/**
|
|
58
60
|
* 注册Player命令监听器
|
|
59
61
|
* @param commandType 命令类型
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { Vector3 } from '../model/general/vector';
|
|
2
|
+
import { VrComponentTransitionAnimationKeyframe, VrComponentTransitionAnimationPlayCompleteProcessType } from '../model/vr-component/vr-component-data';
|
|
3
|
+
import { VrTransitionAnimationPathDesign } from '../model/vr-component/vr-path-design';
|
|
4
|
+
/**
|
|
5
|
+
* 过渡动画路径 → 关键帧生成器(纯函数,零依赖)
|
|
6
|
+
*
|
|
7
|
+
* 手动路径工具 / PositionX 导航导入 / AI generate_path_transition_animation 三个来源共用本管线。
|
|
8
|
+
* 产出的是与手工创建完全同构的普通关键帧;player 播放逻辑零改动。
|
|
9
|
+
*
|
|
10
|
+
* 生成正确性的两个关键点(与 xr-component-general-engine.ts 的播放行为严格对应):
|
|
11
|
+
* 1. 引擎每个关键帧开始时用 THREE.Euler().setFromQuaternion()(XYZ 序)从实际姿态提取欧拉角作为
|
|
12
|
+
* 插值源值,值域受 asin/atan2 限制。本生成器精确模拟该提取(simulateEngineEulerRead),
|
|
13
|
+
* 并在目标欧拉角的两个等价表示 (x,y,z) ≡ (x+180, 180−y, z+180) 及其 ±360k 平移中,
|
|
14
|
+
* 选取与源值逐分量距离最小的表示 —— 保证每段插值走最短弧,跨 ±180°/万向节区域不甩头。
|
|
15
|
+
* 2. 引擎对 duration<=16ms 的帧走同步直贴(不经过 anime),「瞬移到起点」帧用 duration=1 实现。
|
|
16
|
+
*/
|
|
17
|
+
export declare type PathGroundSnapFn = (x: number, refY: number, z: number) => number | null;
|
|
18
|
+
export interface PathSample {
|
|
19
|
+
position: Vector3;
|
|
20
|
+
groundY: number;
|
|
21
|
+
isControlPoint: boolean;
|
|
22
|
+
controlPointId: string;
|
|
23
|
+
segmentLength: number;
|
|
24
|
+
speedMps: number;
|
|
25
|
+
hoverMs: number;
|
|
26
|
+
}
|
|
27
|
+
export interface PathSamplingResult {
|
|
28
|
+
legs: PathSample[][];
|
|
29
|
+
totalLengthM: number;
|
|
30
|
+
sampleStepUsedM: number;
|
|
31
|
+
}
|
|
32
|
+
export interface PathGenerateStats {
|
|
33
|
+
totalLengthM: number;
|
|
34
|
+
estimatedDurationMs: number;
|
|
35
|
+
keyframeCount: number;
|
|
36
|
+
sampleStepUsedM: number;
|
|
37
|
+
}
|
|
38
|
+
export interface PathGenerateResult {
|
|
39
|
+
keyFrameList: VrComponentTransitionAnimationKeyframe[];
|
|
40
|
+
stats: PathGenerateStats;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* 由路径设计草稿生成完整关键帧序列
|
|
44
|
+
* @param design 路径设计草稿
|
|
45
|
+
* @param groundSnap 贴地回调(仅贴地模式需要;传 null 则不贴地,直接用曲线高度)
|
|
46
|
+
* @param currentPosition 组件当前位置(walk-in 起步帧时长计算用)
|
|
47
|
+
* @param currentRotation 组件当前旋转(欧拉角度数;首帧最短弧参考)
|
|
48
|
+
*/
|
|
49
|
+
export declare function generatePathKeyframes(design: VrTransitionAnimationPathDesign, groundSnap: PathGroundSnapFn | null, currentPosition: Vector3, currentRotation: Vector3): PathGenerateResult;
|
|
50
|
+
/**
|
|
51
|
+
* 采样路径(平滑 + 贴地 + 速度/悬停解析 + 往返展开)。
|
|
52
|
+
* 路径可视化画线也用本函数(取 legs 中各样点的 groundY / position)。
|
|
53
|
+
*/
|
|
54
|
+
export declare function samplePathDesign(design: VrTransitionAnimationPathDesign, groundSnap: PathGroundSnapFn | null): PathSamplingResult;
|
|
55
|
+
/**
|
|
56
|
+
* 由采样结果合成关键帧
|
|
57
|
+
*/
|
|
58
|
+
export declare function buildKeyframesFromSampling(design: VrTransitionAnimationPathDesign, sampling: PathSamplingResult, currentPosition: Vector3, currentRotation: Vector3): PathGenerateResult;
|
|
59
|
+
/**
|
|
60
|
+
* 根据往返模式给出建议的动画播放完成处理方式
|
|
61
|
+
*/
|
|
62
|
+
export declare function suggestedPlayCompleteProcessType(design: VrTransitionAnimationPathDesign): VrComponentTransitionAnimationPlayCompleteProcessType;
|
|
63
|
+
/**
|
|
64
|
+
* Douglas-Peucker 折线简化(3D)。PositionX 导航 waypoints 导入前先过一遍,容差建议 0.15m
|
|
65
|
+
*/
|
|
66
|
+
export declare function simplifyPathPoints(points: Vector3[], toleranceM: number): Vector3[];
|