You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add animation support: time-driven value changes (easing/tweens) that update element fields each frame and mark the affected subtree dirty, integrating with the reactive + dirty machinery introduced with reactive scopes.
Motivation
Reactive scopes rebuild a subtree when an input changes. Animations are the continuous counterpart: a value interpolates over time (position, color, opacity, size), updating element fields every frame for some duration and marking those elements dirty so they re-layout/re-render.
Sketch / open questions
Granularity: per-field animators (animate a single field_accessor-addressed field) vs an "animation scope" that re-runs a builder each frame. Per-field is likely lighter and composes with the existing field_path accessors.
Clock / delta-time source: the harness already supplies per-frame dt to demos via the FynixDemo::update(world, dt) hook (examples/vello_winit_examples). A core clock/Time resource is probably needed so the framework can drive animators without demo plumbing.
Summary
Add animation support: time-driven value changes (easing/tweens) that update element fields each frame and mark the affected subtree dirty, integrating with the reactive + dirty machinery introduced with reactive scopes.
Motivation
Reactive scopes rebuild a subtree when an input changes. Animations are the continuous counterpart: a value interpolates over time (position, color, opacity, size), updating element fields every frame for some duration and marking those elements dirty so they re-layout/re-render.
Sketch / open questions
field_accessor-addressed field) vs an "animation scope" that re-runs a builder each frame. Per-field is likely lighter and composes with the existingfield_pathaccessors.dtto demos via theFynixDemo::update(world, dt)hook (examples/vello_winit_examples). A core clock/Timeresource is probably needed so the framework can drive animators without demo plumbing.Elements::mark_dirtyon the animated element so it re-layouts/renders; this depends on proper dirty propagation (see Track element depth for depth-ordered scope updates and layout #38).Related
Elements::dirty_elements/mark_dirty(crates/fynix/src/element/storage.rs)FynixCtx::reactive,Fynix::update_scopes