fix
This commit is contained in:
@@ -30,6 +30,7 @@ const mockTags = [
|
|||||||
{
|
{
|
||||||
name: '建筑师',
|
name: '建筑师',
|
||||||
bgColor: 0xffebeb,
|
bgColor: 0xffebeb,
|
||||||
|
tailColor: 0xffe1e1,
|
||||||
fontColor: 0xff6969,
|
fontColor: 0xff6969,
|
||||||
size: 11.5,
|
size: 11.5,
|
||||||
opacity: 1,
|
opacity: 1,
|
||||||
@@ -50,31 +51,33 @@ const mockTags = [
|
|||||||
{
|
{
|
||||||
name: '记者',
|
name: '记者',
|
||||||
bgColor: 0xebf3ff,
|
bgColor: 0xebf3ff,
|
||||||
|
tailColor: 0xb9d3ff,
|
||||||
fontColor: 0x1d71ef,
|
fontColor: 0x1d71ef,
|
||||||
size: 12,
|
size: 12,
|
||||||
opacity: 1,
|
opacity: 1,
|
||||||
angle: Math.PI / 120,
|
angle: Math.PI / 120,
|
||||||
radius: 130,
|
radius: 130,
|
||||||
tailRotation: Math.PI,
|
tailRotation: (3 * Math.PI) / 3.4,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '程序员',
|
name: '程序员',
|
||||||
bgColor: 0xffd4b6,
|
bgColor: 0xffd4b6,
|
||||||
fontColor: 0xffffff,
|
fontColor: 0xffffff,
|
||||||
size: 14.5,
|
size: 14,
|
||||||
opacity: 1,
|
opacity: 1,
|
||||||
angle: Math.PI / 9,
|
angle: Math.PI / 7,
|
||||||
radius: 120,
|
radius: 120,
|
||||||
tailRotation: (5 * Math.PI) / 4,
|
tailRotation: (5 * Math.PI) / 4,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '摄影师',
|
name: '摄影师',
|
||||||
bgColor: 0xd8e5fe,
|
bgColor: 0xd8e5fe,
|
||||||
|
tailColor: 0xb9d3ff,
|
||||||
fontColor: 0x1d71ef,
|
fontColor: 0x1d71ef,
|
||||||
size: 11,
|
size: 11,
|
||||||
opacity: 1,
|
opacity: 1,
|
||||||
angle: Math.PI / 3,
|
angle: Math.PI / 3,
|
||||||
radius: 75,
|
radius: 79,
|
||||||
tailRotation: (3 * Math.PI) / 2,
|
tailRotation: (3 * Math.PI) / 2,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -90,12 +93,13 @@ const mockTags = [
|
|||||||
{
|
{
|
||||||
name: '心理咨询师',
|
name: '心理咨询师',
|
||||||
bgColor: 0xebf3ff,
|
bgColor: 0xebf3ff,
|
||||||
|
tailColor: 0xb9d3ff,
|
||||||
fontColor: 0x1d71ef,
|
fontColor: 0x1d71ef,
|
||||||
size: 10.5,
|
size: 10.5,
|
||||||
opacity: 1,
|
opacity: 1,
|
||||||
angle: (5.4 * Math.PI) / 6,
|
angle: (5.4 * Math.PI) / 6,
|
||||||
radius: 110,
|
radius: 110,
|
||||||
tailRotation: 0,
|
tailRotation:(3 * Math.PI) /1.78,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '护士',
|
name: '护士',
|
||||||
@@ -211,7 +215,7 @@ const renderScene = (sw, sh) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (data.radius > 0) {
|
if (data.radius > 0) {
|
||||||
const tail = createCometTail(data.bgColor, data.tailRotation, tag.width);
|
const tail = createCometTail( data.tailColor || data.bgColor, data.tailRotation, tag.width);
|
||||||
tag.addChildAt(tail, 0);
|
tag.addChildAt(tail, 0);
|
||||||
tag.updateTail = () => tail.updateAnim();
|
tag.updateTail = () => tail.updateAnim();
|
||||||
}
|
}
|
||||||
@@ -361,5 +365,6 @@ const handleResize = () => {
|
|||||||
height: 500rpx;
|
height: 500rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
color: #b9d3ff;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user