feat(view): ③ rebar view at 50% for members, ground and blinding; deeper rebar colour

On ③ the members, the ground and the blinding concrete are drawn at half opacity without depth writes, so the bars show
through. Outside ③ each part returns to its own opacity. Rebar colours are shaded to 0.8 and slightly glossier so they
read through the members. Approved 2026-10-23.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
ypshimandClaude Haiku 5.5 committed 2026-10-23 09:24:53 +09:00
1 parent e0e220f35c
commit 398fa997e2
4 files changed
+52 -3

No files matched your search

+25
View File
@@ -2,6 +2,7 @@ import { describe, expect, it } from 'vitest';
import * as THREE from 'three';
import { buildPier } from '../src/core/geometry';
import { buildRebar3D } from '../src/view/rebar3d';
import { buildPierScene, setRebarView } from '../src/view/scene';
import { DEFAULT_MATERIAL } from '../src/core/rebar/common';
import { loadP1 } from './helpers';
@@ -119,3 +120,27 @@ describe('3D 철근 모델은 ③ 공통 설정 fck를 따른다', () => {
expect(high).toBeLessThan(base - 0.05);
});
});
describe('③ 부재 반투명 (승인 2026-10-23)', () => {
const model = buildPier(loadP1());
const opacities = (scene: ReturnType<typeof buildPierScene>) => {
const out: Record<string, number[]> = {};
for (const [key, group] of Object.entries(scene.parts)) {
group.traverse((o) => {
if (o instanceof THREE.Mesh) (out[key] ??= []).push((o.material as THREE.MeshStandardMaterial).opacity);
});
}
return out;
};
it('members and the ground go to 50% on ③ and back to their own opacity off ③', () => {
const scene = buildPierScene(model);
const before = opacities(scene);
setRebarView(scene, true);
for (const key of ['coping', 'columns', 'footings', 'piles', 'blinding', 'blocks', 'pads', 'ground']) {
expect(opacities(scene)[key].every((o) => o === 0.5), key).toBe(true);
}
setRebarView(scene, false);
expect(opacities(scene)).toEqual(before);
});
});