Giter Club home page Giter Club logo

litmotion's Introduction

LitMotion

Lightning-fast and Zero Allocation Tween Library for Unity.

license

日本語版READMEはこちら

Overview

LitMotion is a high-performance tweening library for Unity. It encompasses a rich set of features to animate components like Transform, along with custom fields and properties, allowing for easy creation of animations.

Following my creation of Magic Tween, LitMotion stands as my second tweening library. Leveraging the experience gained from implementing Magic Tween, LitMotion has been designed prioritizing essential features while ensuring it operates at the highest speed possible. It outperforms other tweening libraries by a staggering 2 to 20 times in various situations such as tween creation and execution. Naturally, there are no allocations during tween creation.

Documentation

The full version of documentation can be found here.

Features

  • Animate anything in one line of code.
  • Achieves zero allocations due to its struct-based design.
  • Highly optimized using DOTS (Data-Oriented Technology Stack).
  • Works in both runtime and editor.
  • Apply complex settings like easing and looping.
  • Wait for completion via callbacks/coroutines.
  • Convert to Observables using UniRx.
  • Supports async/await via UniTask.
  • Extend types using IMotionOptions and IMotionAdapter.

Setup

Requirements

  • Unity 2021.3 or later
  • Burst 1.6.0 or later
  • Collection 1.5.1 or later
  • Mathematics 1.0.0 or later

Installation

  1. Open Package Manager from Window > Package Manager.
  2. Click the "+" button > Add package from git URL.
  3. Enter the following URL:
https://github.com/AnnulusGames/LitMotion.git?path=src/LitMotion/Assets/LitMotion

Alternatively, open Packages/manifest.json and add the following to the dependencies block:

{
    "dependencies": {
        "com.annulusgames.lit-motion": "https://github.com/AnnulusGames/LitMotion.git?path=src/LitMotion/Assets/LitMotion"
    }
}

Performance

Here are the benchmark results. The benchmark source code can be found in this repository.

Tween 64,000 float properties

Startup

Update

Tween 50,000 transform.position

Startup

Update

GC Allocation (per position tween creation)

Support

Untiy forum: https://forum.unity.com/threads/litmotion-lightning-fast-and-zero-allocation-tween-library.1530427/

License

MIT License

litmotion's People

Contributors

annulusgames avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.