|
@@ -33,8 +33,8 @@ export function drawExtrudeMesh(
|
|
|
});
|
|
|
|
|
|
const material = new THREE.MeshPhongMaterial({
|
|
|
- color: featureColor,
|
|
|
- // color: mapConfig.mapColorGradient[Math.floor(Math.random() * 4)], // 随机颜色
|
|
|
+ // color: featureColor,
|
|
|
+ color: mapConfig.mapColorGradient[0], // 随机颜色
|
|
|
// transparent: mapConfig.mapTransparent,
|
|
|
// opacity: mapConfig.mapOpacity,
|
|
|
});
|
|
@@ -124,7 +124,7 @@ export function generateMapObject3D(
|
|
|
const featureColor = basicFeatureItem.properties.customColor
|
|
|
// 每个中心点位置
|
|
|
const featureCenterCoord =
|
|
|
- basicFeatureItem.properties.centroid
|
|
|
+ basicFeatureItem.properties.centroid
|
|
|
&& projectionFn(basicFeatureItem.properties.centroid);
|
|
|
// 名字
|
|
|
const featureName = basicFeatureItem.properties.name;
|
|
@@ -153,7 +153,7 @@ export function generateMapObject3D(
|
|
|
// Polygon 类型
|
|
|
if (featureType === "Polygon") {
|
|
|
featureCoords.forEach((polygon) => {
|
|
|
- const { mesh, line } = drawExtrudeMesh(polygon, projectionFn,featureColor);
|
|
|
+ const { mesh, line } = drawExtrudeMesh(polygon, projectionFn,"#3D452B");
|
|
|
provinceMapObject3D.add(mesh);
|
|
|
provinceMapObject3D.add(line);
|
|
|
});
|
|
@@ -192,7 +192,7 @@ export function generateMapSpot(label2dData) {
|
|
|
}
|
|
|
|
|
|
//TODO:渲染铁塔
|
|
|
-
|
|
|
+
|
|
|
|
|
|
});
|
|
|
return { spotObject3D, spotList };
|