更新编辑模型,添加材质名支持
This commit is contained in:
@@ -168,14 +168,7 @@ export class MaterialEditor
|
||||
setMaterial(mat: PhysicalMaterialRecord)
|
||||
{
|
||||
this.Material = mat;
|
||||
// for (const child of this.ShowObject.children) {
|
||||
// if (child instanceof Mesh) {
|
||||
// child.material = mat.Material;
|
||||
// }
|
||||
// }
|
||||
|
||||
console.log(mat.Material);
|
||||
|
||||
this._MeshMaterial.copy(mat.Material);
|
||||
let mtl = this._MeshMaterial;
|
||||
if (mtl.metalness > 0.8)
|
||||
@@ -216,7 +209,6 @@ export class MaterialEditor
|
||||
|
||||
async Update()
|
||||
{
|
||||
console.log("copy:", this.Material.Material.metalness);
|
||||
let mat = this.ShowMesh.material as MeshPhysicalMaterial;
|
||||
mat.needsUpdate = true;
|
||||
|
||||
|
Reference in New Issue
Block a user