@shijiu/jsview-vue-samples 2.2.201 → 2.2.373

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 (84) hide show
  1. package/BakeViewDemo/App.vue +6 -1
  2. package/Basic/components/anim/AnimEasingCubicBezier.vue +56 -0
  3. package/Basic/components/anim/AnimGroup2.vue +33 -0
  4. package/Basic/components/panel/Panel2.vue +8 -3
  5. package/CoupletsTest/widget/Banger/Maroon.vue +0 -1
  6. package/CoupletsTest/widget/Fireworks/Fireworks.vue +0 -2
  7. package/CustomShader/App.vue +30 -13
  8. package/CustomShader/pageFlip.glsl +3 -2
  9. package/DemoHomepage/App.vue +14 -5
  10. package/DemoHomepage/components/Item.vue +23 -12
  11. package/DemoHomepage/index.d.ts +5 -2
  12. package/DemoHomepage/router.js +97 -74
  13. package/DispersedFocusControl/App.vue +67 -0
  14. package/DispersedFocusControl/Button.vue +76 -0
  15. package/DispersedFocusControl/data.js +44 -0
  16. package/DragBox/App.vue +148 -0
  17. package/FlexCellDemo/App.vue +47 -223
  18. package/FlexCellDemo/TestFrame1.vue +88 -0
  19. package/FlexCellDemo/TestFrame2.vue +100 -0
  20. package/FlexCellDemo/TestFrame3.vue +97 -0
  21. package/FlexCellDemo/TestFrame4.vue +60 -0
  22. package/FlexCellDemo/TestFrame5.vue +60 -0
  23. package/FlexCellDemo/images/6.jpg +0 -0
  24. package/FocusMoveStyle/App.vue +1 -0
  25. package/FocusMoveStyle/CreepFocus.vue +11 -1
  26. package/FocusMoveStyle/FoldableItem.vue +1 -1
  27. package/FullScreenFlex/App.vue +42 -0
  28. package/FullScreenFlex/TestFrame2.vue +107 -0
  29. package/FullScreenFlex/images/1.png +0 -0
  30. package/HashHistory/App.vue +8 -4
  31. package/Input/App.vue +184 -97
  32. package/Input/InputPanel.vue +98 -82
  33. package/LatexFormula/App.vue +97 -10
  34. package/MetroWidgetDemos/itemSizeUpdate/backward/Item.vue +1 -1
  35. package/MetroWidgetDemos/routeList.js +17 -17
  36. package/MindMap/App.vue +10 -1
  37. package/MindMap/data.js +34 -8
  38. package/Parkour/appConfig/jsview.config.mjs +0 -4
  39. package/PosterPacker/App.vue +207 -0
  40. package/PosterPacker/images/bg.jpg +0 -0
  41. package/PosterPacker/images/blue.png +0 -0
  42. package/PosterPacker/images/darkGreen.png +0 -0
  43. package/PosterPacker/images/left.png +0 -0
  44. package/PosterPacker/images/orange.png +0 -0
  45. package/PosterPacker/images/pink.png +0 -0
  46. package/PosterPacker/images/purple.png +0 -0
  47. package/PosterPacker/images/red.png +0 -0
  48. package/PosterPacker/images/right.png +0 -0
  49. package/PosterPacker/images/yellowGreen.png +0 -0
  50. package/PosterPacker/tools/geniePakcer/Genie.vue +686 -0
  51. package/PosterPacker/tools/geniePakcer/genieBottom.glsl +49 -0
  52. package/PosterPacker/tools/geniePakcer/genieLeft.glsl +50 -0
  53. package/PosterPacker/tools/geniePakcer/genieRight.glsl +57 -0
  54. package/PosterPacker/tools/geniePakcer/genieTop.glsl +50 -0
  55. package/PosterPacker/tools/particlePacker/Particle.vue +71 -0
  56. package/PosterPacker/tools/vortexPacker/Vortex.vue +135 -0
  57. package/PosterPacker/tools/vortexPacker/vortex.glsl +37 -0
  58. package/Preload/App.vue +1 -1
  59. package/ScrollBoxTest/ClipBar.vue +1 -0
  60. package/ScrollBoxTest/NinePatchBar.vue +1 -0
  61. package/ScrollBoxTest/SizeDivBar.vue +1 -0
  62. package/SprayMove/App.vue +75 -0
  63. package/SprayMove/SprayMove.vue +173 -0
  64. package/SprayView/App.vue +8 -9
  65. package/TestNativeSharedView/App.vue +6 -4
  66. package/TextShadowDemo/App.vue +3 -3
  67. package/TextureAnimation/App.vue +244 -148
  68. package/TextureAnimation/App2.vue +66 -14
  69. package/TextureAnimation/assets/blackWhiteTurntable.png +0 -0
  70. package/TextureAnimation/assets/circleHaloMask.png +0 -0
  71. package/TouchWidget/App.vue +79 -40
  72. package/TouchWidget/Item.vue +15 -3
  73. package/index.d.ts +1 -1
  74. package/package.json +1 -1
  75. package/TextureAnimation/assets/mask.png +0 -0
  76. package/TextureAnimation/assets/php.jpg +0 -0
  77. package/TouchSample/App.vue +0 -136
  78. package/TouchSample/Item.vue +0 -102
  79. package/TouchSample/MetroWidgetHorizontal.vue +0 -144
  80. package/TouchSample/MetroWidgetVertical.vue +0 -144
  81. package/TouchSample/TouchContainerHorizontal.vue +0 -160
  82. package/TouchSample/TouchContainerVertical.vue +0 -160
  83. package/TouchSample/data.js +0 -81
  84. /package/TextureAnimation/assets/{php2.png → borderOpacity.png} +0 -0
