Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 0 additions & 26 deletions crates/bevy_animation/src/gltf_curves.rs
Original file line number Diff line number Diff line change
Expand Up @@ -366,32 +366,6 @@ impl<T> WideCubicKeyframeCurve<T> {
}
}

/// A curve specifying the [`MorphWeights`] for a mesh in animation. The variants are broken
/// down by interpolation mode (with the exception of `Constant`, which never interpolates).
///
/// This type is, itself, a `Curve<Vec<f32>>`; however, in order to avoid allocation, it is
/// recommended to use its implementation of the [`IterableCurve`] trait, which allows iterating
/// directly over information derived from the curve without allocating.
///
/// [`MorphWeights`]: bevy_mesh::morph::MorphWeights
#[derive(Debug, Clone, Reflect)]
#[reflect(Clone)]
pub enum WeightsCurve {
/// A curve which takes a constant value over its domain. Notably, this is how animations with
/// only a single keyframe are interpreted.
Constant(ConstantCurve<Vec<f32>>),

/// A curve which interpolates weights linearly between keyframes.
Linear(WideLinearKeyframeCurve<f32>),

/// A curve which interpolates weights between keyframes in steps.
Step(WideSteppedKeyframeCurve<f32>),

/// A curve which interpolates between keyframes by using auxiliary tangent data to join
/// adjacent keyframes with a cubic Hermite spline, which is then sampled.
CubicSpline(WideCubicKeyframeCurve<f32>),
}

//---------//
// HELPERS //
//---------//
Expand Down
4 changes: 3 additions & 1 deletion crates/bevy_gltf/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ pbr_specular_textures = ["bevy_pbr/pbr_specular_textures"]

[dependencies]
# bevy
bevy_animation = { path = "../bevy_animation", version = "0.18.0-dev", optional = true }
bevy_animation = { path = "../bevy_animation", version = "0.18.0-dev", optional = true, features = [
"bevy_mesh",
] }
bevy_app = { path = "../bevy_app", version = "0.18.0-dev" }
bevy_asset = { path = "../bevy_asset", version = "0.18.0-dev" }
bevy_color = { path = "../bevy_color", version = "0.18.0-dev" }
Expand Down