mirror of
https://github.com/storytold/storyteller-bevy.git
synced 2026-10-27 08:48:14 +00:00
Simplify BVH joints representation
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use bevy::{prelude::*, utils::HashMap};
|
||||
use bevy::prelude::*;
|
||||
|
||||
mod error;
|
||||
mod loader;
|
||||
@@ -17,13 +17,14 @@ impl Plugin for BvhPlugin {
|
||||
|
||||
#[derive(Asset, TypePath, Debug)]
|
||||
pub struct Bvh {
|
||||
pub joints: Vec<Handle<BvhJoint>>,
|
||||
pub named_joints: HashMap<String, Handle<BvhJoint>>,
|
||||
pub joints: Vec<BvhJoint>,
|
||||
}
|
||||
|
||||
#[derive(Asset, TypePath, Debug, Clone)]
|
||||
pub struct BvhJoint {
|
||||
pub parent: Option<Handle<BvhJoint>>,
|
||||
pub name: String,
|
||||
/// Local transform
|
||||
pub transform: Transform,
|
||||
/// Direct children of this joint
|
||||
pub children: Vec<BvhJoint>,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user