Implement .blend asset processor (#56)
CI / build-and-test (push) Successful in 1m51s
CI / production-build (push) Successful in 12m11s

Reviewed-on: #56
Co-authored-by: Álex Román Núñez <eirexe@eirteam.moe>
This commit was merged in pull request #56.
This commit is contained in:
2026-09-24 10:47:19 +00:00
committed by EIREXE
parent 2874d496ee
commit 1ba29b817b
8 changed files with 567 additions and 13 deletions
+4 -1
View File
@@ -2,8 +2,8 @@ use super::{
BAKED_ANIMATION_FPS,
runtime::{BakedAnimationClip, BakedFighterAnimations},
};
use crate::math::fixed_transform::FixedMat4;
use crate::fighter::{animation::AnimKind, manifest::FighterManifest};
use crate::math::fixed_transform::FixedMat4;
use bevy::{
asset::{
AssetLoader, AssetPath, AsyncWriteExt, LoadContext,
@@ -51,6 +51,9 @@ impl AssetLoader for FighterBakeSourceLoader {
.map_err(|error| io::Error::other(error.to_string()))?;
let manifest: FighterManifest = ron::de::from_bytes(&manifest_bytes)
.map_err(|error| io::Error::new(io::ErrorKind::InvalidData, error))?;
// `read_asset_bytes` uses the processor's processed asset source. This
// deliberately allows `model_path` to point at a `.blend`: the blend
// processor has already converted it to a hybrid GLB by this point.
let model_bytes = load_context
.read_asset_bytes(&manifest.model_path)
.await