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

Which way of deriving size is better? #43

Open
Rudxain opened this issue Mar 7, 2024 · 2 comments
Open

Which way of deriving size is better? #43

Rudxain opened this issue Mar 7, 2024 · 2 comments
Labels
question Further information is requested

Comments

@Rudxain
Copy link
Owner

Rudxain commented Mar 7, 2024

Assuming this:

// viewport
let W=width, H=height

const { min, max, hypot: diagonal } = Math

/** Geometric Mean */
const geomean = (a,b) => Math.sqrt(a * b)

Given an arbitrary relative (ratio) size, which of these values should be multiplied by it to get the final Droplet absolute font size?

[ W, H, max(W,H), min(W,H), diagonal(W,H), geomean(W,H) ]

Each of those has many pros and cons. I have no idea which is more desirable.

Actual code:

droplet_abs_size = anim.settings.droplet_rel_size * Math.min(w, h) * 2

@Rudxain Rudxain added the question Further information is requested label Mar 7, 2024
@Rudxain
Copy link
Owner Author

Rudxain commented Mar 7, 2024

Should the user be able to choose? Isn't it enough if the user already has control of rel size?

@Rudxain Rudxain changed the title Which way of deriving abs Droplet size is better? Which way of deriving size is better? Mar 7, 2024
@Rudxain
Copy link
Owner Author

Rudxain commented Jul 17, 2024

This is too complicated. I'll revert to using sizes based on browser zoom/scale/font, as that's way simpler, and gives freedom to the user while #5 is still unimplemented

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant