kinetocore 0.1.1

Pure Rust, framework-agnostic physics and multi-track timeline motion engine.
Documentation
  • Coverage
  • 100%
    99 out of 99 items documented0 out of 50 items with examples
  • Size
  • Source code size: 60.6 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.1 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 3s Average build duration of successful builds.
  • all releases: 3s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • techton7/kinetocore
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • GoCoder7

Kinetocore is a high-performance, headless motion core written in 100% pure Rust.

Designed with zero UI or windowing dependencies, kinetocore currently provides a deterministic value-first tweening foundation: interpolation contracts, easing curves, playback clocks, repeat/yoyo behavior, and pure-value set / from_to tween evaluation. It serves as the foundational mathematical engine behind Kinetoxus and is intended to remain reusable across Dioxus, graphics runtimes, and other non-UI hosts.

🧬 Biological Etymology

Named after the Kinetochore, the cellular protein disc that attaches chromosomes to spindle fibers and generates physical tension to drive chromosome segregation during cell division. Kinetocore is the underlying engine generating physical motion forces across time and space.


⚑ Core Architectural Pillars

1. Zero UI Dependencies (Headless & Deterministic)

  • Completely decoupled from any rendering framework or GUI event loop.
  • 100% deterministically testable in unit tests without window handles, display servers, or mocks.

2. Value-First Motion Core

  • Interpolate: Atomic linear interpolation contract for value types.
  • Ease: Unified enum wrapping Robert Penner easing formulas via [easer].
  • AnimClock: Headless playback timekeeper with repeat and mirrored/yoyo arithmetic.
  • Tween<T>: Pure-value tweening supporting deterministic set and from_to.

3. Target-Agnostic Numeric Interpolation

Interpolates any data type implementing the interpolation contract:

  • Scalars: f32, f64
  • Fixed arrays: [f32; 2], [f32; 3], [f32; 4]

4. Planned Later Layers

The following are intentionally not part of the current phase-1 surface yet:

  • to / from verbs requiring current-value sampling
  • target/lens abstractions for in-place host mutation
  • multi-track timelines and sequencing
  • spring physics
  • overwrite/conflict policy
  • higher-level callback orchestration

πŸ—ΊοΈ Ecosystem Role

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ kinetocore (Universal Core - Zero UI Dependency)            β”‚
β”‚ - Interpolate / Ease / AnimClock / Tween                    β”‚
β”‚ - Deterministic set + from_to evaluation                    β”‚
β”‚ - Headless value-first motion foundation                    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                               β”‚
         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
         β–Ό                     β–Ό                     β–Ό
[ kinetoxus (Dioxus) ]   [ trioxus (WGPU) ]   [ nodoxus (Graph) ]
- SignalTarget adapters   - Camera/handle motion - Layout sliding
- Dioxus motion hooks     - Buffer-facing motion - Edge pulse flows
- UI-facing ergonomics    - Non-signal targets   - FitView gliding

πŸ’» Quick Code Preview

use std::time::Duration;
use kinetocore::prelude::*;

// 1. Create a deterministic tween from A to B
let mut tween = Tween::from_to(
    [0.0f32, 0.0, 10.0],
    [15.0f32, 5.0, 25.0],
    Duration::from_secs_f32(2.0),
)
.ease(Ease::CubicOut)
.repeat(2)
.yoyo(true);

// 2. Advance time
let (value, state) = tween.step(Duration::from_millis(16));

// 3. Scrub directly if needed
let halfway = tween.seek(Duration::from_secs(1));

assert_eq!(halfway.len(), 3);
println!("{value:?} / {state:?}");

πŸ—ΊοΈ Development Milestones

  • Project Initialization: Repository scaffold, dual MIT/Apache-2.0 licenses, Release-plz CI setup.
  • M1 (Value Core Foundation): Interpolate, Ease, AnimClock, repeat/yoyo arithmetic, and deterministic set / from_to.
  • M2 (Target-Aware Tween Expansion): to, from, lazy init/current-value sampling, and target/lens abstraction.
  • M3 (Timeline & Sequence Engine): Multi-track sequencing, orchestration, and richer playback control.
  • M4 (Spring & Higher-Level Motion): Spring physics, overwrite policy, and broader motion semantics.

πŸ“œ License

Dual-licensed under either of:

at your option.