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

3.0 API #14

Open
dy opened this issue Jul 17, 2017 · 1 comment
Open

3.0 API #14

dy opened this issue Jul 17, 2017 · 1 comment

Comments

@dy
Copy link
Collaborator

dy commented Jul 17, 2017

@bpostlethwaite I am thinking about redesigning the API so that it looks like:

var colormap = require('colormap')

var jet = colormap('jet') //or cmap(options)
var colors = jet(72) //generate number of shades

That would allow for easier to remember API, less options and higher performance.
Also I am thinking on reducing the size, as it is addressed in #13. Due to clone dependency we include Buffer polyfill, which adds 70kb of completely useless code here.

What do you think about such major change?

Among other improvements, it is possible to optionally enable smoothstep, for enhanced color interpolation (as it is done in glsl-colormap).

@bpostlethwaite
Copy link
Owner

Love it!

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

No branches or pull requests

2 participants