-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf(core): stretch certain marks instead of redraw (#1018)
* feat: stretchable marks * feat: stretchGraphics option * feat: stretchGraphicsThreshold Co-authored-by: Sehi L'Yi <[email protected]> * feat: add stretchGraphicsThreshold to schema * fix: check all resolved tracks stretchable * chore: make first render more clear * chore(editor): add a demo for comparing rendering approaches (#1023) * chore: add a demo for perf comparison * chore: add a demo thumbnail --------- Co-authored-by: sehilyi <[email protected]> * fix: make alignment example wider * chore: linting * chore: cleanup * fix: update schema * feat: add title * fix: no stretching when mouse interactions --------- Co-authored-by: Sehi L'Yi <[email protected]> Co-authored-by: sehilyi <[email protected]>
- Loading branch information
1 parent
ca315b1
commit 0b405ba
Showing
8 changed files
with
277 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import type { GoslingSpec } from '@gosling-lang/gosling-schema'; | ||
import { alignmentWithText } from './responsive-alignment'; | ||
|
||
const commonProps = { width: 800, height: 400, xAxis: false, rowLegend: false, colorLegend: false }; | ||
export const EX_SPEC_PERF_ALIGNMENT: GoslingSpec = { | ||
zoomLimits: [1, 396], | ||
xDomain: { interval: [350, 396] }, | ||
assembly: 'unknown', | ||
title: 'Smoother Zoom', | ||
subtitle: 'Rather than redrawing every element at every frame, we can scale existing elements', | ||
views: [ | ||
{ | ||
tracks: [ | ||
{ | ||
...alignmentWithText(commonProps), | ||
title: 'New Approach: Stretching Tiles', | ||
experimental: { stretchGraphics: true } | ||
} | ||
] | ||
}, | ||
{ | ||
tracks: [ | ||
{ | ||
...alignmentWithText(commonProps), | ||
title: 'Original Approach' | ||
} | ||
] | ||
} | ||
] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters