Pārlūkot izejas kodu

EmberJS integration support fixes

Katrina Cruz 7 gadi atpakaļ
vecāks
revīzija
ab99176236

+ 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;
                 }
             }

+ 1 - 0
what's new.md

@@ -83,6 +83,7 @@
 - Fixed a bug with GUI Slider not working correctly when rotated ([adam](https://github.com/abow))
 - Fixed IE11 "spacebar" bug with GUI InputText ([adam](https://github.com/abow))
 - Fixed a bug where instanced meshes did not work with physics helper effects ([bobalazek](https://github.com/bobalazek))
+- Fix ember.js compatibility in ```BloomEffect``` and ```Camera``` ([kaysabelle](https://github.com/kaysabelle))
 
 ## Breaking changes