Browse Source

Step 5 few more fix

Sebastien Vandenberghe 7 years ago
parent
commit
ee2e88c8d2
2 changed files with 5 additions and 2 deletions
  1. 4 1
      src/Engine/babylon.engine.ts
  2. 1 1
      src/Tools/babylon.environmentTextureTools.ts

+ 4 - 1
src/Engine/babylon.engine.ts

@@ -1131,7 +1131,7 @@
         /**
          * Defines whether the engine has been created with the premultipliedAlpha option on or not.
          */
-        public readonly premultipliedAlpha: boolean = false;
+        public readonly premultipliedAlpha: boolean = true;
 
         /**
          * Creates a new engine
@@ -1185,6 +1185,9 @@
                 if (options.premultipliedAlpha) {
                     this.premultipliedAlpha = true;
                 }
+                else {
+                    this.premultipliedAlpha = false;
+                }
 
                 this._deterministicLockstep = options.deterministicLockstep;
                 this._lockstepMaxSteps = options.lockstepMaxSteps;

+ 1 - 1
src/Tools/babylon.environmentTextureTools.ts

@@ -146,7 +146,7 @@ module BABYLON {
 
             let engine = internalTexture.getEngine();
             if (engine && engine.premultipliedAlpha) {
-                return Promise.reject("Env texture can only be created when the engine is created with the premultipliedAlpa option.");
+                return Promise.reject("Env texture can only be created when the engine is created with the premultipliedAlpha option.");
             }
 
             let canvas = engine.getRenderingCanvas();