Example
Aspose.3D アニメーションシステムは、時間サンプリングされたデータをシーンプロパティにバインドするオブジェクトの階層で構成されています。.
- Example
AnimationClip は、名前付きの再生範囲(例:「Walk」「Run」)で、…が保持する Scene. - Example
AnimationNode はクリップ内に存在し、アニメーションデータをシーンオブジェクトの特定のプロパティにバインドします。. - A
BindPoint は…を接続します AnimationNode を名前付きの Property 上の A3DObject. - Example
AnimationChannel は単一のスカラーを保持します KeyframeSequence バインドポイント内で。. - A
KeyframeSequence は…の順序付けられたリストです KeyFrame 時間–値サンプルです。.
すべてのアニメーションクラスは aspose.threed.animation サブパッケージにありますが、直接からもアクセス可能です aspose.threed.
AnimationClip
1つの再生範囲用の名前付きコンテナ。A Scene 複数のクリップを保持できます。継承元は SceneObject.
Example
| Example | Example |
|---|
AnimationClip(name=None) | オプションの名前でクリップを作成します |
Example
| Example | Example | Example |
|---|
name | str | クリップ名(例:. "Walk") |
description | str | オプションの説明 |
start | float | 開始時間(秒) |
stop | float | 終了時間(秒) |
animations | list[AnimationNode] | このクリップ内のアニメーションノードの読み取り専用リスト |
properties | PropertyCollection | カスタムプロパティ |
Example
| Example | 戻り値の型 | Example |
|---|
create_animation_node(node_name) | AnimationNode | 新しいものを作成し、登録します AnimationNode このクリップ内で |
AnimationNode
バインドします AnimationClip 1つまたは複数の BindPoint シーンオブジェクトのプロパティを対象とするオブジェクト。継承元は A3DObject.
Example
| Example | Example |
|---|
AnimationNode(name=None) | オプションの名前でアニメーションノードを作成します |
Example
| Example | Example | Example |
|---|
name | str | ノード名 |
bind_points | list[BindPoint] | バインドポイントの読み取り専用リスト |
sub_animations | list[AnimationNode] | 子アニメーションノードの読み取り専用リスト |
properties | PropertyCollection | カスタムプロパティ |
Example
| Example | 戻り値の型 | Example |
|---|
find_bind_point(target, name) | `BindPoint | None` |
get_bind_point(target, prop_name, create) | `BindPoint | None` |
create_bind_point(obj, prop_name) | `BindPoint | None` |
get_keyframe_sequence(target, prop_name, channel_name, create) | `KeyframeSequence | None` |
BindPoint
接続します AnimationNode 単一の Property 上の A3DObject.。各 BindPoint 複数保持できる AnimationChannel オブジェクト(スカラーコンポーネントごとに1つ)。継承元は A3DObject.
Example
| Example | Example | Example |
|---|
property | Property | このバインドポイントが対象とするシーンオブジェクトのプロパティ |
channels_count | int | このバインドポイントにおけるアニメーションチャンネルの数 |
Example
| Example | 戻り値の型 | Example |
|---|
add_channel(name, value, type=None) | bool | デフォルト値を持つ名前付きチャンネルを追加する |
get_channel(channel_name) | `AnimationChannel | None` |
get_keyframe_sequence(channel_name) | `KeyframeSequence | None` |
create_keyframe_sequence(name) | KeyframeSequence | 新しいものを作成する KeyframeSequence このバインドポイント用の |
bind_keyframe_sequence(channel_name, sequence) | None | 既存のものを関連付ける KeyframeSequence チャネル付き |
reset_channels() | None | すべてのチャネルを削除します |
AnimationChannel
単一のスカラーを保持します KeyframeSequence 1つのアニメーションコンポーネント用です。.
Example
| Example | Example | Example |
|---|
name | str | チャネル名(例:. "X", "Y", "Z") |
default_value | Any | キーフレームデータが存在しない場合に使用される値 |
keyframe_sequence | `KeyframeSequence | None` |
KeyframeSequence
順序付けられたリスト KeyFrame 単一スカラー チャネルのサンプル。継承元は A3DObject.
Example
| Example | Example |
|---|
KeyframeSequence(name=None) | 空のキーフレームシーケンスを作成します |
Example
| Example | Example | Example |
|---|
name | str | シーケンス名 |
key_frames | list[KeyFrame] | 時系列順のキーフレームの読み取り専用リスト |
pre_behavior | Extrapolation | 最初のキーフレームの前の動作 |
post_behavior | Extrapolation | 最後のキーフレームの後の動作 |
bind_point | `BindPoint | None` |
Example
| Example | 戻り値の型 | Example |
|---|
add(time, value, interpolation=Interpolation.LINEAR) | None | キーフレームを次の位置に追加 time (秒)で、指定された value および interpolation モード |
reset() | None | すべてのキーフレームをクリアし、前後の動作をリセットします |
KeyFrame
単一の時間‑値サンプル KeyframeSequence.
Example
KeyFrame オブジェクトは内部で作成されます KeyframeSequence.add(); 直接構築しないでください。.
Example
| Example | Example | Example |
|---|
time | float | 秒単位の時間位置 |
value | float | この時点のアニメーション値 |
interpolation | Interpolation | このキーフレームと次のキーフレームの間に適用される補間モード |
tangent_weight_mode | WeightedMode | 接線ウェイトモード(ベジェ曲線) |
step_mode | StepMode | ステップ動作(PREVIOUS_VALUE または NEXT_VALUE) |
next_in_tangent | `Vector2 | None` |
out_tangent | `Vector2 | None` |
out_weight | float | 出力接線ウェイト |
next_in_weight | float | 入力接線の重み |
tension | float | テンションパラメータ(TCBスプライン) |
continuity | float | 連続性パラメータ(TCBスプライン) |
bias | float | バイアスパラメータ(TCBスプライン) |
independent_tangent | bool | Example True, インとアウトの接線は独立しています |
flat | bool | Example True, 接線はフラットにクランプされます |
time_independent_tangent | bool | Example True, 接線方向は時間スケーリングに依存しません |
Example
連続するキーフレーム間で値がどのように補間されるかを制御します。.
| Example | Example |
|---|
CONSTANT | Example |
LINEAR | 値間の線形補間 |
BEZIER | イン/アウト接線を使用したキュービックベジェ |
B_SPLINE | 均一Bスプライン |
CARDINAL_SPLINE | カーディナルスプライン |
TCB_SPLINE | テンション–コンティニュイティ–バイアス スプライン |
Example
最初と最後のキーフレーム以降のアニメーションの挙動を制御します。.
| Example | Example |
|---|
CONSTANT | 境界値を保持 |
GRADIENT | 境界キーフレームの接線勾配で外挿する |
CYCLE | キーフレーム範囲を繰り返す(ループ) |
CYCLE_RELATIVE | 累積オフセットで繰り返す(終了値に対して相対) |
OSCILLATE | ピンポン(前後交互に繰り返す) |
Example
参照