Skip to content

Commit

Permalink
Merge pull request #6525 from AnalyticalGraphicsInc/draco-bug-fix
Browse files Browse the repository at this point in the history
Draco fix for #6523
  • Loading branch information
lilleyse authored Apr 30, 2018
2 parents 3865377 + 39f97f0 commit da683c2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ Change Log
* Fixed a bug causing Cesium 3D Tilesets to not clip properly when tiles were unloaded and reloaded. [#6484](https://github.com/AnalyticalGraphicsInc/cesium/issues/6484)
* Improved rendering of glTF models that don't contain normals with a temporary unlit shader workaround. [#6501](https://github.com/AnalyticalGraphicsInc/cesium/pull/6501)
* Fixed rendering of glTF models with emissive-only materials. [#6501](https://github.com/AnalyticalGraphicsInc/cesium/pull/6501)
* Fixed a bug in shader modification for glTF 1.0 quantized attributes and Draco quantized attributes. [#6523](https://github.com/AnalyticalGraphicsInc/cesium/pull/6523)

### 1.44 - 2018-04-02

Expand Down
8 changes: 6 additions & 2 deletions Source/Scene/ModelUtility.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,12 @@ define([
};

function replaceAllButFirstInString(string, find, replace) {
var index = string.indexOf(find);
return string.replace(new RegExp(find, 'g'), function(match, offset) {
// Limit search to strings that are not a subset of other tokens.
find += '(?!\\w)';
find = new RegExp(find, 'g');

var index = string.search(find);
return string.replace(find, function(match, offset) {
return index === offset ? match : replace;
});
}
Expand Down

0 comments on commit da683c2

Please sign in to comment.