@shijiu/jsview-vue-samples 2.1.366-test.0 → 2.1.428
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/CoupletsTest/App.vue +37 -52
- package/CoupletsTest/widget/Fireworks/Fireworks.vue +173 -45
- package/DemoHomepage/router.js +19 -3
- package/FlexCellDemo/App.vue +315 -0
- package/FlexCellDemo/images/1.png +0 -0
- package/FlexCellDemo/images/2.png +0 -0
- package/FlexCellDemo/images/3.png +0 -0
- package/FlexCellDemo/images/4.jpg +0 -0
- package/FlexCellDemo/images/5.png +0 -0
- package/GradientTexture/App.vue +135 -0
- package/ImpactStop/App.vue +1 -1
- package/LongText/LongTextScroll.vue +3 -7
- package/QrcodeDemo/App.vue +37 -9
- package/SceneTransition/App.vue +177 -0
- package/SceneTransition/JsvSceneTransition.vue +181 -0
- package/SceneTransition/images/fly1.jpg +0 -0
- package/SceneTransition/images/fly2.jpg +0 -0
- package/SceneTransition/images/mask/1.png +0 -0
- package/SceneTransition/images/mask/10.png +0 -0
- package/SceneTransition/images/mask/11.png +0 -0
- package/SceneTransition/images/mask/12.png +0 -0
- package/SceneTransition/images/mask/2.png +0 -0
- package/SceneTransition/images/mask/3.png +0 -0
- package/SceneTransition/images/mask/4.png +0 -0
- package/SceneTransition/images/mask/5.png +0 -0
- package/SceneTransition/images/mask/6.png +0 -0
- package/SceneTransition/images/mask/7.png +0 -0
- package/SceneTransition/images/mask/8.png +0 -0
- package/SceneTransition/images/mask/9.png +0 -0
- package/SceneTransition/images/mask-025/config.json +29 -0
- package/SceneTransition/images/mask-025/res/1.png +0 -0
- package/SceneTransition/images/mask-025/res/2.png +0 -0
- package/SceneTransition/images/mask-025/res/3.png +0 -0
- package/SceneTransition/images/mask-025/res/4.png +0 -0
- package/SceneTransition/images/mask-025/res/icon.png +0 -0
- package/SceneTransition/images/mask-025/res/stroke.png +0 -0
- package/SceneTransition/images/sample.png +0 -0
- package/SecTorTest/App.vue +145 -23
- package/SwiperTest/App.vue +4 -4
- package/TouchWidget/App.vue +95 -0
- package/TouchWidget/Item.vue +64 -0
- package/TouchWidget/WidgetItem.vue +96 -0
- package/package.json +1 -1
package/CoupletsTest/App.vue
CHANGED
|
@@ -50,19 +50,19 @@
|
|
|
50
50
|
class="text"
|
|
51
51
|
:style="{ top: 40, left: 800, width: 210, height: 100 }"
|
|
52
52
|
>
|
|
53
|
-
{{ "
|
|
53
|
+
{{ "上卷轴图片素材" }}
|
|
54
54
|
</div>
|
|
55
55
|
<div
|
|
56
56
|
class="text"
|
|
57
57
|
:style="{ top: 200, left: 800, width: 210, height: 100 }"
|
|
58
58
|
>
|
|
59
|
-
{{ "
|
|
59
|
+
{{ "下卷轴精灵图素材" }}
|
|
60
60
|
</div>
|
|
61
61
|
<div
|
|
62
62
|
class="text"
|
|
63
63
|
:style="{ top: 440, left: 800, width: 210, height: 100 }"
|
|
64
64
|
>
|
|
65
|
-
{{ "
|
|
65
|
+
{{ "主体图片素材" }}
|
|
66
66
|
</div>
|
|
67
67
|
</div>
|
|
68
68
|
<!-- 鞭炮引线 第二页 -->
|
|
@@ -145,37 +145,37 @@
|
|
|
145
145
|
class="text"
|
|
146
146
|
:style="{ top: 40, left: 600, width: 210, height: 100 }"
|
|
147
147
|
>
|
|
148
|
-
{{ "
|
|
148
|
+
{{ "火花精灵图素材" }}
|
|
149
149
|
</div>
|
|
150
150
|
<div
|
|
151
151
|
class="text"
|
|
152
152
|
:style="{ top: 240, left: 600, width: 210, height: 100 }"
|
|
153
153
|
>
|
|
154
|
-
{{ "
|
|
154
|
+
{{ "鞭炮精灵图素材" }}
|
|
155
155
|
</div>
|
|
156
156
|
<div
|
|
157
157
|
class="text"
|
|
158
158
|
:style="{ top: 460, left: 600, width: 210, height: 100 }"
|
|
159
159
|
>
|
|
160
|
-
{{ "
|
|
160
|
+
{{ "引线图片素材" }}
|
|
161
161
|
</div>
|
|
162
162
|
<div
|
|
163
163
|
class="text"
|
|
164
164
|
:style="{ top: 40, left: 900, width: 210, height: 100 }"
|
|
165
165
|
>
|
|
166
|
-
{{ "
|
|
166
|
+
{{ "火花图片素材1" }}
|
|
167
167
|
</div>
|
|
168
168
|
<div
|
|
169
169
|
class="text"
|
|
170
170
|
:style="{ top: 240, left: 900, width: 210, height: 100 }"
|
|
171
171
|
>
|
|
172
|
-
{{ "
|
|
172
|
+
{{ "火花图片素材2" }}
|
|
173
173
|
</div>
|
|
174
174
|
<div
|
|
175
175
|
class="text"
|
|
176
176
|
:style="{ top: 460, left: 900, width: 210, height: 100 }"
|
|
177
177
|
>
|
|
178
|
-
{{ "
|
|
178
|
+
{{ "火花图片素材3" }}
|
|
179
179
|
</div>
|
|
180
180
|
</div>
|
|
181
181
|
<div v-else>
|
|
@@ -196,27 +196,7 @@
|
|
|
196
196
|
backgroundImage: fireworksPng,
|
|
197
197
|
}"
|
|
198
198
|
></div>
|
|
199
|
-
<!-- 素材2
|
|
200
|
-
<div
|
|
201
|
-
:style="{
|
|
202
|
-
top: 340,
|
|
203
|
-
left: 670,
|
|
204
|
-
width: 50,
|
|
205
|
-
height: 50,
|
|
206
|
-
backgroundImage: GoldenCoin1,
|
|
207
|
-
}"
|
|
208
|
-
></div>
|
|
209
|
-
<!-- 素材3 金币图2 -->
|
|
210
|
-
<div
|
|
211
|
-
:style="{
|
|
212
|
-
top: 550,
|
|
213
|
-
left: 670,
|
|
214
|
-
width: 50,
|
|
215
|
-
height: 50,
|
|
216
|
-
backgroundImage: GoldenCoin2,
|
|
217
|
-
}"
|
|
218
|
-
></div>
|
|
219
|
-
<!-- 素材4 星星1 -->
|
|
199
|
+
<!-- 素材2 星星1 -->
|
|
220
200
|
<div
|
|
221
201
|
:style="{
|
|
222
202
|
top: 100,
|
|
@@ -226,7 +206,7 @@
|
|
|
226
206
|
backgroundImage: star1,
|
|
227
207
|
}"
|
|
228
208
|
></div>
|
|
229
|
-
<!-- 素材
|
|
209
|
+
<!-- 素材3 星星2 -->
|
|
230
210
|
<div
|
|
231
211
|
:style="{
|
|
232
212
|
top: 260,
|
|
@@ -236,7 +216,7 @@
|
|
|
236
216
|
backgroundImage: star2,
|
|
237
217
|
}"
|
|
238
218
|
></div>
|
|
239
|
-
<!-- 素材
|
|
219
|
+
<!-- 素材4 星星3 -->
|
|
240
220
|
<div
|
|
241
221
|
:style="{
|
|
242
222
|
top: 420,
|
|
@@ -246,7 +226,7 @@
|
|
|
246
226
|
backgroundImage: star3,
|
|
247
227
|
}"
|
|
248
228
|
></div>
|
|
249
|
-
<!-- 素材
|
|
229
|
+
<!-- 素材5 星星4 -->
|
|
250
230
|
<div
|
|
251
231
|
:style="{
|
|
252
232
|
top: 580,
|
|
@@ -255,49 +235,53 @@
|
|
|
255
235
|
height: 50,
|
|
256
236
|
backgroundImage: star4,
|
|
257
237
|
}"
|
|
238
|
+
></div>
|
|
239
|
+
<!-- 素材6 弹药素材-->
|
|
240
|
+
<div
|
|
241
|
+
:style="{
|
|
242
|
+
top: 360,
|
|
243
|
+
left: 680,
|
|
244
|
+
width: 50,
|
|
245
|
+
height: 50,
|
|
246
|
+
backgroundImage: ammo,
|
|
247
|
+
}"
|
|
258
248
|
></div>
|
|
259
249
|
<!-- 文字说明 -->
|
|
260
250
|
<div
|
|
261
251
|
class="text"
|
|
262
252
|
:style="{ top: 40, left: 600, width: 210, height: 100 }"
|
|
263
253
|
>
|
|
264
|
-
{{ "
|
|
265
|
-
</div>
|
|
266
|
-
<div
|
|
267
|
-
class="text"
|
|
268
|
-
:style="{ top: 240, left: 600, width: 210, height: 100 }"
|
|
269
|
-
>
|
|
270
|
-
{{ "素材2" }}
|
|
271
|
-
</div>
|
|
272
|
-
<div
|
|
273
|
-
class="text"
|
|
274
|
-
:style="{ top: 460, left: 600, width: 210, height: 100 }"
|
|
275
|
-
>
|
|
276
|
-
{{ "素材3" }}
|
|
254
|
+
{{ "烟花精灵图素材" }}
|
|
277
255
|
</div>
|
|
278
256
|
<div
|
|
279
257
|
class="text"
|
|
280
258
|
:style="{ top: 40, left: 900, width: 210, height: 100 }"
|
|
281
259
|
>
|
|
282
|
-
{{ "
|
|
260
|
+
{{ "火星图片素材1" }}
|
|
283
261
|
</div>
|
|
284
262
|
<div
|
|
285
263
|
class="text"
|
|
286
264
|
:style="{ top: 200, left: 900, width: 210, height: 100 }"
|
|
287
265
|
>
|
|
288
|
-
{{ "
|
|
266
|
+
{{ "火星图片素材2" }}
|
|
289
267
|
</div>
|
|
290
268
|
<div
|
|
291
269
|
class="text"
|
|
292
270
|
:style="{ top: 360, left: 900, width: 210, height: 100 }"
|
|
293
271
|
>
|
|
294
|
-
{{ "
|
|
272
|
+
{{ "火星图片素材3" }}
|
|
295
273
|
</div>
|
|
296
274
|
<div
|
|
297
275
|
class="text"
|
|
298
276
|
:style="{ top: 520, left: 900, width: 210, height: 100 }"
|
|
299
277
|
>
|
|
300
|
-
{{ "
|
|
278
|
+
{{ "火星图片素材4" }}
|
|
279
|
+
</div>
|
|
280
|
+
<div
|
|
281
|
+
class="text"
|
|
282
|
+
:style="{top: 300, left: 600, width: 210, height: 100 }"
|
|
283
|
+
>
|
|
284
|
+
{{ "弹药图片素材" }}
|
|
301
285
|
</div>
|
|
302
286
|
</div>
|
|
303
287
|
<!-- 翻页提示 -->
|
|
@@ -320,8 +304,6 @@ import scroll from "./widget/images/scroll1.png";
|
|
|
320
304
|
import MyCouplets from "./widget/Couplets/Couplets.vue";
|
|
321
305
|
import Fireworks from "./widget/Fireworks/Fireworks.vue";
|
|
322
306
|
import Banger from "./widget/Banger/Banger.vue";
|
|
323
|
-
import GoldenCoin1 from "./widget/images/goldencoin1.png";
|
|
324
|
-
import GoldenCoin2 from "./widget/images/goldencoin2.png";
|
|
325
307
|
import star1 from "./widget/images/star1.png";
|
|
326
308
|
import star2 from "./widget/images/star2.png";
|
|
327
309
|
import star3 from "./widget/images/star3.png";
|
|
@@ -333,6 +315,9 @@ import purpleStar from "./widget/images/purpleStar.png";
|
|
|
333
315
|
import firecrackerPng from "./widget/Sprite/firecracker.png";
|
|
334
316
|
import leadWire from "./widget/images/leadWire.png";
|
|
335
317
|
import sparkPng from "./widget/Sprite/spark.png";
|
|
318
|
+
|
|
319
|
+
const ammo =
|
|
320
|
+
"https://qcast-image.oss-cn-qingdao.aliyuncs.com/JsViewVideo/ImageTestSample/SpringFestivalTest_2024/images/star2.png";
|
|
336
321
|
//页码
|
|
337
322
|
let myIndex = shallowRef(1);
|
|
338
323
|
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
:noNeedResource="false"
|
|
20
20
|
>
|
|
21
21
|
<div
|
|
22
|
-
|
|
22
|
+
v-show="myShow"
|
|
23
23
|
:style="{
|
|
24
24
|
top: props.top,
|
|
25
25
|
left: props.left,
|
|
@@ -49,14 +49,14 @@
|
|
|
49
49
|
:top="props.top + 40"
|
|
50
50
|
:left="props.left + 15"
|
|
51
51
|
ref="actorRef"
|
|
52
|
-
:width="
|
|
53
|
-
:height="
|
|
52
|
+
:width="8"
|
|
53
|
+
:height="8"
|
|
54
54
|
>
|
|
55
55
|
<div
|
|
56
56
|
:style="{
|
|
57
57
|
width: 8,
|
|
58
58
|
height: 8,
|
|
59
|
-
backgroundImage:
|
|
59
|
+
backgroundImage: ammo,
|
|
60
60
|
}"
|
|
61
61
|
></div>
|
|
62
62
|
</jsv-free-move-actor>
|
|
@@ -64,32 +64,80 @@
|
|
|
64
64
|
<div
|
|
65
65
|
v-if="isSpray"
|
|
66
66
|
:style="{
|
|
67
|
-
top: props.top -
|
|
67
|
+
top: props.top - moveDistance + 20,
|
|
68
68
|
left: props.left,
|
|
69
69
|
width: 50,
|
|
70
70
|
height: 50,
|
|
71
71
|
}"
|
|
72
72
|
>
|
|
73
73
|
<jsv-spray
|
|
74
|
-
v-for="item in
|
|
74
|
+
v-for="item in ImgData1"
|
|
75
75
|
:pointRes="`url(${item})`"
|
|
76
76
|
:sprayStyle="sprayOk"
|
|
77
77
|
:ignoreClip="true"
|
|
78
78
|
/>
|
|
79
79
|
</div>
|
|
80
|
+
<div
|
|
81
|
+
v-if="isSpray1"
|
|
82
|
+
:style="{
|
|
83
|
+
top: props.top - moveDistance + 80,
|
|
84
|
+
left: props.left - 100,
|
|
85
|
+
width: 50,
|
|
86
|
+
height: 50,
|
|
87
|
+
}"
|
|
88
|
+
>
|
|
89
|
+
<jsv-spray
|
|
90
|
+
v-for="item in ImgData2"
|
|
91
|
+
:pointRes="`url(${item})`"
|
|
92
|
+
:sprayStyle="sprayOk1"
|
|
93
|
+
:ignoreClip="true"
|
|
94
|
+
/>
|
|
95
|
+
</div>
|
|
80
96
|
<div
|
|
81
97
|
v-if="isSpray2"
|
|
82
98
|
:style="{
|
|
83
|
-
top: props.top -
|
|
84
|
-
left: props.left,
|
|
99
|
+
top: props.top - moveDistance + 80,
|
|
100
|
+
left: props.left + 100,
|
|
85
101
|
width: 50,
|
|
86
102
|
height: 50,
|
|
87
103
|
}"
|
|
88
104
|
>
|
|
89
105
|
<jsv-spray
|
|
90
|
-
v-for="item in
|
|
106
|
+
v-for="item in ImgData3"
|
|
91
107
|
:pointRes="`url(${item})`"
|
|
92
|
-
:sprayStyle="
|
|
108
|
+
:sprayStyle="sprayOk1"
|
|
109
|
+
:ignoreClip="true"
|
|
110
|
+
/>
|
|
111
|
+
</div>
|
|
112
|
+
<div
|
|
113
|
+
v-if="isSpray3"
|
|
114
|
+
:style="{
|
|
115
|
+
top: props.top - moveDistance - 80,
|
|
116
|
+
left: props.left - 100,
|
|
117
|
+
width: 50,
|
|
118
|
+
height: 50,
|
|
119
|
+
}"
|
|
120
|
+
>
|
|
121
|
+
<jsv-spray
|
|
122
|
+
v-for="item in ImgData4"
|
|
123
|
+
:pointRes="`url(${item})`"
|
|
124
|
+
:sprayStyle="sprayOk1"
|
|
125
|
+
:ignoreClip="true"
|
|
126
|
+
/>
|
|
127
|
+
</div>
|
|
128
|
+
<div
|
|
129
|
+
v-if="isSpray4"
|
|
130
|
+
:style="{
|
|
131
|
+
top: props.top - moveDistance - 80,
|
|
132
|
+
left: props.left + 100,
|
|
133
|
+
width: 50,
|
|
134
|
+
height: 50,
|
|
135
|
+
}"
|
|
136
|
+
>
|
|
137
|
+
<jsv-spray
|
|
138
|
+
v-for="item in ImgData5"
|
|
139
|
+
:pointRes="`url(${item})`"
|
|
140
|
+
:sprayStyle="sprayOk1"
|
|
93
141
|
:ignoreClip="true"
|
|
94
142
|
/>
|
|
95
143
|
</div>
|
|
@@ -111,42 +159,73 @@ const props = defineProps({
|
|
|
111
159
|
left: { type: Number, require: true },
|
|
112
160
|
});
|
|
113
161
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
const
|
|
162
|
+
//火花图片素材
|
|
163
|
+
const group1_1 ="https://qcast-image.oss-cn-qingdao.aliyuncs.com/JsViewVideo/ImageTestSample/SpringFestivalTest_2024/Fireworks/images/1/group1_1.png"
|
|
164
|
+
const group1_2 ="https://qcast-image.oss-cn-qingdao.aliyuncs.com/JsViewVideo/ImageTestSample/SpringFestivalTest_2024/Fireworks/images/1/group1_2.png"
|
|
165
|
+
const group2_1 ="https://qcast-image.oss-cn-qingdao.aliyuncs.com/JsViewVideo/ImageTestSample/SpringFestivalTest_2024/Fireworks/images/2/group2_1.png"
|
|
166
|
+
const group2_2 ="https://qcast-image.oss-cn-qingdao.aliyuncs.com/JsViewVideo/ImageTestSample/SpringFestivalTest_2024/Fireworks/images/2/group2_2.png"
|
|
167
|
+
const group3_1 ="https://qcast-image.oss-cn-qingdao.aliyuncs.com/JsViewVideo/ImageTestSample/SpringFestivalTest_2024/Fireworks/images/3/group3_1.png"
|
|
168
|
+
const group3_2 ="https://qcast-image.oss-cn-qingdao.aliyuncs.com/JsViewVideo/ImageTestSample/SpringFestivalTest_2024/Fireworks/images/3/group3_2.png"
|
|
169
|
+
const group4_1 ="https://qcast-image.oss-cn-qingdao.aliyuncs.com/JsViewVideo/ImageTestSample/SpringFestivalTest_2024/Fireworks/images/4/group4_1.png"
|
|
170
|
+
const group4_2 ="https://qcast-image.oss-cn-qingdao.aliyuncs.com/JsViewVideo/ImageTestSample/SpringFestivalTest_2024/Fireworks/images/4/group4_2.png"
|
|
171
|
+
const group5_1 ="https://qcast-image.oss-cn-qingdao.aliyuncs.com/JsViewVideo/ImageTestSample/SpringFestivalTest_2024/Fireworks/images/5/group5_1.png"
|
|
172
|
+
const group5_2 ="https://qcast-image.oss-cn-qingdao.aliyuncs.com/JsViewVideo/ImageTestSample/SpringFestivalTest_2024/Fireworks/images/5/group5_2.png"
|
|
173
|
+
//弹药图片素材(请按需修改)
|
|
174
|
+
const ammo =
|
|
117
175
|
"https://qcast-image.oss-cn-qingdao.aliyuncs.com/JsViewVideo/ImageTestSample/SpringFestivalTest_2024/images/star2.png";
|
|
118
|
-
|
|
119
|
-
"https://qcast-image.oss-cn-qingdao.aliyuncs.com/JsViewVideo/ImageTestSample/SpringFestivalTest_2024/images/star3.png";
|
|
120
|
-
const star4 =
|
|
121
|
-
"https://qcast-image.oss-cn-qingdao.aliyuncs.com/JsViewVideo/ImageTestSample/SpringFestivalTest_2024/images/star4.png";
|
|
122
|
-
const GoldenCoin1 =
|
|
123
|
-
"https://qcast-image.oss-cn-qingdao.aliyuncs.com/JsViewVideo/ImageTestSample/SpringFestivalTest_2024/images/goldencoin1.png";
|
|
124
|
-
const GoldenCoin2 =
|
|
125
|
-
"https://qcast-image.oss-cn-qingdao.aliyuncs.com/JsViewVideo/ImageTestSample/SpringFestivalTest_2024/images/goldencoin2.png";
|
|
126
|
-
|
|
176
|
+
//精灵图素材
|
|
127
177
|
const fireworksPng =
|
|
128
178
|
"https://qcast-image.oss-cn-qingdao.aliyuncs.com/JsViewVideo/ImageTestSample/SpringFestivalTest_2024/Sprite/fireworks.png";
|
|
129
179
|
const fireworksJson =
|
|
130
180
|
"https://qcast-image.oss-cn-qingdao.aliyuncs.com/JsViewVideo/ImageTestSample/SpringFestivalTest_2024/Sprite/fireworks.json";
|
|
131
181
|
|
|
182
|
+
//运动距离
|
|
183
|
+
let moveDistance = 260
|
|
132
184
|
let sprite_info = shallowRef(null);
|
|
133
185
|
let view_size = shallowRef(null);
|
|
134
186
|
let isSpray = shallowRef(false);
|
|
187
|
+
let isSpray1 = shallowRef(false);
|
|
135
188
|
let isSpray2 = shallowRef(false);
|
|
189
|
+
let isSpray3 = shallowRef(false);
|
|
190
|
+
let isSpray4 = shallowRef(false);
|
|
191
|
+
//集中管理
|
|
192
|
+
const sprayArray = [isSpray1, isSpray2, isSpray3, isSpray4];
|
|
136
193
|
let isShow = shallowRef(true);
|
|
137
194
|
let actorRef = shallowRef(null);
|
|
138
|
-
let myShow=shallowRef(false)
|
|
195
|
+
let myShow = shallowRef(false);
|
|
139
196
|
let actorControl;
|
|
197
|
+
//随机顺序绽放函数
|
|
198
|
+
const spray=()=> {
|
|
199
|
+
timer.id2 = setTimeout(() => {
|
|
200
|
+
let randomIndex = Math.floor(Math.random() * sprayArray.length);
|
|
201
|
+
sprayArray[randomIndex].value = true;
|
|
202
|
+
timer.id = setInterval(() => {
|
|
203
|
+
let remainingItems = sprayArray.filter((item) => !item.value);
|
|
204
|
+
if (remainingItems.length === 0) {
|
|
205
|
+
clearInterval(timer.id);
|
|
206
|
+
timer.id = -1;
|
|
207
|
+
} else {
|
|
208
|
+
randomIndex = Math.floor(Math.random() * remainingItems.length);
|
|
209
|
+
remainingItems[randomIndex].value = true;
|
|
210
|
+
}
|
|
211
|
+
}, 100);
|
|
212
|
+
}, 500);
|
|
213
|
+
}
|
|
140
214
|
|
|
141
215
|
//预加载
|
|
142
216
|
const preload_info = [
|
|
143
|
-
buildPreloadInfo(
|
|
144
|
-
buildPreloadInfo(
|
|
145
|
-
buildPreloadInfo(
|
|
146
|
-
buildPreloadInfo(
|
|
147
|
-
buildPreloadInfo(
|
|
148
|
-
buildPreloadInfo(
|
|
217
|
+
buildPreloadInfo(group1_1),
|
|
218
|
+
buildPreloadInfo(group1_2),
|
|
219
|
+
buildPreloadInfo(group2_1),
|
|
220
|
+
buildPreloadInfo(group2_2),
|
|
221
|
+
buildPreloadInfo(group3_1),
|
|
222
|
+
buildPreloadInfo(group3_2),
|
|
223
|
+
buildPreloadInfo(group4_1),
|
|
224
|
+
buildPreloadInfo(group4_2),
|
|
225
|
+
buildPreloadInfo(group5_1),
|
|
226
|
+
buildPreloadInfo(group5_2),
|
|
149
227
|
buildPreloadInfo(fireworksPng),
|
|
228
|
+
buildPreloadInfo(ammo),
|
|
150
229
|
];
|
|
151
230
|
let readyNum = shallowRef(0);
|
|
152
231
|
const loadDone = (a) => {
|
|
@@ -154,12 +233,10 @@ const loadDone = (a) => {
|
|
|
154
233
|
};
|
|
155
234
|
const preloadCallback = (config_json, resolve_set) => {
|
|
156
235
|
sprite_info.value = _formatInfo(config_json);
|
|
157
|
-
console.log(sprite_info.value);
|
|
158
236
|
view_size.value = {
|
|
159
237
|
w: sprite_info.value.maxW,
|
|
160
238
|
h: sprite_info.value.maxH,
|
|
161
239
|
};
|
|
162
|
-
console.log("view_size: " + view_size.value);
|
|
163
240
|
resolve_set(); // 通知loader数组设置完成
|
|
164
241
|
readyNum.value++;
|
|
165
242
|
};
|
|
@@ -167,30 +244,85 @@ const preloadCallback = (config_json, resolve_set) => {
|
|
|
167
244
|
let timer = { id: -1, id2: -1 };
|
|
168
245
|
//ref
|
|
169
246
|
let myRef = shallowRef(null);
|
|
170
|
-
|
|
247
|
+
|
|
171
248
|
// 建议:做粒子效果的图的像素尽量不超过 40 * 40
|
|
172
249
|
const sprayOk = {
|
|
173
250
|
type: 0,
|
|
174
251
|
particleNum: 60,
|
|
175
|
-
deltaAngle:
|
|
252
|
+
deltaAngle: 180,
|
|
176
253
|
deltaWidth: 20,
|
|
177
|
-
deltaHeight:
|
|
254
|
+
deltaHeight: 40,
|
|
178
255
|
pointSizeMin: 30,
|
|
179
256
|
pointSizeMax: 50,
|
|
180
257
|
speedMin: 1,
|
|
181
258
|
speedMax: 7,
|
|
182
|
-
lifeMin:
|
|
183
|
-
lifeMax:
|
|
259
|
+
lifeMin: 500,
|
|
260
|
+
lifeMax: 800,
|
|
184
261
|
accelerateX: 0,
|
|
185
262
|
accelerateY: 0,
|
|
186
263
|
addNumSpeed: 0.001,
|
|
187
|
-
enableFade:
|
|
264
|
+
enableFade: false,
|
|
188
265
|
enableShrink: true,
|
|
189
266
|
};
|
|
267
|
+
const sprayOk1 = {
|
|
268
|
+
type: 0,
|
|
269
|
+
particleNum: 30,
|
|
270
|
+
deltaAngle: 180,
|
|
271
|
+
deltaWidth: 20,
|
|
272
|
+
deltaHeight: 40,
|
|
273
|
+
pointSizeMin: 30,
|
|
274
|
+
pointSizeMax: 50,
|
|
275
|
+
speedMin: 1,
|
|
276
|
+
speedMax: 7,
|
|
277
|
+
lifeMin: 1000,
|
|
278
|
+
lifeMax: 2000,
|
|
279
|
+
accelerateX: 0,
|
|
280
|
+
accelerateY: -40,
|
|
281
|
+
addNumSpeed: 0.001,
|
|
282
|
+
enableFade: false,
|
|
283
|
+
enableShrink: false,
|
|
284
|
+
};
|
|
285
|
+
//颜色搭配
|
|
286
|
+
const group1 = [group1_1, group1_2];
|
|
287
|
+
const group2 = [group2_1, group2_2];
|
|
288
|
+
const group3 = [group3_1, group3_2];
|
|
289
|
+
const group4 = [group4_1, group4_2];
|
|
290
|
+
const group5 = [group5_1, group5_2];
|
|
291
|
+
let ImgData1;
|
|
292
|
+
let ImgData2;
|
|
293
|
+
let ImgData3;
|
|
294
|
+
let ImgData4;
|
|
295
|
+
let ImgData5;
|
|
296
|
+
const allGroup = [group1, group2, group3, group4, group5];
|
|
297
|
+
//随机烟花颜色设定
|
|
298
|
+
const remainingGroups = [...allGroup];
|
|
299
|
+
for (let i = 1; i <= 5; i++) {
|
|
300
|
+
const randomIndex = Math.floor(Math.random() * remainingGroups.length);
|
|
301
|
+
const selectedGroup = remainingGroups[randomIndex];
|
|
302
|
+
switch(i) {
|
|
303
|
+
case 1:
|
|
304
|
+
ImgData1 = selectedGroup;
|
|
305
|
+
break;
|
|
306
|
+
case 2:
|
|
307
|
+
ImgData2 = selectedGroup;
|
|
308
|
+
break;
|
|
309
|
+
case 3:
|
|
310
|
+
ImgData3 = selectedGroup;
|
|
311
|
+
break;
|
|
312
|
+
case 4:
|
|
313
|
+
ImgData4 = selectedGroup;
|
|
314
|
+
break;
|
|
315
|
+
case 5:
|
|
316
|
+
ImgData5 = selectedGroup;
|
|
317
|
+
break;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
remainingGroups.splice(randomIndex, 1);
|
|
321
|
+
}
|
|
190
322
|
|
|
191
323
|
watch(readyNum, (n, o) => {
|
|
192
324
|
if (o != 2 && n == 2) {
|
|
193
|
-
myShow.value=true
|
|
325
|
+
myShow.value = true;
|
|
194
326
|
timer.id2 = setTimeout(() => {
|
|
195
327
|
myRef.value.start();
|
|
196
328
|
|
|
@@ -199,20 +331,18 @@ watch(readyNum, (n, o) => {
|
|
|
199
331
|
.condition()
|
|
200
332
|
.onNextTick(2)
|
|
201
333
|
.then([
|
|
202
|
-
actorControl.action().setSpeed(undefined, -
|
|
334
|
+
actorControl.action().setSpeed(undefined, -9),
|
|
203
335
|
actorControl.action(3).setAccel(undefined, 0.13),
|
|
204
336
|
]),
|
|
205
337
|
actorControl
|
|
206
338
|
.condition()
|
|
207
|
-
.reachPosition(undefined, -
|
|
339
|
+
.reachPosition(undefined, -moveDistance)
|
|
208
340
|
.then([
|
|
209
341
|
actorControl.action().stopMoving(),
|
|
210
342
|
() => {
|
|
211
343
|
isSpray.value = true;
|
|
212
344
|
isShow.value = false;
|
|
213
|
-
|
|
214
|
-
isSpray2.value = true;
|
|
215
|
-
}, 500);
|
|
345
|
+
spray();
|
|
216
346
|
},
|
|
217
347
|
]),
|
|
218
348
|
]);
|
|
@@ -224,8 +354,6 @@ onMounted(() => {
|
|
|
224
354
|
actorControl = actorRef.value.control;
|
|
225
355
|
});
|
|
226
356
|
onBeforeUnmount(() => {
|
|
227
|
-
clearTimeout(timer.id);
|
|
228
|
-
timer.id = -1;
|
|
229
357
|
clearTimeout(timer.id2);
|
|
230
358
|
timer.id2 = -1;
|
|
231
359
|
});
|
package/DemoHomepage/router.js
CHANGED
|
@@ -16,6 +16,17 @@ let routeList = [
|
|
|
16
16
|
path: '/feature/Basic',
|
|
17
17
|
component: () => import('jsview-vue-samples/Basic/App.vue'),
|
|
18
18
|
},
|
|
19
|
+
// {
|
|
20
|
+
// name: '场景过渡',
|
|
21
|
+
// path: '/feature/SceneTransition',
|
|
22
|
+
// component: () => import('jsview-vue-samples/SceneTransition/App.vue'),
|
|
23
|
+
// },
|
|
24
|
+
{
|
|
25
|
+
name: 'FlexDemo',
|
|
26
|
+
path: '/feature/FlexDemo',
|
|
27
|
+
component: () => import('jsview-vue-samples/FlexCellDemo/App.vue')
|
|
28
|
+
|
|
29
|
+
},
|
|
19
30
|
{
|
|
20
31
|
name: '连接线Demo',
|
|
21
32
|
path: '/feature/ConnectLine',
|
|
@@ -188,6 +199,11 @@ let routeList = [
|
|
|
188
199
|
path: '/feature/ScaleDownNeon',
|
|
189
200
|
component: () => import('jsview-vue-samples/ScaleDownNeon/App.vue'),
|
|
190
201
|
},
|
|
202
|
+
{
|
|
203
|
+
name: '渐变Texture',
|
|
204
|
+
path: '/feature/GradientTexture',
|
|
205
|
+
component: () => import('jsview-vue-samples/GradientTexture/App.vue'),
|
|
206
|
+
},
|
|
191
207
|
{
|
|
192
208
|
name: '碰撞检测',
|
|
193
209
|
path: '/Game/Collision',
|
|
@@ -282,7 +298,7 @@ let routeList = [
|
|
|
282
298
|
name: 'latex公式',
|
|
283
299
|
path: '/feature/LatexFormula',
|
|
284
300
|
component: () => import('jsview-vue-samples/LatexFormula/App.vue'),
|
|
285
|
-
},{
|
|
301
|
+
}, {
|
|
286
302
|
name: 'Swiper3dTest',
|
|
287
303
|
path: '/Operations/Swiper3D',
|
|
288
304
|
component: () => import('jsview-vue-samples/SwiperTest/App.vue'),
|
|
@@ -293,8 +309,8 @@ let routeList = [
|
|
|
293
309
|
component: () => import('jsview-vue-samples/ProgressBar/App.vue'),
|
|
294
310
|
},
|
|
295
311
|
{
|
|
296
|
-
name:'春联测试',
|
|
297
|
-
path:'/Game/CoupletsTest',
|
|
312
|
+
name: '春联测试',
|
|
313
|
+
path: '/Game/CoupletsTest',
|
|
298
314
|
component: () => import('jsview-vue-samples/CoupletsTest/App.vue'),
|
|
299
315
|
}
|
|
300
316
|
];
|