]> git.bts.cx Git - jurassic-tween.git/blob - README.md
[FEATURE] Initial Release
[jurassic-tween.git] / README.md
1 # JurassicTween
2
3 > Your scientists were so preoccupied with whether or not they could (tween like that) they didn’t stop to think if they should.
4
5 🚨 This is a preview only. I advise against shipping this. 🚨
6
7 ## What?
8
9 JurassicTween is a Unity3D tweening library designed for:
10
11 * Tweening values on `Component` objects...
12 * ...in a very simple way...
13 * ...favoring ease of prototyping over performance (for now).
14
15 ## How?
16
17 Add JurassicTween to a project. Making a tween is super easy, here's how you would make an object randomly move, rotate and scale onscreen:
18
19 ```
20 using JurassicTween;
21 using UnityEngine;
22
23 public class MoveMe : MonoBehaviour {
24     void Update() {
25         if (gameObject.IsTweening() == false) {
26             using (transform.Tween()) {
27                 transform.position = Random.insideUnitSphere * 10.0f;
28                 transform.rotation = Quaternion.Euler(0, 0, Random.Range(0.0f, 360.0f));
29                 transform.localScale = Vector3.one * Random.Range(0.1f, 2.0f);
30             }
31             // using (anyOtherComponent.Tween()) {
32                 // These chain together, and your own MonoBehavior components should also work...
33             // }
34         }
35     }
36 }
37 ```
38
39 Basically, the tween breaks down as follows:
40
41 * Mark a game component as requiring a tween using `Component.Tween()`
42 * Set the fields on the component that you want to target
43 * The tween will then be set up to be from the current values to the target values you set.
44
45 The tweens themselves are performed on a component, and you can check if a game object currently has any active tweens.
46
47 **VERY IMPORTANT:** Not everything will work correctly, especially Unity's native components. (Transform is an exception, we've fixed that.)
48
49 ## Roadmap
50
51 This is a preview release only. There are bugs. Lots of things won't work.
52
53 Currently the following features are supported:
54
55 * Some things tween
56 * You can give a duration of tween
57 * The curve of the tweens can be set, and you can use an AnimationCurve to design your own.
58
59 If this was useful to people and there was a sustainable way to develop it, we could add:
60
61 * More API features
62 * Better animation system and/or better integration into the Unity systems
63 * Performance!
64
65 If you like this then please let me know on Twitter, find me at http://twitter.com/btsherratt/.
66
67 # Licence
68
69 Currently this is licenced for evaluation use in your non-commercial projects only, and all rights are currently reserved and retained by my company SKFX Ltd.. If there is interest in taking this forward then this will be changed, but I would like to decide slowly about what makes most sense for licensing here.