diff --git a/src/common/MaterialEditor.ts b/src/common/MaterialEditor.ts
index bd3a2ec..45a2e56 100644
--- a/src/common/MaterialEditor.ts
+++ b/src/common/MaterialEditor.ts
@@ -167,15 +167,17 @@ export class MaterialEditor
private Material: PhysicalMaterialRecord;
setMaterial(mat: PhysicalMaterialRecord)
{
- console.log("set", mat.Material);
this.Material = mat;
- this._MeshMaterial.copy(mat.Material);
+ // for (const child of this.ShowObject.children) {
+ // if (child instanceof Mesh) {
+ // child.material = mat.Material;
+ // }
+ // }
- let mtl = this._MeshMaterial;
- console.log("set2", this._MeshMaterial)
+ console.log(mat.Material);
- this.ShowMesh.material = mtl;
-
+ this._MeshMaterial.copy(mat.Material);
+ let mtl = this._MeshMaterial;
if (mtl.metalness > 0.8)
this.LoadMetalEnv().then(env =>
{
@@ -214,6 +216,7 @@ export class MaterialEditor
async Update()
{
+ console.log("copy:", this.Material.Material.metalness);
let mat = this.ShowMesh.material as MeshPhysicalMaterial;
mat.needsUpdate = true;
diff --git a/src/components/MaterialAdjuster.vue b/src/components/MaterialAdjuster.vue
index 72c916f..5d67846 100644
--- a/src/components/MaterialAdjuster.vue
+++ b/src/components/MaterialAdjuster.vue
@@ -38,25 +38,25 @@