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
Add option to modify ρ value in d3.interpolateZoom #25
Comments
See d3.interpolateRgb.gamma for precedent. It should be a numeric constant, not a function. There should not be a getter; the method returns a new interpolator with the given rho value. I am ambivalent about whether it should automatically protect against invalid values; generally speaking I would say that’s not necessary. |
Thanks. I looked at the d3.interpolateRgb.gamma but I'm afraid it's too advanced a task for a JS n00b like me. |
No problem! I can do it soon.
|
I was also wondering if easing function could be customised similarly to |
Can you be more specific about what you are asking for? Easing functions are handled by transition.ease in D3; the suggested zoom duration is exposed by the interpolator. That leaves rho (which this issue already discussed) and a minimum zoom level parameter. So, are you asking for a minimum scale factor parameter? |
No, sorry! Somehow I thought the zoom transition algorithm uses a fixed easing that can't be modified. Still learning the ropes! |
It would be great if the ρ value responsible for the curvature of the 'flight' path in
d3.interpolateZoom
function could be modified by users, e.g.:interpolate.rho(ρ)
var i=d3.interpolateZoom.rho(.25)([ux0, uy0, w0],[ux1, uy1, w1]);
I would imagine the default ρ value would be the current √2.
It would also be good to have a value that produces linear path (e.g. ρ=0), making it a standard non-zoom interpolator.
What I'm not sure about is if the value should only be a constant or also a function, if there should be allowed min & max values, could it accept negative values and if it should be a set function or a get too?
The text was updated successfully, but these errors were encountered: