@shijiu/jsview-vue 2.1.25 → 2.1.200

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.
Files changed (80) hide show
  1. package/package.json +1 -1
  2. package/utils/JsViewEngineWidget/JsvFocusBlock.vue +1 -1
  3. package/utils/JsViewEngineWidget/JsvFocusHub.ts +123 -0
  4. package/utils/JsViewEngineWidget/JsvFocusManager.js +4 -3
  5. package/utils/JsViewEngineWidget/MetroWidget/AnimationManager.ts +145 -51
  6. package/utils/JsViewEngineWidget/MetroWidget/ListWidget.vue +51 -64
  7. package/utils/JsViewEngineWidget/MetroWidget/MetroWidget.vue +62 -71
  8. package/utils/JsViewEngineWidget/MetroWidget/MetroWidgetSetup.js +308 -613
  9. package/utils/JsViewEngineWidget/TemplateParser/CommonMetroTemplate.ts +127 -247
  10. package/utils/JsViewEngineWidget/TemplateParser/ListMetroTemplate.ts +1 -0
  11. package/utils/JsViewEngineWidget/TemplateParser/MetroTemplate.ts +36 -2
  12. package/utils/JsViewEngineWidget/WidgetCommon.ts +25 -6
  13. package/utils/JsViewPlugin/JsvAudio/{JsvAudioBrowser.vue → BrowserAudio/BrowserAudio.vue} +1 -1
  14. package/utils/JsViewPlugin/JsvAudio/index.js +1 -1
  15. package/utils/JsViewPlugin/JsvLatex/BrowserDomBuilder.js +37 -0
  16. package/utils/JsViewPlugin/JsvLatex/Color.ts +43 -0
  17. package/utils/JsViewPlugin/JsvLatex/JsvLatex.vue +159 -0
  18. package/utils/JsViewPlugin/JsvLatex/JsvLatexBridgeProxy.js +16 -0
  19. package/utils/JsViewPlugin/JsvLatex/JsvLatexBrowser.vue +59 -0
  20. package/utils/JsViewPlugin/JsvLatex/PluginLoader.js +171 -0
  21. package/utils/JsViewPlugin/JsvLatex/index.js +28 -0
  22. package/utils/JsViewPlugin/JsvLatex/mathjax-tex-svg.txt +1 -0
  23. package/utils/JsViewPlugin/JsvLatex/version.js +24 -0
  24. package/utils/JsViewPlugin/JsvLatex/version.mjs +24 -0
  25. package/utils/JsViewPlugin/index.js +2 -1
  26. package/utils/JsViewVueTools/JsvDynamicCssStyle.js +2 -52
  27. package/utils/JsViewVueTools/JsvPerformance.ts +11 -0
  28. package/utils/JsViewVueTools/JsvPreDownloader.ts +55 -11
  29. package/utils/JsViewVueTools/JsvStyleSheetsDeclarer.js +40 -0
  30. package/utils/JsViewVueTools/JsvTextureStore/CanvasTexture/CanvasTexture.ts +143 -0
  31. package/utils/JsViewVueTools/JsvTextureStore/CanvasTexture/CommandList.ts +24 -0
  32. package/utils/JsViewVueTools/JsvTextureStore/CanvasTexture/Path.ts +198 -0
  33. package/utils/JsViewVueTools/JsvTextureStore/JsvTextureStore.ts +31 -0
  34. package/utils/JsViewVueTools/JsvTextureStore/Store.ts +32 -0
  35. package/utils/JsViewVueTools/JsvTextureStore/Texture.ts +38 -0
  36. package/utils/JsViewVueTools/index.js +3 -0
  37. package/utils/JsViewVueWidget/JsvEnableRenderBreak.vue +17 -0
  38. package/utils/JsViewVueWidget/JsvFreeMoveActor/ActionRefObject.ts +6 -0
  39. package/utils/JsViewVueWidget/JsvFreeMoveActor/ActorControl.ts +144 -0
  40. package/utils/JsViewVueWidget/JsvFreeMoveActor/ActorState.ts +6 -0
  41. package/utils/JsViewVueWidget/JsvFreeMoveActor/{CallbackManager.js → CallbackManager.ts} +19 -10
  42. package/utils/JsViewVueWidget/JsvFreeMoveActor/ForgeTypeDefine.ts +45 -0
  43. package/utils/JsViewVueWidget/JsvFreeMoveActor/FreeMoveActor.vue +1 -1
  44. package/utils/JsViewVueWidget/JsvFreeMoveActor/JsvEnvBlocker.vue +124 -0
  45. package/utils/JsViewVueWidget/JsvFreeMoveActor/KeepFlags.ts +6 -0
  46. package/utils/JsViewVueWidget/JsvFreeMoveActor/SetAction.ts +553 -0
  47. package/utils/JsViewVueWidget/JsvFreeMoveActor/SetCondition.ts +138 -0
  48. package/utils/JsViewVueWidget/JsvFreeMoveActor/SetState.ts +53 -0
  49. package/utils/JsViewVueWidget/JsvFreeMoveActor/index.js +11 -1
  50. package/utils/JsViewVueWidget/JsvHole.js +1 -1
  51. package/utils/JsViewVueWidget/JsvLine/JsvLine.vue +101 -0
  52. package/utils/JsViewVueWidget/JsvLine/LineManager.js +62 -0
  53. package/utils/JsViewVueWidget/JsvLine/index.js +3 -0
  54. package/utils/JsViewVueWidget/JsvMarquee.vue +316 -139
  55. package/utils/JsViewVueWidget/JsvMindMap/CommonType.ts +1 -0
  56. package/utils/JsViewVueWidget/JsvMindMap/Constant.ts +20 -0
  57. package/utils/JsViewVueWidget/JsvMindMap/DataTree.ts +394 -0
  58. package/utils/JsViewVueWidget/JsvMindMap/Geometry.ts +277 -0
  59. package/utils/JsViewVueWidget/JsvMindMap/JsvMindMap.vue +653 -0
  60. package/utils/JsViewVueWidget/JsvMindMap/index.js +1 -0
  61. package/utils/JsViewVueWidget/JsvMindMap/rtree.js +628 -0
  62. package/utils/JsViewVueWidget/JsvNinePatch.vue +2 -2
  63. package/utils/JsViewVueWidget/JsvPieChart.vue +124 -0
  64. package/utils/JsViewVueWidget/JsvPosterImage.vue +32 -9
  65. package/utils/JsViewVueWidget/JsvPreload/BrowserPreload.vue +135 -133
  66. package/utils/JsViewVueWidget/JsvPreload/JsvPreload.vue +273 -270
  67. package/utils/JsViewVueWidget/JsvSector.vue +107 -0
  68. package/utils/JsViewVueWidget/JsvTextBox.vue +14 -1
  69. package/utils/JsViewVueWidget/JsvTextureAnim/JsvTextureAnim.vue +28 -2
  70. package/utils/JsViewVueWidget/JsvVisibleSensor/JsvVisibleSensor.vue +122 -93
  71. package/utils/JsViewVueWidget/index.js +15 -7
  72. package/utils/JsViewVueWidget/JsvFreeMoveActor/ActorControl.js +0 -112
  73. package/utils/JsViewVueWidget/JsvFreeMoveActor/CommonTools.js +0 -18
  74. package/utils/JsViewVueWidget/JsvFreeMoveActor/SetAction.js +0 -216
  75. package/utils/JsViewVueWidget/JsvFreeMoveActor/SetCondition.js +0 -66
  76. package/utils/JsViewVueWidget/JsvFreeMoveActor/SetState.js +0 -38
  77. package/utils/JsViewVueWidget/JsvFreeMoveActor/TypeDefine.js +0 -12
  78. package/utils/JsViewVueWidget/JsvTouchContainer.vue +0 -183
  79. package/utils/JsViewVueWidget/JsvTransparentDiv.vue +0 -87
  80. /package/utils/{JsViewVueWidget → JsViewPlugin/JsvAudio/BrowserAudio}/JsvSystemAudio.vue +0 -0
