release: v0.3 배포 (지도 최적화 + 설정 영속화) #13

병합
htlee develop 에서 main 로 22 commits 를 머지했습니다 2026-02-16 16:28:37 +09:00
4개의 변경된 파일32개의 추가작업 그리고 46개의 파일을 삭제
Showing only changes of commit 1fd9f3da82 - Show all commits

파일 보기

@ -105,6 +105,7 @@ body {
.map-area {
position: relative;
background: #010610;
}
.sb {

파일 보기

@ -209,6 +209,26 @@ export function useMapInit(
}, 60_000);
map.once('load', () => {
// Globe 배경(타일 밖)을 심해 색상과 맞춰 타일 경계 seam을 비가시화
try {
map!.setSky({
'sky-color': '#010610',
'horizon-color': '#010610',
'fog-color': '#010610',
'fog-ground-blend': 1,
'sky-horizon-blend': 0,
'atmosphere-blend': 0,
});
} catch {
// ignore
}
// 캔버스 배경도 심해색으로 통일
try {
map!.getCanvas().style.background = '#010610';
} catch {
// ignore
}
if (showSeamarkRef.current) {
try {
ensureSeamarkOverlay(map!, 'bathymetry-lines-coarse');

파일 보기

@ -114,13 +114,11 @@ function applyDepthGradient(map: maplibregl.Map, stops: DepthColorStop[]) {
if (shallowest.depth < 0) {
expr.push(0, lightenHex(shallowest.color, 1.8));
}
for (const layerId of ['bathymetry-fill', 'bathymetry-fill-medium', 'bathymetry-fill-deep']) {
if (!map.getLayer(layerId)) continue;
try {
map.setPaintProperty(layerId, 'fill-color', expr as never);
} catch {
// ignore
}
if (!map.getLayer('bathymetry-fill')) return;
try {
map.setPaintProperty('bathymetry-fill', 'fill-color', expr as never);
} catch {
// ignore
}
}

파일 보기

@ -10,9 +10,7 @@ export const SHALLOW_WATER_FILL_DEFAULT = '#14606e';
export const SHALLOW_WATER_LINE_DEFAULT = '#114f5c';
const BATHY_ZOOM_RANGES: BathyZoomRange[] = [
{ id: 'bathymetry-fill', mercator: [3, 7], globe: [3, 7] },
{ id: 'bathymetry-fill-medium', mercator: [7, 9], globe: [7, 9] },
{ id: 'bathymetry-fill-deep', mercator: [9, 24], globe: [9, 24] },
{ id: 'bathymetry-fill', mercator: [3, 24], globe: [3, 24] },
{ id: 'bathymetry-borders-major', mercator: [3, 7], globe: [3, 7] },
{ id: 'bathymetry-borders', mercator: [7, 24], globe: [7, 24] },
{ id: 'bathymetry-lines-coarse', mercator: [5, 7], globe: [5, 7] },
@ -113,47 +111,18 @@ export function injectOceanBathymetryLayers(style: StyleSpecification, maptilerK
const depthIn = (depths: number[]) =>
['in', depth, ['literal', depths]] as unknown[];
// === Fill (contour polygons) — 3-tier LOD ===
// 심해 폴리곤이 여러 벡터 타일에 걸칠 때 globe tessellation 타일 경계에서
// seam 아티팩트 발생 → 줌아웃에서는 shallow만, 줌인에서 점진적으로 심해 포함
const bathyFillPaint = {
'fill-color': bathyFillColor,
'fill-opacity': ['interpolate', ['linear'], ['zoom'], 0, 0.9, 5, 0.88, 8, 0.84, 10, 0.78],
};
// z3-7: depth >= -2000 (천해만 — 타일 seam 방지)
// === Fill (contour polygons) — 단일 레이어, 전체 depth ===
const bathyFill: LayerSpecification = {
id: 'bathymetry-fill',
type: 'fill',
source: oceanSourceId,
'source-layer': 'contour',
minzoom: 3,
maxzoom: 7,
filter: ['>=', depth, -2000] as unknown as unknown[],
paint: bathyFillPaint,
} as unknown as LayerSpecification;
// z7-9: depth >= -4000 (중심해 포함)
const bathyFillMedium: LayerSpecification = {
id: 'bathymetry-fill-medium',
type: 'fill',
source: oceanSourceId,
'source-layer': 'contour',
minzoom: 7,
maxzoom: 9,
filter: ['>=', depth, -4000] as unknown as unknown[],
paint: bathyFillPaint,
} as unknown as LayerSpecification;
// z9+: 전체 depth (풀 디테일 — 뷰포트가 작아 타일 seam 무관)
const bathyFillDeep: LayerSpecification = {
id: 'bathymetry-fill-deep',
type: 'fill',
source: oceanSourceId,
'source-layer': 'contour',
minzoom: 9,
maxzoom: 24,
paint: bathyFillPaint,
paint: {
'fill-color': bathyFillColor,
'fill-opacity': ['interpolate', ['linear'], ['zoom'], 0, 0.9, 5, 0.88, 8, 0.84, 10, 0.78],
},
} as unknown as LayerSpecification;
// === Borders (contour polygon edges) — 2-tier LOD ===
@ -357,8 +326,6 @@ export function injectOceanBathymetryLayers(style: StyleSpecification, maptilerK
const toInsert = [
bathyFill,
bathyFillMedium,
bathyFillDeep,
bathyBordersMajor,
bathyBorders,
bathyLinesCoarse,