Download node_modules/d3-interpolate/src/basisClosed.js from NKessler/Horizon: direct link, hf CLI and curl.
- Browser
- Download file 363 Bytes
-
https://huggingface.co/NKessler/Horizon/resolve/main/node_modules/d3-interpolate/src/basisClosed.js
- Command line
-
hf download hf://NKessler/Horizon/node_modules/d3-interpolate/src/basisClosed.js
-
curl -L -o basisClosed.js https://huggingface.co/NKessler/Horizon/resolve/main/node_modules/d3-interpolate/src/basisClosed.js
363 Bytes
| import {basis} from "./basis.js"; | |
| export default function(values) { | |
| var n = values.length; | |
| return function(t) { | |
| var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n), | |
| v0 = values[(i + n - 1) % n], | |
| v1 = values[i % n], | |
| v2 = values[(i + 1) % n], | |
| v3 = values[(i + 2) % n]; | |
| return basis((t - i / n) * n, v0, v1, v2, v3); | |
| }; | |
| } | |