@@ -0,0 +1,107 @@
1
+ <!--
2
+ * 【模块 export 内容】
3
+ * JsvSector:Vue高阶组件,扇形图。
4
+ * props说明:
5
+ * centerPosition {Object} 圆心坐标,属性:{x,y}
6
+ * radius {Number} 半径
7
+ * animationTime {Number} 动画变化时间,单位 /秒
8
+ * config {Object} 配置信息对象,包含初始角度,扫过的角度以及颜色。属性:{startAngle,sweepAngle,color}
9
+ * extraTime {Number} 可选配置(饼图用)扇形运动额外时间
10
+ *
11
+ -->
12
+ <template>
13
+ <div
14
+ :style="{
15
+ width: props.radius,
16
+ height: props.radius,
17
+ transform: `rotate3d(0,0,1,${props.config.startAngle}deg)`,
18
+ transformOrigin: `center center`,
19
+ transition: `transform ${props.animationTime}s`,
20
+ left: props.centerPosition.x / 2,
21
+ top: props.centerPosition.y / 2,
22
+ }"
23
+ >
24
+ <div
25
+ :style="{
26
+ width: props.radius,
27
+ height: props.radius / 2,
28
+ top: props.radius / 2,
29
+ left: 0,
30
+ transform: `rotate3d(0,0,1,${upAngle}deg)`,
31
+ transformOrigin: `center top`,
32
+ overflow: 'hidden',
33
+ transition: `transform ${props.animationTime}s`,
34
+ }"
35
+ >
36
+ <div
37
+ :style="{
38
+ width: props.radius,
39
+ height: props.radius,
40
+ backgroundImage: `jsvtexturestore://${sourceId}`,
41
+ transform: `rotate3d(0,0,1,${downAngle}deg)`,
42
+ transformOrigin: `center top`,
43
+ transition: `transform ${props.animationTime + props.extraTime}s`,
44
+ }"
45
+ ></div>
46
+ </div>
47
+ <div
48
+ :style="{
49
+ width: props.radius,
50
+ height: props.radius / 2,
51
+ top: props.radius / 2,
52
+ left: 0,
53
+ overflow: 'hidden',
54
+ }"
55
+ >
56
+ <div
57
+ :style="{
58
+ width: props.radius,
59
+ height: props.radius,
60
+ backgroundImage: `jsvtexturestore://${sourceId}`,
61
+ transform: `rotate3d(0,0,1,${downAngle}deg)`,
62
+ transformOrigin: `center top`,
63
+ transition: `transform ${props.animationTime+props.extraTime}s`,
64
+ }"></div>
65
+ </div>
66
+ </div>
67
+ </template>
68
+
69
+ <script setup>
70
+ import { shallowRef, onBeforeUnmount, watch } from "vue";
71
+ import { JsvTextureStoreApi, JsvLine } from "jsview";
72
+ let sourceId = shallowRef("");
73
+ const props = defineProps({
74
+ centerPosition: { type: Object, require: true },
75
+ radius: { type: Number, require: true },
76
+ config: { type: Object, require: true },
77
+ animationTime: { type: Number, default: 1 },
78
+ extraTime: { type: Number, default: 0 },
79
+ });
80
+
81
+ let canvasRef = JsvTextureStoreApi.canvasTexture(
82
+ 2 * props.radius,
83
+ 2 * props.radius
84
+ );
85
+ let customPath = canvasRef.customPath();
86
+ customPath.arcTo(0, -props.radius, 2 * props.radius, props.radius, 0, 180);
87
+ // 闭合路径,绘制实心扇形
88
+ customPath.close();
89
+ customPath.fill(props.config.color);
90
+ sourceId.value = canvasRef.commit();
91
+ //旋转角度
92
+ let upAngle = shallowRef(0);
93
+ let downAngle = shallowRef(0);
94
+ const judge = () => {
95
+ downAngle.value = -(180 - props.config.sweepAngle / 2);
96
+ upAngle.value = props.config.sweepAngle / 2;
97
+ };
98
+ judge();
99
+ watch(props, (n, o) => {
100
+ judge();
101
+ });
102
+ onBeforeUnmount(() => {
103
+ JsvTextureStoreApi.deleteTexture(sourceId.value);
104
+ });
105
+ </script>
106
+
107
+ <style lang="scss" scoped></style>
@@ -8,6 +8,14 @@
8
8
  * verticalAlign {string} 垂直对齐方式 (必需) top、middle、bottom
