Skip to content
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

Fix camera centering #3582

Merged
merged 6 commits into from Feb 2, 2024
Merged

Fix camera centering #3582

merged 6 commits into from Feb 2, 2024

Conversation

ffreyer
Copy link
Collaborator

@ffreyer ffreyer commented Jan 31, 2024

Description

Changes:

  • center::Bool setting no longer automatically sets itself to false if update_cam!() is called. Iirc this was supposed to avoid re-centering when adding plots after explicitly setting a camera position, but with the alt + click interaction also triggering it, it is more annoying than useful.
  • fix ctrl + click not centering the scene
  • allow ctrl + click to center the camera even if center = false. The thought here is that you can disable to hotkey if you want to avoid this.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • Added an entry in NEWS.md (for new features and breaking changes)
  • Added or changed relevant sections in the documentation
  • Added unit tests for new algorithms, conversion methods, etc.
  • Added reference image tests for new plotting functions, recipes, visual options, etc.

@MakieBot
Copy link
Collaborator

MakieBot commented Jan 31, 2024

Compile Times benchmark

Note, that these numbers may fluctuate on the CI servers, so take them with a grain of salt. All benchmark results are based on the mean time and negative percent mean faster than the base branch. Note, that GLMakie + WGLMakie run on an emulated GPU, so the runtime benchmark is much slower. Results are from running:

using_time = @ctime using Backend
# Compile time
create_time = @ctime fig = scatter(1:4; color=1:4, colormap=:turbo, markersize=20, visible=true)
display_time = @ctime Makie.colorbuffer(display(fig))
# Runtime
create_time = @benchmark fig = scatter(1:4; color=1:4, colormap=:turbo, markersize=20, visible=true)
display_time = @benchmark Makie.colorbuffer(fig)
using create display create display
GLMakie 3.65s (3.56, 3.73) 0.05+- 423.31ms (410.00, 433.40) 9.21+- 505.96ms (473.04, 542.85) 20.63+- 7.74ms (7.49, 7.97) 0.16+- 26.30ms (26.01, 26.43) 0.14+-
master 3.62s (3.54, 3.70) 0.06+- 371.99ms (331.21, 424.92) 43.66+- 502.10ms (482.72, 518.35) 12.33+- 7.79ms (7.64, 8.17) 0.19+- 26.09ms (25.90, 26.26) 0.14+-
evaluation 0.99x invariant, 0.03s (0.56d, 0.32p, 0.06std) 0.88x slower❌, 51.32ms (1.63d, 0.02p, 26.43std) 0.99x invariant, 3.86ms (0.23d, 0.68p, 16.48std) 1.01x invariant, -0.05ms (-0.31d, 0.57p, 0.17std) 0.99x slower X, 0.21ms (1.52d, 0.01p, 0.14std)
CairoMakie 3.10s (3.07, 3.11) 0.01+- 324.16ms (317.73, 331.81) 5.12+- 141.10ms (138.78, 144.02) 1.92+- 7.31ms (7.24, 7.39) 0.05+- 619.45μs (613.35, 626.16) 4.98+-
master 3.07s (3.05, 3.10) 0.02+- 323.16ms (316.66, 331.02) 4.28+- 141.73ms (139.57, 145.93) 2.13+- 7.29ms (7.23, 7.39) 0.05+- 607.57μs (604.08, 612.99) 3.12+-
evaluation 0.99x slower X, 0.03s (1.68d, 0.01p, 0.02std) 1.00x invariant, 1.0ms (0.21d, 0.70p, 4.70std) 1.00x invariant, -0.63ms (-0.31d, 0.57p, 2.02std) 1.00x invariant, 0.02ms (0.38d, 0.49p, 0.05std) 0.98x slower X, 11.89μs (2.86d, 0.00p, 4.05std)
WGLMakie 3.79s (3.69, 3.97) 0.12+- 332.96ms (319.17, 357.33) 16.64+- 9.11s (8.83, 9.46) 0.30+- 9.42ms (9.05, 9.70) 0.26+- 72.96ms (68.17, 80.96) 5.56+-
master 3.84s (3.71, 3.95) 0.10+- 331.26ms (319.97, 349.45) 12.13+- 9.12s (8.85, 9.45) 0.29+- 9.59ms (9.10, 10.02) 0.39+- 73.35ms (68.42, 77.54) 3.77+-
evaluation 1.01x invariant, -0.05s (-0.42d, 0.44p, 0.11std) 0.99x invariant, 1.7ms (0.12d, 0.83p, 14.38std) 1.00x invariant, -0.02s (-0.05d, 0.92p, 0.29std) 1.02x invariant, -0.16ms (-0.49d, 0.38p, 0.32std) 1.01x invariant, -0.39ms (-0.08d, 0.88p, 4.66std)

@ffreyer ffreyer marked this pull request as ready for review February 1, 2024 10:15
@jkrumbiegel jkrumbiegel merged commit f424488 into master Feb 2, 2024
13 of 14 checks passed
@jkrumbiegel jkrumbiegel deleted the ff/camera branch February 2, 2024 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants