@shijiu/jsview-vue-samples 2.2.128 → 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 (105) 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 +4 -7
  6. package/CoupletsTest/widget/Fireworks/Fireworks.vue +52 -44
  7. package/CustomShader/App.vue +174 -0
  8. package/CustomShader/gaussianBlur.glsl +27 -0
  9. package/CustomShader/pageFlip.glsl +41 -0
  10. package/CustomShader/sdf.glsl +22 -0
  11. package/CustomShader/test.glsl +8 -0
  12. package/CustomShader/vortex.glsl +38 -0
  13. package/DemoHomepage/App.vue +50 -32
  14. package/DemoHomepage/components/Item.vue +23 -12
  15. package/DemoHomepage/index.d.ts +5 -2
  16. package/DemoHomepage/router.js +105 -72
  17. package/DispersedFocusControl/App.vue +67 -0
  18. package/DispersedFocusControl/Button.vue +76 -0
  19. package/DispersedFocusControl/data.js +44 -0
  20. package/DragBox/App.vue +148 -0
  21. package/DriftScopeTest/App.vue +128 -0
  22. package/FlexCellDemo/App.vue +47 -223
  23. package/FlexCellDemo/TestFrame1.vue +88 -0
  24. package/FlexCellDemo/TestFrame2.vue +100 -0
  25. package/FlexCellDemo/TestFrame3.vue +97 -0
  26. package/FlexCellDemo/TestFrame4.vue +60 -0
  27. package/FlexCellDemo/TestFrame5.vue +60 -0
  28. package/FlexCellDemo/images/6.jpg +0 -0
  29. package/FocusMoveStyle/App.vue +1 -0
  30. package/FocusMoveStyle/CreepFocus.vue +11 -1
  31. package/FocusMoveStyle/FoldableItem.vue +1 -1
  32. package/FreeMove/App.vue +62 -64
  33. package/FreeMoveLink/App.vue +2 -2
  34. package/FullScreenFlex/App.vue +42 -0
  35. package/FullScreenFlex/TestFrame2.vue +107 -0
  36. package/FullScreenFlex/images/1.png +0 -0
  37. package/HashHistory/App.vue +8 -4
  38. package/ImpactStop/App.vue +45 -45
  39. package/Input/App.vue +184 -97
  40. package/Input/InputPanel.vue +98 -82
  41. package/LatexFormula/App.vue +97 -10
  42. package/LongImage/App.vue +1 -2
  43. package/LongText/App.vue +2 -2
  44. package/LongText/LongTextScroll.vue +22 -22
  45. package/LongText/Scroll.vue +28 -9
  46. package/MetroWidgetDemos/RefreshDemo/App.vue +172 -56
  47. package/MetroWidgetDemos/RefreshDemo/ControlItem.vue +45 -0
  48. package/MetroWidgetDemos/RefreshDemo/Item.vue +20 -4
  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/SceneTransition/JsvSceneTransition.vue +30 -42
  75. package/ScrollBoxTest/App.vue +35 -86
  76. package/ScrollBoxTest/ClipBar.vue +154 -0
  77. package/ScrollBoxTest/DrawCircle.ts +25 -0
  78. package/ScrollBoxTest/NinePatchBar.vue +188 -0
  79. package/ScrollBoxTest/NoBackgroundBar.vue +125 -0
  80. package/ScrollBoxTest/SizeDivBar.vue +139 -0
  81. package/SprayMove/App.vue +75 -0
  82. package/SprayMove/SprayMove.vue +173 -0
  83. package/SprayView/App.vue +8 -9
  84. package/TestNativeSharedView/App.vue +6 -4
  85. package/TextShadowDemo/App.vue +3 -3
  86. package/TextureAnimation/App.vue +244 -148
  87. package/TextureAnimation/App2.vue +66 -14
  88. package/TextureAnimation/assets/blackWhiteTurntable.png +0 -0
  89. package/TextureAnimation/assets/circleHaloMask.png +0 -0
  90. package/TombSweepingDayTest/Raining/Rain.vue +8 -8
  91. package/TouchWidget/App.vue +79 -40
  92. package/TouchWidget/Item.vue +15 -3
  93. package/index.d.ts +1 -1
  94. package/package.json +1 -1
  95. package/MetroWidgetDemos/RefreshDemo/data.js +0 -16
  96. package/TextureAnimation/assets/mask.png +0 -0
  97. package/TextureAnimation/assets/php.jpg +0 -0
  98. package/TouchSample/App.vue +0 -136
  99. package/TouchSample/Item.vue +0 -102
  100. package/TouchSample/MetroWidgetHorizontal.vue +0 -144
  101. package/TouchSample/MetroWidgetVertical.vue +0 -144
  102. package/TouchSample/TouchContainerHorizontal.vue +0 -160
  103. package/TouchSample/TouchContainerVertical.vue +0 -160
  104. package/TouchSample/data.js +0 -81
  105. /package/TextureAnimation/assets/{php2.png → borderOpacity.png} +0 -0
