Animation Specifications and Preparation¶
IconAnimationSpec describes one existing icon’s destination, Duration, X/Y
curves and optional Effect. The origin comes from the desktop at preparation;
an off-screen scene supplies its own origin instead. Use one
specification per icon and keep IDs unique.
Options¶
AnimationOptions controls the session rather than a single icon:
Setting |
Purpose |
|---|---|
|
Requested engine cadence, not guaranteed displayed FPS |
|
Shell position-confirmation tolerance |
|
Reserve available destination cells during preparation |
|
Include filename artwork |
|
Include enabled badges |
|
Explicit folder-flag operations |
|
Exercise direct-placement fallback |
Artwork choices affect both plain rendering and shader inputs. Destination planning is independent of Explorer flags.
PreparedAnimation¶
prepare validates the request, resolves destinations/durations and loads
artwork and GPU resources. It is a blocking preparation step, not animation
time. It reserves access but does not display an overlay, apply before flags,
or move real icons. Read queries remain available; competing writes/sessions
return an error.
PreparedAnimation is one-shot: start it, open a timeline, or cancel it.
Cancelling/dropping an unused preparation releases resources without committing
positions. Python supports a context manager. Rust consumes the prepared value
on start/open. animate is the convenience path when no preparation boundary
is needed.
Choosing a Session¶
Need |
API |
|---|---|
One transition to completion |
|
Seek, pause and reverse repeatedly |
|
Export exact frames without desktop writes |
|
An ordinary animation’s icon set, targets, resources and effects are fixed. There is no in-flight add/remove/retarget API. Stop and wait for cleanup before preparing a different request. Only one live overlay session can run per process.
Real Desktop Effects¶
On Windows, the overlay draws icon copies while real participants are moved
behind it. On ordinary completion, the engine commits final positions and
restores visibility. StopMode.LeaveInPlace commits the current interpolated
positions; TeleportToTarget chooses the final targets. Neither means restore
origins. Save a layout explicitly or use a timeline’s restore close mode.
If an ordinary animation cannot obtain an overlay, it may warn and fall back to a direct move. An off-screen render is not a substitute for a live overlay and never enters that write/fallback path. Process termination can bypass cleanup; do not force-kill live demos.