refactor: 完善材质系统相关代码
- 修复 node-actions.ts 中 forEach 返回值 lint 警告 - 更新材质 schema 定义和渲染器 - wall-cutout.tsx 材质颜色保留修复
This commit is contained in:
@@ -3,7 +3,7 @@ import { useMemo, useRef } from 'react'
|
||||
import { float, mix, positionWorld, smoothstep } from 'three/tsl'
|
||||
import { BackSide, FrontSide, type Mesh, MeshBasicNodeMaterial } from 'three/webgpu'
|
||||
import { useNodeEvents } from '../../../hooks/use-node-events'
|
||||
import { createMaterial, DEFAULT_CEILING_MATERIAL } from '../../../lib/materials'
|
||||
import { DEFAULT_CEILING_MATERIAL } from '../../../lib/materials'
|
||||
import { NodeRenderer } from '../node-renderer'
|
||||
|
||||
const gridScale = 5
|
||||
@@ -46,7 +46,10 @@ export const CeilingRenderer = ({ node }: { node: CeilingNode }) => {
|
||||
const color = props?.color || '#999999'
|
||||
return createCeilingMaterials(color)
|
||||
}
|
||||
return { topMaterial: createCeilingMaterials().topMaterial, bottomMaterial: DEFAULT_CEILING_MATERIAL }
|
||||
return {
|
||||
topMaterial: createCeilingMaterials().topMaterial,
|
||||
bottomMaterial: DEFAULT_CEILING_MATERIAL,
|
||||
}
|
||||
}, [node.material, node.material?.preset, node.material?.properties, node.material?.texture])
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user