@shijiu/jsview-vue-samples 2.2.201 → 2.2.426-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.
Files changed (103) 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/Basic/components/text/TextDirection.vue +0 -1
  6. package/ColorSpace/App.vue +2 -2
  7. package/CoupletsTest/widget/Banger/Maroon.vue +0 -1
  8. package/CoupletsTest/widget/Fireworks/Fireworks.vue +0 -2
  9. package/CssPreprocessor/Stylus/components/stylus-group1/StylusOperations.vue +0 -1
  10. package/CssPreprocessor/utils/ContentBlock.vue +3 -3
  11. package/CssPreprocessor/utils/{FontStyle.css → FontConfig.css} +3 -3
  12. package/CssPreprocessor/utils/TitleBar.vue +2 -2
  13. package/CustomShader/App.vue +32 -15
  14. package/CustomShader/pageFlip.glsl +3 -2
  15. package/DemoHomepage/App.vue +14 -5
  16. package/DemoHomepage/components/Item.vue +23 -12
  17. package/DemoHomepage/index.d.ts +5 -2
  18. package/DemoHomepage/router.js +97 -74
  19. package/DemoHomepage/views/Homepage.vue +0 -4
  20. package/DispersedFocusControl/App.vue +67 -0
  21. package/DispersedFocusControl/Button.vue +76 -0
  22. package/DispersedFocusControl/data.js +44 -0
  23. package/DivMetroPerformance/components/ContentItem.vue +0 -1
  24. package/DragBox/App.vue +148 -0
  25. package/FlexCellDemo/App.vue +47 -223
  26. package/FlexCellDemo/TestFrame1.vue +84 -0
  27. package/FlexCellDemo/TestFrame2.vue +100 -0
  28. package/FlexCellDemo/TestFrame3.vue +97 -0
  29. package/FlexCellDemo/TestFrame4.vue +60 -0
  30. package/FlexCellDemo/TestFrame5.vue +60 -0
  31. package/FlexCellDemo/images/6.jpg +0 -0
  32. package/FocusMoveStyle/App.vue +1 -0
  33. package/FocusMoveStyle/CreepFocus.vue +11 -1
  34. package/FocusMoveStyle/FoldableItem.vue +1 -1
  35. package/FullScreenFlex/App.vue +42 -0
  36. package/FullScreenFlex/TestFrame2.vue +107 -0
  37. package/FullScreenFlex/images/1.png +0 -0
  38. package/GiftRain/App.vue +0 -3
  39. package/HashHistory/App.vue +8 -4
  40. package/HashParams/App.vue +0 -1
  41. package/Input/App.vue +184 -97
  42. package/Input/InputPanel.vue +98 -82
  43. package/JsvPreDownloader/App.vue +0 -2
  44. package/LatexFormula/App.vue +97 -10
  45. package/Marquee/App.vue +2 -2
  46. package/MetroWidgetDemos/MassiveItems/ContentItem.vue +0 -1
  47. package/MetroWidgetDemos/PerformanceTest/components/ContentItem.vue +0 -1
  48. package/MetroWidgetDemos/PerformanceTest/components/MyTab.vue +18 -17
  49. package/MetroWidgetDemos/itemSizeUpdate/backward/Item.vue +1 -1
  50. package/MetroWidgetDemos/routeList.js +17 -17
  51. package/MindMap/App.vue +10 -1
  52. package/MindMap/data.js +34 -8
  53. package/Parkour/appConfig/jsview.config.mjs +0 -4
  54. package/PosterPacker/App.vue +207 -0
  55. package/PosterPacker/images/bg.jpg +0 -0
  56. package/PosterPacker/images/blue.png +0 -0
  57. package/PosterPacker/images/darkGreen.png +0 -0
  58. package/PosterPacker/images/left.png +0 -0
  59. package/PosterPacker/images/orange.png +0 -0
  60. package/PosterPacker/images/pink.png +0 -0
  61. package/PosterPacker/images/purple.png +0 -0
  62. package/PosterPacker/images/red.png +0 -0
  63. package/PosterPacker/images/right.png +0 -0
  64. package/PosterPacker/images/yellowGreen.png +0 -0
  65. package/PosterPacker/tools/geniePakcer/Genie.vue +686 -0
  66. package/PosterPacker/tools/geniePakcer/genieBottom.glsl +49 -0
  67. package/PosterPacker/tools/geniePakcer/genieLeft.glsl +50 -0
  68. package/PosterPacker/tools/geniePakcer/genieRight.glsl +57 -0
  69. package/PosterPacker/tools/geniePakcer/genieTop.glsl +50 -0
  70. package/PosterPacker/tools/particlePacker/Particle.vue +71 -0
  71. package/PosterPacker/tools/vortexPacker/Vortex.vue +135 -0
  72. package/PosterPacker/tools/vortexPacker/vortex.glsl +37 -0
  73. package/Preload/App.vue +1 -1
  74. package/ScaleDownNeon/App.vue +13 -10
  75. package/SceneTransition/App.vue +5 -4
  76. package/ScrollBoxTest/ClipBar.vue +1 -0
  77. package/ScrollBoxTest/NinePatchBar.vue +1 -0
  78. package/ScrollBoxTest/SizeDivBar.vue +1 -0
  79. package/SprayMove/App.vue +75 -0
  80. package/SprayMove/SprayMove.vue +173 -0
  81. package/SprayView/App.vue +8 -9
  82. package/TestNativeSharedView/App.vue +6 -4
  83. package/TextShadowDemo/App.vue +3 -3
  84. package/TextureAnimation/App.vue +237 -151
  85. package/TextureAnimation/App2.vue +66 -14
  86. package/TextureAnimation/assets/blackWhiteTurntable.png +0 -0
  87. package/TextureAnimation/assets/circleHaloMask.png +0 -0
  88. package/TextureSize/App.vue +5 -6
  89. package/TouchWidget/App.vue +79 -40
  90. package/TouchWidget/Item.vue +15 -3
  91. package/ViewOpacity/App.vue +4 -5
  92. package/index.d.ts +1 -1
  93. package/package.json +1 -1
  94. package/TextureAnimation/assets/mask.png +0 -0
  95. package/TextureAnimation/assets/php.jpg +0 -0
  96. package/TouchSample/App.vue +0 -136
  97. package/TouchSample/Item.vue +0 -102
  98. package/TouchSample/MetroWidgetHorizontal.vue +0 -144
  99. package/TouchSample/MetroWidgetVertical.vue +0 -144
  100. package/TouchSample/TouchContainerHorizontal.vue +0 -160
  101. package/TouchSample/TouchContainerVertical.vue +0 -160
  102. package/TouchSample/data.js +0 -81
  103. /package/TextureAnimation/assets/{php2.png → borderOpacity.png} +0 -0
