Repository navigation
Conversation
…anches The scene drew its pick buffer in each frame that moved the camera. The new gl-plot3d draws the buffer when a pointer event queries it, and draws none if no object permits a pick. stackgl_modules/index.js is the webpack output of the pinned commits. The pins go away when the gl-vis pull requests merge and release.
A scatter3d trace with hoverinfo skip tells the scene that no pointer event can select it. A scene with hovermode false queries the pick buffer only on a button press and emits no hover events. A trace with more points than the 24 bits of a pick id gets no hover and no click, because its ids name other points.
This was referenced Dec 5, 2026
…before the first frame of a trace Two specs compare a run whose hover events come from the frame with a run whose events come from the pointer handler. They waited 60 ms after each pointer event, and on a slow runner the frame came later, so the frame run lost its last events. They now wait for the frame. The new spec sends a pointer event in the task in which newPlot resolves. It needs the gl-plot3d commit that draws no pick pass on demand before the frame that draws a change. The pin of that commit follows.
The pinned commit draws no pick pass on demand while a change waits for its frame, and queries no pick buffer before a pass has drawn it. Without it, a pointer event between scene.add and the next frame gave a hover label for a trace that no frame had drawn. The stackgl bundle is the webpack output for the pin.
plotly draws the first frame of a scene inside newPlot, so the event of the spec comes right after that frame, not before it. The spec text said otherwise.
The pinned commit gives a pick pass on demand 1 ms after a frame that changed the scene, as the read-back of the frame pass did. A pointer event right after the first frame of a scene finds nothing again, so a pointer that rests on a scene gets no hover label until it moves. The stackgl bundle is the webpack output for the pin.
…objects The pinned commit gives no pick pass on demand for 1 ms after the first frame that follows scene.add or scene.remove, as the read-back of the frame pass did. A pointer that rests on a scene when it appears gets no hover label until it moves, as before. The pins of the two commits before this one made the wait too wide: it also ran after each frame of a moving camera, and hover specs failed at random. The stackgl bundle is the webpack output for the pin.
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
A 3D scene draws all its objects a second time, for hover, in each frame that moves the camera. This PR draws that pick pass only when a pointer event queries it. With 2 million glyph markers, a rotation frame takes 31.2 ms against 45.2 ms on
main, with 10 draw calls against 20. The change is not opt-in.Draw calls for each rotation frame and each pointer move,
mainagainst this branch. Ten traces, 100,000 glyph markers, thus 10 calls draw the scene one time. Headless Chromium on ANGLE Metal.Nothing reads the pick buffer while a button is down. The new gl-plot3d draws the pass at the first pointer query after a change, or 120 ms after the last frame. A scene where all traces have
hoverinfo: 'skip'draws none.AnnZarro draws millions of cells with plotly.js, and found this cost.
Changes
overridesentry) to three gl-vis PRs settylab/gl-plot3d@03ca2f6 (review: settylab/gl-plot3d#3), settylab/gl-scatter3d@370d619 (review: settylab/gl-scatter3d#5), settylab/gl-select-static@4375784 (review: settylab/gl-select-static#1)stackgl_modules/index.jsfrom those pinspick: falseto gl-scatter3d forhoverinfo: 'skip'scatter3dtrace above 16,777,215 points, and log a message. Its pick ids name other points.Behavior changes:
scene.hovermode: falseemits noplotly_hoverand noplotly_unhover. A button press still givesplotly_click.hoverinfo: 'skip'Testing
gl3d_hover_clickgl3d_hover_click,gl3d_plot_interact,gl3dlayout,scatter3dmainNotes
gl3d_lodspec needs a change, because the full frame after the settle then draws no pick pass. The change is ready.mainit gets the picture of the frame before.pickMode: 'eager'.pr/allwith the typed-position branch feat: keep typed scatter3d positions flat and on the GPU #7, one run eachWe can split this PR, drop a behavior change, or add the follow-up. Thank you for your time.
Checklist
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