@@ -3,12 +3,13 @@ import {
3
3
  jJsvRuntimeBridge,
4
4
  getKeyFramesGroup,
5
5
  JsvTextureAnim,
6
+ DefaultKeyCodeMap,
6
7
  } from "jsview";
7
- import img from "./assets/php2.png";
8
+ import img from "./assets/borderOpacity.png";
8
9
  import swipLight from "./assets/swipLight.png";
9
- import { onMounted, onBeforeUnmount } from "vue";
10
+ import { onMounted, onBeforeUnmount, shallowRef } from "vue";
10
11
  import { useRouter } from "vue-router";
11
- const router = useRouter()
12
+ const router = useRouter();
12
13
  const styleShell = getKeyFramesGroup();
13
14
  const translateTransform = "translate3d(50%, 50%, 0)";
14
15
  const rotateTransform = "rotate3d(1,1,1, 30deg)";
@@ -17,6 +18,9 @@ const borderRadius = 40;
17
18
  const repeat = -1;
18
19
  const duration = 3000;
19
20
 
21
+ let sTranslateTextureRef = shallowRef(null);
22
+ let sTranslateTextureTrigger = shallowRef(1);
23
+
20
24
  const translateAnim =
21
25
  "{from {transform: translate3d(-100%, -50%, 0);} to {transform: translate3d(100%, 50%, 0);}}";
22
26
  const rotateAnim =
@@ -26,183 +30,275 @@ const scaleAnim =
26
30
  const swipAnim =
27
31
  "{from {transform: translate3d(-100%, 0, 0);} to {transform: translate3d(100%, 0, 0);}}";
28
32
 
29
- styleShell.insertRule(
30
- "@keyframes texture-anim-translate " + translateAnim
31
- );
32
- styleShell.insertRule(
33
- "@keyframes texture-anim-rotate " + rotateAnim
34
- );
35
- styleShell.insertRule(
36
- "@keyframes texture-anim-scale " + scaleAnim
37
- );
33
+ styleShell.insertRule("@keyframes texture-anim-translate " + translateAnim);
34
+ styleShell.insertRule("@keyframes texture-anim-rotate " + rotateAnim);
35
+ styleShell.insertRule("@keyframes texture-anim-scale " + scaleAnim);
38
36
 