9
9
  * style {object} 样式(必需)
10
10
  * enableLatex {bool} 是否启用Latex文字描画模式
11
+ * latex语法样例
12
+ * 1. 颜色: "测试\\textcolor{#FF0000}{红色}文字"
13
+ * 2. 加粗: "测试\\textb{加粗}文字"
14
+ * 3. 斜体: "测试\\texti{斜体}文字"
15
+ * 4. 下划线: "测试\\textdecoration{underline}{下划线}文字"
16
+ * 5. 删除线: "测试\\textdecoration{line-through}{删除线}文字"
17
+ * latex混合样式样例
18
+ * "测试\\textcolor{#FF0000}{红色并且\\textb{加粗}}文字"
11
19
  -->
12
20
 
13
21
  <script setup>
@@ -25,6 +33,10 @@ const props = defineProps({
25
33
  },
26
34
  enableLatex: Boolean,
27
35
  className: String,
36
+ textDirection: {
37
+ type: String,
38
+ default: "unset",
39
+ },
28
40
  });
29
41
 
30
42
  const innerStyle = computed(() => {
@@ -67,10 +79,11 @@ const disable = window.JsvDisableReactWrapper;
67
79
  JsvTextLatex: enableLatex ? 1 : 0,
68
80
  JsvTextVerticalAlign: verticalAlign,
69
81
  JsvTextLineAlign: lineAlign,
82
+ JsvTextInnerDirection: textDirection,
70
83
  }"
71
84
  jsv-inherit-class="1"
72
85
  >
73
86
  <slot></slot>
74
87
  </div>
75
88
  </div>
76
- </template>
89
+ </template>
@@ -330,7 +330,7 @@ export default {
330
330
  // 4.设置texture的动画形变
331
331
  if (this.animation) {
332
332
  this.forgeAnimation = new Forge.CssKeyframeAnimation(
333
- "@keyframes test" + this.animation,
333
+ "@keyframes texAnimDef" + this.animation,
334
334
  this.duration,
335
335
  null,
336
336
  1,
@@ -362,6 +362,32 @@ export default {
362
362
  this.start();
363
363
  }
364
364
  },
365
+ activated() {
366
+ if (this.innerView) {
367
+ if (this.animation && this.forgeAnimation == null) {
368
+ this.forgeAnimation = new Forge.CssKeyframeAnimation(
369
+ "@keyframes texAnimDef" + this.animation,
370
+ this.duration,
371
+ null,
372
+ 1,
373
+ 1
374
+ );
375
+ this.forgeAnimation.EnableDelay(this.delay).SetRepeat(this.repeat);
376
+ this.forgeAnimation.SetAnimationListener(
377
+ new Forge.AnimationListener(null, this._onAnimationEnd, null)
378
+ );
379
+ this.innerView.StartTextureAnimation(this.forgeAnimation);
380
+ } else {
381
+ this.forgeAnimation = null;
382
+ }
383
+ }
384
+ },
385
+ deactivated() {
386
+ if (this.innerView) {
387
+ this.innerView.StopTextureAnimation();
388
+ }
389
+ this.forgeAnimation = null;
390
+ },
365
391
  };
366
392
  </script>
367
393
 
@@ -376,4 +402,4 @@ export default {
376
402
  }"
377
403
  :data-jsv-vw-innerview="innerViewId"
378
404
  ></div>
379
- </template>
405
+ </template>
@@ -18,124 +18,153 @@
18
18
  -->
19
19
 
20
20
  <template>
21
- <div ref="viewRef" :style="{
22
- top: props.top,
23
- left: props.left,
24
- width: props.width,
25
- height: props.height,
26
- }" >
27
- <slot/>
28
- </div>
21
+ <div
22
+ ref="viewRef"
23
+ :style="{
24
+ top: props.top,
25
+ left: props.left,
26
+ width: props.width,
27
+ height: props.height,
28
+ }"
29
+ >
30
+ <slot />
31
+ </div>
29
32
  </template>