@@ -1,14 +1,10 @@
1
1
  <script setup>
2
- import {
3
- jJsvRuntimeBridge,
4
- getKeyFramesGroup,
5
- JsvTextureAnim,
6
- } from "jsview";
7
- import img from "./assets/php2.png";
2
+ import { jJsvRuntimeBridge, getKeyFramesGroup, JsvTextureAnim } from "jsview";
3
+ import img from "./assets/borderOpacity.png";
8
4
  import swipLight from "./assets/swipLight.png";
9
5
  import { onMounted, onBeforeUnmount } from "vue";
10
6
  import { useRouter } from "vue-router";
11
- const router = useRouter()
7
+ const router = useRouter();
12
8
  const styleShell = getKeyFramesGroup();
13
9
  const translateTransform = "translate3d(50%, 50%, 0)";
14
10
  const rotateTransform = "rotate3d(1,1,1, 30deg)";
@@ -26,15 +22,9 @@ const scaleAnim =
26
22
  const swipAnim =
27
23
  "{from {transform: translate3d(-100%, 0, 0);} to {transform: translate3d(100%, 0, 0);}}";
28
24
 
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
- );
25
+ styleShell.insertRule("@keyframes texture-anim-translate " + translateAnim);
26
+ styleShell.insertRule("@keyframes texture-anim-rotate " + rotateAnim);
27
+ styleShell.insertRule("@keyframes texture-anim-scale " + scaleAnim);
38
28
 
39
29
  const onKeyDown = (ev) => {
40
30
  // 8:Backspace, 27:Escape, 10000:盒子返回键
@@ -42,167 +32,263 @@ const onKeyDown = (ev) => {
42
32
  router?.go(-1); // 有router时,是从DemoHomepage进入,回退
43
33
  }
44
34
  return true;
45
- }
35
+ };
46
36
 
47
37
  onMounted(() => {
48
38
  jJsvRuntimeBridge.notifyPageLoaded();
49
- })
39
+ });
50
40
 
