//! Low-level math and runtime primitives.
//!
//! Most applications interact with these types through [`crate::runtime`] and
//! [`crate::render`]. They are public so custom loaders, renderers, and tests can
//! reuse Mocari's interpolation, color blending, physics, and matrix helpers.

mod art_mesh;
mod blend;
mod deformers;
mod ids;
mod interpolation;
mod keyforms;
mod math;
mod parameters;
mod physics;
mod update_order;

pub use art_mesh::{
    affect_art_mesh_pair, apply_art_mesh_blend_shape_delta, apply_parent_part_opacity,
    draw_order_from_raw, reverse_coordinate_y,
};
pub use blend::{
    BlendSlot, Rgb, blend_scalar_slots, blend_scalar_slots_clamped, multiply_rgb, screen_rgb,
};
pub use deformers::{
    DeformerTransform, WarpInterpolation, rotation_deformer_transform_point,
    transform_art_mesh_vertices_by_deformers, warp_deformer_transform_inside,
    warp_deformer_transform_target,
};
pub use ids::{DrawableId, Id, ParameterId, PartId};
pub use interpolation::{
    ArrayInterpolationGroup, InterpolationGroup, InterpolationOutput, interpolate_float32,
    interpolate_float32_array, interpolate_float32_array_grouped, interpolate_float32_grouped,
    interpolate_int32,
};
pub use keyforms::{
    KeyformAxis, KeyformAxisInterval, KeyformRuntimeSlot, compute_keyform_axis_interval,
    expand_keyform_runtime_slots,
};
pub use math::{
    Matrix44, ModelMatrix, Vector2, degrees_to_radian, direction_to_radian, radian_to_degrees,
    radian_to_direction,
};
pub use parameters::{clamp_parameter_value, core_repeat_fold, parameter_dirty};
pub use physics::{
    PhysicsInputAccumulator, PhysicsParticle, PhysicsRange, normalize_physics_parameter,
    parent_gravity_for_physics_output, physics_output_angle_with_parent_gravity,
    physics_output_translation_x, physics_output_translation_y, stabilize_physics_particles,
    update_physics_particles,
};
pub use update_order::{
    ModelUpdateStep, semantic_model_update_order, should_affect_glues, should_blend_glues,
    should_run_offscreen_stage,
};
