This commit is contained in:
2912401452 2021-10-12 14:40:12 +08:00
commit 3c9b7aa8bb
4 changed files with 46 additions and 39 deletions

View File

@ -34,6 +34,8 @@ export default class EarthAtomSphereModel extends BaseModel {
}
public buildModels(): IModel[] {
// TODO: 调整图层的绘制顺序 地球大气层
this.layer.zIndex = -997;
return [
this.layer.buildLayerModel({
moduleName: 'earthAtmoSphere',

View File

@ -91,6 +91,8 @@ export default class BaseEarthModel extends BaseModel {
}
public buildModels(): IModel[] {
// TODO: 调整图层的绘制顺序 地球大气层
this.layer.zIndex = -998;
return [
this.layer.buildLayerModel({
moduleName: 'baseEarth',

View File

@ -22,6 +22,28 @@ export default class ScaleComponent extends React.Component {
});
var d = [
{ lng: 121.61865234375, lat: 25.29437116258816 },
{ lng: 121.058349609375, lat: 25.015928763367857 },
{ lng: 120.7177734375, lat: 24.587090339209634 },
{ lng: 120.28930664062499, lat: 23.936054914599815 },
{ lng: 120.12451171875, lat: 23.553916518321625 },
{ lng: 120.08056640625, lat: 23.120153621695614 },
{ lng: 120.234375, lat: 22.867317960075614 },
{ lng: 120.43212890625, lat: 22.52270570348246 },
{ lng: 120.65185546875, lat: 22.370396344320053 },
{ lng: 120.750732421875, lat: 21.922663209325922 },
{ lng: 120.948486328125, lat: 22.268764039073968 },
{ lng: 121.124267578125, lat: 22.806567100271522 },
{ lng: 121.56372070312499, lat: 23.915970370510227 },
{ lng: 121.88232421875, lat: 24.557116164309626 },
{ lng: 121.95922851562501, lat: 25.075648445630527 },
{ lng: 109.97314453125, lat: 20.076570104545173 },
{ lng: 108.896484375, lat: 19.663280219987662 },
{ lng: 108.61083984375, lat: 18.979025953255267 },
{ lng: 108.80859375, lat: 18.47960905583197 },
{ lng: 109.599609375, lat: 18.35452552912664 },
{ lng: 110.32470703125, lat: 18.771115062337024 },
{ lng: 111.005859375, lat: 19.78738018198621 },
{ lng: 110, lat: 30 },
{ lng: 127.657407, lat: 49.76027 },
{ lng: 129.397818, lat: 49.4406 },
@ -352,11 +374,11 @@ export default class ScaleComponent extends React.Component {
},
},
)
.shape('circle')
// .shape('cylinder')
// .shape('circle')
.shape('cylinder')
.color('#f00')
// .size('', () => [1, 1, 10])
.size(20)
.size('', () => [1, 1, 10])
// .size(20)
.style({
// opacity: 0.6,
})
@ -407,13 +429,25 @@ export default class ScaleComponent extends React.Component {
// earthTime: 4.0
earthTime: 0.1,
},
});
// .animate(true);
})
.animate(true);
// earthlayer.setEarthTime(4.0)
const atomLayer = new EarthLayer()
.color('#2E8AE6')
.shape('atomSphere')
.style({
opacity: 1,
});
const bloomLayer = new EarthLayer().color('#fff').shape('bloomSphere');
scene.on('loaded', () => {
scene.addLayer(earthlayer);
scene.addLayer(pointlayer);
// console.log(pointlayer)
scene.addLayer(atomLayer);
scene.addLayer(bloomLayer);
earthlayer.setEarthTime(4.0);
});

View File

@ -23,36 +23,6 @@ export default class ScaleComponent extends React.Component {
scene.setBgColor('#333');
let data = [
{
lng1: 100,
lat1: 30.0,
lng2: 130,
lat2: 30,
},
];
const lineLayer = new LineLayer({
blend: 'normal',
})
.source(data, {
parser: {
type: 'json',
x: 'lng1',
y: 'lat1',
x1: 'lng2',
y1: 'lat2',
},
})
.size(2)
.shape('arc3d')
.color('#8C1EB2');
// .animate(true)
// .animate({
// duration: 50,
// interval: 0.2,
// trailLength: 0.05,
// });
fetch(
'https://gw.alipayobjects.com/os/basement_prod/a5ac7bce-181b-40d1-8a16-271356264ad8.json',
)
@ -79,7 +49,7 @@ export default class ScaleComponent extends React.Component {
})
.color('#b97feb')
.shape('arc3d')
.size(1)
.size(0.5)
.active(true)
.animate({
interval: 2,
@ -143,7 +113,6 @@ export default class ScaleComponent extends React.Component {
// earthlayer.setEarthTime(4.0);
scene.addLayer(atomLayer);
scene.addLayer(bloomLayer);
scene.addLayer(lineLayer);
});
}