30
33
 
31
34
  <script setup>
32
- import { reactive, ref, shallowRef, toRaw, watchEffect, onMounted } from 'vue'
35
+ import {
36
+ reactive,
37
+ ref,
38
+ shallowRef,
39
+ toRaw,
40
+ watchEffect,
41
+ onMounted,
42
+ onActivated,
43
+ onDeactivated,
44
+ } from "vue";
33
45
  import { Forge } from "@shijiu/jsview/dom/jsv-forge-define";
34
46
 
35
47
  const props = defineProps({
36
- // (支持reactive)可视区域设定
37
- horizonShown: Number,
38
- verticalShown: Number,
39
-
40
- // (支持reactive)Container, 父区域的div引用,
41
- container: Object,
42
-
43
- // (不支持reactive)回调处理
44
- callback: Function,
45
-
46
- // (支持reactive)位置信息
47
- left: {
48
- type: Number,
49
- default: 0,
50
- },
51
- top: {
52
- type: Number,
53
- default: 0,
54
- },
55
- width: {
56
- type: Number,
57
- require: true,
58
- },
59
- height: {
60
- type: Number,
61
- require: true,
62
- },
63
-
64
- // (支持reactive)是否激活,仍然在渲染树时,非必须可以通过enable关闭以节省CPU开销
65
- enable: {
66
- type: Boolean,
67
- default: true,
68
- }
48
+ // (支持reactive)可视区域设定
49
+ horizonShown: Number,
50
+ verticalShown: Number,
51
+
52
+ // (支持reactive)Container, 父区域的div引用,
53
+ container: Object,
54
+
55
+ // (不支持reactive)回调处理
56
+ callback: Function,
57
+
58
+ // (支持reactive)位置信息
59
+ left: {
60
+ type: Number,
61
+ default: 0,
62
+ },
63
+ top: {
64
+ type: Number,
65
+ default: 0,
66
+ },
67
+ width: {
68
+ type: Number,
69
+ require: true,
70
+ },
71
+ height: {
72
+ type: Number,
73
+ require: true,
74
+ },
75
+
76
+ // (支持reactive)是否激活,仍然在渲染树时,非必须可以通过enable关闭以节省CPU开销
77
+ enable: {
78
+ type: Boolean,
79
+ default: true,
80
+ },
69
81
  });
