浏览代码

Merge pull request #8973 from outermeasure/patch-1

Fix "Uncaught ReferenceError: name is not defined"
David Catuhe 5 年之前
父节点
当前提交
15804eb5e9
共有 2 个文件被更改,包括 2 次插入1 次删除
  1. 1 0
      dist/preview release/what's new.md
  2. 1 1
      src/Bones/skeleton.ts

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

@@ -319,6 +319,7 @@
 - Fixed an issue in `DeviceSourceManager.getDeviceSources()` where null devices are returned ([Drigax](https://github.com/drigax))
 - Fix issue in glTF2 `_Exporter.createSkinsAsync()` that exported an incorrect joint indexing list ([drigax](https://github.com/drigax))
 - Fix gltf2 Morph Target export code style, add additional test case for non-animation group created morph targets ([drigax](https://github.com/drigax))
+- Fix "Uncaught ReferenceError: name is not defined" ([outermeasure](https://github.com/outermeasure))
 
 ## Breaking changes
 - `FollowCamera.target` was renamed to `FollowCamera.meshTarget` to not be in conflict with `TargetCamera.target` ([Deltakosh](https://github.com/deltakosh))

+ 1 - 1
src/Bones/skeleton.ts

@@ -416,7 +416,7 @@ export class Skeleton implements IAnimatable {
      * @returns the original skeleton
      */
     public static MakeAnimationAdditive(skeleton: Skeleton, referenceFrame = 0, range: string): Nullable<Skeleton> {
-        var rangeValue = skeleton.getAnimationRange(name);
+        var rangeValue = skeleton.getAnimationRange(range);
 
         // We can't make a range additive if it doesn't exist
         if (!rangeValue) {