package/MindMap/data.js CHANGED
@@ -8,6 +8,7 @@ const n = (left, top) => {
8
8
  id: id++,
9
9
  };
10
10
  };
11
+
11
12
  export const data = {
12
13
  ...n(400, 500),
13
14
  moveType: "star",
@@ -57,16 +58,22 @@ export const data = {
57
58
  ...n(600, 400),
58
59
  children: [
59
60
  {
60
- ...n(700, 400)
61
+ ...n(700, 400),
62
+ children: [
63
+ {
64
+ ...n(800, 400),
65
+ children: [
66
+ {
67
+ ...n(900, 400)
68
+ }
69
+ ]
70
+ }
71
+ ]
61
72
  }
62
73
  ]
63
74
  },
64
- {
65
- ...n(600, 500)
66
- },
67
- {
68
- ...n(600, 600)
69
- },
75
+ n(600, 500),
76
+ n(600, 600),
70
77
  ]
71
78
  },
72
79
  {
@@ -83,4 +90,23 @@ export const data = {
83
90
  ]
84
91
  },
85
92
  ]
86
- }
93
+ }
94
+
95
+ // export const data = {
96
+ // ...n(100, 100),
97
+ // moveType: "star",
98
+ // children: [
99
+ // {
100
+ // ...n(0, 100),
101
+ // },
102
+ // {
103
+ // ...n(100, 0),
104
+ // },
105
+ // {
106
+ // ...n(200, 100),
107
+ // },
108
+ // {
109
+ // ...n(100, 200),
110
+ // },
111
+ // ]
112
+ // }
@@ -16,10 +16,6 @@ export default {
16
16
  cookies: {
17
17
  domain: '' // 当非null非空时,激活cookie功能,使ajax请求时自动带上cookies,并且document.cookie的get/set可用
18
18
  },
19
-
20
- // (可选配置)填写main.js或者bundle.js相对于index.html的相对位置,
21
- // 用于image/import.then的相对寻址, vue3默认值是/js/
22
- jsSubPath: '/js/'
23
19
  },
24
20
 
