All Projects → kyubuns → Animetask

kyubuns / Animetask

Licence: mit
Task Animation Library for Unity

Projects that are alternatives of or similar to Animetask

Ugui Tween Tool
unity4.6.x && unity5.x ugui tween utools
Stars: ✭ 99 (+4.21%)
Mutual labels:  unity, tween
Animerx
Rx Tween Animation Library for Unity
Stars: ✭ 156 (+64.21%)
Mutual labels:  unity, tween
Iframework
Simple Unity Framework
Stars: ✭ 110 (+15.79%)
Mutual labels:  unity, tween
Urmotion
Flexible motion engine for non time-based animation in Unity.
Stars: ✭ 220 (+131.58%)
Mutual labels:  unity, tween
Uween
Lightweight tween library for Unity.
Stars: ✭ 123 (+29.47%)
Mutual labels:  unity, tween
Unitween
UniTween is a Tween framework for Unity that enables programmers and artists to create almost any kind of Tween in a workflow that is easy to learn, fun to use, and with great maintainability.
Stars: ✭ 92 (-3.16%)
Mutual labels:  unity, tween
Unityionicintegration
A guide to integrating Unity 3D content into an Ionic app and sending messages between them (for Android & iOS)(tested with Vuforia plugin)
Stars: ✭ 94 (-1.05%)
Mutual labels:  unity
Candycoded
🍭 Custom Unity Components that are delightful
Stars: ✭ 96 (+1.05%)
Mutual labels:  unity
Vrarmik
Unity Inverse Kinematics solution for arms in VR
Stars: ✭ 94 (-1.05%)
Mutual labels:  unity
Dq Skinning For Unity
Stars: ✭ 93 (-2.11%)
Mutual labels:  unity
Klak
Creative coding library for Unity
Stars: ✭ 1,347 (+1317.89%)
Mutual labels:  unity
Render Timing For Unity
GPU time metric for Unity apps (currently limited to Android/GLES)
Stars: ✭ 97 (+2.11%)
Mutual labels:  unity
Forgenetworkingremastered
In short, Forge Networking is a free and open source multiplayer game (multi-user) networking system that has a very good integration with the Unity game engine. You wanna make a multiplayer game or real time multi-user application? This is the library for you.
Stars: ✭ 1,338 (+1308.42%)
Mutual labels:  unity
Darkconfig
DarkConfig is a configuration library for games which supports fast and expressive iteration
Stars: ✭ 94 (-1.05%)
Mutual labels:  unity
Phoenixsharp
C# Phoenix Channels client. Unity Compatible.
Stars: ✭ 96 (+1.05%)
Mutual labels:  unity
Banditdungeon
Demo project using multi-armed bandit algorithm
Stars: ✭ 94 (-1.05%)
Mutual labels:  unity
Gameviewlayouter
A utility script that layouts game views with multiple displays.
Stars: ✭ 97 (+2.11%)
Mutual labels:  unity
Locksteprtsengine
(WIP) Deterministic, Lockstep RTS Engine
Stars: ✭ 94 (-1.05%)
Mutual labels:  unity
Studyunity
A repository for studing Unity
Stars: ✭ 95 (+0%)
Mutual labels:  unity
Ropework
a visual novel framework template for Yarn Spinner / Unity C#
Stars: ✭ 97 (+2.11%)
Mutual labels:  unity

AnimeTask

Task Animation Library for Unity
Rx Version! -> kyubuns/AnimeRx

Read this document in other languages: 日本語

Buy Me A Coffee

gif_animation_001

Sample

Basic

Move from (-5f, 0f, 0f) to (5f, 0f, 0f) over 2 seconds.

await Easing.Create<Linear>(new Vector3(-5f, 0f, 0f), new Vector3(5f, 0f, 0f), 2f).ToLocalPosition(cube);

PlayTo

Move from the current location to a specified location.

await Easing.Create<Linear>(new Vector3(-5f, 3f, 0f), 2f).ToLocalPosition(cube);

Easing

Use InCubic of Easing to move to a specified position.

await Easing.Create<InCubic>(new Vector3(-5f, 3f, 0f), 2f).ToLocalPosition(cube);

Linear

Move at 1 per second for 2 seconds.

await Moving.Linear(1f, 2f).ToLocalPositionX(cube);

Gravity

const float xRange = 5f;
const float yRangeMin = 5f;
const float yRangeMax = 10f;
await Moving.Gravity(
          new Vector3(Random.Range(-xRange, xRange), Random.Range(yRangeMin, yRangeMax)),
          Vector3.down * 9.8f,
          5f
      ).ToLocalPosition(shape)

CalcDuration

Move by calculating moving time from distance.

await Easing.Create<OutCubic>(new Vector3(5f, 0f, 0f), x => x / 2f)
    .Concat(Easing.Create<OutCubic>(new Vector3(5f, 2f, 0f), x => x / 2f))
    .Concat(Easing.Create<OutCubic>(new Vector3(-5f, 0f, 0f), x => x / 2f))
    .ToLocalPosition(cubes);

TranslateTo.Action

TranslateTo.Action enables you to use the animated values freely.

Easing.Create<Linear>(0, 100, 2f).ToAction<float>(x => Debug.Log(x))

UnscaledTime

You can create your own scheduler, so you can stop time for specific objects.
The default is to use Time.time, and you can also use UnscaledTimeScheduler, which uses Time.unscaledTime.

Easing.Create<Linear>(new Vector3(-5f, 0f, 0f), new Vector3(5f, 0f, 0f), 2f)
    .ToLocalPosition(shape, default, new UnscaledTimeScheduler());

Cancel

var cancellationTokenSource = new CancellationTokenSource();
cancellationTokenSource.Token.Register(() => Debug.Log("Cancel"));
cancellationTokenSource.CancelAfter(500);

await Easing.Create<OutCubic>(new Vector3(5f, 0f, 0f), 2f).ToLocalPosition(cubes[0], cancellationTokenSource.Token);

Delay

Move to the right at constant speed for 2 seconds, and set scale to 0 in the last 0.2 seconds.

await UniTask.WhenAll(
    Moving.Linear(3f, 2f).ToLocalPositionX(cube),
    Animator.Delay(1.8f, Easing.Create<Linear>(Vector3.zero, 0.2f)).ToLocalScale(cube),
);

Convert

Convert a float transition to a circular motion.

await Easing.Create<OutCubic>(0.0f, Mathf.PI * 2.0f, 2f)
    .Convert(x => new Vector3(Mathf.Sin(x), Mathf.Cos(x), 0.0f) * 3.0f)
    .ToLocalPosition(go);

Concat

It moves from 5f to 0f in 2 seconds, stops for 1 second, and moves to -5f in 2 seconds.

await Easing.Create<OutCubic>(5f, 0f, 2f)
    .Delay(1f)
    .Concat(Easing.Create<OutCubic>(0f, -5f, 2f))
    .ToLocalPositionX(cubes[0]);

IProgress

Supporting IProgress

await Easing.Create<Linear>(2f).ToProgress(Progress.Create<float>(x => Debug.Log(x)));

AnimationCanceller

var canceller = go.GetAnimationCanceller().Cancel();
Easing.Create<Linear>(1.0f, 0.5f).ToLocalPositionX(go, canceller.Token);

// in other class/scope
var canceller = go.GetAnimationCanceller().Cancel();
Easing.Create<Linear>(0.0f, 0.5f).ToLocalPositionX(go, canceller.Token);

UniRx.Extensions

var score = new ReactiveProperty<int>(0);
score
    .SubscribeTask(async (x, cancellationToken) =>
    {
        scoreCounter.text = $"{x}";
        await Easing.Create<OutBounce>(2f, 1f, 0.5f).ToLocalScale(scoreCounter, cancellationToken);
    });

Instructions

  • Import UniTask
  • Import AnimeTask
    • Package Manager https://github.com/kyubuns/AnimeTask.git?path=Assets/AnimeTask
    • UnityPackage

Way of thinking

You can pass two arguments to Play and PlayTo.
The first is the Animator and the second is the Translator, which have distinct roles.

Animator

Takes the elapsed time and returns the current value.

Translator

Reflect the value.

Requirements

  • Requires Unity2019.4 or later

License

MIT License (see LICENSE)

Buy me a coffee

Are you enjoying save time?
Buy me a coffee if you love my code!
https://www.buymeacoffee.com/kyubuns

"I used it for this game!"

I'd be happy to receive reports like "I used it for this game!"
Please contact me by email, twitter or any other means.
(This library is MIT licensed, so reporting is NOT mandatory.)
MessageForm

https://kyubuns.dev/

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].