51
41
  onBeforeUnmount(() => {
52
42
  styleShell.removeRule("texture-anim-translate");
53
43
  styleShell.removeRule("texture-anim-rotate");
54
44
  styleShell.removeRule("texture-anim-scale");
55
- })
56
-
45
+ });
57
46
  </script>
58
47
  <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
48
+ <jsv-focus-block
49
+ autoFocus
50
+ :onKeyDown="onKeyDown"
51
+ :style="{
52
+ width: 1920,
53
+ height: 1080,
54
+ backgroundColor: '#007788',
55
+ }"
56
+ >
57
+ <div
58
+ :style="{
59
+ left: 100,
60
+ top: 20,
61
+ }"
62
+ >
63
+ <div
64
+ :style="{
65
+ width: 300,
66
+ height: 150,
67
+ backgroundColor: 'rgba(0,255,0,0.5)',
68
+ }"
69
+ />
70
+ <jsv-texture-anim
71
+ :src="img"
72
+ :width="300"
73
+ :height="150"
74
+ :animation="translateAnim"
75
+ :duration="duration"
76
+ :transform="null"
77
+ :borderRadius="borderRadius"
78
+ :repeat="repeat"
79
+ :autoStart="true"
80
+ ></jsv-texture-anim>
81
+ <div
82
+ :style="{
83
+ width: 300,
84
+ height: 150,
85
+ backgroundColor: 'rgba(255,0,0,0.5)',
86
+ transform: null,
87
+ animation: `texture-anim-translate ${
88
+ duration / 1000
81
89
  }s linear infinite`,
82
- }" />
90
+ }"
91
+ />
83
92
  </div>
84
93
 
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
- }" />
94
+ <div
95
+ :style="{
96
+ left: 100,
97
+ top: 230,
98
+ }"
99
+ >
100
+ <div
101
+ :style="{
102
+ width: 300,
103
+ height: 150,
104
+ backgroundColor: 'rgba(0,255,0,0.5)',
105
+ }"
106
+ />
107
+ <jsv-texture-anim
108
+ :src="img"
109
+ :width="300"
110
+ :height="150"
111
+ :animation="rotateAnim"
112
+ :duration="duration"
113
+ :transform="null"
114
+ :borderRadius="borderRadius"
115
+ :repeat="repeat"
116
+ :autoStart="true"
117
+ ></jsv-texture-anim>
118
+ <div
119
+ :style="{
120
+ width: 300,
121
+ height: 150,
122
+ backgroundColor: 'rgba(255,0,0,0.5)',
123
+ transform: null,
124
+ animation: `texture-anim-rotate ${duration / 1000}s linear infinite`,
125
+ }"
126
+ />
103
127
  </div>
104
128
 
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
- }" />
129
+ <div
130
+ :style="{
131
+ left: 100,
132
+ top: 460,
133
+ }"
134
+ >
135
+ <div
136
+ :style="{
137
+ width: 300,
138
+ height: 150,
139
+ backgroundColor: 'rgba(0,255,0,0.5)',
140
+ }"
141
+ />
142
+ <jsv-texture-anim
143
+ :src="img"
144
+ :width="300"
145
+ :height="150"
146
+ :animation="scaleAnim"
147
+ :duration="duration"
148
+ :transform="null"
149
+ :borderRadius="borderRadius"
150
+ :repeat="repeat"
151
+ :autoStart="true"
152
+ ></jsv-texture-anim>
153
+ <div
154
+ :style="{
155
+ width: 300,
156
+ height: 150,
157
+ backgroundColor: 'rgba(255,0,0,0.5)',
158
+ transform: null,
159
+ animation: `texture-anim-scale ${duration / 1000}s linear infinite`,
160
+ }"
161
+ />
123
162
  </div>
124
163
  <!-- 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
- }" />
164
+ <div
165
+ :style="{
166
+ left: 500,
167
+ top: 20,
168
+ }"
169
+ >
170
+ <div
171
+ :style="{
172
+ width: 300,
173
+ height: 150,
174
+ backgroundColor: 'rgba(0,255,0,0.5)',
175
+ }"
176
+ />
177
+ <jsv-texture-anim
178
+ :src="img"
179
+ :width="300"
180
+ :height="150"
181
+ :transform="translateTransform"
182
+ :borderRadius="borderRadius"
183
+ ></jsv-texture-anim>
184
+ <div
185
+ :style="{
186
+ width: 300,
187
+ height: 150,
188
+ backgroundColor: 'rgba(255,0,0,0.5)',
189
+ transform: translateTransform,
190
+ }"
191
+ />
142
192
  </div>
