Quellcode durchsuchen

Merge pull request #4068 from kaysabelle/kaysabelle/emberjsfixes

Additional EmberJS integration support fixes
sebavan vor 7 Jahren
Ursprung
Commit
8b62ea07d3

+ 1 - 0
dist/preview release/what's new.md

@@ -135,6 +135,7 @@
 - Tools.DeepCopy no longer copying getter-only elements - [#3929](https://github.com/BabylonJS/Babylon.js/issues/3929) ([RaananW](https://github.com/RaananW))
 - Reflection and refraction no longer apply a toLinear conversion twice when applying image processing as a post process - [#4060](https://github.com/BabylonJS/Babylon.js/issues/4060) ([trevordev](https://github.com/trevordev))
 - Fix ember.js compatibility in ```PostProcessRenderEffect``` ([sebavan](https://github.com/sebavan))
+- Fix ember.js compatibility in ```BloomEffect``` and ```Camera``` ([kaysabelle](https://github.com/kaysabelle))
 
 ## Breaking changes
 

+ 3 - 3
src/Cameras/babylon.camera.ts

@@ -373,9 +373,9 @@
          * @returns the first post process to be run on this camera.
          */
         public _getFirstPostProcess():Nullable<PostProcess>{
-            for(var pp in this._postProcesses){
-                if(this._postProcesses[pp] !== null){
-                    return this._postProcesses[pp];
+            for(var ppIndex = 0; ppIndex < this._postProcesses.length; ppIndex++){
+                if(this._postProcesses[ppIndex] !== null){
+                    return this._postProcesses[ppIndex];
                 }
             }
             return null;

+ 6 - 6
src/PostProcess/babylon.bloomEffect.ts

@@ -84,8 +84,8 @@ module BABYLON {
          * @param camera The camera to dispose the effect on.
          */
         public disposeEffects(camera:Camera){
-            for(var effect in this._effects){
-                this._effects[effect].dispose(camera);
+            for(var effectIndex = 0; effectIndex < this._effects.length; effectIndex++){
+                this._effects[effectIndex].dispose(camera);
             }
         }
         
@@ -93,8 +93,8 @@ module BABYLON {
          * Internal
          */
         public _updateEffects(){
-            for(var effect in this._effects){
-                this._effects[effect].updateEffect();
+            for(var effectIndex = 0; effectIndex < this._effects.length; effectIndex++){
+                this._effects[effectIndex].updateEffect();
             }
         }
 
@@ -103,8 +103,8 @@ module BABYLON {
          * @returns if all the contained post processes are ready.
          */
         public _isReady(){
-            for(var effect in this._effects){
-                if(!this._effects[effect].isReady()){
+            for(var effectIndex = 0; effectIndex < this._effects.length; effectIndex++){
+                if(!this._effects[effectIndex].isReady()){
                     return false;
                 }
             }