-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Vector tiles polygons #4186
Vector tiles polygons #4186
Conversation
… and max heights.
…h offset annd count for each color batch.
…or more permanent color changes.
var count = batchedIndices[j / 3].count; | ||
|
||
// stencil preload command | ||
var command = commands[j]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we avoid reusing the same command
variable here for three different commands? Just name each one based on the pass.
var bv = primitive._boundingVolumes[j / 3]; | ||
|
||
// stencil preload command | ||
var command = pickCommands[j]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment.
|
||
/** | ||
* Colors the entire tile when enabled is true. The resulting color will be (polygon batch table color * color). | ||
* @private |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the class is marked private, there's no need to mark everything else private.
* Part of the {@link Cesium3DTileContent} interface. | ||
*/ | ||
Vector3DTileContent.prototype.getFeature = function(batchId) { | ||
var featuresLength = this.featuresLength; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can go inside the //>>includeStart...
attribute vec3 currentPosition; | ||
attribute vec3 previousPosition; | ||
attribute vec3 nextPosition; | ||
attribute vec2 expandAndWidth; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about spreading this and a_batchId
across the w
components of current, previous, and next?
float width = abs(expandAndWidth.y) + 0.5; | ||
bool usePrev = expandAndWidth.y < 0.0; | ||
|
||
vec4 p = u_modifiedModelView * vec4(currentPosition, 1.0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you don't do the above, still declare them as vec4
and w
will be implicitly 1.0
, which will clean this up.
Can you add more fine-grained unit tests for the batched polyline and polygon? Otherwise, how is code coverage? |
I did not run this (I will when everything is done), but that is all my comments. Mostly trivial. |
Vector tiles points
@pjcozzi This is ready for another look. I merged in to code for points on terrain and styling them like points/billboards/labels. The original branch strategy was to have branches for each of the features (polygons/polylines/points), but that was a mess. Everything is now in this branch, so I'll merge it into |
Adds vector tile support and a custom ground primitive for rendering polygons of a vector tile.
Both polygons an polylines:
Polygons:
createVertexArray
to a Web Worker.Polylines:
GROUND
pass?