@shijiu/jsview-vue 2.1.200 → 2.1.339-test.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/browser/BrowserApic.vue.mjs +124 -0
- package/bin/browser/BrowserApic2.vue.mjs +118 -0
- package/bin/browser/BrowserApicLib.mjs +424 -0
- package/bin/browser/BrowserAudio.vue.mjs +263 -0
- package/bin/browser/BrowserJsvLatex.vue.mjs +110 -0
- package/bin/browser/BrowserJsvPlayer.vue.mjs +573 -0
- package/bin/browser/BrowserPreload.vue.mjs +154 -0
- package/bin/browser/BrowserQrcode.vue.mjs +178 -0
- package/bin/browser/BrowserSpray.vue.mjs +66 -0
- package/bin/browser/BrowserTextureAnim.vue.mjs +324 -0
- package/bin/export-sfc.mjs +12 -0
- package/bin/jsview-common.mjs +39 -0
- package/bin/jsview-vue.mjs +21106 -0
- package/index.js +3 -4
- package/package.json +1 -2
- package/tools/config/rollup.config.mjs +52 -0
- package/tools/config/tsconfig.json +18 -0
- package/tools/config/vite.config.ts +60 -0
- package/tools/jsview-vue-build.mjs +125 -0
- package/utils/JsViewEngineWidget/{JsvFocusBlock.vue → JsvFocus/JsvFocusBlock.vue} +11 -11
- package/utils/JsViewEngineWidget/{JsvFocusHub.ts → JsvFocus/JsvFocusHub.ts} +9 -3
- package/utils/JsViewEngineWidget/{JsvFocusManager.js → JsvFocus/JsvFocusManager.js} +6 -5
- package/utils/JsViewEngineWidget/MetroWidget/AnimationManager.ts +33 -10
- package/utils/JsViewEngineWidget/MetroWidget/ListWidget.vue +89 -57
- package/utils/JsViewEngineWidget/MetroWidget/MetroWidget.vue +118 -62
- package/utils/JsViewEngineWidget/MetroWidget/MetroWidgetSetup.js +504 -60
- package/utils/JsViewEngineWidget/MetroWidget/RenderItem.ts +11 -1
- package/utils/JsViewEngineWidget/MetroWidget/SlotComponent.vue +13 -0
- package/utils/JsViewEngineWidget/TemplateParser/CommonMetroTemplate.ts +1 -1
- package/utils/JsViewEngineWidget/TemplateParser/ListMetroTemplate.ts +1 -1
- package/utils/JsViewEngineWidget/TemplateParser/MetroTemplate.ts +34 -1
- package/utils/JsViewEngineWidget/TemplateParser/TemplateItemAdder.ts +52 -11
- package/utils/JsViewEngineWidget/index.js +3 -3
- package/utils/JsViewPlugin/JsvAudio/AudioProxy.js +9 -0
- package/utils/JsViewPlugin/JsvAudio/BrowserAudio/BrowserAudio.vue +11 -3
- package/utils/JsViewPlugin/JsvAudio/JsvAudio.vue +1 -0
- package/utils/JsViewPlugin/JsvAudio/JsvAudioBridgeProxy.js +8 -0
- package/utils/JsViewPlugin/JsvAudio/ScreenLockManager.js +16 -0
- package/utils/JsViewPlugin/JsvAudio/version.js +3 -3
- package/utils/JsViewPlugin/JsvAudio/version.mjs +3 -3
- package/utils/JsViewPlugin/JsvLatex/index.js +1 -1
- package/utils/JsViewPlugin/JsvPlayer/JsvPlayer.vue +1 -1
- package/utils/JsViewPlugin/JsvPlayer/index-0.9.js +3 -3
- package/utils/JsViewPlugin/JsvPlayer/index.js +2 -2
- package/utils/JsViewVueTools/DebugTool.js +2 -2
- package/utils/JsViewVueTools/DefaultKeyMap.js +1 -1
- package/utils/JsViewVueTools/JsvDynamicCssStyle.js +1 -1
- package/utils/JsViewVueTools/JsvDynamicKeyFrames.js +2 -2
- package/utils/JsViewVueTools/JsvImpactTracer.js +7 -7
- package/utils/JsViewVueTools/JsvPreDownloader.ts +1 -1
- package/utils/JsViewVueTools/JsvRefTaker.js +2 -1
- package/utils/JsViewVueTools/JsvRuntimeBridge.js +29 -29
- package/utils/JsViewVueTools/JsvStyleClass.js +3 -3
- package/utils/JsViewVueTools/JsvStyleSheetsDeclarer.js +1 -1
- package/utils/JsViewVueTools/JsvTextTools.js +4 -4
- package/utils/JsViewVueTools/JsvTextureStore/CanvasTexture/CanvasTexture.ts +29 -1
- package/utils/JsViewVueTools/JsvTextureStore/CanvasTexture/CommandList.ts +6 -5
- package/utils/JsViewVueTools/JsvTextureStore/JsvTextureStore.ts +60 -2
- package/utils/JsViewVueTools/NinePatchHelper.js +1 -1
- package/utils/JsViewVueWidget/JsvActorMove/ActorControlBase.js +1 -1
- package/utils/JsViewVueWidget/JsvActorMove/JsvActorMoveControl.js +1 -1
- package/utils/JsViewVueWidget/JsvApic/{BrowserApic → JsvApic}/BrowserApic.vue +20 -23
- package/utils/JsViewVueWidget/JsvApic/{JsvApic.vue → JsvApic/JsvApic.vue} +3 -14
- package/utils/JsViewVueWidget/JsvApic/{index.js → JsvApic/index.js} +2 -4
- package/utils/JsViewVueWidget/JsvApic/JsvApic2/BrowserApic2.vue +116 -0
- package/utils/JsViewVueWidget/JsvApic/JsvApic2/JsvApic2.vue +137 -0
- package/utils/JsViewVueWidget/JsvApic/JsvApic2/index.js +17 -0
- package/utils/JsViewVueWidget/JsvApic/JsvBrowserApicLib/BrowserApicLib.js +4 -0
- package/utils/JsViewVueWidget/JsvApic/{BrowserApic → JsvBrowserApicLib}/NormalLoopTool.js +16 -18
- package/utils/JsViewVueWidget/JsvApic/JsvBrowserApicLib/PartLoopTool.js +90 -0
- package/utils/JsViewVueWidget/JsvApic/JsvBrowserApicLib/SingleLoopTool.js +17 -0
- package/utils/JsViewVueWidget/JsvApic/JsvBrowserApicLib/Viewer.js +111 -0
- package/utils/JsViewVueWidget/JsvApic/JsvCommonLoopToolBase.js +48 -0
- package/utils/JsViewVueWidget/JsvConnectLine/ArcLineManager.js +71 -0
- package/utils/JsViewVueWidget/JsvConnectLine/JsvConnectLine.vue +354 -0
- package/utils/JsViewVueWidget/JsvConnectLine/index.js +2 -0
- package/utils/JsViewVueWidget/JsvFreeMoveActor/ActorControl.ts +37 -18
- package/utils/JsViewVueWidget/JsvFreeMoveActor/ForgeTypeDefine.ts +7 -3
- package/utils/JsViewVueWidget/JsvFreeMoveActor/FreeMoveActor.vue +28 -2
- package/utils/JsViewVueWidget/JsvFreeMoveActor/JsvEnvBlocker.vue +12 -5
- package/utils/JsViewVueWidget/JsvFreeMoveActor/NexusNode.ts +21 -0
- package/utils/JsViewVueWidget/JsvFreeMoveActor/SetAction.ts +47 -59
- package/utils/JsViewVueWidget/JsvFreeMoveActor/SetCondition.ts +129 -12
- package/utils/JsViewVueWidget/JsvFreeMoveActor/SetState.ts +45 -0
- package/utils/JsViewVueWidget/JsvFreeMoveActor/index.js +10 -2
- package/utils/JsViewVueWidget/JsvGrid.vue +1 -1
- package/utils/JsViewVueWidget/JsvHole.js +1 -1
- package/utils/JsViewVueWidget/JsvInput/JsvInput.vue +1 -1
- package/utils/JsViewVueWidget/JsvLine/JsvLine.vue +2 -2
- package/utils/JsViewVueWidget/JsvLine/LineManager.js +6 -4
- package/utils/JsViewVueWidget/JsvMarquee.vue +7 -4
- package/utils/JsViewVueWidget/JsvPieChart.vue +1 -1
- package/utils/JsViewVueWidget/JsvPreload/JsvPreload.vue +1 -1
- package/utils/JsViewVueWidget/JsvPreload/index.js +1 -1
- package/utils/JsViewVueWidget/JsvProgressBar.vue +172 -0
- package/utils/JsViewVueWidget/JsvQrcode/JsvQrcode.vue +0 -1
- package/utils/JsViewVueWidget/JsvQrcode/index.js +1 -1
- package/utils/JsViewVueWidget/JsvRadarChart.vue +1 -1
- package/utils/JsViewVueWidget/JsvScaleTextBox.vue +0 -2
- package/utils/JsViewVueWidget/JsvSector.vue +1 -1
- package/utils/JsViewVueWidget/JsvSoundPool.js +1 -1
- package/utils/JsViewVueWidget/JsvSpray/index.js +1 -1
- package/utils/JsViewVueWidget/JsvSpriteAnim/FrameBuidler.ts +235 -0
- package/utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteAnim.vue +433 -401
- package/utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteLoader.vue +120 -0
- package/utils/JsViewVueWidget/JsvSpriteAnim/index.js +2 -2
- package/utils/JsViewVueWidget/JsvSwiper/JsvSwiper.vue +5 -5
- package/utils/JsViewVueWidget/JsvSwiper3D/JsvSwiper.vue +425 -422
- package/utils/JsViewVueWidget/JsvVisibleSensor/index.js +1 -1
- package/utils/JsViewVueWidget/index.js +7 -3
- package/utils/index.js +4 -0
- package/utils/JsViewVueWidget/JsvApic/BrowserApic/LoopToolBase.js +0 -25
- package/utils/JsViewVueWidget/JsvApic/BrowserApic/PartLoopTool.js +0 -119
- package/utils/JsViewVueWidget/JsvApic/BrowserApic/Viewer.js +0 -106
- /package/utils/JsViewPlugin/JsvLatex/{JsvLatexBrowser.vue → BrowserJsvLatex.vue} +0 -0
- /package/utils/JsViewPlugin/JsvPlayer/{JsvPlayerBrowser-0.9.vue → BrowserJsvPlayer-0.9.vue} +0 -0
- /package/utils/JsViewPlugin/JsvPlayer/{JsvPlayerBrowser.vue → BrowserJsvPlayer.vue} +0 -0
- /package/utils/JsViewVueWidget/JsvApic/{BrowserApic → JsvBrowserApicLib}/ApicDataBase.js +0 -0
- /package/utils/JsViewVueWidget/JsvApic/{BrowserApic → JsvBrowserApicLib}/GifData.js +0 -0
- /package/utils/JsViewVueWidget/JsvApic/{BrowserApic → JsvBrowserApicLib}/WebpData.js +0 -0
|
@@ -7,7 +7,9 @@
|
|
|
7
7
|
*/
|
|
8
8
|
export { default as JsvActorMove, JsvActorMoveControl } from "./JsvActorMove";
|
|
9
9
|
export * from "./JsvFreeMoveActor";
|
|
10
|
-
export { default as JsvApic
|
|
10
|
+
export { default as JsvApic } from "./JsvApic/JsvApic";
|
|
11
|
+
export { default as JsvApic2 } from "./JsvApic/JsvApic2";
|
|
12
|
+
export { LoopType, ApicEndState } from "./JsvApic/JsvCommonLoopToolBase.js";
|
|
11
13
|
export { default as JsvInput, InputType } from "./JsvInput";
|
|
12
14
|
export {
|
|
13
15
|
default as JsvPreload,
|
|
@@ -16,7 +18,7 @@ export {
|
|
|
16
18
|
} from "./JsvPreload";
|
|
17
19
|
export { default as JsvQrcode } from "./JsvQrcode";
|
|
18
20
|
export { default as JsvSpray } from "./JsvSpray";
|
|
19
|
-
export
|
|
21
|
+
export * from "./JsvSpriteAnim";
|
|
20
22
|
export { default as JsvSwiper } from "./JsvSwiper";
|
|
21
23
|
export { default as JsvSwiper3D } from "./JsvSwiper3D";
|
|
22
24
|
export { default as JsvTextureAnim, TexAlignAnchor, DECORATE_NINEPATCH_ALPHA_MIX, DECORATE_BORDER_RADIUS } from "./JsvTextureAnim";
|
|
@@ -44,7 +46,9 @@ export { default as JsvRipple, JsvRippleShape } from "./JsvRipple"
|
|
|
44
46
|
export { default as JsvLine } from "./JsvLine";
|
|
45
47
|
export { default as JsvPieChart } from "./JsvPieChart.vue";
|
|
46
48
|
export { default as JsvSector } from "./JsvSector.vue";
|
|
47
|
-
|
|
49
|
+
export { default as JsvConnectLine } from "./JsvConnectLine";
|
|
50
|
+
export { default as JsvProgressBar } from "./JsvProgressBar.vue"
|
|
51
|
+
//! 合并透过层样例, 更便于有声音无画面问题的调试
|
|
48
52
|
import JsvNativeSharedDiv from "./JsvNativeSharedDiv.vue";
|
|
49
53
|
export {
|
|
50
54
|
JsvNativeSharedDiv as JsvTransparentDiv,
|
package/utils/index.js
ADDED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @Author: ChenChanghua
|
|
3
|
-
* @Date: 2021-10-13 14:01:14
|
|
4
|
-
* @LastEditors: ChenChanghua
|
|
5
|
-
* @LastEditTime: 2021-10-13 15:20:48
|
|
6
|
-
* @Description: file content
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
class LoopToolBase {
|
|
10
|
-
getNextIndex() {
|
|
11
|
-
return -1;
|
|
12
|
-
}
|
|
13
|
-
reset() {}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
const LoopType = {
|
|
17
|
-
LOOP_DEFAULT: 0,
|
|
18
|
-
LOOP_INFINITE: 1,
|
|
19
|
-
LOOP_FINITE: 2,
|
|
20
|
-
LOOP_PART: 3,
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export default LoopToolBase;
|
|
24
|
-
|
|
25
|
-
export { LoopType };
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @Author: ChenChanghua
|
|
3
|
-
* @Date: 2021-10-13 14:01:36
|
|
4
|
-
* @LastEditors: ChenChanghua
|
|
5
|
-
* @LastEditTime: 2021-10-13 16:17:46
|
|
6
|
-
* @Description: file content
|
|
7
|
-
*/
|
|
8
|
-
import LoopToolBase from "./LoopToolBase";
|
|
9
|
-
|
|
10
|
-
class PartLoopTool extends LoopToolBase {
|
|
11
|
-
constructor(info_list, frame_num) {
|
|
12
|
-
super();
|
|
13
|
-
if (info_list == null) {
|
|
14
|
-
console.error("PartLoopTool info is null.");
|
|
15
|
-
this.mDataError = true;
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
|
-
this.mLoopPeriod = 0;
|
|
19
|
-
this.mFrameIndex = 0;
|
|
20
|
-
|
|
21
|
-
this.mCurLoopStartFrame = 0;
|
|
22
|
-
this.mCurLoopEndFrame = 0;
|
|
23
|
-
this.mCurLoopNum = 0;
|
|
24
|
-
this.mCurLoopCount = 0;
|
|
25
|
-
|
|
26
|
-
this.mDataError = false;
|
|
27
|
-
this.mFrameNum = frame_num;
|
|
28
|
-
this.mLoopInfo = info_list;
|
|
29
|
-
if (this.mLoopInfo.length > 0) {
|
|
30
|
-
let has_next = this.updateLoop();
|
|
31
|
-
if (!has_next) {
|
|
32
|
-
console.error("PartLoopTool init loop info error.", info_list);
|
|
33
|
-
this.mDataError = true;
|
|
34
|
-
}
|
|
35
|
-
} else {
|
|
36
|
-
console.error("PartLoopTool init loop info error.", info_list);
|
|
37
|
-
this.mDataError = true;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
getNextIndex() {
|
|
42
|
-
if (this.mDataError) {
|
|
43
|
-
return -1;
|
|
44
|
-
}
|
|
45
|
-
let next_index = -1;
|
|
46
|
-
let loop_period_num = this.mLoopInfo.length;
|
|
47
|
-
if (this.mLoopPeriod < loop_period_num) {
|
|
48
|
-
if (this.mFrameIndex < this.mCurLoopEndFrame) {
|
|
49
|
-
next_index = this.mFrameIndex + 1;
|
|
50
|
-
} else {
|
|
51
|
-
if (this.mCurLoopNum <= 0) {
|
|
52
|
-
//无限循环
|
|
53
|
-
next_index = this.mCurLoopStartFrame;
|
|
54
|
-
} else {
|
|
55
|
-
this.mCurLoopCount++;
|
|
56
|
-
if (this.mCurLoopCount >= this.mCurLoopNum) {
|
|
57
|
-
//出当前循环更新循环信息
|
|
58
|
-
this.mLoopPeriod++;
|
|
59
|
-
if (this.mLoopPeriod < loop_period_num) {
|
|
60
|
-
let has_next = this.updateLoop();
|
|
61
|
-
if (has_next) {
|
|
62
|
-
this.mCurLoopCount = 0;
|
|
63
|
-
next_index = this.mFrameIndex + 1;
|
|
64
|
-
}
|
|
65
|
-
} else {
|
|
66
|
-
//所有循环已完成
|
|
67
|
-
if (this.mFrameIndex < this.mFrameNum - 1) {
|
|
68
|
-
next_index = this.mFrameIndex + 1;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
} else {
|
|
72
|
-
next_index = this.mCurLoopStartFrame;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
} else {
|
|
77
|
-
//所有循环已完成
|
|
78
|
-
if (this.mFrameIndex < this.mFrameNum - 1) {
|
|
79
|
-
next_index = this.mFrameIndex + 1;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
if (next_index >= 0) {
|
|
84
|
-
this.mFrameIndex = next_index;
|
|
85
|
-
}
|
|
86
|
-
return next_index;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
updateLoop() {
|
|
90
|
-
let loop = this.mLoopInfo[this.mLoopPeriod];
|
|
91
|
-
this.mCurLoopNum = loop[0];
|
|
92
|
-
this.mCurLoopStartFrame = loop[1];
|
|
93
|
-
this.mCurLoopEndFrame = loop[2];
|
|
94
|
-
if (
|
|
95
|
-
this.mCurLoopStartFrame >= this.mFrameNum ||
|
|
96
|
-
this.mCurLoopEndFrame >= this.mFrameNum
|
|
97
|
-
) {
|
|
98
|
-
this.mDataError = true;
|
|
99
|
-
console.error("data error, frame number out of size.", this.mLoopInfo);
|
|
100
|
-
this.reset();
|
|
101
|
-
return false;
|
|
102
|
-
} else {
|
|
103
|
-
return true;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
reset() {
|
|
108
|
-
this.mLoopPeriod = 0;
|
|
109
|
-
this.mFrameIndex = 0;
|
|
110
|
-
this.mCurLoopCount = 0;
|
|
111
|
-
|
|
112
|
-
let loop = this.mLoopInfo[this.mLoopPeriod];
|
|
113
|
-
this.mCurLoopNum = loop[0];
|
|
114
|
-
this.mCurLoopStartFrame = loop[1];
|
|
115
|
-
this.mCurLoopEndFrame = loop[2];
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
export default PartLoopTool;
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @Author: ChenChanghua
|
|
3
|
-
* @Date: 2021-10-13 14:01:45
|
|
4
|
-
* @LastEditors: ChenChanghua
|
|
5
|
-
* @LastEditTime: 2021-10-13 17:09:17
|
|
6
|
-
* @Description: file content
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
import { LoopType } from "./LoopToolBase";
|
|
10
|
-
import PartLoopTool from "./PartLoopTool";
|
|
11
|
-
import NormalLoopTool from "./NormalLoopTool";
|
|
12
|
-
|
|
13
|
-
class Viewer {
|
|
14
|
-
constructor(
|
|
15
|
-
apic_data,
|
|
16
|
-
canvas,
|
|
17
|
-
listener,
|
|
18
|
-
auto_play,
|
|
19
|
-
loop_type,
|
|
20
|
-
loop_info_list
|
|
21
|
-
) {
|
|
22
|
-
this._ApicData = apic_data;
|
|
23
|
-
this._Canvas = canvas;
|
|
24
|
-
this._Context = this._Canvas.getContext("2d");
|
|
25
|
-
this._Listener = listener;
|
|
26
|
-
this._TimeoutId = -1;
|
|
27
|
-
|
|
28
|
-
this._LoopType = loop_type;
|
|
29
|
-
this._LoopInfo = loop_info_list;
|
|
30
|
-
this._createLoopTool();
|
|
31
|
-
let duration = this.renderFrame(0);
|
|
32
|
-
if (auto_play) {
|
|
33
|
-
this._TimeoutId = setTimeout(() => {
|
|
34
|
-
this.renderLoop();
|
|
35
|
-
}, duration);
|
|
36
|
-
if (this._Listener?.onstart) {
|
|
37
|
-
this._Listener.onstart();
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
_createLoopTool() {
|
|
43
|
-
let loop_num = null;
|
|
44
|
-
switch (this._LoopType) {
|
|
45
|
-
case LoopType.LOOP_DEFAULT:
|
|
46
|
-
case LoopType.LOOP_INFINITE:
|
|
47
|
-
case LoopType.LOOP_FINITE:
|
|
48
|
-
loop_num =
|
|
49
|
-
this._LoopType == LoopType.LOOP_DEFAULT
|
|
50
|
-
? this._ApicData.LoopCount
|
|
51
|
-
: this._LoopInfo[0][0];
|
|
52
|
-
this._LoopTool = new NormalLoopTool(
|
|
53
|
-
this._LoopType,
|
|
54
|
-
loop_num,
|
|
55
|
-
this._ApicData.FrameCount
|
|
56
|
-
);
|
|
57
|
-
break;
|
|
58
|
-
case LoopType.LOOP_PART:
|
|
59
|
-
this._LoopTool = new PartLoopTool(
|
|
60
|
-
this._LoopInfo,
|
|
61
|
-
this._ApicData.FrameCount
|
|
62
|
-
);
|
|
63
|
-
break;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
stop() {
|
|
68
|
-
clearTimeout(this._TimeoutId);
|
|
69
|
-
if (this._Listener?.onend) {
|
|
70
|
-
this._Listener.onend();
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
play() {
|
|
75
|
-
clearTimeout(this._TimeoutId);
|
|
76
|
-
let duration = this.renderFrame(0);
|
|
77
|
-
this._LoopTool.reset();
|
|
78
|
-
this._TimeoutId = setTimeout(() => {
|
|
79
|
-
this.renderLoop();
|
|
80
|
-
}, duration);
|
|
81
|
-
if (this._Listener?.onstart) {
|
|
82
|
-
this._Listener.onstart();
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
renderLoop() {
|
|
87
|
-
let next_index = this._LoopTool.getNextIndex();
|
|
88
|
-
if (next_index < 0) {
|
|
89
|
-
console.log("loop finished");
|
|
90
|
-
if (this._Listener?.onend) {
|
|
91
|
-
this._Listener.onend();
|
|
92
|
-
}
|
|
93
|
-
} else {
|
|
94
|
-
let duration = this.renderFrame(next_index);
|
|
95
|
-
this._TimeoutId = setTimeout(() => {
|
|
96
|
-
this.renderLoop();
|
|
97
|
-
}, duration);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
renderFrame(frame_index) {
|
|
102
|
-
return this._ApicData.toImage(frame_index, this._Canvas, this._Context);
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
export default Viewer;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|