70
82
 
71
83
  // 内部状态变量
72
84
  const viewRef = shallowRef(null);
73
- const viewMounted = reactive({status: false})
85
+ const viewMounted = reactive({ status: false });
74
86
  let sensorRef = null;
75
87
 
76
88
  // 变更检测范围
77
- watchEffect(()=>{
78
- if (viewMounted.status) {
79
- let horizon = fixAreaValue(props.horizonShown);
80
- let vertical = fixAreaValue(props.verticalShown);
89
+ watchEffect(() => {
90
+ if (viewMounted.status) {
91
+ let horizon = fixAreaValue(props.horizonShown);
92
+ let vertical = fixAreaValue(props.verticalShown);
81
93
 
82
- sensorRef.ResetArea({horizon, vertical})
83
- }
84
- })
94
+ sensorRef.ResetArea({ horizon, vertical });
95
+ }
96
+ });
85
97
 
86
98
  // 变更enable状态
87
- watchEffect(()=>{
88
- if (viewMounted.status) {
89
- sensorRef.Enable(props.enable)
90
- }
91
- })
99
+ watchEffect(() => {
100
+ if (viewMounted.status) {
101
+ sensorRef.Enable(props.enable);
102
+ }
103
+ });
92
104
 
93
105
  // 检测container变化