25
21
  vendorConfig: {
@@ -0,0 +1,207 @@
1
+ <script setup>
2
+ import { onMounted, onUnmounted, ref, computed, shallowRef } from "vue";
3
+ import Vortex from "./tools/vortexPacker/Vortex.vue";
4
+ import Genie from "./tools/geniePakcer/Genie.vue";
5
+ import particlePacker from "./tools/particlePacker/Particle.vue";
6
+ import orange from "./images/orange.png";
7
+ import pink from "./images/pink.png";
8
+ import red from "./images/red.png";
9
+ import yellowGreen from "./images/yellowGreen.png";
10
+ import blue from "./images/blue.png";
11
+ import darkGreen from "./images/darkGreen.png";
12
+ import purple from "./images/purple.png";
13
+ //particle特效图片素材
14
+ const ImgData = [orange, pink, red, yellowGreen, blue, darkGreen, purple];
15
+
16
+ const ImageChinChilla =
17
+ "https://qcast-image.oss-cn-qingdao.aliyuncs.com/JsViewVideo/ImageTestSample/BackgroundLongmao.jpg";
18
+ const ImageLandscape = "https://oss.image.qcast.cn/ai-draw/landscape.jpeg";
19
+ const ImageOwl = "https://oss.image.qcast.cn/ai-draw/owl.jpeg";
20
+ //旋涡子组件的引用
21
+ const cChildRef1 = ref(null);
22
+ //genie子组件的引用
23
+ const cChildRef2 = ref(null);
24
+ const cShaderSettings = [
25
+ {
26
+ name: "vortex",
27
+ text: "左右键切换效果,【OK】键随机焦点开始",
28
+ },
29
+ {
30
+ name: "genie",
31
+ text: "【OK】键进行收或放。上下键切换样例点",
32
+ },
33
+ {
34
+ name: "particle",
35
+ text: "左右键切换效果 遮罩粒子组件",
36
+ },
37
+ ];
38
+
39
+ const rKeyCount = ref(2);
40
+ const rShaderInfo = computed(() => {
41
+ return cShaderSettings[rKeyCount.value];
42
+ });
43
+
44
+ //genie组件测试数组(14个)
45
+ //index
46
+ let rPositionIndex = shallowRef(0);
47
+ //key值
48
+ let rKey = shallowRef(1);
49
+ //数组
50
+ const cPositionArray = [
51
+ { x: -80, y: -60, direction: "horizontal" }, //左上横向
52
+ { x: -80, y: -60, direction: "vertical" }, //左上纵向
53
+ { x: 280, y: -60, direction: "vertical" }, //正上
54
+ { x: 1080, y: -60, direction: "horizontal" }, //右上横向
55
+ { x: 1080, y: -60, direction: "vertical" }, //右上纵向
56
+ { x: -80, y: 270, direction: "horizontal" }, //正左
57
+ { x: 1080, y: 270, direction: "horizontal" }, //正右
58
+ { x: -80, y: 600, direction: "horizontal" }, //左下横向
59
+ { x: -80, y: 600, direction: "vertical" }, //左下纵向
60
+ { x: 280, y: 600, direction: "vertical" }, //正下
61
+ { x: 1080, y: 600, direction: "horizontal" }, //右下横向
62
+ { x: 1080, y: 600, direction: "vertical" }, //右下纵向
63
+ { x: 200, y: 200, direction: "vertical" }, //内部纵向
64
+ { x: 700, y: 500, direction: "horizontal" }, //内部横向
65
+ ];
66
+ const onKeyDown = (ev) => {
67
+ switch (ev.keyCode) {
68
+ case 37: {
69
+ rKeyCount.value =
70
+ rKeyCount.value > 1 ? rKeyCount.value - 1 : rKeyCount.value;
71
+ return true;
72
+ }
73
+ case 39: {
74
+ rKeyCount.value =
75
+ rKeyCount.value < cShaderSettings.length - 1
76
+ ? rKeyCount.value + 1
77
+ : rKeyCount.value;
78
+ return true;
79
+ }
80
+ case 13: {
81
+ if (rKeyCount.value == 0) {
82
+ cChildRef1.value.getRandomDecimal();
83
+ } else {
84
+ cChildRef2.value.switcher();
85
+ }
86
+
87
+ return true;
88
+ }
89
+ case 38: {
90
+ if (rKeyCount.value == 1) {
91
+ rPositionIndex.value =
92
+ rPositionIndex.value == 0 ? 0 : (rPositionIndex.value -= 1);
93
+ rKey.value += 1;
94
+ console.log(rPositionIndex.value);
95
+ }
96
+ return true;
97
+ }
98
+ case 40: {
99
+ if (rKeyCount.value == 1) {
100
+ rPositionIndex.value =
101
+ rPositionIndex.value == cPositionArray.length - 1
102
+ ? cPositionArray.length - 1
103
+ : (rPositionIndex.value += 1);
104
+ rKey.value += 1;
105
+ console.log(rPositionIndex.value);
106
+ }
107
+ return true;
108
+ }
109
+ default:
110
+ return false;
111
+ }
112
+ };
113
+ const myEnd = () => {
114
+ console.log("动画结束");
115
+ };
116
+ onMounted(() => {
117
+ window.JsView?.enableFpsDisplay(true);
118
+ });
119
+
120
+ onUnmounted(() => {
121
+ window.JsView?.enableFpsDisplay(false);
122
+ });
123
+ </script>
124
+
125
+ <template>
126
+ <jsv-focus-block
127
+ autoFocus
128
+ :onAction="{
129
+ onKeyDown,
130
+ }"
131
+ :style="{
132
+ width: 1280,
133
+ height: 720,
134
+ backgroundImage: `url(${ImageChinChilla})`,
135
+ }"
136
+ ></jsv-focus-block>
137
+ <Vortex
138
+ v-if="rKeyCount == 0"
139
+ ref="cChildRef1"
140
+ :width="640"
141
+ :height="360"
142
+ ></Vortex>
143
+ <Genie
144
+ :key="rKey"
145
+ v-else-if="rKeyCount == 1"
146
+ ref="cChildRef2"
147
+ :width="1024"
148
+ :height="576"
149
+ :left="128"
150
+ :top="72"
151
+ :direction="cPositionArray[rPositionIndex].direction"
152
+ :position="cPositionArray[rPositionIndex]"
153
+ :time="1"
154
+ :imgUrl="ImageLandscape"
155
+ :aniEnd="myEnd"
156
+ :initShow="true"
157
+ ></Genie>
158
+ <div v-else>
159
+ <div
160
+ :style="{
161
+ width: 600,
162
+ height: 300,
163
+ top: 210,
164
+ left: 340,
165
+ backgroundImage: ImageOwl,
166
+ }"
167
+ ></div>
168
+ <particlePacker
169
+ :style="{
170
+ width: 600,
171
+ height: 300,
172
+ top: 210,
173
+ left: 340,
174
+ }"
175
+ :imgArray="ImgData"
176
+ >
177
+ </particlePacker>
178
+ </div>
179
+
180
+ <div
181
+ :key="rKeyCount"
182
+ :style="{
183
+ top: 100,
184
+ left: 20,
185
+ width: 560,
186
+ height: 50,
187
+ fontSize: 30,
188
+ backgroundColor: '#00000055',
189
+ color: '#ffffff',
190
+ }"
191
+ >
192
+ {{ `${rShaderInfo.name}(${rPositionIndex})` }}
193
+ </div>
194
+ <div
195
+ :style="{
196
+ top: 150,
197
+ left: 20,
198
+ width: 560,
199
+ height: 50,
200
+ fontSize: 30,
201
+ backgroundColor: '#00000055',
202
+ color: '#ffffff',
203
+ }"
204
+ >
205
+ {{ rShaderInfo.text }}
206
+ </div>
207
+ </template>
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file