Skip to content

Release 0.2.4

Choose a tag to compare

@kbrattli kbrattli released this 29 Jul 20:49
b56b41e

0.2.4 (2026-07-29)

Bug Fixes

  • harden 'inherit' velocity sampling and the frame-clock time axes (6768666)

Features

  • exact easing presets and a shared animation base type (6c8065a)

An adversarial review of the 0.2.3 handoff work confirmed the architecture
and found three defects in the margins, all fixed here:

  1. from + initialVelocity: 'inherit' corrupted the spring launch.
    A release seed identical to the last drag write zeroed the sample deltas
    (dead spring, Android only), and a distinct seed recorded in the same
    input batch divided sub-frame displacement by microseconds (wild
    overshoot, both platforms). Sample recording, coalescing, and the
    velocity projection now live in a shared header
    (cpp/SmoothClipVelocityTracker.h) executed verbatim by both platforms:
    identical re-records are dropped, and records closer than 4 ms merge
    into one observation so every surviving pair spans real frame time.
    Behavior note: a fast release exactly at the last drag position now
    inherits the drag velocity (iOS parity) instead of launching dead.

  2. The Android re-latch mixed clock axes. The remainder computation
    subtracted the post-anchor frame-axis start from wall time, shortening
    resumed animations by the first callback's dispatch latency. A
    wallStartedAtS twin — never rebased by the anchor — now carries the
    wall axis for bookkeeping.

  3. Post-stall run-ahead. The anchor's one-time shift bakes the first
    callback's dispatch latency into the frame axis; after a heavy stall the
    animation could lead wall time and complete early. advance() now
    re-anchors forward when frame-axis elapsed exceeds wall elapsed by more
    than one vsync — provably inert on calm frames.

ClipEasings exports the exact single-Bézier control points of the
standard polynomial easings (easeOutCubic = Easing.out(Easing.cubic),
etc.) so a parallel Reanimated content animation can run the identical
curve without hand-deriving control points. Also: README now documents the
real rejection contract (a fresh non-zero id plus one finished:false
completion; 0 with no completion only for destroyed-driver or off-main
calls), and the iOS timing/spring presentation-layer from-value is
documented as intended visual continuity.

New coverage: 6 deterministic velocity-tracker XCTests (shared-header
behavior pinned for both platforms) plus a registry integration test
asserting a bounded CASpringAnimation.initialVelocity for the fused-seed
handoff — 35 XCTests total.