Pārlūkot izejas kodu

let every material have it's own reflection color

Currently every Material gets the same color object as reflection color. I consider this a bug since changing the value of one color changes the colors of all materials.
tauli 6 gadi atpakaļ
vecāks
revīzija
84d297970f
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 2 2
      Viewer/src/model/viewerModel.ts

+ 2 - 2
Viewer/src/model/viewerModel.ts

@@ -557,7 +557,7 @@ export class ViewerModel implements IDisposable {
                 material.disableLighting = !this._modelConfiguration.material.directEnabled;
                 material.disableLighting = !this._modelConfiguration.material.directEnabled;
             }
             }
             if (this._configurationContainer && this._configurationContainer.reflectionColor) {
             if (this._configurationContainer && this._configurationContainer.reflectionColor) {
-                material.reflectionColor = this._configurationContainer.reflectionColor;
+                material.reflectionColor = this._configurationContainer.reflectionColor.clone();
             }
             }
         }
         }
         else if (material instanceof MultiMaterial) {
         else if (material instanceof MultiMaterial) {
@@ -762,4 +762,4 @@ export class ViewerModel implements IDisposable {
         this._animations.length = 0;
         this._animations.length = 0;
         this.rootMesh.dispose(false, true);
         this.rootMesh.dispose(false, true);
     }
     }
-}
+}