Skip to content

Commit 6583297

Browse files
author
shijiashuai
committed
refactor: 共享 goldMat 替换剩余内联金色材质 + 导出 MeshHelpers
1 parent 2c763b3 commit 6583297

3 files changed

Lines changed: 33 additions & 26 deletions

File tree

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Workflow 深度标准化
2+
3+
日期:2026-03-10
4+
5+
## 变更内容
6+
7+
- CI workflow 统一 `permissions: contents: read``concurrency` 配置
8+
- Pages workflow 补充 `actions/configure-pages@v5` 步骤
9+
- Pages workflow 添加 `paths` 触发过滤,减少无效构建
10+
11+
## 背景
12+
13+
全仓库第二轮 GitHub Actions 深度标准化:统一命名、权限、并发、路径过滤与缓存策略。

src/components/viewer/CyberAvatarModel.tsx

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -898,13 +898,7 @@ export default function CyberAvatarModel({ refs }: Props) {
898898
{/* 手链 */}
899899
<mesh position={[0, -0.62, 0]} rotation={[Math.PI / 2, 0, 0]}>
900900
<torusGeometry args={[0.044, 0.004, 6, 16]} />
901-
<meshPhysicalMaterial
902-
color="#e8b84b"
903-
metalness={0.85}
904-
roughness={0.15}
905-
clearcoat={0.9}
906-
envMapIntensity={2.0}
907-
/>
901+
{goldMat}
908902
</mesh>
909903
{/* 手掌 */}
910904
<mesh position={[0, -0.7, 0]} scale={[0.9, 0.6, 0.55]}>
@@ -949,13 +943,7 @@ export default function CyberAvatarModel({ refs }: Props) {
949943
{/* 手链 */}
950944
<mesh position={[0, -0.62, 0]} rotation={[Math.PI / 2, 0, 0]}>
951945
<torusGeometry args={[0.044, 0.004, 6, 16]} />
952-
<meshPhysicalMaterial
953-
color="#e8b84b"
954-
metalness={0.85}
955-
roughness={0.15}
956-
clearcoat={0.9}
957-
envMapIntensity={2.0}
958-
/>
946+
{goldMat}
959947
</mesh>
960948
{/* 手掌 */}
961949
<mesh position={[0, -0.7, 0]} scale={[0.9, 0.6, 0.55]}>
@@ -1049,11 +1037,11 @@ export default function CyberAvatarModel({ refs }: Props) {
10491037
{/* 鞋口金色装饰线 */}
10501038
<mesh position={[0.15, -2.53, 0.03]} rotation={[Math.PI / 2, 0, 0]}>
10511039
<torusGeometry args={[0.072, 0.003, 4, 12]} />
1052-
<meshPhysicalMaterial color="#e8b84b" metalness={0.8} roughness={0.2} />
1040+
{goldMat}
10531041
</mesh>
10541042
<mesh position={[-0.15, -2.53, 0.03]} rotation={[Math.PI / 2, 0, 0]}>
10551043
<torusGeometry args={[0.072, 0.003, 4, 12]} />
1056-
<meshPhysicalMaterial color="#e8b84b" metalness={0.8} roughness={0.2} />
1044+
{goldMat}
10571045
</mesh>
10581046
{/* 鞋扣 */}
10591047
<mesh position={[0.15, -2.55, 0.1]}>

src/components/viewer/index.ts

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
// viewer/ barrel export
2-
export { default as DigitalHumanViewer } from './DigitalHumanViewer';
3-
export { default as CyberAvatar } from './CyberAvatar';
4-
export { default as VRMAvatar } from './VRMAvatar';
5-
export { default as AvatarSwitch } from './AvatarSwitch';
6-
export { default as Scene } from './Scene';
7-
export { default as FPSMonitor } from './FPSMonitor';
8-
export { default as VisibilityOptimizer } from './VisibilityOptimizer';
9-
export { useMousePosition } from './useMousePosition';
10-
export * from './materials';
11-
export * from './animation-config';
2+
export { default as DigitalHumanViewer } from "./DigitalHumanViewer";
3+
export { default as CyberAvatar } from "./CyberAvatar";
4+
export { default as VRMAvatar } from "./VRMAvatar";
5+
export { default as AvatarSwitch } from "./AvatarSwitch";
6+
export { default as Scene } from "./Scene";
7+
export { default as FPSMonitor } from "./FPSMonitor";
8+
export { default as VisibilityOptimizer } from "./VisibilityOptimizer";
9+
export { useMousePosition } from "./useMousePosition";
10+
export * from "./materials";
11+
export * from "./animation-config";
12+
export {
13+
SymmetricPair,
14+
SymmetricRefPair,
15+
RadialArray,
16+
Deco,
17+
} from "./MeshHelpers";

0 commit comments

Comments
 (0)