Skip to content

Motion クラス

ydicoder edited this page Nov 4, 2024 · 4 revisions

XDUT Motion の起点となるクラスです。


目次

メソッド


メソッド

Motion は以下のメソッドを公開します。


spring

(object: Node, property_name: String, cancel: Cancel = null) -> SpringMotionExpression static

プロパティに対しバネ (減衰振動) アニメーションをスケジュールします。


spring_method

(object: Node, method_name: String, cancel: Cancel = null) -> SpringMotionExpression static

メソッドに対しバネ (減衰振動) アニメーションをスケジュールします。

Tip

メソッドは以下のシグネチャに一致している必要があります。

  • (progress: float) -> void

glide

(object: Node, property_name: String, cancel: Cancel = null) -> GlideMotionExpression static

プロパティに対し滑走 (指数関数減衰) アニメーションをスケジュールします。


glide_method

(object: Node, method_name: String, cancel: Cancel = null) -> GlideMotionExpression static

メソッドに対し滑走 (指数関数減衰) アニメーションをスケジュールします。

Tip

メソッドは以下のシグネチャに一致している必要があります。

  • (progress: float) -> void

tween

(object: Node, property_name: String, cancel: Cancel = null) -> TweenMotionExpression static

プロパティに対し Tween アニメーションをスケジュールします。

Important

Tween アニメーションは加速度を持ちますが直前の速度を考慮しません。


tween_method

(object: Node, method_name: String, cancel: Cancel = null) -> TweenMotionExpression static

メソッドに対し Tween アニメーションをスケジュールします。

Important

Tween アニメーションは加速度を持ちますが直前の速度を考慮しません。

Tip

メソッドは以下のシグネチャに一致している必要があります。

  • (progress: float) -> void

cancel

(object: Node, property_name: String, cancel: Cancel = null) -> CancelMotionExpression static

プロパティに対しアクティブになっているアニメーションをキャンセルします。


cancel_method

(object: Node, method_name: String, cancel: Cancel = null) -> CancelMotionExpression static

メソッドに対しアクティブになっているアニメーションをキャンセルします。

Tip

メソッドは以下のシグネチャに一致している必要があります。

  • (progress: float) -> void