Repository navigation
Conversation
The outline of a glyph marker draws only when lineWidth is above 0, but gl-scatter3d built its vertices for every point. Count and fill them only when lineWidth is above 0. A circle marker drops from 104 to 60 vertices.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This change cuts a
scatter3dcircle marker from 104 vertices to 60 when the marker has no outline. It is not opt-in, and the pixels stay the same.Vertices per circle marker before and after. The outline draws only when
marker.line.widthis above 0.Each glyph marker has a fill mesh and an outline. The outline draws only for
marker.line.widthabove 0, but plotly.js built its vertices for every point. The fix counts and fills them only when the width is above 0. At 100k circle markers it saves 4.4 million vertices, which is 176 MB of vertex buffer data.The same two lines also apply to
markers+textlabels. Seven scenes render the same pixels asmainat pixel ratios 1 and 2, and hover ids match.AnnZarro, an AnnData viewer from the Setty lab (https://github.com/settylab/annzarro), draws millions of single cells as 3D markers. This is where the limit showed up. I am glad to rework, split or drop any part.
Closes #
Changes
gl-scatter3dcounts and fills outline vertices only whenlineWidthis above 0. The change is a fork commit thatstackgl_modules/package.jsonpins, andstackgl_modules/index.jsis rebuilt from it, as in 58d0503.scatter3d_test.jsfor the vertex counts withmarker.line.width0, 2 and 0 againdraftlogs/XXXX_fix.mdTesting
scatter3d,gl3d_hover_click,gl3d_plot_interact,gl3dlayout. Two hover specs ofgl3d_hover_clickfail onmainand on this branch in a headless Chrome run.npm run lintandnpm run test-syntaxpassNotes
gl-vis/gl-scatter3dfirst, and a version bump here can replace the pin (the gl-vis pull request follows)mainand 4,821,352 bytes on this branchChecklist
ready-for-prlabel, and it has no assignee or lists me as an assigneemainin my forkdist/package-lock.jsononly for a dependency changedraftlogs/as draftlogs/README.md describes, or I will add one after the pull request opens