94
- watchEffect(()=>{
95
- if (viewMounted.status) {
96
- if (props.container) {
97
- window.MyContainerView = toRaw(props.container);
98
-
99
- let jsv_main_view_ref = toRaw(props.container).jsvGetProxyView();
100
- if (jsv_main_view_ref) {
101
- sensorRef.ResetContainer(jsv_main_view_ref);
102
- } else {
103
- console.error("Error: container is NOT a div");
104
- }
105
- } else {
106
- sensorRef.ResetContainer(null); // 无container
107
- }
106
+ watchEffect(() => {
107
+ if (viewMounted.status) {
108
+ if (props.container) {
109
+ window.MyContainerView = toRaw(props.container);
110
+
111
+ let jsv_main_view_ref = toRaw(props.container).jsvGetProxyView();
112
+ if (jsv_main_view_ref) {
113
+ sensorRef.ResetContainer(jsv_main_view_ref);
114
+ } else {
115
+ console.error("Error: container is NOT a div");
116
+ }
117
+ } else {
118
+ sensorRef.ResetContainer(null); // 无container
119
+ }
120
+ }
121
+ });
122
+
123
+ let oldH, newH, oldV, newV;
124
+ const visibleChange = (old_h, new_h, old_v, new_v) => {
125
+ oldH = old_h;
126
+ newH = new_h;
127
+ oldV = old_v;
128
+ newV = new_v;
129
+ props.callback?.(old_h, new_h, old_v, new_v);
130
+ };
131
+ onMounted(() => {
132
+ console.log("JsvVisibleSensor: on mounted");
133
+
134
+ sensorRef = new Forge.VisibleSensor(
135
+ toRaw(viewRef.value).jsvGetProxyView(),
136
+ (old_h, new_h, old_v, new_v) => {
137
+ // 获得横向和纵向的新旧状态值
138
+ visibleChange(old_h, new_h, old_v, new_v);
108
139
  }
109
- })
140
+ );
141
+ viewMounted.status = true;
142
+ });
110
143
 
111
- onMounted(()=>{
112
- console.log("JsvVisibleSensor: on mounted");
144
+ onActivated(() => {
145
+ sensorRef.Enable(props.enable);
146
+ });
113
147
 
114
- sensorRef = new Forge.VisibleSensor(toRaw(viewRef.value).jsvGetProxyView(), (old_h, new_h, old_v, new_v)=>{
115
- // 获得横向和纵向的新旧状态值
116
- if (props.callback) {
117
- props.callback(old_h, new_h, old_v, new_v);
118
- }
119
- });
120
- viewMounted.status = true;
121
- })
148
+ onDeactivated(() => {
149
+ if (newH || newV) {
150
+ visibleChange(newH, false, newV, false);
151
+ }
152
+ sensorRef.Enable(false);
153
+ });
122
154
 
123
155
  // 外部方法
124
- defineExpose({
125
-
126
- })
156
+ defineExpose({});
127
157
 
128
158
  // 内部方法
129
159
  function fixAreaValue(origin_value) {
130
- if (origin_value > 1) {
131
- console.warn(`will limited to 1 origin=${origin_value}`);
132
- return 1;
133
- } else if (origin_value < 0) {
134
- console.warn(`will limited to 0 origin=${origin_value}`);
135
- return 0;
136
- } else {
137
- return origin_value;
138
- }
160
+ if (origin_value > 1) {
161
+ console.warn(`will limited to 1 origin=${origin_value}`);
162
+ return 1;
163
+ } else if (origin_value < 0) {
164
+ console.warn(`will limited to 0 origin=${origin_value}`);
165
+ return 0;
166
+ } else {
167
+ return origin_value;
168
+ }
139
169
  }
140
-
141
170
  </script>
@@ -6,7 +6,7 @@
6
6
  * @Description: file content
7
7
  */
8
8
  export { default as JsvActorMove, JsvActorMoveControl } from "./JsvActorMove";
9
- export { default as JsvFreeMoveActor } from "./JsvFreeMoveActor";
9
+ export * from "./JsvFreeMoveActor";
10
10
  export { default as JsvApic, LoopType } from "./JsvApic";
11
11
  export { default as JsvInput, InputType } from "./JsvInput";
12
12
  export {
@@ -31,16 +31,24 @@ export {
31
31
  export { default as JsvHole } from "./JsvHole.js";
32
32
  export { default as JsvMarquee } from "./JsvMarquee.vue";
33
33
  export { default as JsvMaskClipDiv } from "./JsvMaskClipDiv.vue";
34
- export { default as JsvNativeSharedDiv } from "./JsvNativeSharedDiv.vue";
35
34
  export { default as JsvNinePatch } from "./JsvNinePatch.vue";
36
35
  export { default as JsvPosterDiv } from "./JsvPosterDiv.vue";
37
36
  export { default as JsvPosterImage } from "./JsvPosterImage.vue";
38
37
  export { default as JsvScaleTextBox } from "./JsvScaleTextBox.vue";
39
38
  export { JsvSoundPool } from "./JsvSoundPool.js";
40
39
  export { default as JsvTextBox } from "./JsvTextBox.vue";
41
- export { default as JsvTouchContainer } from "./JsvTouchContainer.vue";
42
- export { default as JsvTransparentDiv } from "./JsvTransparentDiv.vue";
43
- export { default as JsvVideo } from "./JsvVideo.vue";
44
- export { default as JsvSystemAudio } from "./JsvSystemAudio.vue";
45
- export { default as JsvRadarChart} from "./JsvRadarChart.vue";
40
+ // export { default as JsvVideo } from "./JsvVideo.vue";
41
+ // export { default as JsvSystemAudio } from "./JsvSystemAudio.vue";
42
+ export { default as JsvRadarChart } from "./JsvRadarChart.vue";
46
43
  export { default as JsvRipple, JsvRippleShape } from "./JsvRipple"
44
+ export { default as JsvLine } from "./JsvLine";
45
+ export { default as JsvPieChart } from "./JsvPieChart.vue";
46
+ export { default as JsvSector } from "./JsvSector.vue";
47
+ // 合并透过层样例, 更便于有声音无画面问题的调试
48
+ import JsvNativeSharedDiv from "./JsvNativeSharedDiv.vue";
49
+ export {
50
+ JsvNativeSharedDiv as JsvTransparentDiv,
51
+ JsvNativeSharedDiv
52
+ }
53
+ export { default as JsvEnableRenderBreak } from "./JsvEnableRenderBreak.vue";
54
+ export { JsvMindMap } from "./JsvMindMap"
@@ -1,112 +0,0 @@
1
- /*
2
- * @Author: donglin.lu@qcast.cn
3
- * @Date: 2023-07-05 15:41:00
4
- * @LastEditors: donglin.lu@qcast.cn
5
- * @Description: file content
6
- */
7
-
8
- import { Forge } from "@shijiu/jsview/dom/jsv-forge-define";
9
-
10
- import ConditionPackBuilder from "./SetCondition.js";
11
- import ActionPackBuilder from "./SetAction.js"
12
- import StatePackBuilder from "./SetState.js";
13
- import CallbackManager from "./CallbackManager.js";
14
-
15
-
16
- class ActorControl {
17
- constructor() {
18
- this._BindView = null;
19
- this._BindAnim = null;
20
- this._Callbacks = new CallbackManager();
21
- this._ConditionPackBuilder = new ConditionPackBuilder(this._Callbacks);
22
- this._ActionPackBuilder = new ActionPackBuilder(this._Callbacks);
23
- this._StatePackBuilder = new StatePackBuilder();
24
- }
25
-
26
- bindForgeView(bindView) {
27
- this._BindView = bindView;
28
- }
29
-
30
- /**
31
- * run 执行编排好的intent集合
32
- *
33
- * @param {Array} cmdPackList 内容来自 Condition(), State(), Action() 这些工厂类创建的Command pack
34
- */
35
- run(cmdPackList) {
36
- if (window.JsView) {
37
- this._WrappedRun(cmdPackList);
38
- } else {
39
- // Browser场景DomProxy需要onReady调用
40
- let that = this;
41
- this._BindView.RegisterOnProxyReady(()=>{
42
- that._WrappedRun(cmdPackList);
43
- })
44
- }
45
- }
46
-
47
- _WrappedRun(cmdPackList) {
48
- this._EnsureAnim();
49
-
50
- if (!(cmdPackList instanceof Array)) {
51
- console.error("params error");
52
- return;
53
- }
54
-
55
- Forge.AnimFireCommand.RunFreeMoveCmdPacks(this._BindView, cmdPackList);
56
- }
57
-
58
- /**
59
- * Condition
60
- * 获取创建 ConditionPack 的工厂对象
61
- * ConditionPack对应支持 .then(cmdPackList), 可传入同 Run 的处理队列
62
- * 可用方法见 ./SetCondition.js
63
- */
64
- condition(group, multiTimes, specName) {
65
- // 注意: 不支持获取condition后,多次复制
66
- this._ConditionPackBuilder.updateCommandInfo(group, multiTimes, specName);
67
- return this._ConditionPackBuilder;
68
- }
69
-
70
- /**
71
- * Action
72
- * 获取创建 ActionPack 的工厂对象
73
- * 注意: ActionPack 是指会改变 speed 或 accelerate 的指令,每个新的Action会覆盖掉前一次的Action设置,包括其关联的condition
74
- * 可用方法见 ./SetAction.js
75
- *
76
- * @param {int} xySpeedKeeps xy轴上的速度是否保持,x轴保持为1, y轴保持为2,可"与或"让两个轴都保持
77
- * @param {int} xyAccKeeps xy轴上的加速度是否保持,x轴保持为1, y轴保持为2,可"与或"让两个轴都保持
78
- * @return {ActionPackBuilder} ActionPack 的工厂对象
79
- */
80
- action(xySpeedKeeps, xyAccKeeps) {
81
- this._ActionPackBuilder.updateCommonInfo(xySpeedKeeps, xyAccKeeps);
82
- return this._ActionPackBuilder;
83
- }
84
-
85
- /**
86
- * State
87
- * 获取创建 StatePack 的工厂对象
88
- * 可用方法见 ./SetState.js
89
- */
90
- state() {
91
- return this._StatePackBuilder;
92
- }
93
-
94
- _OnEchoEvent(retJsonObject) {
95
- let actorState = retJsonObject;
96
- let echoTokens = retJsonObject["eTkns"];
97
- if (echoTokens) {
98
- for (let etoken of echoTokens) {
99
- this._Callbacks.invokeCallback(etoken, actorState);
100
- }
101
- }
102
- }
103
-
104
- _EnsureAnim() {
105
- if (!this._BindAnim) {
106
- this._BindAnim = new Forge.FreeMoveAnimation(this._OnEchoEvent.bind(this));
107
- this._BindView.StartAnimation(this._BindAnim);
108
- }
109
- }
110
- }
111
-
112
- export default ActorControl;
@@ -1,18 +0,0 @@
1
- /*
2
- * @Author: donglin.lu@qcast.cn
3
- * @Date: 2023-07-18 11:14:00
4
- * @LastEditors: donglin.lu@qcast.cn
5
- * @Description: file content
6
- */
7
-
8
- const ConditionSetBuilder = Forge.FreeMoveConditionSet;
9
- const StateCmdBuilder = Forge.FreeMoveStateBuilder;
10
- const ActionCmdBuilder = Forge.FreeMoveActionBuilder;
11
- const CmdPackBuilder = Forge.FreeMoveCmdPackBuilder;
12
-
13
- export {
14
- ConditionSetBuilder,
15
- ActionCmdBuilder,
16
- StateCmdBuilder,
17
- CmdPackBuilder
18
- }