Skip to content

Commit

Permalink
Add comment for fix, entry to CHANGES.md and fix formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
p-skakun authored Jan 26, 2024
1 parent 0f6993a commit 2c464ab
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
- The `EntityCollection#add` method was documented to throw a `DeveloperError` for duplicate IDs, but did throw a `RuntimeError` in this case. This is now changed to throw a `DeveloperError`. [#11776](https://github.com/CesiumGS/cesium/pull/11776)
- Parts of the documentation have been updated to resolve potential issues with the generated TypedScript definitions. [#11776](https://github.com/CesiumGS/cesium/pull/11776)
- Fixed type definition for `Camera.constrainedAxis`. [#11475](https://github.com/CesiumGS/cesium/issues/11475)
- Fixed a geometry displacement on iOS devices that was caused by NaN value in `czm_translateRelativeToEye` function. [#7100](https://github.com/CesiumGS/cesium/issues/7100)

#### @cesium/widgets

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@
vec4 czm_translateRelativeToEye(vec3 high, vec3 low)
{
vec3 highDifference = high - czm_encodedCameraPositionMCHigh;
if (length(highDifference) == 0.0) highDifference = vec3(0);
// This check handles the case when NaN values have gotten into `highDifference`.
// Such a thing could happen on devices running iOS.
if (length(highDifference) == 0.0) {
highDifference = vec3(0);
}
vec3 lowDifference = low - czm_encodedCameraPositionMCLow;

return vec4(highDifference + lowDifference, 1.0);
Expand Down

0 comments on commit 2c464ab

Please sign in to comment.