-
Notifications
You must be signed in to change notification settings - Fork 75
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 auto primitiveShape to the webgl point feature. #1031
Conversation
771e144
to
ebf95d9
Compare
7319b6b
to
3d6472f
Compare
ebf95d9
to
c3113a0
Compare
src/webgl/pointFeature.js
Outdated
@@ -222,6 +220,9 @@ var webgl_pointFeature = function (arg) { | |||
fillVal = fillFunc(item, i) ? 1.0 : 0.0; | |||
fillOpacityVal = fillOpacityFunc(item, i); | |||
fillColorVal = fillColorFunc(item, i); | |||
if (m_primitiveShapeAuto && ((fillVal && fillOpacityVal) || (strokeVal && strokeOpacityVal)) && radiusVal + (strokeVal && strokeOpacityVal ? strokeWidthVal : 0) > maxr) { |
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 line is probably too long and need to be split for consistency
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 split it to multiple lines.
c3113a0
to
66c2d60
Compare
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.
the changes looks reasonable and straightforward from the GL point of view. Just had a minor comment
caabdc9
to
0003a64
Compare
The new default primitiveShape, `auto`, uses a sprite (a webgl point) if points are smaller than the GPU's maximum point size and a triangle if any are larger. Specific primitive shapes can still be specified, as there are performance reasons for each of them and auto detection has some time cost.
The new default primitiveShape,
auto
, uses a sprite (a webgl point) if points are smaller than the GPU's maximum point size and a triangle if any are larger. Specific primitive shapes can still be specified, as there are performance reasons for each of them and auto detection has some time cost.