-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
WebGL support for HBar VBar and HexTile glyphs #12061
Conversation
|
||
if (this.glyph.model.orientation == "pointytop") { | ||
this._angles!.set_from_scalar(0.5*Math.PI) | ||
this._widths!.set_from_scalar(this.glyph.svy[0]*2) |
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.
Widths and heights are taken from HexTileView.svx
and svy
which are calculated in _get_unscaled_vertices()
. I thought this better than recalculating the sizes here as well, although looking in the svx
and svy
arrays is not ideal.
@ianthomas23 this is great, my only comment is that rects do support rotation about their center, so perhaps the |
Added rotation |
* Add WebGL HBar and VBar glyphs * Add WebGL HexTile glyphs * Visual test changes * Include rotation in should_support_Rect test
* Fix webgl line NaN handling (#11829) * Fix webgl line nan handling * Add baseline images * Support multiple marker types in WebGL scatter (#11840) * Support multiple marker types in WebGL scatter * Update macos/windows baseline images * Changes following review * Add docs about different render order * Remove temporary webgl circle fix (#11849) * Add regression test for updating webgl line (#11884) * Add regression test for updating webgl line (issue #8346) * Update macos and windows baseline images * Unify WebGL markers and rects (#12040) * Unify markers and rects * Baseline images * Consistent code style * WebGL typescript refactor and add quad glyph (#12046) * SingleMarkerGL for rect and quad * MarkerGL inherits from BaseMarkerGL * Better class hierarchy * Test WebGL quad glyph * Separate CircleGL class * Avoid use of any * Remove code duplication * Implement WebGL marker line joins (#12055) * Line joins for markers * Use same antialiasing width for all webgl markers * Correct size hints * Baseline image changes * Marker glyph should support line join test * WebGL support for HBar VBar and HexTile glyphs (#12061) * Add WebGL HBar and VBar glyphs * Add WebGL HexTile glyphs * Visual test changes * Include rotation in should_support_Rect test * Minor WebGL line refactor (#12120) * Fix Wedge and AnnualWedge glyph hitboxes (#12071) * Fix Wedge and AnnualWedge glyph hitboxes * Hitbox tests for Wedge and AnnualWedge glyphs Co-authored-by: Michael Brown <michael@msbrown.net>
This PR adds support for WebGL rendering of
HBar
,VBar
andHexTile
glyphs.HBar
andVBar
useQuadGL
almost without any changes, so I have renamedQuadGL
toLRTBGL
as all 3GlyphView
s use the same left, right, top and bottom properties.Most of the changes to support
HexTileGL
are to change the WebGL fragment shader to support hex glyphs of varying aspect ratio rather than the fixed aspect ratio thatscatter(marker='hex', ...)
uses.I have extended the existing visual tests to include WebGL testing for those glyphs that we support so far, which includes
circle
andrect
for completeness. There are quite a few visual tests forhex_tile
and I have only altered the two that include hatch patterns as this is the easiest way to identify WebGL rendering vs canvas or SVG. Here is one of them:This work is part of the CZI round 3 extension.