feat(3D): 353-3 3D 등고선 주곡선 5 m 고정 · 1 m 옅게 — 평면 색 토큰 · B05 · B04 같은 재질
- 새 공용 재질 ui_template_contour3d(isMajorContour · contourMaterials) — 주곡선 = 5 m 배수(간격 무관) - 색 = --map-contour-major(진하게 0.95) · --map-contour-minor(토큰 알파 0.45 · 깊이 안 씀) - B05 3D 뷰어 · B04 3D 지형 뷰어 둘 다 옛 주황 두 색 · 간격 × 5 갈래 걷음 · B04 높이 글도 5 m 선에만 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Se7ytqbohmBQnfYpwYFnYf
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
import * as THREE from "three";
|
||||
|
||||
import { contourAssetUrl, fetchCachedJson } from "../A00_Common/b_asset_cache";
|
||||
import { contourMaterials, isMajorContour } from "@ui/ui_template_contour3d";
|
||||
|
||||
/** 화면에 띄우는 등고 라벨 상한 — 긴 등고선부터 채운다(분리 전 상수 그대로). */
|
||||
const MAX_CONTOUR_LABELS = 40;
|
||||
@@ -93,7 +94,7 @@ export async function loadContourLinesInto(
|
||||
const points = transform(c.coordinates);
|
||||
if (points.length < 2) return;
|
||||
|
||||
const isMajor = c.level % (interval * 5) === 0;
|
||||
const isMajor = isMajorContour(c.level);
|
||||
const bucket = isMajor ? majorPoints : minorPoints;
|
||||
for (let i = 0; i < points.length - 1; i++) {
|
||||
bucket.push(points[i], points[i + 1]);
|
||||
@@ -156,18 +157,15 @@ export async function loadContourLinesInto(
|
||||
ctx.setLabelsDirty(true);
|
||||
}
|
||||
|
||||
// 합쳐 둔 점들을 주곡선·보조곡선 각각 한 덩어리로 올린다.
|
||||
// 합쳐 둔 점들을 주곡선·보조곡선 각각 한 덩어리로 올린다 — 주곡선 = 5 m 고정 · 1 m 는
|
||||
// 옅게(평면 그림과 같은 색 토큰 · 353-3).
|
||||
const materials = contourMaterials();
|
||||
[
|
||||
{ points: minorPoints, color: 0xf59e0b },
|
||||
{ points: majorPoints, color: 0xd97706 },
|
||||
].forEach(({ points, color }) => {
|
||||
{ points: minorPoints, material: materials.minor },
|
||||
{ points: majorPoints, material: materials.major },
|
||||
].forEach(({ points, material }) => {
|
||||
if (points.length === 0) return;
|
||||
const geometry = new THREE.BufferGeometry().setFromPoints(points);
|
||||
const material = new THREE.LineBasicMaterial({
|
||||
color,
|
||||
transparent: true,
|
||||
opacity: 0.8,
|
||||
});
|
||||
ctx.contourGroup.add(new THREE.LineSegments(geometry, material));
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user