143
193
 
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
- }" />
194
+ <div
195
+ :style="{
196
+ left: 500,
197
+ top: 230,
198
+ }"
199
+ >
200
+ <div
201
+ :style="{
202
+ width: 300,
203
+ height: 150,
204
+ backgroundColor: 'rgba(0,255,0,0.5)',
205
+ }"
206
+ />
207
+ <jsv-texture-anim
208
+ :src="img"
209
+ :width="300"
210
+ :height="150"
211
+ :transform="rotateTransform"
212
+ :borderRadius="borderRadius"
213
+ ></jsv-texture-anim>
214
+ <div
215
+ :style="{
216
+ width: 300,
217
+ height: 150,
218
+ backgroundColor: 'rgba(255,0,0,0.5)',
219
+ transform: rotateTransform,
220
+ }"
221
+ />
161
222
  </div>
162
223
 
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
- }" />
224
+ <div
225
+ :style="{
226
+ left: 500,
227
+ top: 460,
228
+ }"
229
+ >
230
+ <div
231
+ :style="{
232
+ width: 300,
233
+ height: 150,
234
+ backgroundColor: 'rgba(0,255,0,0.5)',
235
+ }"
236
+ />
237
+ <jsv-texture-anim
238
+ :src="img"
239
+ :width="300"
240
+ :height="150"
241
+ :transform="scaleTransform"
242
+ :borderRadius="borderRadius"
243
+ ></jsv-texture-anim>
244
+ <div
245
+ :style="{
246
+ width: 300,
247
+ height: 150,
248
+ backgroundColor: 'rgba(255,0,0,0.5)',
249
+ transform: scaleTransform,
250
+ }"
251
+ />
180
252
  </div>
181
253
  <!-- 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>
254
+ <div
255
+ :style="{
256
+ left: 850,
257
+ top: 460,
258
+ }"
259
+ >
260
+ <div
261
+ :style="{
262
+ width: 300,
263
+ height: 150,
264
+ backgroundColor: 'rgba(0,255,0,0.5)',
265
+ }"
266
+ />
267
+ <jsv-texture-anim
268
+ :src="swipLight"
269
+ :animation="swipAnim"
270
+ :width="300"
271
+ :height="150"
272
+ :duration="duration"
273
+ transform="scale3d(0.5, 1, 1) rotate3d(0,0,1, 30deg)"
274
+ :borderRadius="borderRadius"
275
+ :repeat="repeat"
276
+ :autoStart="true"
277
+ ></jsv-texture-anim>
194
278
  </div>
195
279
 
196
280
  <!-- 说明文字 -->
197
- <div :style="{
198
- left: 100,
199
- top: 620,
200
- width: 1920,
201
- height: 200,
202
- fontSize: 30,
203
- color: '#000000',
204
- }">
281
+ <div
282
+ :style="{
283
+ left: 100,
284
+ top: 620,
285
+ width: 1920,
286
+ height: 200,
287
+ fontSize: 30,
288
+ color: '#000000',
289
+ }"
290
+ >
205
291
  {{ "1. 注意圆角\n2. 红色半透明的view为标准, 图片的动画需要与其一致" }}
206
292
  </div>
207
293
  </jsv-focus-block>
208
- </template>
294
+ </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>
@@ -10,11 +10,10 @@ const router = useRouter();
10
10
  const onKeyDown = (ev) => {
11
11
  // 8:Backspace, 27:Escape, 10000:盒子返回键
12
12
  if (ev.keyCode == 8 || ev.keyCode == 27 || ev.keyCode == 10000) {
13
- if (window.JsView) {
14
- window.JsView.setGlobalConfig({
15
- texCache: -1,
16
- });
17
- }
13
+ // 关掉TextureCache(通过将waterLevel设置成-1)
14
+ window.JsvCoreApi.setRenderGlobalConfig({
15
+ texCache: -1,
16
+ });
18
17
 
19
18
  router.go(-1); // 有router时,回退
20
19
  return true;
@@ -129,4 +128,4 @@ const onKeyDown = (ev) => {
129
128
  color: #ffffff;
130
129
  font-size: 20;
131
130
  }
132
- </style>
131
+ </style>