Repository navigation
Conversation
The fork skips objects with alwaysOnTop in the depth, opaque and transparent passes and draws them after the composite. Rebuild stackgl_modules/index.js with npm run bundle-stackgl.
Points in front hide a highlighted marker inside a dense cloud. The markers of a trace with alwaysontop true draw last, over everything else, with no depth test. The default is false and changes no pixel. The markers stay pickable.
This was referenced Dec 5, 2026
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
alwaysontop: trueon ascatter3dtrace draws its markers last, over everything else, with no depth test. The default isfalseand changes no pixel. The markers stay pickable.AnnZarro, a viewer for single-cell data, motivates the change. It marks the focused cell with a ring. We will rework, split or drop any part. Related: a plotly.js issue follows. Overview: #11.
Points in front hide a highlight inside a dense cloud. On a translucent cloud, they also tint it.
With
scene.oit: 'auto'(#5, plotly#1267), translucent markers blend by depth, so the order of the traces no longer puts a highlight on top.alwaysontopgives that control back as an explicit attribute.One camera loop. On upstream
main, the markers in front cut the ring, and the cut changes with the camera. In the dense cloud, the ring has 0 visible pixels in all 72 frames. Withalwaysontop: true, the full ring shows in each frame.The two sides use
scene.oit: 'auto', and the highlight is the last trace. Withoutalwaysontop, depth decides, and the last trace no longer shows on top. The ring is cut in the sparse cloud and has 0 near-black pixels in the dense one.The depth, opaque and transparent passes skip flagged markers. The render loop then draws them after the composite, in trace order. It works with
scene.oitset to'off'or'auto'. In the spec, pixels outside the marker stay identical.Changes
scatter3d.alwaysontop(boolean, defaultfalse)scene.oitchange: feat: add scene.oit to blend translucent scatter3d markers by depth #5. The gl-plot3d fork holds the pass: settylab/gl-plot3d@4666692.Testing
scatter3d_test.jsmainNotes
Checklist
ready-for-prlabel, and it has no assignee or lists me as an assigneemainin my forkdist/package-lock.jsononly for a dependency changedraftlogs/(XXXX_add_alwaysontop.md, to rename with the PR number)