Skip to content

Easing: take the CSS curves from an's shared easing contract (#23) - #29

Merged
thorwhalen merged 1 commit into
mainfrom
easing-from-an-contract
Oct 14, 2026
Merged

thorwhalen merged 1 commit into
mainfrom
easing-from-an-contract

Conversation

@thorwhalen

Copy link
Copy Markdown
Collaborator

Closes #23.

burns' named easings are now the CSS entries of an's shared easing contract (an ADR 0006: consumers install the published package rather than copy files).

  • TypeScript (ts/): CSS_BEZIERS is built from @thorwhalen/an-contract's easing.json: css_hyphenated_curves (ease-in, ease-out, ease-in-out) plus css_import_aliases (CSS ease), with linear as before. The package is a devDependency and tsup inlines it (noExternal), so the published kenburnz carries just the two tables and no runtime JSON import. test/an-contract.test.ts asserts the curves and every sample value of linear and the three CSS entries.
  • Python: burns does not depend on an, so the table stays in burns/easing.py and tests/test_an_contract.py pins it, and its values, to the contract, found in an installed an or in ts/node_modules; it skips when neither is present (the Python CI job). The golden vectors tie Python to TypeScript, which checks the contract on every CI run.
  • Tolerance: the contract's CSS solver stops at |x(s) − t| < 1e-12, while burns bisects to about 2^-60, so they agree to within 1e-12 (measured: 9.9e-13 worst case); the tests allow 1e-11. The solver is unchanged, so the golden vectors are unchanged.
  • Not served: the contract's step-start/step-end (a stepped crop makes no Ken Burns move) and an's legacy and Manim curves (burns' ease stays CSS ease, exactly the contract's import alias).

Tests: Python 258 passed; TS typecheck clean, vitest 144 passed, build OK.

Review: small, low-stakes change (no auth, secrets, deploy, infra or data deletion), so no adversarial review, per the 2026-10-14 policy.

🤖 Generated with Claude Code

The TypeScript port reads its named curves from @thorwhalen/an-contract
(easing.json: css_hyphenated_curves plus the CSS 'ease' import alias),
inlined at build time so the published package has no runtime JSON import.
Tests in both languages assert burns' easings against the contract's sample
values (agreement to a few 1e-12: the contract's solver stops at 1e-12).
The Python table stays in burns (no dependency on an) and is pinned to the
contract by the test. Golden vectors unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@thorwhalen
thorwhalen merged commit 29ff63e into main Oct 14, 2026
22 checks passed
@thorwhalen
thorwhalen deleted the easing-from-an-contract branch October 14, 2026 05:34
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

Successfully merging this pull request may close these issues.

Take easing curves from an's shared easing.json contract

1 participant