Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix model animation cache #2098

Merged
merged 4 commits into from
Sep 6, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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