Expose PolygonOffsetRadius
attribute to render irregular polygons
#60
Labels
enhancement
New feature or request
Currently, the
Sides
sprite attribute allows the API user to render regular polygons. In addition, API users should be able to render irregular polygons.The fragment shader used for drawing already supports offset radii in the
getDistPolygon()
method. See scene-fragment-shader.tsDesign question: Should the number of radius components always be 4? Should this be configurable? Under what circumstances would a different number be beneficial?
API Proposal:
Example:
Implementation note: Consider the effect of negative values on the need to shift vertex coordinates outwards. Points further away demand extra space in the bounding box to ensure that the full shape is rendered. Make sure that both the rendering shaders and the hit test shader take this into account.
The text was updated successfully, but these errors were encountered: