Skip to content

Commit

Permalink
style: lint style
Browse files Browse the repository at this point in the history
  • Loading branch information
yiiiiiiqianyao committed Apr 21, 2022
1 parent df05e07 commit de10d8e
Show file tree
Hide file tree
Showing 6 changed files with 211 additions and 211 deletions.
48 changes: 24 additions & 24 deletions examples/earth/arc3d/demo/flyline.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,31 +47,31 @@ scene.on('loaded', () => {
scene.addLayer(bloomLayer);

fetch('https://gw.alipayobjects.com/os/bmw-prod/20a69b46-3d6d-4ab5-b8b5-150b6aa52c88.json')
.then(res => res.json())
.then(flydata => {
const flyLine = new LineLayer({ blend: 'normal' })
.source(flydata, {
parser: {
type: 'json',
coordinates: 'coord'
}
})
.color('#b97feb')
.shape('arc3d')
.size(0.5)
.active(true)
.animate({
interval: 2,
trailLength: 2,
duration: 1
})
.style({
opacity: 1,
segmentNumber: 60,
globalArcHeight: 20
.then(res => res.json())
.then(flydata => {
const flyLine = new LineLayer({ blend: 'normal' })
.source(flydata, {
parser: {
type: 'json',
coordinates: 'coord'
}
})
.color('#b97feb')
.shape('arc3d')
.size(0.5)
.active(true)
.animate({
interval: 2,
trailLength: 2,
duration: 1
})
.style({
opacity: 1,
segmentNumber: 60,
globalArcHeight: 20
});
scene.addLayer(flyLine);
});
scene.addLayer(flyLine);
})

earthlayer.setEarthTime(4.0);
});
38 changes: 19 additions & 19 deletions examples/earth/point/demo/cylinder.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,26 +40,26 @@ const bloomLayer = new EarthLayer().color('#fff').shape('bloomSphere')

scene.on('loaded', () => {
scene.addLayer(earthlayer);

fetch('https://gw.alipayobjects.com/os/bmw-prod/efef6c2b-2922-4c03-b9e0-d3743f68eaf2.json')
.then(res => res.json())
.then(data => {
const pointlayer = new PointLayer()
.source(data,
{
parser: {
type: 'json',
x: 'lng',
y: 'lat'
}
}
)
.shape('cylinder')
.color('#f00')
.size('', () => [ 1, 1, 10 ])
.active(true);
scene.addLayer(pointlayer);
})
.then(res => res.json())
.then(data => {
const pointlayer = new PointLayer()
.source(data,
{
parser: {
type: 'json',
x: 'lng',
y: 'lat'
}
}
)
.shape('cylinder')
.color('#f00')
.size('', () => [ 1, 1, 10 ])
.active(true);
scene.addLayer(pointlayer);
});

scene.addLayer(atomLayer);
scene.addLayer(bloomLayer);
Expand Down
36 changes: 18 additions & 18 deletions examples/earth/point/demo/point.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,24 +41,24 @@ const bloomLayer = new EarthLayer().color('#fff').shape('bloomSphere')
scene.on('loaded', () => {
scene.addLayer(earthlayer);
fetch('https://gw.alipayobjects.com/os/bmw-prod/efef6c2b-2922-4c03-b9e0-d3743f68eaf2.json')
.then(res => res.json())
.then(data => {
const pointlayer = new PointLayer()
.source(data,
{
parser: {
type: 'json',
x: 'lng',
y: 'lat'
}
}
)
.shape('circle')
.color('#f00')
.size(10)
.active(true);
scene.addLayer(pointlayer);
})
.then(res => res.json())
.then(data => {
const pointlayer = new PointLayer()
.source(data,
{
parser: {
type: 'json',
x: 'lng',
y: 'lat'
}
}
)
.shape('circle')
.color('#f00')
.size(10)
.active(true);
scene.addLayer(pointlayer);
});

scene.addLayer(atomLayer);
scene.addLayer(bloomLayer);
Expand Down
154 changes: 77 additions & 77 deletions examples/point/text/demo/iconfonts.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,94 +24,94 @@ scene.addIconFonts([

scene.on('loaded', () => {
fetch('https://gw.alipayobjects.com/os/bmw-prod/9eb3f1b5-0c3b-49b2-8221-191d4ba8aa5e.json')
.then(res => res.json())
.then(originData => {
const layer = new PointLayer()
.source(originData, {
parser: {
type: 'json',
x: 'lng',
y: 'lat'
}
})
.shape('circle')
.color('backgoundColor')
.size(42);
scene.addLayer(layer);

const pointIconFontLayer = new PointLayer({})
.source(originData, {
parser: {
type: 'json',
x: 'lng',
y: 'lat'
}
}
)
.shape('iconType', 'text')
.size(30)
.color('iconColor')
.style({
textAnchor: 'center', // 文本相对锚点的位置 center|left|right|top|bottom|top-left
textOffset: [ -10, 10 ], // 文本相对锚点的偏移量 [水平, 垂直]
fontFamily,
iconfont: true,
textAllowOverlap: true
});
scene.addLayer(pointIconFontLayer);

const textLayer = new PointLayer({})
.source(originData,
{
.then(res => res.json())
.then(originData => {
const layer = new PointLayer()
.source(originData, {
parser: {
type: 'json',
x: 'lng',
y: 'lat'
}
}
)
.shape('temperature', 'text')
.size(10)
.color('#ffffff')
.style({
textAnchor: 'center', // 文本相对锚点的位置 center|left|right|top|bottom|top-left
textOffset: [ 5, -55 ], // 文本相对锚点的偏移量 [水平, 垂直]
spacing: 2, // 字符间距
padding: [ 1, 1 ], // 文本包围盒 padding [水平,垂直],影响碰撞检测结果,避免相邻文本靠的太近
stroke: '#ffffff', // 描边颜色
strokeWidth: 0.3, // 描边宽度
strokeOpacity: 1.0,
fontFamily: 'Times New Roman',
textAllowOverlap: true
});
scene.addLayer(textLayer);
})
.shape('circle')
.color('backgoundColor')
.size(42);
scene.addLayer(layer);

const textLayer2 = new PointLayer({})
.source(originData,
{
const pointIconFontLayer = new PointLayer({})
.source(originData, {
parser: {
type: 'json',
x: 'lng',
y: 'lat'
}
}
)
.shape('weather', 'text')
.size(14)
.color('#ffffff')
.style({
textAnchor: 'center', // 文本相对锚点的位置 center|left|right|top|bottom|top-left
textOffset: [ 5, -15 ], // 文本相对锚点的偏移量 [水平, 垂直]
spacing: 2, // 字符间距
padding: [ 1, 1 ], // 文本包围盒 padding [水平,垂直],影响碰撞检测结果,避免相邻文本靠的太近
stroke: '#ffffff', // 描边颜色
strokeWidth: 0.3, // 描边宽度
strokeOpacity: 1.0,
fontFamily: 'Times New Roman',
textAllowOverlap: true
});
scene.addLayer(textLayer2);
})

)
.shape('iconType', 'text')
.size(30)
.color('iconColor')
.style({
textAnchor: 'center', // 文本相对锚点的位置 center|left|right|top|bottom|top-left
textOffset: [ -10, 10 ], // 文本相对锚点的偏移量 [水平, 垂直]
fontFamily,
iconfont: true,
textAllowOverlap: true
});
scene.addLayer(pointIconFontLayer);

const textLayer = new PointLayer({})
.source(originData,
{
parser: {
type: 'json',
x: 'lng',
y: 'lat'
}
}
)
.shape('temperature', 'text')
.size(10)
.color('#ffffff')
.style({
textAnchor: 'center', // 文本相对锚点的位置 center|left|right|top|bottom|top-left
textOffset: [ 5, -55 ], // 文本相对锚点的偏移量 [水平, 垂直]
spacing: 2, // 字符间距
padding: [ 1, 1 ], // 文本包围盒 padding [水平,垂直],影响碰撞检测结果,避免相邻文本靠的太近
stroke: '#ffffff', // 描边颜色
strokeWidth: 0.3, // 描边宽度
strokeOpacity: 1.0,
fontFamily: 'Times New Roman',
textAllowOverlap: true
});
scene.addLayer(textLayer);

const textLayer2 = new PointLayer({})
.source(originData,
{
parser: {
type: 'json',
x: 'lng',
y: 'lat'
}
}
)
.shape('weather', 'text')
.size(14)
.color('#ffffff')
.style({
textAnchor: 'center', // 文本相对锚点的位置 center|left|right|top|bottom|top-left
textOffset: [ 5, -15 ], // 文本相对锚点的偏移量 [水平, 垂直]
spacing: 2, // 字符间距
padding: [ 1, 1 ], // 文本包围盒 padding [水平,垂直],影响碰撞检测结果,避免相邻文本靠的太近
stroke: '#ffffff', // 描边颜色
strokeWidth: 0.3, // 描边宽度
strokeOpacity: 1.0,
fontFamily: 'Times New Roman',
textAllowOverlap: true
});
scene.addLayer(textLayer2);
});


});
62 changes: 31 additions & 31 deletions examples/point/text/demo/simpleCoordinate.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,38 +29,38 @@ const imagelayer = new ImageLayer({}).source(

scene.on('loaded', () => {
fetch('https://gw.alipayobjects.com/os/bmw-prod/7dc0d454-fabc-4461-a5d5-d404dadb49a9.json')
.then(res => res.json())
.then(data => {
const textlayer = new PointLayer({ zIndex: 2 })
.source(
data,
{
parser: {
type: 'json',
x: 'x',
y: 'y'
}
}
)
.shape('t', 'text')
.size(12)
.active({
color: '#00f',
mix: 0.9
})
.color('rgb(86, 156, 214)')
.style({
textAnchor: 'center', // 文本相对锚点的位置 center|left|right|top|bottom|top-left
spacing: 2, // 字符间距
fontWeight: '800',
padding: [ 1, 1 ], // 文本包围盒 padding [水平,垂直],影响碰撞检测结果,避免相邻文本靠的太近
stroke: '#ffffff', // 描边颜色
strokeWidth: 2, // 描边宽度
textAllowOverlap: true
.then(res => res.json())
.then(data => {
const textlayer = new PointLayer({ zIndex: 2 })
.source(
data,
{
parser: {
type: 'json',
x: 'x',
y: 'y'
}
}
)
.shape('t', 'text')
.size(12)
.active({
color: '#00f',
mix: 0.9
})
.color('rgb(86, 156, 214)')
.style({
textAnchor: 'center', // 文本相对锚点的位置 center|left|right|top|bottom|top-left
spacing: 2, // 字符间距
fontWeight: '800',
padding: [ 1, 1 ], // 文本包围盒 padding [水平,垂直],影响碰撞检测结果,避免相邻文本靠的太近
stroke: '#ffffff', // 描边颜色
strokeWidth: 2, // 描边宽度
textAllowOverlap: true
});
scene.addLayer(textlayer);
});
scene.addLayer(textlayer);
})

scene.addLayer(imagelayer);

});
Loading

0 comments on commit de10d8e

Please sign in to comment.