TickerForest Scale Tracking and Counter-Scale Helpers (March 2026)
· 2 min read
@wonderlandlabs-pixi-ux/ticker-forest now has first-class support for scale-aware dirty tracking and counter-scale helpers.
What changed
- Added
dirtyOnScaletoTickerForestconfig. - Added
getScale(): { x, y }andgetInverseScale(): { x, y }. - Standardized dirty triggering via
makeDirty(data?: unknown)so the base class can request dirty state without assuming store-specific dirty fields. - Scale observer now only triggers dirtying when
isDirty()is currentlyfalse, and uses axis-awaredistinctUntilChanged.
dirtyOnScale options
dirtyOnScale: true enables defaults:
watchX: truewatchY: trueepsilon: 0.0001relativeToRootParent: true
You can also pass an object with:
enabledwatchXwatchYepsilonrelativeToRootParent
Why this matters
This removes repeated per-package scale observer logic and centralizes it in TickerForest.
Packages like window, grid, and resizer can now share one pattern:
- Track container scale.
- Mark dirty on meaningful scale deltas.
- Re-render once on the next ticker frame.
For UI elements that should appear visually constant under zoom (for example titlebar content or handles), use getInverseScale() in resolve().
Titlebar pattern
For titlebar rendering under zoom:
- width should follow the window width directly
- height should be multiplied by inverse
yscale - content can live in a sub-container scaled by inverse
y - mask height should use the same inverse-scaled titlebar height
This keeps the titlebar's perceived height stable while preserving alignment with the parent window.