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

feat: allow customizing the point size's zoom scale function #178

Merged
merged 5 commits into from
Dec 11, 2024

Conversation

flekschas
Copy link
Owner

@flekschas flekschas commented Dec 10, 2024

This PR introduces a new property called size_scale_function to allow customizing the point size's zoom scale function.

Description

What was changed in this pull request?

This PR exposes regl-scatterplot's pointScaleMode (added by @abast! Thanks again 🎉 ) via scatter.size(scale_function). You can choose between

  • asinh (default)
  • linear
  • constant (a.k.a., no zoom-based scaling)

Why is it necessary?

Because it's a neat feature to have and it's already implemented in regl-scatterplot

Demo

Zoom-based scale functions in the following order:

  1. asinh
  2. linear
  3. constant
asing-linear-constant.mp4

Checklist

  • Provided a concise title as a semantic commit message (e.g. "fix: correctly handle undefined properties")
  • CHANGELOG.md updated
  • Tests added or updated
  • Documentation in API.md/README.md added or updated
  • Example(s) added or updated
  • Screenshot, gif, or video attached for visual changes

Copy link

netlify bot commented Dec 10, 2024

Deploy Preview for calm-platypus-50e85d canceled.

Name Link
🔨 Latest commit b4f6e8a
🔍 Latest deploy log https://app.netlify.com/sites/calm-platypus-50e85d/deploys/675989908c40d000085021d1

@flekschas flekschas merged commit 3498cde into main Dec 11, 2024
10 checks passed
@flekschas flekschas deleted the flekschas/point-size-scale-function branch December 11, 2024 15:38
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.

1 participant