-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Skeleton WebGL vector support #749
Conversation
Nice example! @tschaub and I started to review this - plan is to finish the review on Monday. |
Needed because expect.js's eql does not support typed arrays.
This enables drawing of LineStrings with more than two coordinates.
@@ -12,10 +12,12 @@ goog.require('ol.css'); | |||
goog.require('ol.layer.ImageLayer'); | |||
goog.require('ol.layer.TileLayer'); | |||
goog.require('ol.layer.Vector'); | |||
goog.require('ol.layer.VectorLayer2'); |
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.
I think this pull request would be leaner without the canvas skeletons for VectorLayer2 - @tschaub and I are planning to integrate the geom2 stuff into geom and canvas in upcoming pull requests when this one is merged. But maybe I am missing something and these skeletons are needed to make things work?
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.
I agree. I had to add this because the Travis CI example integration tests are canvas only which means that I got an assertion error (effectively "no layer renderer available for this type of layer") without this.
Nice work @twpayne. It looks like the direction you are going is to favor geometry collections and not to have individual constructors for I'm also trying to imagine the parsing or building phase for feature based data. I don't think the most efficient way forward is to build things like |
I've added the comments as discussed in today's hangout. |
Regarding @tschaub's comment about |
Setting the renderer of the ten-thousand-points example to WebGL should remove the need for this stub. This is basically the same approach we took for all vector examples in master, where we set the renderer to Canvas.
|
||
it('throws an error when dimensions are inconsistent', function() { | ||
expect(function() { | ||
var lsc = ol.geom2.LineStringCollection.pack([[0, 1], [2, 3, 4]]); |
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.
Wrong argument type. Should probably be [[[0, 1], [2, 3, 4]]]
.
Removing canvas renderer stub for VectorLayer2
I've just reviewed @twpayne's commits. Nothing more to say. It looks good to me. |
Thanks for the reviews all. |
This PR adds initial skeleton support for rendering vector data with WebGL. There's an example,
ten-thousand-points
, for demonstration.Some outlines:
ol.struct.Buffer
)ol.geom2.PointCollection
andol.geom2.LineStringCollection
build on top ofol.structs.Buffer
to manage geometries whose coordinates are stored in these fixed-size flat arraysThere's still a lot missing, including: