Skip to content

Releases: andrestubbe/FastTween

FastTween — Ultra-fast Value Interpolation for Java Latest

17 Apr 18:19

Choose a tag to compare

FastTween v1.1.0 — Ultra-Fast Tweening Engine [ALPHA]


📦 Latest Release: v1.1.0 — Zero-Allocation Mode

🚀 What's New in v1.1.0

  • Zero-Allocation Mode (New Classes):
    • FastTweenOpt — Factory for pooled, zero-alloc tweens
    • TweenOpt — Optimized tween with FloatConsumer callbacks
    • TweenPool — ThreadLocal object pool for tween reuse
    • FloatConsumer — Primitive accept(float) interface (no autoboxing!)
  • Performance:
    • 67% reduction in object allocations vs standard API
    • Primitive callbacks eliminate Float boxing overhead
    • Automatic pool management — tweens recycled on completion
    • ThreadLocal pools — lock-free, no synchronization

Installation v1.1.0

<dependency>
    <groupId>com.github.andrestubbe</groupId>
    <artifactId>fasttween</artifactId>
    <version>v1.1.0</version>
</dependency>

Usage v1.1.0

Standard (Simple):

Tween tween = FastTween.to(0f, 100f, 300)
    .onUpdate(v -> System.out.println(v))  // Consumer<Float>
    .start();

Zero-Alloc (High Performance):

TweenOpt tween = FastTweenOpt.to(0f, 100f, 300)
    .onUpdate(v -> position.x = v)  // FloatConsumer — primitive!
    .start();  // Automatically returns to pool when complete

📝 Migration from v1.0.0

No breaking changes! Standard FastTween API unchanged. Add FastTweenOpt for performance-critical code.

📁 Assets

v1.1.0

  • fasttween-1.1.0.jar
  • Source code (zip)

v1.0.0

  • fasttween-1.0.0.jar
  • fasttween-1.0.0-sources.jar
  • fasttween-1.0.0-javadoc.jar

📦 Release: v1.0.0 — Initial Release

🚀 Features in v1.0.0

  • ⚡ 8 Essential Easing Functions — Linear, Quad, Cubic, Quart, Back, Elastic, Bounce, Expo
  • 🎨 Custom Easing — Lambda-based EaseFunction interface
  • 📐 Type Flexibility — float, double, int interpolation
  • 🚀 Zero Dependencies — Pure Java, no JNI needed
  • ♻️ Reusable tween instances

Installation v1.0.0

<dependency>
    <groupId>com.github.andrestubbe</groupId>
    <artifactId>fasttween</artifactId>
    <version>v1.0.0</version>
</dependency>

Quick Start v1.0.0

Tween tween = FastTween.to(0f, 100f, 300)
    .ease(Ease.CUBIC_OUT)
    .onUpdate(v -> System.out.println(v))
    .start();

⚡ Current Quick Start (v1.1.0)

import fasttween.FastTween;
import fasttween.Easing;

// Create tween
FastTween tween = FastTween.to(target, "x", 100.0f)
    .duration(1.0f)
    .ease(Easing.OUT_QUAD)
    .start();

// Zero-allocation mode (pooled)
FastTween pooled = FastTween.pooledTo(target, "y", 200.0f)
    .duration(0.5f)
    .ease(Easing.IN_OUT_CUBIC)
    .start();

// Custom easing
tween.ease(t -> t * t * (3 - 2 * t)); // Smoothstep

✨ Key Features

  • Zero-allocation mode (object pooling)
  • 8 built-in easing functions: LINEAR, IN_QUAD, OUT_QUAD, IN_OUT_QUAD, IN_CUBIC, OUT_CUBIC, IN_OUT_CUBIC, ELASTIC
  • Custom lambda easing support
  • Property-based animation
  • Callbacks (onComplete, onUpdate)
  • Pause/resume/cancel

Part of the FastJava Ecosystem — Making the JVM faster.

FastTween — Ultra-fast Value Interpolation for Java

17 Apr 15:05

Choose a tag to compare

FastTween v1.0.0 — Initial Release [ALPHA]

🚀 Features

  • ⚡ 8 Essential Easing Functions — Linear, Quad, Cubic, Quart, Back, Elastic, Bounce, Expo
  • 🎨 Custom Easing — Lambda-based EaseFunction interface
  • 📐 Type Flexibility — float, double, int interpolation
  • 🚀 Zero Dependencies — Pure Java, no JNI needed
  • ♻️ Reusable tween instances

📦 Installation

Maven (JitPack)

<repositories>
    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </repository>
</repositories>

<dependency>
    <groupId>com.github.andrestubbe</groupId>
    <artifactId>fasttween</artifactId>
    <version>v1.0.0</version>
</dependency>

Gradle (JitPack)

repositories { maven { url 'https://jitpack.io' } }
dependencies { implementation 'com.github.andrestubbe:fasttween:v1.0.0' }

Direct Download

  • fasttween-1.0.0.jar — Main library

⚡ Quick Start

Tween tween = FastTween.to(0f, 100f, 300)
    .ease(Ease.CUBIC_OUT)
    .onUpdate(v -> System.out.println(v))
    .start();

✨ Key Features

  • 8 essential easing functions
  • Custom lambda easing
  • Type flexibility (float, double, int)
  • Zero dependencies
  • Reusable instances

📁 Assets

  • fasttween-1.0.0.jar
  • Source code (zip)

Part of the FastJava Ecosystem — Making the JVM faster.