Namespace Serenity.ProceduralAnimator.Domain.Entities
Classes
ActionRuntimeState
Runtime state for a procedural action instance. Stores timing and custom data that persists across ticks.
ActivationDelta
Represents a collection of activation (on/off) changes for procedural animation. Analogous to TransformDelta but for boolean GameObject activation instead of scale.
Why TransformId: this deliberately reuses TransformId as the dictionary key rather than introducing a new value-object type. An activation target is still just a named target within this animator's world — the same identifier space transform targets already use — so a distinct id type would only duplicate TransformId's shape for no additional type safety.
Combination Semantics: Uses last-write-wins per TransformId. When combining two ActivationDeltas, entries from the other delta overwrite existing entries with the same TransformId. This is deterministic given consistent ordering.
MaterialDelta
Represents a collection of material property changes for procedural animation. Analogous to PoseDelta but for material properties instead of bone transforms.
Combination Semantics: Uses last-write-wins per MaterialId. When combining two MaterialDeltas, entries from the other delta overwrite existing entries with the same MaterialId. This is deterministic given consistent ordering.
Weight Semantics: Weight represents blend strength, not additive contribution. A weight of 0 means "no change" (original color preserved), and 1 means "full delta applied". The applier is responsible for lerping between original and delta colors based on weight.
Why Separate from PoseDelta: Material changes target renderers (visual appearance) while pose changes target transforms (skeletal animation). They have different application semantics, different Unity APIs (MaterialPropertyBlock vs Transform), and may be applied to different objects (a character's body vs. equipment materials).
PoseDelta
Represents a collection of bone offsets for procedural animation. Position offsets are additive (base + offset). Rotation offsets use quaternion multiplication (base * offset). Combination is deterministic and order-stable.
TransformDelta
Represents a collection of transform changes for procedural animation — scale, local Z rotation, and local position offset — each stored in its own independently-keyed facet. Analogous to MaterialDelta but for transform properties instead of material colors.
Facet Independence: Scale, rotation and position entries are stored in separate dictionaries, keyed by the same TransformId space. A single TransformId can carry any combination of a scale entry, a rotation entry and a position entry — including none or all three — and writing one facet never disturbs the others for that id.
Combination Semantics: Uses last-write-wins per TransformId, independently per facet. When combining two TransformDeltas, entries from the other delta overwrite existing entries with the same TransformId within the same facet. This is deterministic given consistent ordering.
Weight Semantics: Weight represents blend strength, not multiplicative contribution. A weight of 0 means "no change" (identity scale/rotation/position preserved), and 1 means "full delta applied". The WRITER (the authoring layer) is responsible for pre-blending its own value toward identity by this weight before writing the entry — see Weight/ Weight/Weight. The applier does not read or lerp by Weight.
Position is layout-hostile. Unlike scale and rotation, the position facet is not safe for a
FLEXBOX-parented HUD element: UGUI's layout rebuild runs after the animator tick and overwrites whatever
local position this facet wrote. UnityTransformApplier enforces this at the applier level
via each target's AllowPosition flag, set once at registration — see
UnityHudHostComponent.BuildAnimator, which only passes allowPositionOverride: true for a
root-level element (no ParentId).
UiColorDelta
Represents a collection of UGUI Graphic tint changes for procedural animation.
Analogous to ActivationDelta but for a UGUI Graphic's color instead of GameObject
activation.
Why TransformId: this deliberately reuses TransformId as the dictionary key, exactly as ActivationDelta's own remarks explain for activation targets — a UiColor target is still just a named target within this animator's world (a HUD element id), so a distinct id type would only duplicate TransformId's shape for no additional type safety.
Combination Semantics: Uses last-write-wins per TransformId. When combining two UiColorDeltas, entries from the other delta overwrite existing entries with the same TransformId. This is deterministic given consistent ordering.
Weight is the deliberate exception to the transform-facet convention. Every
TransformDelta facet (scale/rotation/position) has the WRITER pre-blend its own value toward
identity by weight before writing the entry, because each facet's identity (1, 0, Vector3.zero) is known
without consulting the target. A Graphic's "identity" tint is its OWN CURRENT BASE COLOR — a value only the
applier (UnityGraphicColorApplier), which actually holds the registered Graphic, ever knows.
So for UiColor the applier itself performs Color.Lerp(Base, Base * Tint, Weight) — Weight
on this entry is read and consumed by the applier, unlike its transform-facet counterparts. This mirrors
how MaterialDelta.SetColor/UnityMaterialApplier already defer weight-blending to the applier
for the same reason (a material's original color is likewise only known at the applier).
Structs
MaterialPropertyData
Data container for a single material property change. Contains the target color and blend weight.
ProceduralContext
Context passed to all procedural animation evaluation logic. Contains state reader for accessing state values and time information.
TransformPositionData
Data container for a single transform position change. Contains the local position offset and blend weight.
TransformRotationData
Data container for a single transform rotation change. Contains the target local Z rotation (degrees) and blend weight.
TransformScaleData
Data container for a single transform scale change. Contains the target scale multiplier and blend weight.
UiColorEntry
Data container for a single UGUI Graphic tint change. Contains the target tint color and blend weight.