Split baked animation modules #38
@@ -1,8 +1,8 @@
|
|||||||
use super::{
|
use super::{
|
||||||
BAKED_ANIMATION_FPS,
|
BAKED_ANIMATION_FPS,
|
||||||
fixed_transform::FixedMat4,
|
|
||||||
runtime::{BakedAnimationClip, BakedFighterAnimations},
|
runtime::{BakedAnimationClip, BakedFighterAnimations},
|
||||||
};
|
};
|
||||||
|
use crate::math::fixed_transform::FixedMat4;
|
||||||
use crate::fighter::{animation::AnimKind, manifest::FighterManifest};
|
use crate::fighter::{animation::AnimKind, manifest::FighterManifest};
|
||||||
use bevy::{
|
use bevy::{
|
||||||
asset::{
|
asset::{
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
//! Deterministic, fighter-local skeletal animation samples for gameplay and rendering.
|
//! Deterministic, fighter-local skeletal animation samples for gameplay and rendering.
|
||||||
|
|
||||||
mod asset_baking;
|
mod asset_baking;
|
||||||
mod fixed_transform;
|
|
||||||
mod runtime;
|
mod runtime;
|
||||||
mod visual_binding;
|
mod visual_binding;
|
||||||
|
|
||||||
pub use asset_baking::BakedAnimationPlugin;
|
pub use asset_baking::BakedAnimationPlugin;
|
||||||
pub use fixed_transform::FixedMat4;
|
pub use crate::math::fixed_transform::FixedMat4;
|
||||||
pub use runtime::{
|
pub use runtime::{
|
||||||
BakedAnimationClip, BakedFighterAnimations, FighterBoneIndexMap, FighterBoneMatrices,
|
BakedAnimationClip, BakedFighterAnimations, FighterBoneIndexMap, FighterBoneMatrices,
|
||||||
update_fighter_bone_matrices,
|
update_fighter_bone_matrices,
|
||||||
|
|||||||
@@ -3,7 +3,8 @@ use std::collections::HashMap;
|
|||||||
use bevy::prelude::*;
|
use bevy::prelude::*;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
use super::{BAKED_ANIMATION_FPS, fixed_transform::FixedMat4};
|
use super::{BAKED_ANIMATION_FPS};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
fighter::{
|
fighter::{
|
||||||
Fighter,
|
Fighter,
|
||||||
@@ -12,6 +13,7 @@ use crate::{
|
|||||||
visual::FighterAnimations,
|
visual::FighterAnimations,
|
||||||
},
|
},
|
||||||
math::int::FGi32,
|
math::int::FGi32,
|
||||||
|
math::fixed_transform::FixedMat4
|
||||||
};
|
};
|
||||||
|
|
||||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ impl FixedMat4 {
|
|||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
pub(super) fn from_mat4(matrix: Mat4) -> io::Result<Self> {
|
pub fn from_mat4(matrix: Mat4) -> io::Result<Self> {
|
||||||
let values = matrix.to_cols_array();
|
let values = matrix.to_cols_array();
|
||||||
let mut cols = [[FGi32::ZERO; 4]; 4];
|
let mut cols = [[FGi32::ZERO; 4]; 4];
|
||||||
for (index, value) in values.into_iter().enumerate() {
|
for (index, value) in values.into_iter().enumerate() {
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
pub mod int;
|
pub mod int;
|
||||||
pub mod segment;
|
pub mod segment;
|
||||||
pub mod vec;
|
pub mod vec;
|
||||||
|
pub mod fixed_transform;
|
||||||
pub mod vec3;
|
pub mod vec3;
|
||||||
|
|||||||
Reference in New Issue
Block a user