@shijiu/jsview-vue 2.2.35 → 2.2.201
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/bin/browser/BrowserApic.vue.mjs +4 -3
- package/bin/browser/BrowserApic2.vue.mjs +4 -3
- package/bin/browser/BrowserApicLib.mjs +10 -3
- package/bin/browser/BrowserJsvFragShaderView.vue.mjs +63 -0
- package/bin/browser/BrowserQrcode.vue.mjs +3 -1
- package/bin/browser/BrowserTextureAnim.vue.mjs +7 -6
- package/bin/jsview-vue.mjs +2990 -1146
- package/bin/types/JsViewEngineWidget/JsvFocus/JsvFocusManager.d.ts +8 -6
- package/bin/types/JsViewEngineWidget/MetroWidget/Dispatcher.d.ts +10 -12
- package/bin/types/JsViewEngineWidget/MetroWidget/ListWidget.vue.d.ts +3 -3
- package/bin/types/JsViewEngineWidget/MetroWidget/MetroWidget.vue.d.ts +3 -3
- package/bin/types/JsViewEngineWidget/MetroWidget/MetroWidgetSetup.d.ts +2 -2
- package/bin/types/JsViewEngineWidget/MetroWidget/RenderItem.d.ts +3 -0
- package/bin/types/JsViewEngineWidget/MetroWidget/Slide.d.ts +21 -0
- package/bin/types/JsViewEngineWidget/TemplateParser/ListMetroTemplate.d.ts +1 -0
- package/bin/types/JsViewEngineWidget/TemplateParser/MetroTemplate.d.ts +2 -8
- package/bin/types/JsViewEngineWidget/TemplateParser/TemplateItemAdder.d.ts +1 -1
- package/bin/types/JsViewEngineWidget/WidgetCommon.d.ts +9 -3
- package/bin/types/JsViewEngineWidget/index.d.ts +10 -1
- package/bin/types/JsViewVueTools/ConstSymbol.d.ts +2 -0
- package/bin/types/JsViewVueTools/ForgeConstDefine.d.ts +11 -0
- package/bin/types/JsViewVueTools/JsvFederationTools.d.ts +16 -0
- package/bin/types/JsViewVueTools/JsvPerformance.d.ts +5 -0
- package/bin/types/JsViewVueTools/JsvPreDownloader.d.ts +33 -0
- package/bin/types/JsViewVueTools/JsvRuntimeBridge.d.ts +113 -57
- package/bin/types/JsViewVueTools/JsvTextureStore/CapturedTexture/CapturedTexture.d.ts +11 -0
- package/bin/types/JsViewVueTools/JsvTextureStore/JsvTextureStore.d.ts +45 -1
- package/bin/types/JsViewVueTools/JsvTextureStore/Texture.d.ts +8 -0
- package/bin/types/JsViewVueTools/index.d.ts +19 -11
- package/bin/types/JsViewVueWidget/JsvApic/JsvApic/BrowserApic.vue.d.ts +1 -1
- package/bin/types/JsViewVueWidget/JsvApic/JsvApic/JsvApic.vue.d.ts +1 -1
- package/bin/types/JsViewVueWidget/JsvApic/JsvApic2/BrowserApic2.vue.d.ts +1 -1
- package/bin/types/JsViewVueWidget/JsvApic/JsvApic2/JsvApic2.vue.d.ts +1 -1
- package/bin/types/JsViewVueWidget/JsvApic/JsvBrowserApicLib/Viewer.d.ts +2 -1
- package/bin/types/JsViewVueWidget/JsvClipDiv/JsvClipDiv.vue.d.ts +70 -0
- package/bin/types/JsViewVueWidget/JsvClipDiv/index.d.ts +1 -0
- package/bin/types/JsViewVueWidget/JsvConnectLine/JsvConnectLine.vue.d.ts +1 -1
- package/bin/types/JsViewVueWidget/JsvDriftScope/JsvDriftScope.vue.d.ts +104 -0
- package/bin/types/JsViewVueWidget/JsvDriftScope/index.d.ts +1 -0
- package/bin/types/JsViewVueWidget/JsvFragShaderView/BrowserJsvFragShaderView.vue.d.ts +13 -0
- package/bin/types/JsViewVueWidget/JsvFragShaderView/JsvFragShaderView.vue.d.ts +13 -0
- package/bin/types/JsViewVueWidget/JsvFragShaderView/index.d.ts +2 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/ActionRefObject.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/ActorControl.d.ts +91 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/ActorState.d.ts +6 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/CallbackManager.d.ts +11 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/ForgeTypeDefine.d.ts +15 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/FreeMoveActor.vue.d.ts +6 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/SetAction.d.ts +71 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/SetCondition.d.ts +97 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/SetState.d.ts +62 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/SyncLinkManager.d.ts +18 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/index.d.ts +4 -1
- package/bin/types/JsViewVueWidget/JsvLine/JsvLine.vue.d.ts +1 -1
- package/bin/types/JsViewVueWidget/JsvNativeSharedDiv.vue.d.ts +66 -28
- package/bin/types/JsViewVueWidget/JsvNinePatch.vue.d.ts +2 -0
- package/bin/types/JsViewVueWidget/JsvScrollBox/JsvScrollBox.vue.d.ts +236 -0
- package/bin/types/JsViewVueWidget/JsvScrollBox/JsvScrollFollow.vue.d.ts +153 -0
- package/bin/types/JsViewVueWidget/JsvScrollBox/ScrollInnerSymbol.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvScrollBox/ScrollSymbol.d.ts +12 -0
- package/bin/types/JsViewVueWidget/JsvScrollBox/index.d.ts +3 -0
- package/bin/types/JsViewVueWidget/JsvTextBox.vue.d.ts +3 -3
- package/bin/types/JsViewVueWidget/index.d.ts +4 -0
- package/package.json +1 -1
- package/tools/config/rollup.config.mjs +1 -0
- package/utils/JsViewEngineWidget/JsvFocus/{JsvFocusManager.js → JsvFocusManager.ts} +12 -12
- package/utils/JsViewEngineWidget/MetroWidget/Dispatcher.ts +20 -0
- package/utils/JsViewEngineWidget/MetroWidget/ListWidget.vue +27 -10
- package/utils/JsViewEngineWidget/MetroWidget/MetroWidget.vue +52 -11
- package/utils/JsViewEngineWidget/MetroWidget/MetroWidgetSetup.js +686 -480
- package/utils/JsViewEngineWidget/MetroWidget/RenderItem.ts +13 -1
- package/utils/JsViewEngineWidget/MetroWidget/Slide.ts +56 -0
- package/utils/JsViewEngineWidget/MetroWidget/TaskManager.ts +59 -10
- package/utils/JsViewEngineWidget/MetroWidget/TokenGenerator.ts +10 -0
- package/utils/JsViewEngineWidget/TemplateParser/CommonMetroTemplate.ts +20 -10
- package/utils/JsViewEngineWidget/TemplateParser/ListMetroTemplate.ts +27 -3
- package/utils/JsViewEngineWidget/TemplateParser/MetroTemplate.ts +25 -35
- package/utils/JsViewEngineWidget/TemplateParser/TemplateItemAdder.ts +7 -0
- package/utils/JsViewEngineWidget/WidgetCommon.ts +20 -7
- package/utils/JsViewEngineWidget/{index.js → index.ts} +1 -1
- package/utils/JsViewPlugin/JsvAudio/AudioProxy.js +21 -2
- package/utils/JsViewPlugin/JsvPlayer/BrowserJsvPlayer.vue +13 -1
- package/utils/JsViewPlugin/JsvPlayer/JsvPlayer.vue +470 -338
- package/utils/JsViewVueTools/ConstSymbol.ts +3 -0
- package/utils/JsViewVueTools/ForgeConstDefine.ts +11 -0
- package/utils/JsViewVueTools/JsvPreDownloader.ts +3 -3
- package/utils/JsViewVueTools/JsvRuntimeBridge.js +172 -50
- package/utils/JsViewVueTools/JsvTextureStore/CapturedTexture/CapturedTexture.ts +62 -0
- package/utils/JsViewVueTools/JsvTextureStore/JsvTextureStore.ts +42 -8
- package/utils/JsViewVueTools/JsvTextureStore/Texture.ts +15 -1
- package/utils/JsViewVueTools/index.js +19 -17
- package/utils/JsViewVueWidget/JsvApic/JsvApic/BrowserApic.vue +8 -8
- package/utils/JsViewVueWidget/JsvApic/JsvApic/JsvApic.vue +3 -3
- package/utils/JsViewVueWidget/JsvApic/JsvApic2/BrowserApic2.vue +7 -8
- package/utils/JsViewVueWidget/JsvApic/JsvApic2/JsvApic2.vue +3 -3
- package/utils/JsViewVueWidget/JsvApic/JsvBrowserApicLib/ApicDataBase.js +5 -1
- package/utils/JsViewVueWidget/JsvApic/JsvBrowserApicLib/Viewer.js +8 -3
- package/utils/JsViewVueWidget/JsvClipDiv/JsvClipDiv.vue +42 -0
- package/utils/JsViewVueWidget/JsvClipDiv/index.ts +1 -0
- package/utils/JsViewVueWidget/JsvConnectLine/JsvConnectLine.vue +5 -1
- package/utils/JsViewVueWidget/JsvDriftScope/JsvDriftScope.vue +82 -0
- package/utils/JsViewVueWidget/JsvDriftScope/index.ts +1 -0
- package/utils/JsViewVueWidget/JsvFragShaderView/BrowserJsvFragShaderView.vue +48 -0
- package/utils/JsViewVueWidget/JsvFragShaderView/JsvFragShaderView.vue +145 -0
- package/utils/JsViewVueWidget/JsvFragShaderView/index.js +18 -0
- package/utils/JsViewVueWidget/JsvFreeMoveActor/ActionRefObject.ts +1 -1
- package/utils/JsViewVueWidget/JsvFreeMoveActor/ActorControl.ts +156 -55
- package/utils/JsViewVueWidget/JsvFreeMoveActor/ActorState.ts +4 -4
- package/utils/JsViewVueWidget/JsvFreeMoveActor/CallbackManager.ts +6 -6
- package/utils/JsViewVueWidget/JsvFreeMoveActor/ForgeTypeDefine.ts +1 -1
- package/utils/JsViewVueWidget/JsvFreeMoveActor/FreeMoveActor.vue +43 -9
- package/utils/JsViewVueWidget/JsvFreeMoveActor/SetAction.ts +33 -0
- package/utils/JsViewVueWidget/JsvFreeMoveActor/SetCondition.ts +69 -8
- package/utils/JsViewVueWidget/JsvFreeMoveActor/SetState.ts +60 -0
- package/utils/JsViewVueWidget/JsvFreeMoveActor/SyncLinkManager.ts +120 -0
- package/utils/JsViewVueWidget/JsvFreeMoveActor/index.js +7 -0
- package/utils/JsViewVueWidget/JsvMaskClipDiv.vue +6 -1
- package/utils/JsViewVueWidget/JsvNativeSharedDiv.vue +121 -68
- package/utils/JsViewVueWidget/JsvNinePatch.vue +17 -2
- package/utils/JsViewVueWidget/JsvPosterImage.vue +22 -9
- package/utils/JsViewVueWidget/JsvQrcode/BrowserQrcode.vue +6 -2
- package/utils/JsViewVueWidget/JsvScrollBox/JsvScrollBox.vue +518 -0
- package/utils/JsViewVueWidget/JsvScrollBox/JsvScrollFollow.vue +468 -0
- package/utils/JsViewVueWidget/JsvScrollBox/ScrollInnerSymbol.ts +9 -0
- package/utils/JsViewVueWidget/JsvScrollBox/ScrollSymbol.ts +24 -0
- package/utils/JsViewVueWidget/JsvScrollBox/index.ts +3 -0
- package/utils/JsViewVueWidget/JsvTextBox.vue +12 -4
- package/utils/JsViewVueWidget/JsvTextureAnim/BrowserTextureAnim.vue +9 -6
- package/utils/JsViewVueWidget/JsvTextureAnim/JsvTextureAnim.vue +2 -0
- package/utils/JsViewVueWidget/index.js +4 -0
- package/utils/JsViewEngineWidget/MetroWidget/Dispatcher.js +0 -19
|
@@ -12,74 +12,36 @@ import ActionRefObject from "./ActionRefObject";
|
|
|
12
12
|
import { RunFreeMoveCmdPacks, FreeMoveAnimClass, FinishRenderBreak } from "./ForgeTypeDefine"
|
|
13
13
|
import { NexusNode, newNexus } from "./NexusNode";
|
|
14
14
|
|
|
15
|
+
interface CmdListCreator {
|
|
16
|
+
(builders: BuilderFactory): Array<Object>;
|
|
17
|
+
}
|
|
15
18
|
|
|
16
|
-
class
|
|
17
|
-
private _BindView: any;
|
|
18
|
-
private _BindAnim: any;
|
|
19
|
-
private _Callbacks: CallbackManager;
|
|
20
|
-
private _SelfNexusRecv: NexusNode;
|
|
21
|
-
|
|
19
|
+
class BuilderFactory {
|
|
22
20
|
private _SharedQuickConditionPackBuilder: ConditionPackBuilder;
|
|
23
21
|
private _SharedQuickActionPackBuilder: ActionPackBuilder;
|
|
24
22
|
private _StatePackBuilder: StatePackBuilder;
|
|
23
|
+
private _Callbacks: CallbackManager;
|
|
24
|
+
private _SelfNexusRecv: NexusNode;
|
|
25
|
+
private _OwnerControl: ActorControl;
|
|
25
26
|
|
|
26
|
-
constructor() {
|
|
27
|
-
this.
|
|
28
|
-
this.
|
|
29
|
-
this.
|
|
30
|
-
|
|
31
|
-
this._SharedQuickConditionPackBuilder = new ConditionPackBuilder(this._Callbacks, this._SelfNexusRecv);
|
|
27
|
+
constructor(owner: ActorControl, callbackManager: CallbackManager, selfNexusRecv: NexusNode) {
|
|
28
|
+
this._OwnerControl = owner;
|
|
29
|
+
this._Callbacks = callbackManager;
|
|
30
|
+
this._SelfNexusRecv = selfNexusRecv;
|
|
31
|
+
|
|
32
|
+
this._SharedQuickConditionPackBuilder = new ConditionPackBuilder(this._Callbacks, this._SelfNexusRecv, this);
|
|
32
33
|
this._SharedQuickActionPackBuilder = new ActionPackBuilder(this._Callbacks, this._SelfNexusRecv);
|
|
33
34
|
this._StatePackBuilder = new StatePackBuilder();
|
|
34
35
|
}
|
|
35
36
|
|
|
36
|
-
// debugGetAnimId() {
|
|
37
|
-
// return this._BindAnim?.AnimNativeId;
|
|
38
|
-
// }
|
|
39
|
-
|
|
40
|
-
bindForgeView(bindView: any, instantActive: boolean) {
|
|
41
|
-
this._BindView = bindView;
|
|
42
|
-
|
|
43
|
-
if (instantActive) {
|
|
44
|
-
this._EnsureAnim();
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* run 执行编排好的intent集合
|
|
50
|
-
*
|
|
51
|
-
* @param {Array} cmdPackList 内容来自 Condition(), State(), Action() 这些工厂类创建的Command pack
|
|
52
|
-
*/
|
|
53
|
-
run(cmdPackList: Array<Object>) {
|
|
54
|
-
if ((window as any).JsView) {
|
|
55
|
-
this._WrappedRun(cmdPackList);
|
|
56
|
-
} else {
|
|
57
|
-
// Browser场景DomProxy需要onReady调用
|
|
58
|
-
let that = this;
|
|
59
|
-
this._BindView.RegisterOnProxyReady(() => {
|
|
60
|
-
that._WrappedRun(cmdPackList);
|
|
61
|
-
})
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
_WrappedRun(cmdPackList: Array<Object>) {
|
|
66
|
-
this._EnsureAnim();
|
|
67
|
-
|
|
68
|
-
if (!(cmdPackList instanceof Array)) {
|
|
69
|
-
console.error("params error");
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
RunFreeMoveCmdPacks(this._BindView, cmdPackList);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
37
|
/**
|
|
77
38
|
* Condition
|
|
78
39
|
* 获取创建 ConditionPack 的工厂对象
|
|
79
40
|
* ConditionPack对应支持 .then(cmdPackList), 可传入同 Run 的处理队列
|
|
80
41
|
* 可用方法见 ./SetCondition.js
|
|
81
42
|
* @param {int} group 可选参数,默认为0, 有效值为0~3, 对应默认组, 1组, 2组, 3组, 便于remove时,按组进行清理
|
|
82
|
-
* @param {boolean} multiTimes 可选参数,默认为false, 是否要多次执行,
|
|
43
|
+
* @param {boolean} multiTimes 可选参数,默认为false, 是否要多次执行,
|
|
44
|
+
* 若为单次, 当group未设定时自动作废,当group设定时,不作废但改为deactive状态
|
|
83
45
|
* @param {string} specName 可选参数,默认null, 命名condition, 用于指定名字进行active/deactive动作的场景
|
|
84
46
|
* @param {boolean} shoudRenderBreak 可选参数,默认false, 关联的回调是否会发起RenderBreak
|
|
85
47
|
* @return {ConditionPackBuilder} ConditionPack 的工厂对象
|
|
@@ -94,7 +56,7 @@ class ActorControl {
|
|
|
94
56
|
let builder: ConditionPackBuilder = this._SharedQuickConditionPackBuilder;
|
|
95
57
|
if (builder.isInUsing()) {
|
|
96
58
|
// 用于加速的builder被占用了,为了防止状态问题,使用新建builder
|
|
97
|
-
builder = new ConditionPackBuilder(this._Callbacks, this._SelfNexusRecv);
|
|
59
|
+
builder = new ConditionPackBuilder(this._Callbacks, this._SelfNexusRecv, this);
|
|
98
60
|
}
|
|
99
61
|
builder.updateCommandInfo(group, multiTimes, specName, shoudRenderBreak);
|
|
100
62
|
return builder;
|
|
@@ -139,12 +101,143 @@ class ActorControl {
|
|
|
139
101
|
state(): StatePackBuilder {
|
|
140
102
|
return this._StatePackBuilder;
|
|
141
103
|
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
class ActorControl {
|
|
107
|
+
private _BindView: any;
|
|
108
|
+
private _BindAnim: any;
|
|
109
|
+
private _Callbacks: CallbackManager;
|
|
110
|
+
private _SelfNexusRecv: NexusNode;
|
|
111
|
+
private _SizeMode: Boolean = false;
|
|
112
|
+
|
|
113
|
+
private _CondCycleStartList: Array<Function> | undefined = undefined;
|
|
114
|
+
private _CondCycleEndList: Array<Function> | undefined = undefined;
|
|
115
|
+
private _Builders: BuilderFactory;
|
|
116
|
+
|
|
117
|
+
constructor() {
|
|
118
|
+
this._BindView = null;
|
|
119
|
+
this._BindAnim = null;
|
|
120
|
+
this._Callbacks = new CallbackManager();
|
|
121
|
+
this._SelfNexusRecv = newNexus();
|
|
122
|
+
this._Builders = new BuilderFactory(this, this._Callbacks, this._SelfNexusRecv);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
asSizeMode() {
|
|
126
|
+
if (this._BindAnim != null) {
|
|
127
|
+
console.error("error: asSizeMode should call before bindForgeView");
|
|
128
|
+
} else {
|
|
129
|
+
this._SizeMode = true;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// debugGetAnimId() {
|
|
134
|
+
// return this._BindAnim?.AnimNativeId;
|
|
135
|
+
// }
|
|
136
|
+
|
|
137
|
+
bindForgeView(bindView: any, instantActive: boolean) {
|
|
138
|
+
this._BindView = bindView;
|
|
139
|
+
|
|
140
|
+
if (instantActive) {
|
|
141
|
+
this._EnsureAnim();
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* run 执行编排好的intent集合
|
|
147
|
+
*
|
|
148
|
+
* @param {CmdListCreator} commandsCreator
|
|
149
|
+
* 命令指令队列创建回调
|
|
150
|
+
* 此回调返回值为一个数组,数组内容内容来自 Condition(), State(), Action()
|
|
151
|
+
* 这些工厂类创建的Command pack
|
|
152
|
+
*/
|
|
153
|
+
run(commandsCreator: CmdListCreator | undefined) {
|
|
154
|
+
if (commandsCreator) {
|
|
155
|
+
let cmdPackList = commandsCreator(this._Builders);
|
|
156
|
+
if ((window as any).JsView) {
|
|
157
|
+
this._WrappedRun(cmdPackList);
|
|
158
|
+
} else {
|
|
159
|
+
// Browser场景DomProxy需要onReady调用
|
|
160
|
+
let that = this;
|
|
161
|
+
this._BindView.RegisterOnProxyReady(() => {
|
|
162
|
+
that._WrappedRun(cmdPackList);
|
|
163
|
+
})
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
_WrappedRun(cmdPackList: Array<Object>) {
|
|
169
|
+
this._EnsureAnim();
|
|
170
|
+
|
|
171
|
+
if (!(cmdPackList instanceof Array)) {
|
|
172
|
+
console.error("params error");
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
RunFreeMoveCmdPacks(this._BindView, cmdPackList);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
getBindedAnim() {
|
|
180
|
+
this._EnsureAnim();
|
|
181
|
+
return this._BindAnim;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
getBindedView() {
|
|
185
|
+
this._EnsureAnim();
|
|
186
|
+
return this._BindView;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* addCondCycleListener
|
|
191
|
+
* 追加 cond cycle listener,可以根据start和end来进行callback时序排序
|
|
192
|
+
*
|
|
193
|
+
* @param {Function} startCycleCallback 开始执行一帧的js回调(condition的callback)
|
|
194
|
+
* @param {Function} endCycleCallback 执行一帧的js回调完毕
|
|
195
|
+
*/
|
|
196
|
+
addCondCycleListener(startCycleCallback: Function, endCycleCallback: Function) {
|
|
197
|
+
if (startCycleCallback) {
|
|
198
|
+
if (!this._CondCycleStartList) {
|
|
199
|
+
this._CondCycleStartList = new Array();
|
|
200
|
+
}
|
|
201
|
+
this._CondCycleStartList!.push(startCycleCallback);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
if (endCycleCallback) {
|
|
205
|
+
if (!this._CondCycleEndList) {
|
|
206
|
+
this._CondCycleEndList = new Array();
|
|
207
|
+
}
|
|
208
|
+
this._CondCycleEndList!.push(endCycleCallback);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
removeCondCycleListener(startCycleCallback: Function, endCycleCallback: Function) {
|
|
213
|
+
if (startCycleCallback && this._CondCycleStartList) {
|
|
214
|
+
for (let i = 0; i < this._CondCycleStartList.length; i++) {
|
|
215
|
+
if (this._CondCycleStartList[i] == startCycleCallback) {
|
|
216
|
+
this._CondCycleStartList.splice(i, 1);
|
|
217
|
+
break;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
if (endCycleCallback && this._CondCycleEndList) {
|
|
222
|
+
for (let i = 0; i < this._CondCycleEndList.length; i++) {
|
|
223
|
+
if (this._CondCycleEndList[i] == endCycleCallback) {
|
|
224
|
+
this._CondCycleEndList.splice(i, 1);
|
|
225
|
+
break;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}
|
|
142
230
|
|
|
143
231
|
_OnEchoEvent(retJson: string) {
|
|
144
232
|
// 遇到layout后仍然会因为新broadcast有动作时,一帧中可能会有多次回调
|
|
145
233
|
let retJsonObject: any = JSON.parse(retJson);
|
|
146
234
|
let echoRetList: Array<any> = retJsonObject["retList"];
|
|
147
235
|
if (echoRetList) {
|
|
236
|
+
if (this._CondCycleStartList && this._CondCycleStartList.length > 0) {
|
|
237
|
+
for (let startCb of this._CondCycleStartList) {
|
|
238
|
+
startCb();
|
|
239
|
+
}
|
|
240
|
+
}
|
|
148
241
|
for (let echoRet of echoRetList) {
|
|
149
242
|
let renderBreakId = echoRet["rbTkn"];
|
|
150
243
|
if (renderBreakId != 0) {
|
|
@@ -153,12 +246,20 @@ class ActorControl {
|
|
|
153
246
|
}
|
|
154
247
|
this._Callbacks.invokeCallback(echoRet["eTkn"], retJsonObject, echoRet["cds"], echoRet["ncds"]);
|
|
155
248
|
}
|
|
249
|
+
if (this._CondCycleEndList && this._CondCycleEndList.length > 0) {
|
|
250
|
+
for (let endCb of this._CondCycleEndList) {
|
|
251
|
+
endCb();
|
|
252
|
+
}
|
|
253
|
+
}
|
|
156
254
|
}
|
|
157
255
|
}
|
|
158
256
|
|
|
159
257
|
_EnsureAnim() {
|
|
160
258
|
if (!this._BindAnim) {
|
|
161
|
-
this._BindAnim = new FreeMoveAnimClass(
|
|
259
|
+
this._BindAnim = new FreeMoveAnimClass(
|
|
260
|
+
this._OnEchoEvent.bind(this),
|
|
261
|
+
this._SelfNexusRecv.token,
|
|
262
|
+
this._SizeMode);
|
|
162
263
|
this._BindView.StartAnimation(this._BindAnim);
|
|
163
264
|
}
|
|
164
265
|
}
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
import { StateCmdBuilder } from "./ForgeTypeDefine"
|
|
9
9
|
|
|
10
10
|
class CallbackInfo {
|
|
11
|
-
public funcRef
|
|
12
|
-
public times: number; // 回调的次数
|
|
13
|
-
public once: boolean; // 是否单次回调就销毁
|
|
11
|
+
public funcRef!: Function; // 回调函数
|
|
12
|
+
public times: number = 0; // 回调的次数
|
|
13
|
+
public once: boolean = false; // 是否单次回调就销毁
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
class CallbackManager {
|
|
@@ -49,9 +49,9 @@ class CallbackManager {
|
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
public invokeCallback(id: string, actorState: Object,
|
|
53
|
-
customDataStr: string | null | undefined,
|
|
54
|
-
nexusCustomDataStr:string | null | undefined) {
|
|
52
|
+
public invokeCallback(id: string, actorState: Object,
|
|
53
|
+
customDataStr: string | null | undefined,
|
|
54
|
+
nexusCustomDataStr: string | null | undefined) {
|
|
55
55
|
let callbackObj = this._CallbackMap.get(id);
|
|
56
56
|
if (callbackObj) {
|
|
57
57
|
if (callbackObj.once) {
|
|
@@ -7,16 +7,43 @@
|
|
|
7
7
|
|
|
8
8
|
<!--
|
|
9
9
|
* 【模块 export 内容】
|
|
10
|
-
* JsvFreeMoveActor
|
|
11
|
-
*
|
|
12
|
-
*
|
|
10
|
+
* JsvFreeMoveActor/JsvFreeMoveDiv:
|
|
11
|
+
* 帧动画控制组件,通过control
|
|
12
|
+
* .action() 单一运动指令,新指令发生时会冲掉旧指令
|
|
13
|
+
* .condition() 条件设置,有时间维度,X/Y维度
|
|
14
|
+
* .state() 状态调整指令
|
|
13
15
|
*
|
|
16
|
+
* props说明:
|
|
17
|
+
* class: String, 等同于div的class设置(目前未实装,后续支持...)
|
|
18
|
+
* style: Object, 等同于div的style设置
|
|
19
|
+
* 特别注意: 在sizeMode模式下,非hidden,控制的是background/image的展示区域,
|
|
20
|
+
* overflow:hidden时,控制的是剪切区域,展示区域保持最初的width/height
|
|
21
|
+
* sizeMode: Boolean, 从控制div左上角坐标的模式改为改为通过div矩形宽高
|
|
22
|
+
* (指令控制右下角坐标,实现对[0,0]->[右下角x,y]的矩形的宽高调整,另外,不支持负坐标)
|
|
23
|
+
* expose说明:
|
|
24
|
+
* control: Object 控制器句柄,具体参考 ActorControl
|
|
14
25
|
-->
|
|
15
26
|
<script setup>
|
|
16
27
|
import ActControl from "./ActorControl.ts";
|
|
17
28
|
import { shallowRef, onMounted } from "vue";
|
|
18
29
|
|
|
19
30
|
const props = defineProps({
|
|
31
|
+
// div的style设置,
|
|
32
|
+
// 其中top, left会作用于父节点,其余内容作用于子节点
|
|
33
|
+
// width和height在size模式下为初始尺寸
|
|
34
|
+
// 例如backgroundColor/backgroundImage/overflowHidden
|
|
35
|
+
style: {
|
|
36
|
+
type: Object,
|
|
37
|
+
default: {},
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
// 动画转而控制width/height,而不是x,y
|
|
41
|
+
sizeMode: {
|
|
42
|
+
default: false,
|
|
43
|
+
type: Boolean,
|
|
44
|
+
},
|
|
45
|
+
|
|
46
|
+
// Deprecated
|
|
20
47
|
// 设置给父节点,动画节点必须top/left为0, 以保证PC端模拟通过style直接获取当前位置信息的逻辑能通过
|
|
21
48
|
top: {
|
|
22
49
|
default: 0,
|
|
@@ -27,7 +54,9 @@ const props = defineProps({
|
|
|
27
54
|
type: Number,
|
|
28
55
|
},
|
|
29
56
|
|
|
30
|
-
//
|
|
57
|
+
// Deprecated
|
|
58
|
+
// 设置给实际的动画节点, 在size模式下为初始尺寸
|
|
59
|
+
// 可能会被style.width, style.height替代
|
|
31
60
|
width: {
|
|
32
61
|
default: 0,
|
|
33
62
|
type: Number,
|
|
@@ -40,9 +69,13 @@ const props = defineProps({
|
|
|
40
69
|
|
|
41
70
|
let mainDivRef = shallowRef(null);
|
|
42
71
|
let controller = new ActControl();
|
|
72
|
+
if (props.sizeMode) {
|
|
73
|
+
// 启用size模式
|
|
74
|
+
controller.asSizeMode();
|
|
75
|
+
}
|
|
43
76
|
|
|
44
77
|
onMounted(() => {
|
|
45
|
-
controller.bindForgeView(mainDivRef.value.jsvGetProxyView());
|
|
78
|
+
controller.bindForgeView(mainDivRef.value.jsvGetProxyView(true));
|
|
46
79
|
});
|
|
47
80
|
|
|
48
81
|
defineExpose({
|
|
@@ -53,17 +86,18 @@ defineExpose({
|
|
|
53
86
|
<template>
|
|
54
87
|
<div
|
|
55
88
|
:style="{
|
|
56
|
-
top: props.top,
|
|
57
|
-
left: props.left,
|
|
89
|
+
top: props.style.top ? props.style.top : props.top,
|
|
90
|
+
left: props.style.left ? props.style.left : props.left,
|
|
58
91
|
}"
|
|
59
92
|
>
|
|
60
93
|
<div
|
|
61
94
|
ref="mainDivRef"
|
|
62
95
|
:style="{
|
|
63
|
-
top: 0,
|
|
64
|
-
left: 0,
|
|
65
96
|
width: props.width,
|
|
66
97
|
height: props.height,
|
|
98
|
+
...props.style,
|
|
99
|
+
top: 0,
|
|
100
|
+
left: 0,
|
|
67
101
|
}"
|
|
68
102
|
>
|
|
69
103
|
<slot></slot>
|
|
@@ -479,6 +479,39 @@ class ActorPackBuilder {
|
|
|
479
479
|
return CmdPackBuilder.InitActCmdPack(this._SpeedKeeps, this._AccKeeps, this._NexusRecv?.token, cmdList);
|
|
480
480
|
}
|
|
481
481
|
|
|
482
|
+
/**
|
|
483
|
+
* ackMovementSync
|
|
484
|
+
* 只能放在 movementSync 的then中,用于将Sync同步信息按比例转化成
|
|
485
|
+
* (注意): 如果触发链条上有自己发出的信息,则将不再产生动作,规避循环触发
|
|
486
|
+
*
|
|
487
|
+
* @param {int} horizontalStart 横向运动识别区域的0%对应位置, 可以为负
|
|
488
|
+
* @param {int} horizontalEnd 横向运动识别区域的100%对应位置, 可以为负,可以小于start
|
|
489
|
+
* @param {int} verticalStart 纵向运动识别区域的0%对应位置, 可以为负
|
|
490
|
+
* @param {int} verticalEnd 纵向运动识别区域的100%对应位置, 可以为负,可以小于end
|
|
491
|
+
* @param {int} xyEnable x,y是否都触发, 0b01对应x, 0b10对应y, 可以或运算在一起
|
|
492
|
+
* @param {int} syncType 换算公式:
|
|
493
|
+
* 1: 正比公式:selfPercent = givenPercent
|
|
494
|
+
* 2: 反比公式:selfPercent = (1 - givenPercent)
|
|
495
|
+
*/
|
|
496
|
+
ackMovementSync(
|
|
497
|
+
horizontalStart: number, horizontalEnd: number,
|
|
498
|
+
verticalStart: number, verticalEnd: number,
|
|
499
|
+
xyEnable: number, syncType: number) {
|
|
500
|
+
|
|
501
|
+
if (!this._BasicPreProcess("ackMovementSync")) {
|
|
502
|
+
return;
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
let cmdList: Array<Object> = [];
|
|
506
|
+
cmdList.push(ActionCmdBuilder.AckMovementSync(
|
|
507
|
+
horizontalStart,
|
|
508
|
+
horizontalEnd,
|
|
509
|
+
verticalStart,
|
|
510
|
+
verticalEnd,
|
|
511
|
+
xyEnable, syncType));
|
|
512
|
+
return CmdPackBuilder.InitActCmdPack(this._SpeedKeeps, this._AccKeeps, this._NexusRecv?.token, cmdList);
|
|
513
|
+
}
|
|
514
|
+
|
|
482
515
|
_BuildAccelOnPole(
|
|
483
516
|
builderThis: ActorPackBuilder,
|
|
484
517
|
cmdList: Array<Object>,
|
|
@@ -31,12 +31,14 @@ class ConditionPackBuilder {
|
|
|
31
31
|
private _CommonInfo: Object;
|
|
32
32
|
private _CommonInfoValid: boolean;
|
|
33
33
|
private _ContorlSlefNexus: NexusNode;
|
|
34
|
+
private _BuildersFactory: any;
|
|
34
35
|
|
|
35
|
-
constructor(callbackManager: CallbackManager, selfNexus: NexusNode) {
|
|
36
|
+
constructor(callbackManager: CallbackManager, selfNexus: NexusNode, buildersFactory: any) {
|
|
36
37
|
this._Callbacks = callbackManager;
|
|
37
38
|
this._CommonInfo = ConditionSetBuilder.InitCommonInfo();
|
|
38
39
|
this._CommonInfoValid = false;
|
|
39
40
|
this._ContorlSlefNexus = selfNexus;
|
|
41
|
+
this._BuildersFactory = buildersFactory;
|
|
40
42
|
}
|
|
41
43
|
|
|
42
44
|
isInUsing() {
|
|
@@ -88,7 +90,7 @@ class ConditionPackBuilder {
|
|
|
88
90
|
return this._BuildPack(ConditionSetBuilder.WallPosition(direction, xPosition, yPosition, this._CommonInfo));
|
|
89
91
|
}
|
|
90
92
|
|
|
91
|
-
boxPosition(left: UNumber, top: UNumber, right: UNumber, bottom: UNumber):
|
|
93
|
+
boxPosition(left: UNumber, top: UNumber, right: UNumber, bottom: UNumber): any {
|
|
92
94
|
if (!this._CheckCommonInfo()) {
|
|
93
95
|
return null;
|
|
94
96
|
}
|
|
@@ -143,7 +145,7 @@ class ConditionPackBuilder {
|
|
|
143
145
|
* @param {NexusNode} nexusRecv 由 FreeMoveFunc.newNexus() 创建, 作为通讯句柄,类似电话号,被fireNexusEvent调用
|
|
144
146
|
* @param {number} detailEventType 监听的事件类型, 类比与分机号,和fireNexusEvent发出的id约定, 自定义内容要求1000以上
|
|
145
147
|
*/
|
|
146
|
-
onNexusEvent(nexusRecv: NexusNode, detailEventType: number)
|
|
148
|
+
onNexusEvent(nexusRecv: NexusNode, detailEventType: number) {
|
|
147
149
|
// CommonInfo 只能使用一次,规避多次使用问题
|
|
148
150
|
if (!this._CheckCommonInfo()) {
|
|
149
151
|
return null;
|
|
@@ -179,6 +181,7 @@ class ConditionPackBuilder {
|
|
|
179
181
|
/**
|
|
180
182
|
* onNextTick
|
|
181
183
|
* 用于对一些Condition激活进行延迟,例如teleportTo处理后延迟激活 OnHitBlock 动作,规避teleportTo处理直接触发OnHitBlocker
|
|
184
|
+
* 特别场景: onNextTick(0) 可用于充当前帧命令执行完毕的回调,相当于为命令执行完毕做一个callback
|
|
182
185
|
*
|
|
183
186
|
*/
|
|
184
187
|
onNextTick(tickGap: number = 1) {
|
|
@@ -187,8 +190,8 @@ class ConditionPackBuilder {
|
|
|
187
190
|
return null;
|
|
188
191
|
}
|
|
189
192
|
this._CommonInfoValid = false;
|
|
190
|
-
if (tickGap
|
|
191
|
-
tickGap =
|
|
193
|
+
if (tickGap < 0) {
|
|
194
|
+
tickGap = 0;
|
|
192
195
|
}
|
|
193
196
|
|
|
194
197
|
return this._BuildPack(ConditionSetBuilder.OnNextTick(tickGap, this._CommonInfo));
|
|
@@ -277,6 +280,11 @@ class ConditionPackBuilder {
|
|
|
277
280
|
return this._BuildPack(ConditionSetBuilder.OnFlingDrop(this._CommonInfo, this._ContorlSlefNexus.token));
|
|
278
281
|
}
|
|
279
282
|
|
|
283
|
+
/**
|
|
284
|
+
* touchCount
|
|
285
|
+
* 当touchDown时,Count会++,用于解决多次touchDown引发的时序问题
|
|
286
|
+
* 当native的count计数等于给定的参数设定的count时,触发condition
|
|
287
|
+
*/
|
|
280
288
|
touchCount(count: number) {
|
|
281
289
|
if (!this._CheckCommonInfo()) {
|
|
282
290
|
return null;
|
|
@@ -285,6 +293,50 @@ class ConditionPackBuilder {
|
|
|
285
293
|
return this._BuildPack(ConditionSetBuilder.TouchCount(this._CommonInfo, count));
|
|
286
294
|
}
|
|
287
295
|
|
|
296
|
+
/**
|
|
297
|
+
* onMovement
|
|
298
|
+
* 当FreeMove块移动时,移动了给定的距离值后触发条件, 给定的距离值由sensitivity定义
|
|
299
|
+
*
|
|
300
|
+
* @param {float} xSensitivity x轴的敏感度设置,表示移动了多少像素时就触发条件, 最小值为1
|
|
301
|
+
* @param {float} ySensitivity y轴的敏感度设置,表示移动了多少像素时就触发条件, undefined时等于xSensitivity
|
|
302
|
+
* @param {int} xyEnables x,y两轴哪个生效, 0b1 为x, 0b10 为y, 默认为都enable
|
|
303
|
+
*/
|
|
304
|
+
onMovement(xSensitivity: number,
|
|
305
|
+
ySensitivity: number | undefined = undefined,
|
|
306
|
+
xyEnables: number | undefined = undefined) {
|
|
307
|
+
if (!this._CheckCommonInfo()) {
|
|
308
|
+
return null;
|
|
309
|
+
}
|
|
310
|
+
this._CommonInfoValid = false;
|
|
311
|
+
|
|
312
|
+
if (!xSensitivity || xSensitivity < 1) {
|
|
313
|
+
xSensitivity = 1;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
if (typeof ySensitivity == "undefined") {
|
|
317
|
+
ySensitivity = xSensitivity;
|
|
318
|
+
xyEnables = 0b11;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
if (typeof xyEnables == "undefined") {
|
|
322
|
+
xyEnables = 0b11;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
return this._BuildPack(ConditionSetBuilder.OnMovement(
|
|
326
|
+
this._CommonInfo,
|
|
327
|
+
xSensitivity, ySensitivity, xyEnables));
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
movementSync(nexusRef: NexusNode) {
|
|
331
|
+
if (!this._CheckCommonInfo()) {
|
|
332
|
+
return null;
|
|
333
|
+
}
|
|
334
|
+
this._CommonInfoValid = false;
|
|
335
|
+
return this._BuildPack(ConditionSetBuilder.MovementSyncNexus(this._CommonInfo,
|
|
336
|
+
nexusRef?.token ? nexusRef.token : 0,
|
|
337
|
+
));
|
|
338
|
+
}
|
|
339
|
+
|
|
288
340
|
_CheckCommonInfo(): boolean {
|
|
289
341
|
if (!this._CommonInfoValid) {
|
|
290
342
|
console.error("Error: must call from new conditoin()");
|
|
@@ -298,10 +350,19 @@ class ConditionPackBuilder {
|
|
|
298
350
|
|
|
299
351
|
// 追加then处理
|
|
300
352
|
let callbackManager = this._Callbacks;
|
|
301
|
-
cmdPack["then"] = (
|
|
302
|
-
|
|
353
|
+
cmdPack["then"] = (creatorOrArray: Function | Array<Object> | undefined) => {
|
|
354
|
+
if (creatorOrArray) {
|
|
355
|
+
let childCmdPackList: Array<Object>;
|
|
356
|
+
if (typeof creatorOrArray == "function") {
|
|
357
|
+
childCmdPackList = creatorOrArray(this._BuildersFactory);
|
|
358
|
+
} else {
|
|
359
|
+
childCmdPackList = creatorOrArray;
|
|
360
|
+
}
|
|
361
|
+
setChildCommnadPackList(conditionSet, callbackManager, childCmdPackList);
|
|
362
|
+
return cmdPack;
|
|
363
|
+
}
|
|
303
364
|
return cmdPack;
|
|
304
|
-
}
|
|
365
|
+
}
|
|
305
366
|
|
|
306
367
|
return cmdPack;
|
|
307
368
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import { StateCmdBuilder, CmdPackBuilder } from "./ForgeTypeDefine"
|
|
3
3
|
import { NexusNode } from "./NexusNode";
|
|
4
|
+
import ActorControl from "./ActorControl";
|
|
4
5
|
|
|
5
6
|
class StatePackBuilder {
|
|
6
7
|
constructor() {
|
|
@@ -99,6 +100,65 @@ class StatePackBuilder {
|
|
|
99
100
|
fireNexusEvent(nexusRecv: NexusNode, detailEventType: number) {
|
|
100
101
|
return CmdPackBuilder.InitStateCmdPack(StateCmdBuilder.FireNexusEvent(detailEventType, nexusRecv.token));
|
|
101
102
|
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* setTouchAttractChild
|
|
106
|
+
*
|
|
107
|
+
* 绑定一个子view中的FreeMoveDiv
|
|
108
|
+
* 当Touch触控到本div时,这个子div会立刻移动到手指按下的位置,并接受焦点
|
|
109
|
+
*
|
|
110
|
+
* @param {ActorControl} otherFreeMoveControl 其他FreeMoveDiv的control对象
|
|
111
|
+
*/
|
|
112
|
+
setTouchAttractChild(otherFreeMoveControl: ActorControl) {
|
|
113
|
+
if (otherFreeMoveControl) {
|
|
114
|
+
let animRef = otherFreeMoveControl.getBindedAnim();
|
|
115
|
+
return CmdPackBuilder.InitStateCmdPack(StateCmdBuilder.SetTouchAttractChild(animRef));
|
|
116
|
+
} else {
|
|
117
|
+
return CmdPackBuilder.InitStateCmdPack(StateCmdBuilder.SetTouchAttractChild(null));
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* startMovementSync
|
|
123
|
+
*
|
|
124
|
+
* 发出进度同步信号(可以一个FreeMove绑定多个信号发生器,但目前场景估计只需要一个发生器即可)
|
|
125
|
+
* 计算当前freeMove的postion和运动识别区域的比值
|
|
126
|
+
* xPercent = (xPos - horizontalStart) / (horizontalEnd - horizontalStart)
|
|
127
|
+
* yPercent = (yPos - verticalStart) / (verticalEnd - verticalStart)
|
|
128
|
+
* x和y可以为负数,也可能>100%
|
|
129
|
+
*
|
|
130
|
+
* 当多次调用时,nexusRef相同时,则为更新运动识别区域,nexusRef不同时则为新建信号发起器
|
|
131
|
+
*
|
|
132
|
+
* @param {NexusNode} nexusRef 绑定的nexus句柄,接受者用这个句柄来进行监听
|
|
133
|
+
* @param {int} horizontalStart 横向运动识别区域的0%对应位置, 可以为负
|
|
134
|
+
* @param {int} horizontalEnd 横向运动识别区域的100%对应位置, 可以为负,可以小于start
|
|
135
|
+
* @param {int} verticalStart 纵向运动识别区域的0%对应位置, 可以为负
|
|
136
|
+
* @param {int} verticalEnd 纵向运动识别区域的100%对应位置, 可以为负,可以小于end
|
|
137
|
+
* @param {int} xyEnable x,y是否都触发, 0b01对应x, 0b10对应y, 可以或运算在一起
|
|
138
|
+
*/
|
|
139
|
+
startMovementSync(nexusRef: NexusNode,
|
|
140
|
+
horizontalStart: number, horizontalEnd: number,
|
|
141
|
+
verticalStart: number, verticalEnd: number,
|
|
142
|
+
xyEnable: number) {
|
|
143
|
+
|
|
144
|
+
return CmdPackBuilder.InitStateCmdPack(StateCmdBuilder.StartMovementSync(
|
|
145
|
+
nexusRef?.token ? nexusRef.token : 0,
|
|
146
|
+
horizontalStart,
|
|
147
|
+
horizontalEnd,
|
|
148
|
+
verticalStart,
|
|
149
|
+
verticalEnd,
|
|
150
|
+
xyEnable));
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/*
|
|
154
|
+
* stopMovementSync
|
|
155
|
+
*
|
|
156
|
+
* 停止由startMovementSync发起的的同步信号
|
|
157
|
+
* 目前阶段,为关闭所有的信号发起器
|
|
158
|
+
*/
|
|
159
|
+
stopMovementSync() {
|
|
160
|
+
return CmdPackBuilder.InitStateCmdPack(StateCmdBuilder.StopMovementSync());
|
|
161
|
+
}
|
|
102
162
|
}
|
|
103
163
|
|
|
104
164
|
export default StatePackBuilder;
|