39
37
  const onKeyDown = (ev) => {
40
38
  // 8:Backspace, 27:Escape, 10000:盒子返回键
41
39
  if (ev.keyCode == 8 || ev.keyCode == 27 || ev.keyCode == 10000) {
42
40
  router?.go(-1); // 有router时,是从DemoHomepage进入,回退
41
+ } else if (ev.keyCode == DefaultKeyCodeMap.Ok) {
42
+ sTranslateTextureRef.value.start();
43
+ sTranslateTextureTrigger.value = sTranslateTextureTrigger.value + 1;
43
44
  }
44
45
  return true;
45
- }
46
+ };
46
47
 
47
48
  onMounted(() => {
48
49
  jJsvRuntimeBridge.notifyPageLoaded();
49
- })
50
+ });
50
51
 
51
52
  onBeforeUnmount(() => {
52
53
  styleShell.removeRule("texture-anim-translate");
53
54
  styleShell.removeRule("texture-anim-rotate");
54
55
  styleShell.removeRule("texture-anim-scale");
55
- })
56
-
56
+ });
57
57
  </script>
58
58
  <template>
59
- <jsv-focus-block autoFocus :onKeyDown="onKeyDown" :style="{
60
- width: 1920,
61
- height: 1080,
62
- backgroundColor: '#007788',
63
- }">
64
- <div :style="{
65
- left: 100,
66
- top: 20,
67
- }">
68
- <div :style="{
69
- width: 300,
70
- height: 150,
71
- backgroundColor: 'rgba(0,255,0,0.5)',
72
- }" />
73
- <jsv-texture-anim :src="img" :width="300" :height="150" :animation="translateAnim" :duration="duration"
74
- :transform="null" :borderRadius="borderRadius" :repeat="repeat" :autoStart="true"></jsv-texture-anim>
75
- <div :style="{
76
- width: 300,
77
- height: 150,
78
- backgroundColor: 'rgba(255,0,0,0.5)',
79
- transform: null,
80
- animation: `texture-anim-translate ${duration / 1000
81
- }s linear infinite`,
82
- }" />
59
+ <jsv-focus-block
60
+ autoFocus
61
+ :onKeyDown="onKeyDown"
62
+ :style="{
63
+ width: 1920,
64
+ height: 1080,
65
+ backgroundColor: '#007788',
66
+ }"
67
+ >
68
+ <div
69
+ :style="{
70
+ left: 100,
71
+ top: 20,
72
+ }"
73
+ >
74
+ <div
75
+ :style="{
76
+ width: 300,
77
+ height: 150,
78
+ backgroundColor: 'rgba(0,255,0,0.5)',
79
+ }"
80
+ />
81
+ <jsv-texture-anim
82
+ ref="sTranslateTextureRef"
83
+ :src="img"
84
+ :width="300"
85
+ :height="150"
86
+ :animation="translateAnim"
87
+ :duration="duration"
88
+ :transform="null"
89
+ :borderRadius="borderRadius"
90
+ :autoStart="true"
91
+ ></jsv-texture-anim>
92
+ <div
93
+ :key="sTranslateTextureTrigger"
94
+ :style="{
95
+ width: 300,
96
+ height: 150,
97
+ backgroundColor: 'rgba(255,0,0,0.5)',
98
+ transform: null,
99
+ animation: `texture-anim-translate ${duration / 1000}s linear 1`,
100
+ }"
101
+ />
83
102
  </div>
84
103
 
85
- <div :style="{
86
- left: 100,
87
- top: 230,
88
- }">
89
- <div :style="{
90
- width: 300,
91
- height: 150,
92
- backgroundColor: 'rgba(0,255,0,0.5)',
93
- }" />
94
- <jsv-texture-anim :src="img" :width="300" :height="150" :animation="rotateAnim" :duration="duration"
95
- :transform="null" :borderRadius="borderRadius" :repeat="repeat" :autoStart="true"></jsv-texture-anim>
96
- <div :style="{
97
- width: 300,
98
- height: 150,
99
- backgroundColor: 'rgba(255,0,0,0.5)',
100
- transform: null,
101
- animation: `texture-anim-rotate ${duration / 1000}s linear infinite`,
102
- }" />
104
+ <div
105
+ :style="{
106
+ left: 100,
107
+ top: 230,
108
+ }"
109
+ >
110
+ <div
111
+ :style="{
112
+ width: 300,
113
+ height: 150,
114
+ backgroundColor: 'rgba(0,255,0,0.5)',
115
+ }"
116
+ />
117
+ <jsv-texture-anim
118
+ :src="img"
119
+ :width="300"
120
+ :height="150"
121
+ :animation="rotateAnim"
122
+ :duration="duration"
123
+ :transform="null"
124
+ :borderRadius="borderRadius"
125
+ :repeat="repeat"
126
+ :autoStart="true"
127
+ ></jsv-texture-anim>
128
+ <div
129
+ :style="{
130
+ width: 300,
131
+ height: 150,
132
+ backgroundColor: 'rgba(255,0,0,0.5)',
133
+ transform: null,
134
+ animation: `texture-anim-rotate ${duration / 1000}s linear infinite`,
135
+ }"
136
+ />
103
137
  </div>
