Skip to content

Commit

Permalink
Merge pull request #2098 from AnalyticalGraphicsInc/cache-fix
Browse files Browse the repository at this point in the history
Fix model animation cache
  • Loading branch information
hpinkos committed Sep 6, 2014
2 parents e03a8d7 + d373259 commit bc43597
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Change Log
### 1.2 - 2014-10-01

* Eliminated imagery artifacts at some zoom levels due to Mercator reprojection.
* Fixed a bug in `Model` where the wrong animations could be used when the model was created from glTF JSON instead of
a url to a glTF file. [#2078](https://github.com/AnalyticalGraphicsInc/cesium/issues/2078)

### 1.1 - 2014-09-02

Expand Down
10 changes: 8 additions & 2 deletions Source/Scene/ModelAnimationCache.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,10 @@ define([
}
// GLTF_SPEC: Support more parameter types when glTF supports targeting materials. https://github.com/KhronosGroup/glTF/issues/142

cachedAnimationParameters[key] = values;
if (model.basePath !== '') {
// Only cache when we can create a unique id
cachedAnimationParameters[key] = values;
}
}

return values;
Expand Down Expand Up @@ -135,7 +138,10 @@ define([
// GLTF_SPEC: Support new interpolators. https://github.com/KhronosGroup/glTF/issues/156
}

cachedAnimationSplines[key] = spline;
if (model.basePath !== '') {
// Only cache when we can create a unique id
cachedAnimationSplines[key] = spline;
}
}

return spline;
Expand Down

0 comments on commit bc43597

Please sign in to comment.