Back to Explore

d3/d3-interpolate

GitHub
1 updates · last 90 daysOpen source

Last release:

d3-interpolate is a JavaScript module that provides interpolation methods to blend between two values. It supports numbers, colors, strings, arrays, and deeply nested objects, which makes it useful for smooth transitions and animations.

Project status

  • The source was updated on 2026-11-03, so it has very recent activity, but the long gap since its 2021 updates means ongoing maintenance cadence is not yet clear.
  • Updates have been sparse and irregular historically, with a multi-year pause before the latest update.

AI summary generated

AI-generated from public sources. May be inaccurate. Report

Recent updates

  • v3.0.2

    v3.0.2 fixes negative durations from interpolateZoom and changes package distribution to a bundled ES module, alongside updates to the development and publishing toolchain. The implementation diff also removes substantial README documentation and changes release-related npm script behavior that the release notes do not call out.

    BreakingFeatures
  • v3.0.1

    Release v3.0.1 updates project dependencies and adjusts the build to be more reproducible. The code diff shows a dependency bump and a change to the generated UMD banner content, replacing a dynamic date-based value.

  • v3.0.0

    v3.0.0 marks a packaging shift toward ESM by setting the package to use `type: module` and requiring Node.js 12+. The repository also modernizes tooling and updates the project configuration for ESLint and CI, and the test suite is migrated away from `tape` to `mocha` with ESM-style imports.

    Breaking
  • v2.0.1

    v2.0.1 introduces new interpolation APIs and modernizes parts of the transform and zoom implementations. The release notes highlight interpolateZoom.rho, a new overload for piecewise that defaults to d3.interpolate, and switching interpolateTransformCss to DOMMatrix parsing with absolute units. The code diff also shows additional behavior changes around duration scaling and CSS transform parsing details that are not fully spelled out in the notes.

    BreakingFeatures
  • v1.4.0

    v1.4.0 adds first-class support for interpolating numeric typed arrays via a new interpolateNumberArray export, and routes typed arrays through this logic for both interpolate and interpolateArray. It also changes the underlying numeric interpolation math to ensure exact endpoint values at t=0 and t=1.

    Features
  • v1.3.3

    v1.3.3 is a packaging and module-resolution update. The code changes focus on switching internal import/export specifiers to exact file paths that include the .js extension, alongside npm metadata updates (files whitelist, sideEffects: false) and dependency bumps.

  • v1.3.2

    Release v1.3.2 contains minimal functional changes per the release notes (only “Housekeeping”). The code diff shows a refactor of the package entrypoints, build configuration updates (rollup input and externals), and a dependency bump from d3-color 1.2.2 to 1.2.3.

  • v1.3.1

    v1.3.1 is described as a dependency update, but the code diff shows more than just version bumps. It switches the package build/publish pipeline from a build/ directory to dist/, and changes what file is used as the npm entry point (package.json main).

    Breaking
  • v1.3.0

    Release v1.3.0 adds two new public interpolators, d3.interpolateDiscrete and d3.interpolateHue, and documents their purpose in README.md. The code also includes build system changes (Rollup and Terser, Yarn-based publishing) and updates existing color interpolation test expectations.

    Features
  • v1.2.0

    Release v1.2.0 primarily adds a new API, d3.piecewise, for composing multiple interpolators over adjacent value pairs. The code changes also update the README to document the new function and include a small wording tweak in an existing example description.

    Features
  • v1.1.6

    v1.1.6 is a very small release focused on optimizing d3.interpolateArray. The code change adjusts how intermediate arrays are allocated during array interpolation, with no documented API changes.