Skip to content

A tweening library for Unity designed to be simple to use and extend.

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE
Unknown
LICENSE.meta
Notifications You must be signed in to change notification settings

rhys-vdw/peachy-tween

Repository files navigation

PeachyTween 🍑

openupm standard-readme compliant

A tweening library for Unity designed to be simple to use and extend.

Background

Created as an alternative to DOTween, which has a proprietary license with some limitations. PeachyTween intends to create a similarly powerful tweening library that can be installed by UPM and allows public forks and distribution.

PeachyTween does not aim to be API compatible with DOTween, nor to fully mirror its functionality.

⚠️ PeachyTween is still in early development, and is untested

Install

Installing from OpenUPM

OpenUPM package.

Package can be installed from OpenUPM using OpenUPM CLI;

$ openupm add computer.rhys.peachy-tween

Installing from GitHub

GitHub repository.

To add to you Unity project, first add the internal dependency ecslite.

In Unity package manager, select "Add package from git URL..." and add the following two URLs:

  1. https://github.com/LeoECSCommunity/ecslite.git#1.0.0
  2. https://github.com/rhys-vdw/peachy-tween.git

Or add the following two lines to dependencies in your manifest.json:

"dependencies": {
  "com.leoecscommunity.ecslite": "https://github.com/LeoECSCommunity/ecslite.git#1.0.0",
  "computer.rhys.peachy-tween": "https://github.com/rhys-vdw/peachy-tween.git",

Installation will streamlined before full release.

Usage

using UnityEngine;
using PeachyTween;

public class PeachyExample : MonoBehaviour
{
  void Start()
  {
    Peachy.Tween(
      from: 0f,
      to: 5f,
      duration: 4f,
      onChange: v => Debug.Log($"value = {v}")
    );

    transform
      .TweenLocalRotation(Quaternion.Euler(90, 90, 90), 2f)
      .Slerp()
      .Ease(Ease.BounceInOut)
      .Loop(4)
      .OnLoop(() => Debug.Log("Loop complete"))
      .OnKill(() => Debug.Log("Four loops complete"));
  }
}

API

API Documentation.

Contributing

Contributions welcome. If you wish to make a pull request, please open an issue first.

See the GitHub project for the development roadmap.

Environment setup

To work on PeachyTween:

  1. Clone the GitHub repo.
  2. Create a new Unity project.
  3. In the package manager window, select "Add package from disk..." and select your local PeachyTween folder.
  4. Enable tests in the editor (see below).

Enabling tests in the editor

Contributions should have test coverage. To run the test suite, edit your project's manifest.json to include the following entry:

  "testables": [
    "computer.rhys.peachy-tween"
  ]

License

MIT © Rhys van der Waerden

About

A tweening library for Unity designed to be simple to use and extend.

Topics

Resources

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE
Unknown
LICENSE.meta

Stars

Watchers

Forks

Packages

No packages published

Languages