-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
640 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
use cgmath::{Quaternion, Vector3}; | ||
|
||
pub struct Animation { | ||
pub name: String, | ||
pub channels: Vec<AnimationChannel>, | ||
pub duration: f32, | ||
} | ||
|
||
pub enum AnimationProperty { | ||
Translation, | ||
Rotation, | ||
Scale, | ||
// TODO: Morph target | ||
Weights, | ||
} | ||
|
||
pub struct AnimationChannel { | ||
pub target_node_index: usize, | ||
pub target_property: AnimationProperty, | ||
pub keyframes: Vec<Keyframe>, | ||
// interpolation: TODO? | ||
} | ||
|
||
#[derive(Clone)] | ||
pub struct Keyframe { | ||
pub time: f32, | ||
pub value: AnimationValue, | ||
} | ||
|
||
#[derive(Clone)] | ||
pub enum AnimationValue { | ||
Translation(Vector3<f32>), | ||
Rotation(Quaternion<f32>), | ||
Scale(Vector3<f32>), | ||
Weights(Vec<f32>), | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,6 +48,7 @@ impl OpaqueState { | |
} | ||
} | ||
|
||
pub mod animation; | ||
pub mod asset; | ||
mod frame_time; | ||
pub mod geometry; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.