Skip to content

Commit

Permalink
Added list of nodes to docs, update README
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrea-c committed Dec 14, 2023
1 parent 8db9c26 commit bfb2546
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 2 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
![Crates.io](https://img.shields.io/crates/v/bevy_animation_graph) ![Crates.io](https://img.shields.io/crates/d/bevy_animation_graph)
[![CI](https://github.com/mbrea-c/bevy_animation_graph/actions/workflows/ci.yaml/badge.svg)](https://github.com/mbrea-c/bevy_animation_graph/actions/workflows/ci.yaml)

# bevy_animation_graph
# Bevy Animation Graph

## Motivation

Expand Down Expand Up @@ -55,6 +55,7 @@ This library is [available in crates.io](https://crates.io/crates/bevy_animation
```bash
cargo add bevy_animation_graph
```

or manually add the latest version to your `Cargo.toml`.

To install the latest git master, add the following to `Cargo.toml`
Expand Down
35 changes: 34 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,26 @@
//! If the animated scene spawning fails, (e.g. because the given `path_to_player` is incorrect),
//! an error will be printed and the `AnimatedSceneFailed` component will be added instead.
//!
//! ## Nodes
//!
//! The currently implemented graph nodes are:
//! - [`ClipNode`]: Plays back an animation clip.
//! - [`ChainNode`]: Chains (plays one after the other) two animation inputs.
//! - [`BlendNode`]: Blends two animation inputs linearly based on an input factor.
//! - [`FlipLRNode`]: Mirrors an animation on the X axis, based on the bones having `L` and `R`
//! suffixes to specify which side they are on.
//! - [`LoopNode`]: Loops an animation input indefinitely.
//! - [`SpeedNode`]: Adjust the playback speed of an animation input.
//! - [`GraphNode`]: Nested animation graph. The node inputs and outputs match the nested graph's
//! inputs and outputs.
//! - Parameter arithmetic:
//! - Floating point numbers (`f32`)
//! - [`AddF32`]
//! - [`SubF32`]
//! - [`MulF32`]
//! - [`DivF32`]
//! - [`ClampF32`]
//!
//! ## How does it work?
//!
//! Each node [`AnimationNode`] in an animation graph has an arbitrary number of parameter inputs
Expand Down Expand Up @@ -95,7 +115,20 @@
//!
//! [`ParamValue`]: crate::core::animation_graph::ParamValue
//! [`AnimationNode`]: prelude::AnimationNode
//! [`SpeedNode`]: prelude::SpeedNode
//!
//! [`SpeedNode`]: crate::nodes::SpeedNode
//! [`ClipNode`]: crate::nodes::ClipNode
//! [`ChainNode`]: crate::nodes::ChainNode
//! [`BlendNode`]: crate::nodes::BlendNode
//! [`FlipLRNode`]: crate::nodes::FlipLRNode
//! [`LoopNode`]: crate::nodes::LoopNode
//! [`GraphNode`]: crate::nodes::GraphNode
//! [`AddF32`]: crate::nodes::AddF32
//! [`SubF32`]: crate::nodes::SubF32
//! [`MulF32`]: crate::nodes::MulF32
//! [`DivF32`]: crate::nodes::DivF32
//! [`ClampF32`]: crate::nodes::ClampF32
//!
//! [`NodeLike`]: crate::core::animation_node::NodeLike
//! [`GraphClip`]: crate::core::animation_clip::GraphClip
//! [`AnimationClip`]: bevy::animation::AnimationClip
Expand Down

0 comments on commit bfb2546

Please sign in to comment.