104
138
 
105
- <div :style="{
106
- left: 100,
107
- top: 460,
108
- }">
109
- <div :style="{
110
- width: 300,
111
- height: 150,
112
- backgroundColor: 'rgba(0,255,0,0.5)',
113
- }" />
114
- <jsv-texture-anim :src="img" :width="300" :height="150" :animation="scaleAnim" :duration="duration"
115
- :transform="null" :borderRadius="borderRadius" :repeat="repeat" :autoStart="true"></jsv-texture-anim>
116
- <div :style="{
117
- width: 300,
118
- height: 150,
119
- backgroundColor: 'rgba(255,0,0,0.5)',
120
- transform: null,
121
- animation: `texture-anim-scale ${duration / 1000}s linear infinite`,
122
- }" />
139
+ <div
140
+ :style="{
141
+ left: 100,
142
+ top: 460,
143
+ }"
144
+ >
145
+ <div
146
+ :style="{
147
+ width: 300,
148
+ height: 150,
149
+ backgroundColor: 'rgba(0,255,0,0.5)',
150
+ }"
151
+ />
152
+ <jsv-texture-anim
153
+ :src="img"
154
+ :width="300"
155
+ :height="150"
156
+ :animation="scaleAnim"
157
+ :duration="duration"
158
+ :transform="null"
159
+ :borderRadius="borderRadius"
160
+ :repeat="repeat"
161
+ :autoStart="true"
162
+ ></jsv-texture-anim>
163
+ <div
164
+ :style="{
165
+ width: 300,
166
+ height: 150,
167
+ backgroundColor: 'rgba(255,0,0,0.5)',
168
+ transform: null,
169
+ animation: `texture-anim-scale ${duration / 1000}s linear infinite`,
170
+ }"
171
+ />
123
172
  </div>
124
173
  <!-- transform sample -->
125
- <div :style="{
126
- left: 500,
127
- top: 20,
128
- }">
129
- <div :style="{
130
- width: 300,
131
- height: 150,
132
- backgroundColor: 'rgba(0,255,0,0.5)',
133
- }" />
134
- <jsv-texture-anim :src="img" :width="300" :height="150" :transform="translateTransform"
135
- :borderRadius="borderRadius"></jsv-texture-anim>
136
- <div :style="{
137
- width: 300,
138
- height: 150,
139
- backgroundColor: 'rgba(255,0,0,0.5)',
140
- transform: translateTransform,
141
- }" />
174
+ <div
175
+ :style="{
176
+ left: 500,
177
+ top: 20,
178
+ }"
179
+ >
180
+ <div
181
+ :style="{
182
+ width: 300,
183
+ height: 150,
184
+ backgroundColor: 'rgba(0,255,0,0.5)',
185
+ }"
186
+ />
187
+ <jsv-texture-anim
188
+ :src="img"
189
+ :width="300"
190
+ :height="150"
191
+ :transform="translateTransform"
192
+ :borderRadius="borderRadius"
193
+ ></jsv-texture-anim>
194
+ <div
195
+ :style="{
196
+ width: 300,
197
+ height: 150,
198
+ backgroundColor: 'rgba(255,0,0,0.5)',
199
+ transform: translateTransform,
200
+ }"
201
+ />
142
202
  </div>
143
203
 
