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 geometry offset attribute for 2D and CV #6753

Merged
merged 3 commits into from
Jun 29, 2018
Merged

Fix geometry offset attribute for 2D and CV #6753

merged 3 commits into from
Jun 29, 2018

Conversation

hpinkos
Copy link
Contributor

@hpinkos hpinkos commented Jun 28, 2018

The offset vector needs to be projected for 2D and columbus view

Also fixed the doc for OffsetGeometryInstanceAttribute

Also, partial fix for #6365. I wrapped the distance display condition 2D bounding sphere calculations in if (!frameState.scene3DOnly) so the example to longer crashes when scene3DOnly: true.

@cesium-concierge
Copy link

Signed CLA is on file.

@hpinkos, thanks for the pull request! Maintainers, we have a signed CLA from @hpinkos, so you can review this at any time.

⚠️ I noticed that CHANGES.md has not been updated. If this change updates the public API in any way, fixes a bug, or makes any non-trivial update, please add a bullet point to CHANGES.md and comment on this pull request so we know it was updated. For more info, see the Pull Request Guidelines.


I am a bot who helps you make Cesium awesome! Contributions to my configuration are welcome.

🌍 🌎 🌏

@hpinkos
Copy link
Contributor Author

hpinkos commented Jun 28, 2018

Fixed the eslint error

var offsetScratchCartesian = new Cartesian3();
function updateBatchTableOffsets(primitive, frameState) {
var hasOffset = defined(primitive._batchTableAttributeIndices.offset);
if (!hasOffset|| primitive._batchTableOffsetsUpdated || frameState.scene3DOnly) {
Copy link
Contributor

Choose a reason for hiding this comment

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

whitespace

}

var center = boundingSphere.center;
center = ellipsoid.scaleToGeodeticSurface(center, center);
Copy link
Contributor

Choose a reason for hiding this comment

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

You don't want to modify the bounding sphere right? Should this use a scratch variable?

@hpinkos
Copy link
Contributor Author

hpinkos commented Jun 28, 2018

Thanks @bagnell ! Updated

@bagnell
Copy link
Contributor

bagnell commented Jun 29, 2018

👍

@bagnell bagnell merged commit 4ddc4c6 into master Jun 29, 2018
@bagnell bagnell deleted the offset-2d branch June 29, 2018 00:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants