chroma.js
chroma.js copied to clipboard
Adding alpha functionality to bezier interpolation
Your implementation is wrong for 5 points, those are not the results.
Note in all cases, the alpha and not alpha tests match except the last 2 digits on the Hex values. In your pull request, the 5-point solution does not.
Also you have replaced the n-degree method with a hard-coded 4-degree one, therefore failing for anything greater than that.
See this for a proper implementation of n-degree Bezier: https://github.com/regorxxx/chroma.js/commit/48a86d2163a42c860861d9ad1aff44860a04b276