144
- <div :style="{
145
- left: 500,
146
- top: 230,
147
- }">
148
- <div :style="{
149
- width: 300,
150
- height: 150,
151
- backgroundColor: 'rgba(0,255,0,0.5)',
152
- }" />
153
- <jsv-texture-anim :src="img" :width="300" :height="150" :transform="rotateTransform"
154
- :borderRadius="borderRadius"></jsv-texture-anim>
155
- <div :style="{
156
- width: 300,
157
- height: 150,
158
- backgroundColor: 'rgba(255,0,0,0.5)',
159
- transform: rotateTransform,
160
- }" />
204
+ <div
205
+ :style="{
206
+ left: 500,
207
+ top: 230,
208
+ }"
209
+ >
210
+ <div
211
+ :style="{
212
+ width: 300,
213
+ height: 150,
214
+ backgroundColor: 'rgba(0,255,0,0.5)',
215
+ }"
216
+ />
217
+ <jsv-texture-anim
218
+ :src="img"
219
+ :width="300"
220
+ :height="150"
221
+ :transform="rotateTransform"
222
+ :borderRadius="borderRadius"
223
+ ></jsv-texture-anim>
224
+ <div
225
+ :style="{
226
+ width: 300,
227
+ height: 150,
228
+ backgroundColor: 'rgba(255,0,0,0.5)',
229
+ transform: rotateTransform,
230
+ }"
231
+ />
161
232
  </div>
162
233
 
163
- <div :style="{
164
- left: 500,
165
- top: 460,
166
- }">
167
- <div :style="{
168
- width: 300,
169
- height: 150,
170
- backgroundColor: 'rgba(0,255,0,0.5)',
171
- }" />
172
- <jsv-texture-anim :src="img" :width="300" :height="150" :transform="scaleTransform"
173
- :borderRadius="borderRadius"></jsv-texture-anim>
174
- <div :style="{
175
- width: 300,
176
- height: 150,
177
- backgroundColor: 'rgba(255,0,0,0.5)',
178
- transform: scaleTransform,
179
- }" />
234
+ <div
235
+ :style="{
236
+ left: 500,
237
+ top: 460,
238
+ }"
239
+ >
240
+ <div
241
+ :style="{
242
+ width: 300,
243
+ height: 150,
244
+ backgroundColor: 'rgba(0,255,0,0.5)',
245
+ }"
246
+ />
247
+ <jsv-texture-anim
248
+ :src="img"
249
+ :width="300"
250
+ :height="150"
251
+ :transform="scaleTransform"
252
+ :borderRadius="borderRadius"
253
+ ></jsv-texture-anim>
254
+ <div
255
+ :style="{
256
+ width: 300,
257
+ height: 150,
258
+ backgroundColor: 'rgba(255,0,0,0.5)',
259
+ transform: scaleTransform,
260
+ }"
261
+ />
180
262
  </div>
181
263
  <!-- swip light -->
182
- <div :style="{
183
- left: 850,
184
- top: 460,
185
- }">
186
- <div :style="{
187
- width: 300,
188
- height: 150,
189
- backgroundColor: 'rgba(0,255,0,0.5)',
190
- }" />
191
- <jsv-texture-anim :src="swipLight" :animation="swipAnim" :width="300" :height="150" :duration="duration"
192
- transform="scale3d(0.5, 1, 1) rotate3d(0,0,1, 30deg)" :borderRadius="borderRadius" :repeat="repeat"
193
- :autoStart="true"></jsv-texture-anim>
264
+ <div
265
+ :style="{
266
+ left: 850,
267
+ top: 460,
268
+ }"
269
+ >
270
+ <div
271
+ :style="{
272
+ width: 300,
273
+ height: 150,
274
+ backgroundColor: 'rgba(0,255,0,0.5)',
275
+ }"
276
+ />
277
+ <jsv-texture-anim
278
+ :src="swipLight"
279
+ :animation="swipAnim"
280
+ :width="300"
281
+ :height="150"
282
+ :duration="duration"
283
+ transform="scale3d(0.5, 1, 1) rotate3d(0,0,1, 30deg)"
284
+ :borderRadius="borderRadius"
285
+ :repeat="repeat"
286
+ :autoStart="true"
287
+ ></jsv-texture-anim>
194
288
  </div>
