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 PolylineCollection indices arrays (#5538) #5782

Merged
merged 5 commits into from
Sep 27, 2017
Merged
Show file tree
Hide file tree
Changes from 2 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
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,4 +152,5 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to contribute to Cesiu
* [Rishabh Shah](https://github.com/rms13)
* [Rudraksha Shah](https://github.com/Rudraksha20)
* [Cody Guldner](https://github.com/burn123)
* [Florent Cayré](https://github.com/fcayre)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add yourself under the corporate CLA section?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pjcozzi done.


4 changes: 2 additions & 2 deletions Source/Scene/PolylineCollection.js
Original file line number Diff line number Diff line change
Expand Up @@ -1457,7 +1457,7 @@ define([
for ( var j = 0; j < numberOfSegments; ++j) {
var segmentLength = segments[j] - 1.0;
for ( var k = 0; k < segmentLength; ++k) {
if (indicesCount + 4 >= CesiumMath.SIXTY_FOUR_KILOBYTES - 2) {
if (indicesCount + 4 > CesiumMath.SIXTY_FOUR_KILOBYTES) {
polyline._locatorBuckets.push({
locator : bucketLocator,
count : segmentIndexCount
Expand Down Expand Up @@ -1489,7 +1489,7 @@ define([
count : segmentIndexCount
});

if (indicesCount + 4 >= CesiumMath.SIXTY_FOUR_KILOBYTES - 2) {
if (indicesCount + 4 > CesiumMath.SIXTY_FOUR_KILOBYTES) {
vertexBufferOffset.push(0);
indices = [];
totalIndices.push(indices);
Expand Down