地球点阵:贴合真实地形采样、加密缩小、海陆精准分类(含极地与西伯利亚)

This commit is contained in:
2026-09-18 19:26:07 +08:00
parent 4e818d53e3
commit b79e6c9c03
+5 -4
View File
@@ -99,8 +99,9 @@ export class Globe {
const y = Math.min(H - 1, Math.max(0, Math.round((theta / Math.PI) * (H - 1)))); const y = Math.min(H - 1, Math.max(0, Math.round((theta / Math.PI) * (H - 1))));
const i = (y * W + x) * 4; const i = (y * W + x) * 4;
const r = px[i], g = px[i + 1], b = px[i + 2]; const r = px[i], g = px[i + 1], b = px[i + 2];
// 海洋:蓝色明显占优(蓝>红且蓝>绿,且差距足够大以排除冰雪的微蓝白色) // 海洋:蓝色占优且饱和度高(蓝明显大于红)。
return !(b > r && b > g && (b - r) > 6 && (b - g) > 4); // 用相对比例而非绝对值,避免把高纬度偏蓝的雪原/苔原(如西伯利亚)误判为海。
return !(b > r && b > g && (b - r) / Math.max(1, b) > 0.25);
}; };
// 斐波那契球:单位球面上均匀分布的点 // 斐波那契球:单位球面上均匀分布的点
@@ -129,10 +130,10 @@ export class Globe {
} }
this._buildDotBeads(landPts, { this._buildDotBeads(landPts, {
radius: 0.0045, color: 0xe8d9b4, opacity: 0.95, emissiveIntensity: 0.5, radius: 0.0032, color: 0xe8d9b4, opacity: 0.95, emissiveIntensity: 0.6,
}); });
this._buildDotBeads(oceanPts, { this._buildDotBeads(oceanPts, {
radius: 0.003, color: 0x33415f, opacity: 0.5, emissiveIntensity: 0.15, radius: 0.0022, color: 0x53658a, opacity: 0.65, emissiveIntensity: 0.45,
}); });
} }