195
289
 
196
290
  <!-- 说明文字 -->
197
- <div :style="{
198
- left: 100,
199
- top: 620,
200
- width: 1920,
201
- height: 200,
202
- fontSize: 30,
203
- color: '#000000',
204
- }">
291
+ <div
292
+ :style="{
293
+ left: 100,
294
+ top: 620,
295
+ width: 1920,
296
+ height: 200,
297
+ fontSize: 30,
298
+ color: '#000000',
299
+ }"
300
+ >
205
301
  {{ "1. 注意圆角\n2. 红色半透明的view为标准, 图片的动画需要与其一致" }}
206
302
  </div>
207
303
  </jsv-focus-block>
208
- </template>
304
+ </template>
@@ -6,9 +6,9 @@ import {
6
6
  DECORATE_NINEPATCH_ALPHA_MIX,
7
7
  JsvTextureStoreApi,
8
8
  } from "jsview";
9
- import img from "./assets/light.png";
10
- import img2 from "./assets/light2.png";
11
- import mask from "./assets/mask.png";
9
+ import img from "./assets/blackWhiteTurntable.png";
10
+ import img2 from "./assets/light.png";
11
+ import mask from "./assets/circleHaloMask.png";
12
12
  import { getDataUrl } from "../CommonUtils/ResourceData";
13
13
  //无网络环境下使用
14
14
  const DemoResourceBase = getDataUrl();
@@ -25,17 +25,20 @@ const top = ref(80);
25
25
  const rotateAnimation =
26
26
  "{from {transform: rotate3d(0,0,1,0);} to {transform: rotate3d(0,0,1,360deg);}}";
27
27
 
28
+ /**
29
+ * 创建右图的边缘遮罩,可调节边框的粗细:circleLineWidth
30
+ */
28
31
  // 设置设定模拟绘制.9图
29
32
  let canvasRef;
30
33
  let sourceId = shallowRef("");
31
- let sampleImageWidth = 90;
34
+ let sampleImageWidth = 150;
32
35
  canvasRef = JsvTextureStoreApi.canvasTexture(
33
36
  sampleImageWidth,
34
37
  sampleImageWidth
35
38
  ); // 创建画布
36
39
 
37
40
  let circleInnerDiameter = 70; // 环形内直径, 为所要包括图形的borderRadius的一倍
38
- let circleLineWidth = 6; // 线宽
41
+ let circleLineWidth = 2; // 线宽
39
42
  let circleRadius = Math.floor(circleInnerDiameter / 2 + circleLineWidth / 2); // 绘制线是圆圈的轨迹中线
