修改更新
This commit is contained in:
@@ -167,10 +167,15 @@ export class MaterialEditor
|
||||
private Material: PhysicalMaterialRecord;
|
||||
setMaterial(mat: PhysicalMaterialRecord)
|
||||
{
|
||||
console.log("set", mat.Material);
|
||||
this.Material = mat;
|
||||
this._MeshMaterial.copy(mat.Material);
|
||||
|
||||
let mtl = this._MeshMaterial;
|
||||
console.log("set2", this._MeshMaterial)
|
||||
|
||||
this.ShowMesh.material = mtl;
|
||||
|
||||
if (mtl.metalness > 0.8)
|
||||
this.LoadMetalEnv().then(env =>
|
||||
{
|
||||
@@ -183,7 +188,7 @@ export class MaterialEditor
|
||||
mtl.envMap = exr;
|
||||
mtl.needsUpdate = true;
|
||||
});
|
||||
|
||||
this.ShowMesh.updateWorldMatrix(true,true)
|
||||
this.Update();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user