Преглед на файлове

address nit and update what's new

fmmoret преди 7 години
родител
ревизия
357c7b7134
променени са 2 файла, в които са добавени 3 реда и са изтрити 3 реда
  1. 1 1
      dist/preview release/what's new.md
  2. 2 2
      src/Animations/babylon.animatable.ts

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

@@ -64,7 +64,7 @@
 - Added canvas toBlob polyfill in tools ([sebavan](http://www.github.com/sebavan))
 - Added canvas toBlob polyfill in tools ([sebavan](http://www.github.com/sebavan))
 - Added `RawCubeTexture` class with RGBD and mipmap support ([bghgary](http://www.github.com/bghgary))
 - Added `RawCubeTexture` class with RGBD and mipmap support ([bghgary](http://www.github.com/bghgary))
 - Added effect layer per rendering group addressing [Issue 4463](https://github.com/BabylonJS/Babylon.js/issues/4463) ([sebavan](http://www.github.com/sebavan))
 - Added effect layer per rendering group addressing [Issue 4463](https://github.com/BabylonJS/Babylon.js/issues/4463) ([sebavan](http://www.github.com/sebavan))
-- Added predicate function `targetMask` argument to `scene.beginWeightedAnimation` and `scene.beginAnimation` to allow for selective application of animations.  ([fmmoret](http://github.com/fmmoret))
+- Added predicate function `targetMask` argument to `scene.beginWeightedAnimation`,`scene.beginAnimation`, `scene.stopAnimation`, and `animatable.stop` to allow for selective application of animations.  ([fmmoret](http://github.com/fmmoret))
 
 
 ### glTF Loader
 ### glTF Loader
 
 

+ 2 - 2
src/Animations/babylon.animatable.ts

@@ -294,10 +294,10 @@
 
 
                     for (var index = runtimeAnimations.length - 1; index >= 0; index--) {
                     for (var index = runtimeAnimations.length - 1; index >= 0; index--) {
                         const runtimeAnimation = runtimeAnimations[index];
                         const runtimeAnimation = runtimeAnimations[index];
-                        if (typeof animationName === "string" && runtimeAnimation.animation.name != animationName) {
+                        if (animationName && runtimeAnimation.animation.name != animationName) {
                             continue;
                             continue;
                         }
                         }
-                        if (typeof targetMask === "function" && !targetMask(runtimeAnimation.target)) {
+                        if (targetMask && !targetMask(runtimeAnimation.target)) {
                             continue;
                             continue;
                         }
                         }