-
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
Geometry and Appearances #911
Conversation
Must be indented with a multiple of 4 spaces to be rendered correctly.
Conflicts: Source/Core/PolygonGeometry.js
Finish WallGeometry
Polygon geometry
* @alias Primitive | ||
* @constructor | ||
* | ||
* @param {Array} [options.geometryInstances=undefined] The geometry instances - or a single geometry instance - to render. |
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.
Get rid of - or a single geometry instance -
, This function has to take an array and it makes it sound like it can take a GeometryInstance
object as well as an array.
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.
It can take a single GeometryInstance
object as well as an array.
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.
Okay, then change {Array}
to {Array | GeometryInstance}
since that's how we normally document parameters that can be multiple things.
Okay, I'm done my review. That was exhausting. 😉 I didn't look at the Specs too closely, but coverage looks good and we'll add additional specs to verify any future bugs we find. Let me know when you are done with all your changes and I can do final tests/confirmation before merging. Overall, this is awesome. Obviously there's going to be a lot of work to be done to leverage this at the higher-level (DynamicScene/CZML/GeoJSON/etc...) but this is a huge step to making Cesium even more awesome. Thanks guys. |
@mramato This is ready for another review. |
Does anyone else want to take a look at this? If I don't hear anything, or find any issues in the next 15 minutes or so, I think we're ready. |
Conflicts: CHANGES.md
Sandcastle example screenshot:
For context, read the draft tutorials. From the tutorials:
Also see the roadmap for an intro (slightly outdated) and future work.
From CHANGES.md:
CubeMapEllipsoidTessellator
withEllipsoidGeometry
.BoxTessellator
withBoxGeometry
.ExtentTessletaor
withExtentGeometry
.PlaneTessellator
. It was incomplete and not used.MeshFilters
toGeometryPipeline
.MeshFilters.toWireframeInPlace
toGeometryPipeline.toWireframe
.MeshFilters.mapAttributeIndices
. It was not used.Context.createVertexArrayFromMesh
toContext.createVertexArrayFromGeometry
. Likewise, renamedmesh
constructor property togeometry
.ComponentDatatype.*.toTypedArray
toComponentDatatype.*.createTypedArray
.Polygon.configureExtent
. UseExtentPrimitive
instead.Polygon.bufferUsage
. It is no longer needed.height
andtextureRotationAngle
arguments fromPolygon
setPositions
andconfigureFromPolygonHierarchy
functions. UsePolygon
height
andtextureRotationAngle
properties.PolygonPipeline.cleanUp
toPolygonPipeline.removeDuplicates
.PolygonPipeline.wrapLongitude
. UseGeometryPipeline.wrapLongitude
instead.height
parameter toBoundingSphere.fromExtent3D
.height
parameter toExtent.subsample
.ExtentPrimitive
.Geometry
andGeometryInstance
. Added the following geometry types:PolygonGeometry
ExtentGeometry
EllipseGeometry
CircleGeometry
WallGeometry
SimplePolylineGeometry
BoxGeometry
EllipsoidGeometry
Appearance
PerInstanceColorAppearance
EllipsoidSurfaceAppearance
Primitive
, which is a generic primitive that combines geometry instances and appearances.GeometryPipeline.combine
to combine meshes for better batching.GeometryPipeline.computeNormal
to compute normals for a geometry.GeometryPipeline.computeBinormalAndTangent
to compute binormals and tangent vectors for a geometry.GeometryPipeline.wrapLongitude
to split geometry across the International Date Line.GeometryPipeline.createLineSegmentsForVectors
andcreateTangentSpaceDebugPrimitive
for debugging.PolylinePipeline.removeDuplicates
.barycentricCoordinates
to compute the barycentric coordinates of a point in a triangle.BoundingSphere.fromEllipsoid
.BoundingSphere.projectTo2D
.Extent.fromDegrees
.czm_tangentToEyeSpaceMatrix
built-in GLSL function.configureFromPolygonHierarchy
.@bagnell - with some help from @hpinkos - will do the changes needed to merge this. I'm moving on to models. There are still a few outstanding changes that will be part of this:
faceForward
, which look wrong in the Sandcastle example.Other features - like extruded polygons and extents, and performance improvements (all in the near-term section of the roadmap) - will be separate pull requests.
The draft tutorials will be finalized and published on the blog in August after b19.