-
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
Add ability to create open extruded PolygonGeometry #3879
Conversation
While working on the NYC 3D Tiles demo, I needed to create open Polygon geometry (for example, a building with a different color roof). Having a top and bottom on the polygon was inefficient and also caused z-fighting.) Also added feature to CZML and Entity API as well as tweaked Sandcastle examples to show it.
|
That's probably a good idea (I originally wanted something similar but didn't know Rectangle already had it). I was having trouble figuring out how to separate the two, since they seem to be genereated together currently. |
I can take a look at it. I think I can do it really easily. |
👍 Thanks |
Add closeTop and closeBottom to PolygonGeometry
Okay, this should be good to go. @bagnell, you should probably take a quick look at PolygonGeometry.js, everything else is pretty striaghtforward. |
|
||
it('computes positions extruded and not closeBottom', function() { | ||
var p = PolygonGeometry.createGeometry(PolygonGeometry.fromPositions({ | ||
vertexFormat : VertexFormat.POSITION_ONLY, |
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.
whitespace
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.
We should probably revert the Cesium-only tweak to the WebStorm defaults that is causing this to happen on format. So annoying.
While working on the NYC 3D Tiles demo, I needed to create open Polygon geometry (for example, a building with a different color roof). Having a top and bottom on the polygon was inefficient and also caused z-fighting.)
Also added feature to CZML and Entity API as well as tweaked Sandcastle examples to show it.
This also makes it easier for users who want to create a polygon with different top/bottonm materials, which is often asked about on the mailing list (and doesn't work with walls because of interpolation).