-
Notifications
You must be signed in to change notification settings - Fork 291
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
Border point #464
Comments
Hi @donflopez – we don't plan to add support for a |
Hi @meetar! Yep, I've seen those possibilities but, could the border be dynamic based on a feature of the data? Thank you! |
We don't have any built-in functionality which matches that description, but if you use the double-point trick then you could set the color of the background point with a function, and the effect would be to color the border based on feature properties. |
If we make a PR with this feature, would you consider to add it to tangram? |
We've actually been considering changing the points style behavior in Tangram-JS, to match the Tangram-ES behavior in ways which would allow borders to be easier to implement! Currently the default circular point shape is drawn with a custom shader, and it may be better to switch to using pre-drawn textures instead. So of course feel free to experiment, but this specific behavior is currently subject to change, and without knowing more about how you plan to modify it I can't be sure that our goals will line up.
|
Changing this to a feature request, for tracking: would like a way to add borders to points. |
the problem with pre-draw textures if that it's hard to deal with situations where you need dynamic border width (based on a attribute for example). That's a pretty typical thing in data visualization (our use case) |
Sorry, to clarify, we mean we may switch to textures that Tangram draws on the fly, according to the styling rules in the scene file. Terminology in this case, "pre-drawn" = "CPU-side / before the shader", vs. the current method which is drawn entirely within the shader :) |
Though even then your by-attribute example is a good one where this might break down. That suggests a method of having one (or a limited number) of SDF-style point textures that are dynamically re-styled in the shader may be the best option. cc @blair1618 |
Hey! We've been thinking about the way to draw points, here are our insights:
We can also check all the conditions and pre-draw all the possibilities. But this is a complex task with bad worse cases.
Using the points primitive, we can draw points on the fly and use the technique commented before of drawing two points to paint the border dynamically by attribute or directly in the shader, as we are doing here but with gl.POINTS not gl.TRIANGLE. What do you think? Thank you all! |
Hi @donflopez -- thanks, your general direction is good, here are my thoughts:
|
Released in v0.12.0! |
Hi guys,
I have not seen a way to set a border for a point (with colour and width), Is there anyway to set it up? If not, is it planned?
Thank you!
The text was updated successfully, but these errors were encountered: