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 model_descriptor;
13mod pose;
14// The reducer remains crate-private until its Rust shape is stabilized by the
15// format targets and wrapper parity work in later POSE-REDUCE phases.
16#[allow(dead_code)]
17pub(crate) mod reduce;
18mod runtime;
19
20pub use animation::{
21    AnimationClip, AnimationClipBuilder, BoneAnimationBinding, BoneSample, ClipFrameBounds,
22    ClipSample, InterpolationScalar, InterpolationVector3, MorphAnimationBinding, MorphKeyframe,
23    MorphSample, MorphTrack, MovableBoneKeyframe, MovableBoneTrack, PropertyAnimationBinding,
24    PropertyKeyframe,
25};
26pub use append_primitive::{AppendPrimitiveInput, AppendPrimitiveOutput, solve_append_transform};
27pub use flat_model::{
28    FlatAppendTransformInput, FlatBoneInput, FlatBoneMorphInput, FlatGroupMorphInput,
29    FlatIkLinkInput, FlatIkSolverInput, FlatModelInputError, FlatMorphInput,
30    build_append_transforms_from_flat, build_append_transforms_from_flat_iter,
31    build_bones_from_flat, build_ik_solvers_from_flat, build_ik_solvers_from_flat_iter,
32    build_morph_init_from_flat, build_morph_init_from_flat_iter,
33};
34pub use ik_primitive::{
35    IkChainDefinition, IkChainLinkDefinition, IkChainPoseInput, IkChainSolveOutput, IkChainSolver,
36};
37pub use model::{
38    AppendTransform, AppendTransformInit, BoneIndex, BoneInit, BoneMorphOffset, GroupMorphOffset,
39    IkAngleLimit, IkLink, IkLinkInit, IkSolver, IkSolverInit, LocalAxis, ModelArena,
40    ModelBuildError, MorphIndex, MorphInit, MorphOffsetSpan, VertexMorphOffset,
41    build_morph_init_from_offsets,
42};
43pub use model_descriptor::{
44    RUNTIME_MODEL_DESCRIPTOR_VERSION_V1, RuntimeAppendTransformDescriptorV1,
45    RuntimeBoneDescriptorV1, RuntimeBoneMorphOffsetDescriptorV1,
46    RuntimeGroupMorphOffsetDescriptorV1, RuntimeIkLinkDescriptorV1, RuntimeIkSolverDescriptorV1,
47    RuntimeModelDescriptorError, RuntimeModelDescriptorErrorKind, RuntimeModelDescriptorV1,
48    RuntimeMorphDescriptorV1, compile_runtime_model_descriptor_v1,
49};
50pub use pose::PoseArena;
51pub use reduce::{
52    DccCubicSegment, DccScalarSegment, DensePoseSequenceView, PoseReductionError,
53    PoseReductionReport, QuantizedBezier, ReducedBoneKey, ReducedBoneTrack, ReducedMorphKey,
54    ReducedMorphTrack, ReducedPoseSample, ReducedPoseSequence, ReductionTarget, ReductionTimings,
55    ReductionTolerances, ReductionWorkStats, SkeletonSnapshot, VmdBoneInterpolation,
56    reduce_dense_pose_sequence, reduce_dense_pose_sequence_with_worker_count,
57};
58pub use runtime::{
59    HostPoseError, HostPoseView, IkSolveOptions, IkSolverRuntimeStats, PhysicsMode,
60    PhysicsStepStats, PhysicsTickConfig, RuntimeInstance,
61};