@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.
- package/BakeViewDemo/App.vue +6 -1
- package/Basic/components/anim/AnimEasingCubicBezier.vue +56 -0
- package/Basic/components/anim/AnimGroup2.vue +33 -0
- package/Basic/components/panel/Panel2.vue +8 -3
- package/CoupletsTest/widget/Banger/Maroon.vue +4 -7
- package/CoupletsTest/widget/Fireworks/Fireworks.vue +52 -44
- package/CustomShader/App.vue +174 -0
- package/CustomShader/gaussianBlur.glsl +27 -0
- package/CustomShader/pageFlip.glsl +41 -0
- package/CustomShader/sdf.glsl +22 -0
- package/CustomShader/test.glsl +8 -0
- package/CustomShader/vortex.glsl +38 -0
- package/DemoHomepage/App.vue +50 -32
- package/DemoHomepage/components/Item.vue +23 -12
- package/DemoHomepage/index.d.ts +5 -2
- package/DemoHomepage/router.js +105 -72
- package/DispersedFocusControl/App.vue +67 -0
- package/DispersedFocusControl/Button.vue +76 -0
- package/DispersedFocusControl/data.js +44 -0
- package/DragBox/App.vue +148 -0
- package/DriftScopeTest/App.vue +128 -0
- package/FlexCellDemo/App.vue +47 -223
- package/FlexCellDemo/TestFrame1.vue +88 -0
- package/FlexCellDemo/TestFrame2.vue +100 -0
- package/FlexCellDemo/TestFrame3.vue +97 -0
- package/FlexCellDemo/TestFrame4.vue +60 -0
- package/FlexCellDemo/TestFrame5.vue +60 -0
- package/FlexCellDemo/images/6.jpg +0 -0
- package/FocusMoveStyle/App.vue +1 -0
- package/FocusMoveStyle/CreepFocus.vue +11 -1
- package/FocusMoveStyle/FoldableItem.vue +1 -1
- package/FreeMove/App.vue +62 -64
- package/FreeMoveLink/App.vue +2 -2
- package/FullScreenFlex/App.vue +42 -0
- package/FullScreenFlex/TestFrame2.vue +107 -0
- package/FullScreenFlex/images/1.png +0 -0
- package/HashHistory/App.vue +8 -4
- package/ImpactStop/App.vue +45 -45
- package/Input/App.vue +184 -97
- package/Input/InputPanel.vue +98 -82
- package/LatexFormula/App.vue +97 -10
- package/LongImage/App.vue +1 -2
- package/LongText/App.vue +2 -2
- package/LongText/LongTextScroll.vue +22 -22
- package/LongText/Scroll.vue +28 -9
- package/MetroWidgetDemos/RefreshDemo/App.vue +172 -56
- package/MetroWidgetDemos/RefreshDemo/ControlItem.vue +45 -0
- package/MetroWidgetDemos/RefreshDemo/Item.vue +20 -4
- package/MetroWidgetDemos/itemSizeUpdate/backward/Item.vue +1 -1
- package/MetroWidgetDemos/routeList.js +17 -17
- package/MindMap/App.vue +10 -1
- package/MindMap/data.js +34 -8
- package/Parkour/appConfig/jsview.config.mjs +0 -4
- package/PosterPacker/App.vue +207 -0
- package/PosterPacker/images/bg.jpg +0 -0
- package/PosterPacker/images/blue.png +0 -0
- package/PosterPacker/images/darkGreen.png +0 -0
- package/PosterPacker/images/left.png +0 -0
- package/PosterPacker/images/orange.png +0 -0
- package/PosterPacker/images/pink.png +0 -0
- package/PosterPacker/images/purple.png +0 -0
- package/PosterPacker/images/red.png +0 -0
- package/PosterPacker/images/right.png +0 -0
- package/PosterPacker/images/yellowGreen.png +0 -0
- package/PosterPacker/tools/geniePakcer/Genie.vue +686 -0
- package/PosterPacker/tools/geniePakcer/genieBottom.glsl +49 -0
- package/PosterPacker/tools/geniePakcer/genieLeft.glsl +50 -0
- package/PosterPacker/tools/geniePakcer/genieRight.glsl +57 -0
- package/PosterPacker/tools/geniePakcer/genieTop.glsl +50 -0
- package/PosterPacker/tools/particlePacker/Particle.vue +71 -0
- package/PosterPacker/tools/vortexPacker/Vortex.vue +135 -0
- package/PosterPacker/tools/vortexPacker/vortex.glsl +37 -0
- package/Preload/App.vue +1 -1
- package/SceneTransition/JsvSceneTransition.vue +30 -42
- package/ScrollBoxTest/App.vue +35 -86
- package/ScrollBoxTest/ClipBar.vue +154 -0
- package/ScrollBoxTest/DrawCircle.ts +25 -0
- package/ScrollBoxTest/NinePatchBar.vue +188 -0
- package/ScrollBoxTest/NoBackgroundBar.vue +125 -0
- package/ScrollBoxTest/SizeDivBar.vue +139 -0
- package/SprayMove/App.vue +75 -0
- package/SprayMove/SprayMove.vue +173 -0
- package/SprayView/App.vue +8 -9
- package/TestNativeSharedView/App.vue +6 -4
- package/TextShadowDemo/App.vue +3 -3
- package/TextureAnimation/App.vue +244 -148
- package/TextureAnimation/App2.vue +66 -14
- package/TextureAnimation/assets/blackWhiteTurntable.png +0 -0
- package/TextureAnimation/assets/circleHaloMask.png +0 -0
- package/TombSweepingDayTest/Raining/Rain.vue +8 -8
- package/TouchWidget/App.vue +79 -40
- package/TouchWidget/Item.vue +15 -3
- package/index.d.ts +1 -1
- package/package.json +1 -1
- package/MetroWidgetDemos/RefreshDemo/data.js +0 -16
- package/TextureAnimation/assets/mask.png +0 -0
- package/TextureAnimation/assets/php.jpg +0 -0
- package/TouchSample/App.vue +0 -136
- package/TouchSample/Item.vue +0 -102
- package/TouchSample/MetroWidgetHorizontal.vue +0 -144
- package/TouchSample/MetroWidgetVertical.vue +0 -144
- package/TouchSample/TouchContainerHorizontal.vue +0 -160
- package/TouchSample/TouchContainerVertical.vue +0 -160
- package/TouchSample/data.js +0 -81
- /package/TextureAnimation/assets/{php2.png → borderOpacity.png} +0 -0
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<!-- 进度条 -->
|
|
3
|
+
<div :style="{ top: rProps.top, left: rProps.left }">
|
|
4
|
+
<div ref="rPressDetectDiv" :style="{ width: 800, height: 84 }">
|
|
5
|
+
<JsvScrollBox
|
|
6
|
+
ref="rJsvScrollBox"
|
|
7
|
+
:linkName="cLinkName"
|
|
8
|
+
:style="{
|
|
9
|
+
width: 800,
|
|
10
|
+
height: 84,
|
|
11
|
+
}"
|
|
12
|
+
:direction="HORIZONTAL"
|
|
13
|
+
:sliderSize="{
|
|
14
|
+
width: 84,
|
|
15
|
+
}"
|
|
16
|
+
>
|
|
17
|
+
<!-- 用位置固定的区域来进行进度条展示(FixedBox) -->
|
|
18
|
+
<template #FixedBox="{ boxWidth, boxHeight }">
|
|
19
|
+
<!-- 进度条背景色 -->
|
|
20
|
+
<div
|
|
21
|
+
:style="{
|
|
22
|
+
width: boxWidth,
|
|
23
|
+
height: boxHeight,
|
|
24
|
+
backgroundColor: 'rgba(255,255,255,0.3)',
|
|
25
|
+
borderRadius: Math.floor(boxHeight / 2),
|
|
26
|
+
}"
|
|
27
|
+
/>
|
|
28
|
+
|
|
29
|
+
<!-- 正向进度的颜色(对圆角div进行剪切) -->
|
|
30
|
+
<JsvScrollFollow
|
|
31
|
+
:proxyType="ScrollBoxStyle.SizeDiv"
|
|
32
|
+
:proxyProps="{
|
|
33
|
+
style: {
|
|
34
|
+
backgroundColor: 'rgba(255,255,255,0.7)',
|
|
35
|
+
borderRadius: Math.floor(boxHeight / 2),
|
|
36
|
+
},
|
|
37
|
+
}"
|
|
38
|
+
:syncWith="cLinkName"
|
|
39
|
+
:varWidth="{
|
|
40
|
+
start: boxHeight /* 最小尺寸为一个小圆形 */,
|
|
41
|
+
end: boxWidth,
|
|
42
|
+
}"
|
|
43
|
+
:varHeight="boxHeight"
|
|
44
|
+
/>
|
|
45
|
+
|
|
46
|
+
<!-- 进度文字 -->
|
|
47
|
+
<div
|
|
48
|
+
:style="{
|
|
49
|
+
width: boxWidth,
|
|
50
|
+
height: boxHeight,
|
|
51
|
+
lineHeight: boxHeight,
|
|
52
|
+
fontSize: Math.floor(boxHeight * 0.5),
|
|
53
|
+
textAlign: 'center',
|
|
54
|
+
color: 'rgba(0,0,0,1)',
|
|
55
|
+
}"
|
|
56
|
+
>
|
|
57
|
+
{{ `进度:${rPercentDisp}` }}
|
|
58
|
+
</div>
|
|
59
|
+
</template>
|
|
60
|
+
|
|
61
|
+
<!-- 进度游标球(SliderBox) -->
|
|
62
|
+
<template #SliderBox="{ boxWidth, boxHeight }">
|
|
63
|
+
<div
|
|
64
|
+
:style="{
|
|
65
|
+
top: -15,
|
|
66
|
+
left: -15,
|
|
67
|
+
width: boxWidth + 30,
|
|
68
|
+
height: boxHeight + 30,
|
|
69
|
+
backgroundColor: 'rgba(255, 0,0,0.5)',
|
|
70
|
+
borderRadius: Math.floor((boxHeight + 30) / 2),
|
|
71
|
+
}"
|
|
72
|
+
@click="fncOnClick"
|
|
73
|
+
/>
|
|
74
|
+
</template>
|
|
75
|
+
</JsvScrollBox>
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
</template>
|
|
79
|
+
|
|
80
|
+
<script setup>
|
|
81
|
+
import { shallowRef, onMounted } from "vue";
|
|
82
|
+
import {
|
|
83
|
+
JsvScrollBox,
|
|
84
|
+
JsvScrollFollow,
|
|
85
|
+
ScrollBoxStyle,
|
|
86
|
+
HORIZONTAL,
|
|
87
|
+
} from "jsview";
|
|
88
|
+
import { numberCheckSet } from "../../jsview-vue/utils";
|
|
89
|
+
|
|
90
|
+
let rProps = defineProps({
|
|
91
|
+
top: {
|
|
92
|
+
Type: Number,
|
|
93
|
+
default: 0,
|
|
94
|
+
},
|
|
95
|
+
left: {
|
|
96
|
+
Type: Number,
|
|
97
|
+
default: 0,
|
|
98
|
+
},
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
const cLinkName = "ScrollBoxTest_SizeDivSlider";
|
|
102
|
+
|
|
103
|
+
//进度百分比
|
|
104
|
+
let myProgress = shallowRef(20);
|
|
105
|
+
|
|
106
|
+
let fncOnClick = () => {
|
|
107
|
+
console.log("SizeDiv slider OnClicked");
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
let rJsvScrollBox = shallowRef(null);
|
|
111
|
+
let rPressDetectDiv = shallowRef(null);
|
|
112
|
+
let rPercentDisp = shallowRef(0);
|
|
113
|
+
|
|
114
|
+
onMounted(() => {
|
|
115
|
+
rJsvScrollBox.value.setSensor((percent, x, y) => {
|
|
116
|
+
rPercentDisp.value = Math.floor(percent * 100) / 100;
|
|
117
|
+
console.log(
|
|
118
|
+
`onProgress dragged percent=${percent} \
|
|
119
|
+
x=${Math.floor(x)} \
|
|
120
|
+
y=${Math.floor(y)}`
|
|
121
|
+
);
|
|
122
|
+
}, 15);
|
|
123
|
+
|
|
124
|
+
// 通过代码设计进度条位置, 同理按键操作下来的进度条调整也可以这么处理
|
|
125
|
+
rJsvScrollBox.value.updatePercent(0.2);
|
|
126
|
+
|
|
127
|
+
// 注册按下抬起的监听
|
|
128
|
+
rPressDetectDiv.value.jsvSetTapListener({
|
|
129
|
+
onTouchStart: () => {console.log(" touch start")},
|
|
130
|
+
onTouchEnd: () => {
|
|
131
|
+
rPercentDisp.value =
|
|
132
|
+
Math.floor(rJsvScrollBox.value.currentPercent() * 100) / 100;
|
|
133
|
+
console.log("+SizeDiv release percent=" + rPercentDisp.value);
|
|
134
|
+
},
|
|
135
|
+
});
|
|
136
|
+
});
|
|
137
|
+
</script>
|
|
138
|
+
|
|
139
|
+
<style scoped></style>
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div :style="{ width: 1280, height: 720, backgroundColor: '#0000FF' }">
|
|
3
|
+
<div v-for="(item, index) in CenterSet">
|
|
4
|
+
<SprayMove
|
|
5
|
+
v-if="showArray[index]"
|
|
6
|
+
:center="item.center"
|
|
7
|
+
:color="item.color"
|
|
8
|
+
:num="item.num"
|
|
9
|
+
></SprayMove>
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script setup>
|
|
15
|
+
import SprayMove from "./SprayMove.vue";
|
|
16
|
+
import { onMounted, reactive } from "vue";
|
|
17
|
+
|
|
18
|
+
//随机数(6-12)
|
|
19
|
+
const getRandomNumber = (min = 6, max = 12) => {
|
|
20
|
+
const result = Math.floor(Math.random() * (max - min + 1)) + min;
|
|
21
|
+
return result;
|
|
22
|
+
};
|
|
23
|
+
//组件配置
|
|
24
|
+
const CenterSet = [
|
|
25
|
+
{
|
|
26
|
+
center: { x: 100, y: 100 },
|
|
27
|
+
num: getRandomNumber(),
|
|
28
|
+
color: "#FFFF00",
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
center: { x: 200, y: 500 },
|
|
32
|
+
num: getRandomNumber(),
|
|
33
|
+
color: "#00FF00",
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
center: { x: 820, y: 200 },
|
|
37
|
+
num: getRandomNumber(),
|
|
38
|
+
color: "#FFA500",
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
center: { x: 900, y: 500 },
|
|
42
|
+
num: getRandomNumber(),
|
|
43
|
+
color: "#FF0000",
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
center: { x: 500, y: 320 },
|
|
47
|
+
num: getRandomNumber(),
|
|
48
|
+
color: "#FFFFFF",
|
|
49
|
+
},
|
|
50
|
+
];
|
|
51
|
+
//定时器控制实现烟花绚烂效果
|
|
52
|
+
const showArray = reactive([]);
|
|
53
|
+
CenterSet.forEach((item, index) => {
|
|
54
|
+
showArray.push(false);
|
|
55
|
+
});
|
|
56
|
+
showArray[0] = true;
|
|
57
|
+
console.log(showArray);
|
|
58
|
+
|
|
59
|
+
const timer = { id: -1 };
|
|
60
|
+
|
|
61
|
+
onMounted(() => {
|
|
62
|
+
timer.id = setInterval(() => {
|
|
63
|
+
const index = showArray.indexOf(false); // 找到第一个 false 的索引
|
|
64
|
+
if (index !== -1) {
|
|
65
|
+
showArray[index] = true; // 将第一个 false 改为 true
|
|
66
|
+
console.log(showArray);
|
|
67
|
+
} else {
|
|
68
|
+
// 如果数组内所有的 false 都变为 true,清除定时器
|
|
69
|
+
clearInterval(timer.id);
|
|
70
|
+
}
|
|
71
|
+
}, 1000); // 每 1.5 秒执行一次
|
|
72
|
+
});
|
|
73
|
+
</script>
|
|
74
|
+
|
|
75
|
+
<style lang="scss" scoped></style>
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
/**
|
|
3
|
+
* @file SprayMove组件说明
|
|
4
|
+
* prayMove: 烟花行进组件
|
|
5
|
+
* props说明:
|
|
6
|
+
* @prop {Object} center (必填) 中心点
|
|
7
|
+
* @prop {String} color (必填) 烟花颜色
|
|
8
|
+
* @prop {Number} num (必填) 烟花数量
|
|
9
|
+
*
|
|
10
|
+
*/
|
|
11
|
+
import {
|
|
12
|
+
JsvSpray,
|
|
13
|
+
JsvFreeMoveActor,
|
|
14
|
+
JsvTextureStoreApi,
|
|
15
|
+
FreeMoveDef,
|
|
16
|
+
FreeMoveFunc,
|
|
17
|
+
} from "jsview";
|
|
18
|
+
import { shallowRef, onMounted } from "vue";
|
|
19
|
+
const props = defineProps({
|
|
20
|
+
color: { type: String, default: "#FFFFFF" },
|
|
21
|
+
center: { type: Object, require: true },
|
|
22
|
+
num: { type: Number, default: 12 },
|
|
23
|
+
});
|
|
24
|
+
console.log("props.num", props.num);
|
|
25
|
+
|
|
26
|
+
//画圆形
|
|
27
|
+
let canvasRef;
|
|
28
|
+
let sourceId = shallowRef("");
|
|
29
|
+
const bitmap = {
|
|
30
|
+
width: 10,
|
|
31
|
+
height: 10,
|
|
32
|
+
};
|
|
33
|
+
canvasRef = JsvTextureStoreApi.canvasTexture(bitmap.width, bitmap.height);
|
|
34
|
+
let customPath = canvasRef.circlePath(5, 5, 4);
|
|
35
|
+
customPath.fill(props.color);
|
|
36
|
+
sourceId.value = canvasRef.commit();
|
|
37
|
+
|
|
38
|
+
//FreeMove
|
|
39
|
+
let actorRef = [];
|
|
40
|
+
const actEvents = FreeMoveDef.ActEventDefine;
|
|
41
|
+
let interactNexus = FreeMoveFunc.newNexus();
|
|
42
|
+
//粒子效果
|
|
43
|
+
const ImgData = [`jsvtexturestore://${sourceId.value}`];
|
|
44
|
+
const sprayBoom = {
|
|
45
|
+
type: 0,
|
|
46
|
+
particleNum: 500,
|
|
47
|
+
deltaAngle: 180,
|
|
48
|
+
deltaWidth: 10,
|
|
49
|
+
deltaHeight: 10,
|
|
50
|
+
pointSizeMin: 2,
|
|
51
|
+
pointSizeMax: 5,
|
|
52
|
+
speedMin: 0.5,
|
|
53
|
+
speedMax: 3,
|
|
54
|
+
lifeMin: 1000,
|
|
55
|
+
lifeMax: 2000,
|
|
56
|
+
accelerateX: 0,
|
|
57
|
+
accelerateY: 0,
|
|
58
|
+
enableFade: true,
|
|
59
|
+
enableShrink: true,
|
|
60
|
+
};
|
|
61
|
+
const spraySet = {
|
|
62
|
+
type: 1,
|
|
63
|
+
particleNum: 50,
|
|
64
|
+
deltaAngle: 20,
|
|
65
|
+
deltaWidth: 5,
|
|
66
|
+
deltaHeight: 5,
|
|
67
|
+
pointSizeMin: 2,
|
|
68
|
+
pointSizeMax: 5,
|
|
69
|
+
speedMin: 0,
|
|
70
|
+
speedMax: 0,
|
|
71
|
+
lifeMin: 1000,
|
|
72
|
+
lifeMax: 1500,
|
|
73
|
+
accelerateX: 0,
|
|
74
|
+
accelerateY: 0,
|
|
75
|
+
particleAddSpeed: 0.05,
|
|
76
|
+
enableFade: true,
|
|
77
|
+
enableShrink: false,
|
|
78
|
+
angularVelocityMin: 360,
|
|
79
|
+
angularVelocityMax: 1440,
|
|
80
|
+
alphaMin: 0.5,
|
|
81
|
+
alphaMax: 1,
|
|
82
|
+
};
|
|
83
|
+
//控制整个组件的关闭
|
|
84
|
+
let show = shallowRef(true);
|
|
85
|
+
//动画处理
|
|
86
|
+
const move = () => {
|
|
87
|
+
actorRef.forEach((item, index) => {
|
|
88
|
+
item.control.run((cmds) => [
|
|
89
|
+
cmds
|
|
90
|
+
.action(0, 0, interactNexus)
|
|
91
|
+
.setSpdAndAccel(2, undefined, -0.02, undefined, () => {}, null),
|
|
92
|
+
cmds
|
|
93
|
+
.condition()
|
|
94
|
+
.onNexusEvent(interactNexus, actEvents.SpeedRevertX)
|
|
95
|
+
.then([
|
|
96
|
+
cmds.action().stopMoving(),
|
|
97
|
+
() => {
|
|
98
|
+
show.value = false;
|
|
99
|
+
},
|
|
100
|
+
]),
|
|
101
|
+
]);
|
|
102
|
+
});
|
|
103
|
+
};
|
|
104
|
+
onMounted(() => {
|
|
105
|
+
move();
|
|
106
|
+
});
|
|
107
|
+
</script>
|
|
108
|
+
<template>
|
|
109
|
+
<div v-if="show">
|
|
110
|
+
<div
|
|
111
|
+
:style="{
|
|
112
|
+
top: props.center.y + 10,
|
|
113
|
+
left: props.center.x + 10,
|
|
114
|
+
width: 10,
|
|
115
|
+
height: 10,
|
|
116
|
+
}"
|
|
117
|
+
>
|
|
118
|
+
<jsv-spray
|
|
119
|
+
v-for="item in ImgData"
|
|
120
|
+
:pointRes="item"
|
|
121
|
+
:sprayStyle="sprayBoom"
|
|
122
|
+
:ignoreClip="true"
|
|
123
|
+
/>
|
|
124
|
+
</div>
|
|
125
|
+
<div
|
|
126
|
+
v-for="(item, index) in props.num"
|
|
127
|
+
:style="{
|
|
128
|
+
top: props.center.y,
|
|
129
|
+
left: props.center.x,
|
|
130
|
+
width: 45,
|
|
131
|
+
height: 45,
|
|
132
|
+
transform: `rotate3d(0, 0, 1, ${(index * 360) / props.num}deg)`,
|
|
133
|
+
}"
|
|
134
|
+
>
|
|
135
|
+
<jsv-free-move-actor
|
|
136
|
+
:top="0"
|
|
137
|
+
:left="0"
|
|
138
|
+
:width="10"
|
|
139
|
+
:height="10"
|
|
140
|
+
:ref="(el) => (actorRef[index] = el)"
|
|
141
|
+
>
|
|
142
|
+
<div
|
|
143
|
+
:style="{
|
|
144
|
+
width: 10,
|
|
145
|
+
height: 10,
|
|
146
|
+
backgroundImage: `jsvtexturestore://${sourceId}`,
|
|
147
|
+
}"
|
|
148
|
+
>
|
|
149
|
+
<div>
|
|
150
|
+
<!-- 粒子效果 -->
|
|
151
|
+
<div
|
|
152
|
+
:style="{
|
|
153
|
+
top: 0,
|
|
154
|
+
left: -8,
|
|
155
|
+
width: 10,
|
|
156
|
+
height: 10,
|
|
157
|
+
}"
|
|
158
|
+
>
|
|
159
|
+
<jsv-spray
|
|
160
|
+
v-for="item in ImgData"
|
|
161
|
+
:pointRes="item"
|
|
162
|
+
:sprayStyle="spraySet"
|
|
163
|
+
:ignoreClip="true"
|
|
164
|
+
/>
|
|
165
|
+
</div>
|
|
166
|
+
</div>
|
|
167
|
+
</div>
|
|
168
|
+
</jsv-free-move-actor>
|
|
169
|
+
</div>
|
|
170
|
+
</div>
|
|
171
|
+
</template>
|
|
172
|
+
|
|
173
|
+
<style lang="scss" scoped></style>
|
package/SprayView/App.vue
CHANGED
|
@@ -33,7 +33,6 @@ const sprayOk = {
|
|
|
33
33
|
lifeMax: 2000,
|
|
34
34
|
accelerateX: 0,
|
|
35
35
|
accelerateY: 0,
|
|
36
|
-
addNumSpeed: 0.001,
|
|
37
36
|
enableFade: true,
|
|
38
37
|
enableShrink: true,
|
|
39
38
|
};
|
|
@@ -52,7 +51,7 @@ const sprayRotate = {
|
|
|
52
51
|
lifeMax: 3000,
|
|
53
52
|
accelerateX: 0,
|
|
54
53
|
accelerateY: -100,
|
|
55
|
-
|
|
54
|
+
particleAddSpeed: 0.1,
|
|
56
55
|
enableFade: true,
|
|
57
56
|
enableShrink: false,
|
|
58
57
|
};
|
|
@@ -71,7 +70,7 @@ const sprayMove = {
|
|
|
71
70
|
lifeMax: 3000,
|
|
72
71
|
accelerateX: -50,
|
|
73
72
|
accelerateY: -120,
|
|
74
|
-
|
|
73
|
+
particleAddSpeed: 0.1,
|
|
75
74
|
enableFade: true,
|
|
76
75
|
enableShrink: true,
|
|
77
76
|
};
|
|
@@ -90,11 +89,11 @@ const sprayCycle = {
|
|
|
90
89
|
lifeMax: 3000,
|
|
91
90
|
accelerateX: 0,
|
|
92
91
|
accelerateY: 0,
|
|
93
|
-
|
|
92
|
+
particleAddSpeed: 0.01,
|
|
94
93
|
enableFade: true,
|
|
95
94
|
enableShrink: false,
|
|
96
|
-
angularVelocityMin:
|
|
97
|
-
angularVelocityMax:
|
|
95
|
+
angularVelocityMin: 360,
|
|
96
|
+
angularVelocityMax: 1440,
|
|
98
97
|
alphaMin: 0.5,
|
|
99
98
|
alphaMax: 1,
|
|
100
99
|
};
|
|
@@ -113,11 +112,11 @@ const sprayFall = {
|
|
|
113
112
|
lifeMax: 6000,
|
|
114
113
|
accelerateX: 0,
|
|
115
114
|
accelerateY: -30,
|
|
116
|
-
|
|
115
|
+
particleAddSpeed: 0.1,
|
|
117
116
|
enableFade: false,
|
|
118
117
|
enableShrink: false,
|
|
119
|
-
angularVelocityMin:
|
|
120
|
-
angularVelocityMax:
|
|
118
|
+
angularVelocityMin: 360,
|
|
119
|
+
angularVelocityMax: 1440,
|
|
121
120
|
alphaMin: 0.5,
|
|
122
121
|
alphaMax: 1,
|
|
123
122
|
};
|
|
@@ -26,6 +26,8 @@ let _Index = 0;
|
|
|
26
26
|
//给两个div给定不同的响应式变量
|
|
27
27
|
let view1 = shallowRef("null");
|
|
28
28
|
let view2 = shallowRef("null");
|
|
29
|
+
let view1Dsp = shallowRef("null");
|
|
30
|
+
let view2Dsp = shallowRef("null");
|
|
29
31
|
let isShow = shallowRef(false);
|
|
30
32
|
let isStop = shallowRef(false);
|
|
31
33
|
//创造出需要的四个属性的对象
|
|
@@ -47,10 +49,10 @@ const obj = (newValue) => {
|
|
|
47
49
|
};
|
|
48
50
|
//监听
|
|
49
51
|
watch(view1, (n, o) => {
|
|
50
|
-
|
|
52
|
+
view1Dsp.value = obj(n);
|
|
51
53
|
});
|
|
52
54
|
watch(view2, (n, o) => {
|
|
53
|
-
|
|
55
|
+
view2Dsp.value = obj(n);
|
|
54
56
|
isShow.value = true;
|
|
55
57
|
});
|
|
56
58
|
// 每2秒进行位置变化以测试位置信息更新
|
|
@@ -167,7 +169,7 @@ onMounted(() => {
|
|
|
167
169
|
{{ "view1的参数" }}
|
|
168
170
|
</div>
|
|
169
171
|
<div
|
|
170
|
-
v-for="(value, key, index) in
|
|
172
|
+
v-for="(value, key, index) in view1Dsp"
|
|
171
173
|
:style="{
|
|
172
174
|
top: 30 + index * 40,
|
|
173
175
|
left: 10,
|
|
@@ -195,7 +197,7 @@ onMounted(() => {
|
|
|
195
197
|
</div>
|
|
196
198
|
<div v-if="isShow">
|
|
197
199
|
<div
|
|
198
|
-
v-for="(value, key, index) in
|
|
200
|
+
v-for="(value, key, index) in view2Dsp"
|
|
199
201
|
:style="{
|
|
200
202
|
top: 30 + index * 40,
|
|
201
203
|
left: 130,
|
package/TextShadowDemo/App.vue
CHANGED
|
@@ -23,8 +23,8 @@ const TextData = [
|
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
25
|
id: 3,
|
|
26
|
-
title: "#格式颜色(
|
|
27
|
-
textShadow: "4 4
|
|
26
|
+
title: "#格式颜色(蓝色+小数点)",
|
|
27
|
+
textShadow: "4 4 3.3 #0000EF",
|
|
28
28
|
},
|
|
29
29
|
]
|
|
30
30
|
|
|
@@ -62,7 +62,7 @@ const onKeyDown = (ev) => {
|
|
|
62
62
|
textAlign: 'center',
|
|
63
63
|
lineHeight: 40,
|
|
64
64
|
}">
|
|
65
|
-
文字阴影
|
|
65
|
+
{{ "文字阴影" + item.id }}
|
|
66
66
|
</JsvTextBox>
|
|
67
67
|
</div>
|
|
68
68
|
</div>
|