Upgrade to Pro — share decks privately, control downloads, hide ads and more …

CustomPainterとAnimationControllerを使用したアニメーション作成

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
Avatar for takashi takashi
September 18, 2024

 CustomPainterとAnimationControllerを使用したアニメーション作成

Avatar for takashi

takashi

September 18, 2024
Tweet

More Decks by takashi

Other Decks in Programming

Transcript

  1. 目次 - 自己紹介 - GitHubリポジトリ - 完成デモ - CustomPainterとは -

    AnimationControllerとは - 実装 - 改めてデモ - おわりに
  2. CustomPainterとは - パスを描画するためのクラス - Canvas / Path / Paintを使用して、CustomPaint上に描画する -

    主要なメソッド - paint - 描画処理の実装を記述する - shouldRepaint - 再描画が必要かどうかを記述する
  3. AnimationControllerとは - アニメーションを制御するためのクラス - 時間の経過に基づいて、 valueプロパティがlowerBoundからupperBoundまでの値を取り、アニメー ションの進行度を示す - lowerBoundとupperBoundのデフォルト値は0と1 -

    主なプロパティとメソッド - vsync - 使用するTickerを設定 - Tickerとは毎フレームごとにコールバックを発生させるメカニズムで、アニメーションの 更新を提供する - forward / reverse / repeat - アニメーションを前方向 / 逆方向 / 繰り返し再生