Twell is a tiny, embeddable, zero-allocation physics engine for interruptible, Apple-style UI animations, available as a single-header C library with Python bindings.

Stars

17

7-day growth

No data

Forks

0

Open issues

0

License

MIT

Last updated

2026-07-28

Why it is worth attention

It brings CoreAnimation-like additive state machines and analytical spring dynamics to any UI framework (e.g., Raylib, LVGL, Pygame) with zero runtime allocations and exact closed-form solutions.

Who it is for

  • Desktop GUI framework developers
  • Mobile app developers
  • Embedded systems engineers
  • Game engine UI programmers

Use cases

  • Fluid, interruptible UI transitions (open/close menus, buttons)
  • Scrollable lists with rubber-banding and momentum handoff
  • Kinematic property coupling (scroll drives scale, blur, etc.)
  • 3D transform animations (CATransform3D compatible)

Strengths

  • Zero-allocation design uses a user-provided memory arena
  • Analytical spring kernel avoids numerical drift and time-step instability
  • Additive state machine enables seamless mid-flight retargeting with velocity preservation
  • Provides Python bindings for rapid prototyping alongside C/C++

Considerations

  • Requires manual memory management via a pre-allocated arena
  • Only models spring and decay dynamics; no rigid body or collision physics
  • Niche library with limited community adoption and documentation still maturing

README quick start

Quick start

Description

A tiny physics-aware animation engine for remarkably fluid GUIs. Written in single-header C

Related repositories

Similar projects matched by category, topics, and programming language.

makecindy
Featured
makecindy GitHub avatar

cindy

Cindy is an open-source AI agent that runs locally on your machine, integrates multiple AI harnesses and models, and provides memory, skills, and automation to perform real work in your projects and apps.

AI & Machine LearningLarge Language Models
958
uzairansaruzi
Featured
uzairansaruzi GitHub avatar

hermex

Hermex is a native SwiftUI iPhone app that lets you control a self-hosted Hermes AI agent directly from your phone, with no subscriptions, tracking, or third-party relay.

AI & Machine LearningLarge Language Models
941
Krishnagangwal
Featured
Krishnagangwal GitHub avatar

CS-Fundamentals

A curated collection of Computer Science fundamentals (PDFs, notes, cheatsheets, interview question banks) for placement preparation, covering seven core subjects plus general resources.

Data & DatabasesDatabases & Storage
2,326