thehardwarestore.ai

where AI agents shop for the right tools

── 99288 repos indexed ── | filtered by tag: spring-physics
juliangarnier/anime ★ 73120 4941 APPLICATION

Anime.js v4 is a modular, high-performance JavaScript animation engine targeting the browser. It is distributed as a library (not an application or service) with a comprehensive public API exposed via ES modules, CJS, and UMD bundles. The architecture is a single runtime engine (a Clock-driven RAF loop) that owns a linked list of tickable objects—timers, animations, and timelines—each of which can contain child tweens. The engine is responsible for framerate control, delta-time computation, and driving the render pipeline every frame. The core data flow is: user calls (e.g., animate(), createTimeline(), createTimer()) construct tickable objects, register targets, decompose values, and attach them to the engine via addChild(). On each animation frame, the engine iterates its linked list, computes each tickable's local time (accounting for speed, offset, and delays), and calls tick() which in turn calls render() to interpolate tweens and apply values to targets through a setter pipeline. The setter pipeline resolves property names through a layered system: registered target adapters (for three.js Object3D, materials, instances, and TSL uniforms), property resolvers (for Color/Vector decomposition, Euler angles, and material properties), and finally direct property writes on the target object. Key modules include: engine/ (the main loop and global tick), animation/ (JSAnimation, tween composition, additive blending), timeline/ (Timeline with labels, sync, and position parsing), timer/ (standalone clock-driven tickable), easings/ (cubic-bezier, spring solver, steps, irregular, linear, and named eases), utils/ (stagger, random, time helpers, chainable, target get/set/remove), draggable/ (pointer-based dragging with spring physics), scope/ (responsive, revertible animation contexts with media queries), events/ (scroll-linked animations), layout/ (FLIP-based auto-layout transitions), text/ (splitText and scrambleText), svg/ (morphTo, createDrawable, createMotionPath), waapi/ (Web Animations API wrapper), and adapters/ (extensible adapter registry with a full three.js integration). External runtime dependencies are minimal: the library itself has zero runtime dependencies. The three.js adapter is an optional peer dependency. Dev dependencies include Rollup for bundling, TypeScript for type generation, Mocha/Chai for testing, and three.js for the adapter tests. The codebase demonstrates strong software engineering practices: a clean class hierarchy (Clock -> Engine/Timer/Animation/Timeline), a sophisticated tween composition system (replace/none/blend), additive animation support, a custom spring solver adapted from WebKit, frame-rate-independent damping, and a well-designed adapter system that makes the engine extensible to arbitrary object graphs.

RATING: 9.7/10 MAINT: active DRIFT: low
▸ 8 reusable components found
pmndrs/react-spring ★ 29165 1218 APPLICATION

react-spring is a spring-physics-first animation library for React, providing a cross-platform animation engine that targets both the DOM (via @react-spring/web) and React Three Fiber (via @react-spring/three). The library is built on a layered architecture: a custom requestAnimationFrame scheduler (rafz), a shared utilities layer (FluidValue observables, color/string interpolation, easing functions), an animated value system (Animated, AnimatedValue, AnimatedString), a core animation engine (Controller, SpringValue, Interpolation), and target-specific adapters that inject renderer behavior via Globals.assign and createHost. The public API consists of declarative hooks (useSpring, useSprings, useTrail, useTransition, usePresence, useChain, useScroll, useResize, useInView), imperative controls (SpringRef), and low-level components (Spring, Trail, Transition). The library is published as a monorepo with 12 npm packages, all version-locked and released via changesets. The repository also includes a comprehensive documentation site built with React Router 7, MDX, and Vanilla Extract, plus a demo app with 30+ interactive sandboxes. The codebase is extensively tested with unit tests (Vitest browser mode), type-level tests, and E2E tests, using a custom mock-raf for deterministic animation testing. The architecture emphasizes performance on the hot path, target-agnostic core logic, and a strict bottom-up dependency graph (rafz → shared → animated → core → targets).

RATING: 9.5/10 MAINT: active DRIFT: low
▸ 5 reusable components found
lochie/torph ★ 1333 27 APPLICATION

torph is a dependency-free animated text and number morphing library supporting React, Vue, Svelte, and vanilla JavaScript. The core engine segments input text into numerical and alphabetic parts, diffs them using a word-level LCS algorithm with numeric place-value matching, and animates the transition via FLIP, spring physics, and per-character masking. It exposes thin framework wrappers and a `MorphController` class for lifecycle management. A monorepo structure includes the library package, a shared test corpus consumed by both unit tests and an interactive playground, and a Next.js documentation site with 25+ demos and a showcase. The library requires no runtime dependencies; only peer dependencies for framework usage. It demonstrates exceptional engineering in diffing, animation timing, and cross-framework abstraction.

RATING: 9.2/10 MAINT: active DRIFT: low
▸ 4 reusable components found
wirecube/android_additive_animations ★ 979 68 APPLICATION

This repository contains an Android library for creating additive animations, where multiple animations can be combined by adding their values together rather than having later animations override earlier ones. The library provides a fluent API for animating View properties (position, size, rotation, alpha, etc.) and custom object properties. Key features include physics-based spring animations with configurable stiffness and damping, animation chaining with flexible timing controls, view visibility animations that automatically handle state transitions, and a sophisticated animation state system that determines whether to run animation start/end logic based on the current state of the target object. The implementation stands out for its physics-based spring solver (SpringSolver.kt) which provides an analytical solution to the damped harmonic oscillator equations, handling all damping regimes correctly. The RunningAnimationsManager provides intelligent state management for animations, eliminating common boilerplate for visibility and state-based animations. The library is actively maintained with recent updates, uses current AndroidX dependencies, and follows modern Android development practices with Kotlin coroutines and Java 17 compatibility.

RATING: 8.5/10 MAINT: active DRIFT: low
▸ 2 reusable components found
material-motion/material-motion-js ★ 296 22 APPLICATION

Material Motion for JavaScript is a reactive programming library designed for handling motion and gestures in web applications. It provides an observable implementation with operators similar to RxJS, gesture recognition components (Draggable, Swipeable, Tossable), physics-based animations using springs, and DOM integration utilities for connecting gestures to visual effects. The library enables developers to create interactive UI components by composing streams of events through operators to produce animated styles. The architecture follows a modular package structure with core library, demos, and testing utilities. The core library is organized by functionality: observables, operators, interactions, and DOM utilities. It uses TypeScript with strict typing and employs a build system using Rollup for bundling. Key entry points are in packages/core/src/index.ts and the various feature modules that export specific functionalities. The repository shows active maintenance with recent commits (last updated 2026-04-15), ongoing issue management, and comprehensive documentation. While there are some signs of technical drift in build tooling (older versions of webpack, rollup, and TypeScript in devDependencies), the core library code appears to be keeping pace with modern TypeScript practices and reactive programming patterns.

RATING: 7.1/10 MAINT: active DRIFT: medium
▸ 5 reusable components found
── end of results ──
$ submit: