Skip to main content

mmd_anim_runtime/
lib.rs

1//! Renderer-independent MMD animation runtime core.
2//!
3//! The core crate intentionally has no Wasm, Unity, parser, or renderer
4//! dependencies. Wrappers pass pre-normalized model and animation IR into this
5//! crate and read contiguous output buffers back.
6
7mod animation;
8pub mod append_primitive;
9mod flat_model;
10pub mod ik_primitive;
11mod model;
12mod pose;
13// The reducer remains crate-private until its Rust shape is stabilized by the
14// format targets and wrapper parity work in later POSE-REDUCE phases.
15#[allow(dead_code)]
16pub(crate) mod reduce;
17mod runtime;
18
19pub use animation::{
20    AnimationClip, AnimationClipBuilder, BoneAnimationBinding, BoneSample, ClipFrameBounds,
21    ClipSample, InterpolationScalar, InterpolationVector3, MorphAnimationBinding, MorphKeyframe,
22    MorphSample, MorphTrack, MovableBoneKeyframe, MovableBoneTrack, PropertyAnimationBinding,
23    PropertyKeyframe,
24};
25pub use append_primitive::{AppendPrimitiveInput, AppendPrimitiveOutput, solve_append_transform};
26pub use flat_model::{
27    FlatAppendTransformInput, FlatBoneInput, FlatBoneMorphInput, FlatGroupMorphInput,
28    FlatIkLinkInput, FlatIkSolverInput, FlatModelInputError, FlatMorphInput,
29    build_append_transforms_from_flat, build_append_transforms_from_flat_iter,
30    build_bones_from_flat, build_ik_solvers_from_flat, build_ik_solvers_from_flat_iter,
31    build_morph_init_from_flat, build_morph_init_from_flat_iter,
32};
33pub use ik_primitive::{
34    IkChainDefinition, IkChainLinkDefinition, IkChainPoseInput, IkChainSolveOutput, IkChainSolver,
35};
36pub use model::{
37    AppendTransform, AppendTransformInit, BoneIndex, BoneInit, BoneMorphOffset, GroupMorphOffset,
38    IkAngleLimit, IkLink, IkLinkInit, IkSolver, IkSolverInit, LocalAxis, ModelArena,
39    ModelBuildError, MorphIndex, MorphInit, MorphOffsetSpan, VertexMorphOffset,
40};
41pub use pose::PoseArena;
42pub use reduce::{
43    DccCubicSegment, DccScalarSegment, DensePoseSequenceView, PoseReductionError,
44    PoseReductionReport, QuantizedBezier, ReducedBoneKey, ReducedBoneTrack, ReducedMorphKey,
45    ReducedMorphTrack, ReducedPoseSample, ReducedPoseSequence, ReductionTarget, ReductionTimings,
46    ReductionTolerances, ReductionWorkStats, SkeletonSnapshot, VmdBoneInterpolation,
47    reduce_dense_pose_sequence, reduce_dense_pose_sequence_with_worker_count,
48};
49pub use runtime::{
50    HostPoseError, HostPoseView, IkSolveOptions, IkSolverRuntimeStats, PhysicsMode,
51    PhysicsStepStats, PhysicsTickConfig, RuntimeInstance,
52};