AnimationController クラス
指定された範囲の値をフレーム単位で更新するアニメーションを制御します。
名前空間: FloatSoda.Animation
アセンブリ: FloatSoda.dll
public class AnimationController : IAnimation<double>, IListenable, IDisposable実装するインターフェイス
Section titled “実装するインターフェイス”IAnimation<double>, IListenable, IDisposable
継承したメンバー
Section titled “継承したメンバー”object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
再生中はVsyncからフレーム通知を受け、値または状態が変化した場合に通知を発行します。
範囲内の進行率へ適用する曲線を取得します。既定では線形に補間します。
public ICurve Curve { get; init; }プロパティの値
Section titled “プロパティの値”Duration
Section titled “Duration”Forward/Reverseの標準所要時間。
public required TimeSpan Duration { get; init; }プロパティの値
Section titled “プロパティの値”LowerBound
Section titled “LowerBound”アニメーション値の下限を取得します。既定値は0です。
public double LowerBound { get; init; }プロパティの値
Section titled “プロパティの値”Status
Section titled “Status”現在の進行状態を取得します。
public AnimationStatus Status { get; }プロパティの値
Section titled “プロパティの値”UpperBound
Section titled “UpperBound”アニメーション値の上限を取得します。既定値は1です。
public double UpperBound { get; init; }プロパティの値
Section titled “プロパティの値”現在のアニメーション値を取得します。
public double Value { get; }プロパティの値
Section titled “プロパティの値”tickの供給元。通常はState側のITickerProvider実装を渡します。
public required ITickerProvider Vsync { get; init; }プロパティの値
Section titled “プロパティの値”AnimateWith(ISimulation)
Section titled “AnimateWith(ISimulation)”任意のシミュレーション(スプリング等)で駆動します。完了時のStatusはCompletedになります。
public void AnimateWith(ISimulation simulation)パラメーター
Section titled “パラメーター”simulation ISimulation
Dispose()
Section titled “Dispose()”フレーム通知を停止し、このコントローラーが保持する通知先を解放します。
public void Dispose()Forward(double?)
Section titled “Forward(double?)”UpperBoundへ向けて再生します。fromを指定するとその値から開始します。
public void Forward(double? from = null)パラメーター
Section titled “パラメーター”from double?
Reverse(double?)
Section titled “Reverse(double?)”LowerBoundへ向けて再生します。
public void Reverse(double? from = null)パラメーター
Section titled “パラメーター”from double?
Stop()
Section titled “Stop()”再生を止めます。Valueは現在値のまま保持されます。
public void Stop()Changed
Section titled “Changed”値が変化したフレームで発火します。
public event Action? Changedイベントの型
Section titled “イベントの型”StatusChanged
Section titled “StatusChanged”Statusが遷移したときに新しい値を伴って発火します。
public event Action<AnimationStatus>? StatusChanged