virtualizer-adapter 0.4.0

Adapter utilities for the virtualizer crate.
Documentation

virtualizer-adapter

CI crates.io docs.rs MSRV License

Adapter utilities for the virtualizer crate (workspace sibling).

This crate is intentionally framework-neutral and does not hold any UI objects. It provides small, common building blocks for adapters:

  • Scroll anchoring for prepend workflows (chat/timelines) without visual jumps
  • Tween helpers and a simple controller pattern for smooth scrolling (adapter-driven)

This crate is part of the virtualizer workspace repository.

Usage

use virtualizer_adapter::{Controller, Easing};

let mut c = Controller::new(virtualizer::VirtualizerOptions::new(10_000, |_| 1));
c.virtualizer_mut().set_viewport_size(20);

// Start an adapter-driven tween to an index.
c.start_tween_to_index(500, virtualizer::Align::Start, 0, 250, Easing::SmoothStep);

// In your frame loop:
let _ = c.tick(16);

Examples

  • Prepend anchoring: cargo run -p virtualizer-adapter --example anchor_prepend
  • Tween controller: cargo run -p virtualizer-adapter --example controller_tween