@@ -460,26 +460,24 @@ Each handler:
4604602 . Applies its easing curve to progress.
4614613 . Lerps each property named in the ` properties ` bitmask from ` initial ` to
462462 ` target ` .
463- 4 . Increments the Term context 's ` animating_count ` unless progress is 1.0.
463+ 4 . Increments the current frame 's ` animating_count ` unless progress is 1.0.
4644645 . Returns ` true ` if progress is 1.0 (transition complete), ` false ` otherwise.
465465
466- At the start of each ` render() ` , the Term resets ` animating_count ` to zero. At
467- the end, the value is copied into the result struct as the ` animating ` flag
468- (` true ` if count > 0).
466+ At the start of each ` render() ` , the current frame's ` animating_count ` is reset
467+ to zero. At the end, the value is copied into the result struct as the
468+ ` animating ` flag (` true ` if count > 0).
469469
470470### 12.3 Per-Term isolation
471471
472- The ` animating_count ` lives on the Term's C-side context, not as module-level
473- state. Multiple Terms created in the same process remain isolated.
472+ The ` animating_count ` belongs to a frame owned by the Term's C-side context.
473+ Multiple Terms created in the same process remain isolated.
474474
475475### 12.4 Resolving the active Term inside the handler
476476
477477Clay's transition-handler signature does not carry a ` userData ` pointer or
478- element ID. Each ` reduce() ` call records the currently-active Term pointer in a
479- module-level variable (` ct_active_context ` ) and clears it at the end. The
480- handler reads this variable to reach the Term's ` animating_count ` . A single
481- render pass cannot overlap with another (renders are synchronous), so there is
482- no concurrency concern.
478+ element ID. The handler obtains the active Clay context through
479+ ` Clay_GetCurrentContext() ` and reads the owning Term from the context's error
480+ handler ` userData ` . It increments that Term's current frame counter.
483481
484482---
485483
0 commit comments