40
43
  let customPath = canvasRef.circlePath(
41
44
  Math.floor(sampleImageWidth / 2),
@@ -43,9 +46,10 @@ let customPath = canvasRef.circlePath(
43
46
  circleRadius
44
47
  ); // 创建圆环绘制路径,圆形在画布的中心点位置
45
48
  canvasRef.drawColor("rgba(0,0,0,0)"); // 画布绘制半透明底色
46
- customPath.stroke(circleLineWidth, "#FF00FF7F"); // 以给定线宽绘制圆环
49
+ customPath.stroke(circleLineWidth, "#000000FF"); // 以给定线宽绘制圆环
47
50
  sourceId = canvasRef.commit(); // texture和div的textureStore绑定
48
51
 
52
+ // 通过canvas创建出来的 texture 创建NinePatch方式的蒙版
49
53
  const ninePatchDecorator1 = {
50
54
  type: DECORATE_NINEPATCH_ALPHA_MIX,
51
55
  url: `jsvtexturestore://${sourceId}`,
@@ -55,20 +59,39 @@ const ninePatchDecorator1 = {
55
59
  animTime: 0.5,
56
60
  };
57
61
 
62
+ /**
63
+ * 导入右图的边缘光晕部分的遮罩
64
+ */
65
+ // 外发光的圈的图片信息
66
+ const originPngInfo = {
67
+ size: 160, // 图片尺寸
68
+ radius: 56, // 图片中的圆的圆内半径
69
+ };
70
+ const rectRadius = Math.floor(circleInnerDiameter / 2 + circleLineWidth / 2); // 光环在描边之外,留出描边的宽度
58
71
  const ninePatchDecorator2 = {
59
72
  type: DECORATE_NINEPATCH_ALPHA_MIX,
60
73
  url: `url(${mask})`,
61
- imageWidth: 86,
74
+ imageWidth: originPngInfo.size,
75
+ imageDspWidth: Math.floor(
76
+ (rectRadius / originPngInfo.radius) * originPngInfo.size
77
+ ),
62
78
  centerWidth: 2,
63
- borderOutset: 0,
79
+ borderOutset: Math.floor(originPngInfo.size / 2 - originPngInfo.radius),
64
80
  animTime: 0.5,
65
81
  };
82
+
83
+ /**
84
+ * 设置敏感转盘的绘制覆盖区域
85
+ */
66
86
  //注意texture的尺寸需要兼顾最大的view
67
87
  const texCoord = {
68
- width: 600,
69
- height: 600,
88
+ width: 400,
89
+ height: 400,
70
90
  };
71
91
 
92
+ /**
93
+ * 其他回调处理
94
+ */
72
95
  const onKeyDown = (ev) => {
73
96
  // 8:Backspace, 27:Escape, 10000:盒子返回键
74
97
  if (ev.keyCode == 8 || ev.keyCode == 27 || ev.keyCode == 10000) {
@@ -93,6 +116,7 @@ onBeforeUnmount(() => {
93
116
  :style="{
94
117
  width: 1280,
95
118
  height: 720,
119
+ backgroundColor: 'rgba(0,0,0,0.7)',
96
120
  }"
97
121
  >
98
122
  <div
@@ -119,8 +143,26 @@ onBeforeUnmount(() => {
119
143
  height: height,
120
144
  backgroundColor: 'rgba(0, 255, 0, 0.7)',
121
145
  borderRadius: Math.floor(circleInnerDiameter / 2),
146
+ fontSize: 30,
147
+ lineHeight: height,
148
+ textAlign: 'center',
122
149
  }"
123
- />
150
+ >
151
+ {{ "带光晕的焦点框" }}
152
+ </div>
153
+ <jsv-texture-anim
154
+ :src="img"
155
+ :left="left"
156
+ :top="top"
157
+ :width="width"
158
+ :height="height"
159
+ :texCoord="texCoord"
160
+ :animation="rotateAnimation"
161
+ :duration="5000"
162
+ :repeat="-1"
163
+ :autoStart="true"
164
+ :decorate="ninePatchDecorator2"
165
+ ></jsv-texture-anim>
124
166
  <jsv-texture-anim
125
167
  :src="img"
126
168
  :left="left"
@@ -129,13 +171,23 @@ onBeforeUnmount(() => {
129
171
  :height="height"
130
172
  :texCoord="texCoord"
131
173
  :animation="rotateAnimation"
132
- :duration="2000"
174
+ :duration="5000"
133
175
  :repeat="-1"
134
176
  :autoStart="true"
135
177
  :decorate="ninePatchDecorator1"
136
178
  ></jsv-texture-anim>
137
179
  </div>
138
180
  <div>
181
+ <!-- <div
182
+ :style="{
183
+ left: left + 500,
184
+ top: top,
185
+ width: width,
186
+ height: height,
187
+ backgroundColor: 'rgba(0, 255, 0, 0.7)',
188
+ borderRadius: rectRadius,
189
+ }"
190
+ /> -->
139
191
  <jsv-texture-anim
140
192
  :src="img2"
141
193
  :left="left + 500"
@@ -144,10 +196,10 @@ onBeforeUnmount(() => {
144
196
  :height="height"
145
197
  :texCoord="texCoord"
146
198
  :animation="rotateAnimation"
147
- :duration="2000"
199
+ :duration="3000"
148
200
  :repeat="-1"
149
201
  :autoStart="true"
150
- :decorate="ninePatchDecorator2"
202
+ :decorate="ninePatchDecorator1"
151
203
  ></jsv-texture-anim>
152
204
  </div>
153
205
  </jsv-focus-block>