浏览代码

pr changes

Kacey Coley 6 年之前
父节点
当前提交
099a3295f9
共有 2 个文件被更改,包括 3 次插入3 次删除
  1. 1 1
      src/Animations/babylon.animationGroup.ts
  2. 2 2
      src/babylon.scene.ts

+ 1 - 1
src/Animations/babylon.animationGroup.ts

@@ -406,7 +406,7 @@ module BABYLON {
                 var animation = Animation.Parse(targetedAnimation.animation);
                 var id = targetedAnimation.targetId;
                 if (targetedAnimation.animation.property === "influence") { // morph target animation
-                    let morphTarget = scene.getMorphTargetByID(id);
+                    let morphTarget = scene.getMorphTargetById(id);
                     if (morphTarget) {
                         animationGroup.addTargetedAnimation(animation, morphTarget);
                     }

+ 2 - 2
src/babylon.scene.ts

@@ -3957,11 +3957,11 @@ module BABYLON {
         }
 
         /**
-         * Gets a morph target using a given id (if many are found, this function will pick the last one)
+         * Gets a morph target using a given id (if many are found, this function will pick the first one)
          * @param id defines the id to search for
          * @return the found morph target or null if not found at all.
          */
-        public getMorphTargetByID(id: string): Nullable<MorphTarget> {
+        public getMorphTargetById(id: string): Nullable<MorphTarget> {
             for (let managerIndex = 0; managerIndex < this.morphTargetManagers.length; ++managerIndex) {
                 const morphTargetManager = this.morphTargetManagers[managerIndex];
                 for (let index = 0; index < morphTargetManager.numTargets; ++index) {