net.dreditor.chartweener 0.0.0-stage → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CharTween.asmdef +17 -0
- package/CharTween.asmdef.meta +7 -0
- package/CharTweener.ExtraTweens.cs +237 -0
- package/CharTweener.ExtraTweens.cs.meta +2 -0
- package/CharTweener.Properties.cs +447 -0
- package/CharTweener.Properties.cs.meta +13 -0
- package/CharTweener.Tweens.cs +304 -0
- package/CharTweener.Tweens.cs.meta +13 -0
- package/CharTweener.cs +748 -0
- package/CharTweener.cs.meta +13 -0
- package/CharTweenerDefaults.cs +11 -0
- package/CharTweenerDefaults.cs.meta +2 -0
- package/CharTweenerUtility.cs +27 -0
- package/CharTweenerUtility.cs.meta +13 -0
- package/LICENSE.md +21 -0
- package/LICENSE.md.meta +7 -0
- package/VertexGradientPlugin.cs +98 -0
- package/VertexGradientPlugin.cs.meta +13 -0
- package/package.json +34 -6
- package/package.json.meta +7 -0
- package/README.md +0 -3
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
//Author: Copyright (c) 2021 Matthew Dechatech under MIT License
|
|
2
|
+
#if DOTWEEN
|
|
3
|
+
using DG.Tweening;
|
|
4
|
+
using TMPro;
|
|
5
|
+
using UnityEngine;
|
|
6
|
+
|
|
7
|
+
namespace CharTween
|
|
8
|
+
{
|
|
9
|
+
// Contains tweens that are exact copies of DOTween methods
|
|
10
|
+
public partial class CharTweener : MonoBehaviour
|
|
11
|
+
{
|
|
12
|
+
// Color tweens
|
|
13
|
+
public Tweener DOFade(int charIndex, float endValue, float duration)
|
|
14
|
+
{
|
|
15
|
+
NotifyActiveColorTween();
|
|
16
|
+
ProxyColor proxy = GetProxyColor(charIndex);
|
|
17
|
+
return proxy.AddTween(proxy.DOFade(endValue, duration));
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
public Tweener DOColor(int charIndex, Color endValue, float duration)
|
|
21
|
+
{
|
|
22
|
+
NotifyActiveColorTween();
|
|
23
|
+
ProxyColor proxy = GetProxyColor(charIndex);
|
|
24
|
+
return proxy.AddTween(proxy.DOColor(endValue, duration));
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
public Tweener DOGradient(int charIndex, VertexGradient endValue, float duration)
|
|
28
|
+
{
|
|
29
|
+
NotifyActiveColorTween();
|
|
30
|
+
ProxyColor proxy = GetProxyColor(charIndex);
|
|
31
|
+
return proxy.AddTween(proxy.DOColorGradient(endValue, duration));
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// Transform tweens
|
|
35
|
+
public Tweener DOMove(int charIndex, Vector3 endValue, float duration, bool snapping = false)
|
|
36
|
+
{
|
|
37
|
+
NotifyActiveTransformTween();
|
|
38
|
+
ProxyTransform proxy = GetProxyTransform(charIndex);
|
|
39
|
+
return proxy.AddTween(proxy.DOMove(endValue, duration, snapping));
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
public Tweener DOMoveX(int charIndex, float endValue, float duration, bool snapping = false)
|
|
43
|
+
{
|
|
44
|
+
NotifyActiveTransformTween();
|
|
45
|
+
ProxyTransform proxy = GetProxyTransform(charIndex);
|
|
46
|
+
return proxy.AddTween(proxy.DOMoveX(endValue, duration, snapping));
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
public Tweener DOMoveY(int charIndex, float endValue, float duration, bool snapping = false)
|
|
50
|
+
{
|
|
51
|
+
NotifyActiveTransformTween();
|
|
52
|
+
ProxyTransform proxy = GetProxyTransform(charIndex);
|
|
53
|
+
return proxy.AddTween(proxy.DOMoveY(endValue, duration, snapping));
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
public Tweener DOMoveZ(int charIndex, float endValue, float duration, bool snapping = false)
|
|
57
|
+
{
|
|
58
|
+
NotifyActiveTransformTween();
|
|
59
|
+
ProxyTransform proxy = GetProxyTransform(charIndex);
|
|
60
|
+
return proxy.AddTween(proxy.DOMoveZ(endValue, duration, snapping));
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
public Tweener DOLocalMove(int charIndex, Vector3 endValue, float duration, bool snapping = false)
|
|
64
|
+
{
|
|
65
|
+
NotifyActiveTransformTween();
|
|
66
|
+
ProxyTransform proxy = GetProxyTransform(charIndex);
|
|
67
|
+
return proxy.AddTween(proxy.DOLocalMove(endValue, duration, snapping));
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
public Tweener DOLocalMoveX(int charIndex, float endValue, float duration, bool snapping = false)
|
|
71
|
+
{
|
|
72
|
+
ProxyTransform proxy = GetProxyTransform(charIndex);
|
|
73
|
+
return proxy.AddTween(proxy.DOLocalMoveX(endValue, duration, snapping));
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
public Tweener DOLocalMoveY(int charIndex, float endValue, float duration, bool snapping = false)
|
|
77
|
+
{
|
|
78
|
+
NotifyActiveTransformTween();
|
|
79
|
+
ProxyTransform proxy = GetProxyTransform(charIndex);
|
|
80
|
+
return proxy.AddTween(proxy.DOLocalMoveY(endValue, duration, snapping));
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
public Tweener DOLocalMoveZ(int charIndex, float endValue, float duration, bool snapping = false)
|
|
84
|
+
{
|
|
85
|
+
NotifyActiveTransformTween();
|
|
86
|
+
ProxyTransform proxy = GetProxyTransform(charIndex);
|
|
87
|
+
return proxy.AddTween(proxy.DOLocalMoveZ(endValue, duration, snapping));
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
public Sequence DOJump(int charIndex, Vector3 endValue, float jumpPower, int numJumps, float duration, bool snapping = false)
|
|
91
|
+
{
|
|
92
|
+
NotifyActiveTransformTween();
|
|
93
|
+
ProxyTransform proxy = GetProxyTransform(charIndex);
|
|
94
|
+
return proxy.AddTween(proxy.Target.DOJump(endValue, jumpPower, numJumps, duration, snapping));
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
public Sequence DOLocalJump(int charIndex, Vector3 endValue, float jumpPower, int numJumps, float duration, bool snapping = false)
|
|
98
|
+
{
|
|
99
|
+
NotifyActiveTransformTween();
|
|
100
|
+
ProxyTransform proxy = GetProxyTransform(charIndex);
|
|
101
|
+
return proxy.AddTween(proxy.Target.DOLocalJump(endValue, jumpPower, numJumps, duration, snapping));
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
public Tweener DORotate(int charIndex, Vector3 endValue, float duration, RotateMode mode)
|
|
105
|
+
{
|
|
106
|
+
NotifyActiveTransformTween();
|
|
107
|
+
ProxyTransform proxy = GetProxyTransform(charIndex);
|
|
108
|
+
return proxy.AddTween(proxy.Target.DORotate(endValue, duration, mode));
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
public Tweener DORotateQuaternion(int charIndex, Quaternion endValue, float duration)
|
|
112
|
+
{
|
|
113
|
+
NotifyActiveTransformTween();
|
|
114
|
+
ProxyTransform proxy = GetProxyTransform(charIndex);
|
|
115
|
+
return proxy.AddTween(proxy.Target.DORotateQuaternion(endValue, duration));
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
public Tweener DOLocalRotate(int charIndex, Vector3 endValue, float duration, RotateMode mode = RotateMode.Fast)
|
|
119
|
+
{
|
|
120
|
+
NotifyActiveTransformTween();
|
|
121
|
+
ProxyTransform proxy = GetProxyTransform(charIndex);
|
|
122
|
+
return proxy.AddTween(proxy.Target.DOLocalRotate(endValue, duration, mode));
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
public Tweener DOLocalRotateQuaternion(int charIndex, Quaternion endValue, float duration)
|
|
126
|
+
{
|
|
127
|
+
NotifyActiveTransformTween();
|
|
128
|
+
ProxyTransform proxy = GetProxyTransform(charIndex);
|
|
129
|
+
return proxy.AddTween(proxy.Target.DOLocalRotateQuaternion(endValue, duration));
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
public Tweener DOLookAt(int charIndex, Vector3 towards, float duration, AxisConstraint axisConstraint = AxisConstraint.None,
|
|
133
|
+
Vector3? up = null)
|
|
134
|
+
{
|
|
135
|
+
NotifyActiveTransformTween();
|
|
136
|
+
ProxyTransform proxy = GetProxyTransform(charIndex);
|
|
137
|
+
return proxy.AddTween(proxy.Target.DOLookAt(towards, duration, axisConstraint, up));
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
public Tweener DOScale(int charIndex, float endValue, float duration)
|
|
141
|
+
{
|
|
142
|
+
NotifyActiveTransformTween();
|
|
143
|
+
ProxyTransform proxy = GetProxyTransform(charIndex);
|
|
144
|
+
return proxy.AddTween(proxy.Target.DOScale(endValue, duration));
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
public Tweener DOScale(int charIndex, Vector3 endValue, float duration)
|
|
148
|
+
{
|
|
149
|
+
NotifyActiveTransformTween();
|
|
150
|
+
ProxyTransform proxy = GetProxyTransform(charIndex);
|
|
151
|
+
return proxy.AddTween(proxy.Target.DOScale(endValue, duration));
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
public Tweener DOScaleX(int charIndex, float endValue, float duration)
|
|
155
|
+
{
|
|
156
|
+
NotifyActiveTransformTween();
|
|
157
|
+
ProxyTransform proxy = GetProxyTransform(charIndex);
|
|
158
|
+
return proxy.AddTween(proxy.Target.DOScaleX(endValue, duration));
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
public Tweener DOScaleY(int charIndex, float endValue, float duration)
|
|
162
|
+
{
|
|
163
|
+
NotifyActiveTransformTween();
|
|
164
|
+
ProxyTransform proxy = GetProxyTransform(charIndex);
|
|
165
|
+
return proxy.AddTween(proxy.Target.DOScaleY(endValue, duration));
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
public Tweener DOScaleZ(int charIndex, float endValue, float duration)
|
|
169
|
+
{
|
|
170
|
+
NotifyActiveTransformTween();
|
|
171
|
+
ProxyTransform proxy = GetProxyTransform(charIndex);
|
|
172
|
+
return proxy.AddTween(proxy.Target.DOScaleZ(endValue, duration));
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
public Tweener DOPunchPosition(int charIndex, Vector3 punch, float duration, int vibrato = 10, float elasticity = 1, bool snapping = false)
|
|
176
|
+
{
|
|
177
|
+
NotifyActiveTransformTween();
|
|
178
|
+
ProxyTransform proxy = GetProxyTransform(charIndex);
|
|
179
|
+
return proxy.AddTween(proxy.Target.DOPunchPosition(punch, duration, vibrato, elasticity, snapping));
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
public Tweener DOPunchRotation(int charIndex, Vector3 punch, float duration, int vibrato = 10, float elasticity = 1)
|
|
183
|
+
{
|
|
184
|
+
NotifyActiveTransformTween();
|
|
185
|
+
ProxyTransform proxy = GetProxyTransform(charIndex);
|
|
186
|
+
return proxy.AddTween(proxy.Target.DOPunchRotation(punch, duration, vibrato, elasticity));
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
public Tweener DOPunchScale(int charIndex, Vector3 punch, float duration, int vibrato = 10, float elasticity = 1)
|
|
190
|
+
{
|
|
191
|
+
NotifyActiveTransformTween();
|
|
192
|
+
ProxyTransform proxy = GetProxyTransform(charIndex);
|
|
193
|
+
return proxy.AddTween(proxy.Target.DOPunchScale(punch, duration, vibrato, elasticity));
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
public Tweener DOShakePosition(int charIndex, float duration, float strength = 1, int vibrato = 10, float randomness = 90,
|
|
197
|
+
bool snapping = false, bool fadeOut = true)
|
|
198
|
+
{
|
|
199
|
+
NotifyActiveTransformTween();
|
|
200
|
+
ProxyTransform proxy = GetProxyTransform(charIndex);
|
|
201
|
+
return proxy.AddTween(proxy.Target.DOShakePosition(duration, strength, vibrato, randomness, snapping, fadeOut));
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
public Tweener DOShakePosition(int charIndex, float duration, Vector3 strength, int vibrato = 10, float randomness = 90,
|
|
205
|
+
bool snapping = false, bool fadeOut = true)
|
|
206
|
+
{
|
|
207
|
+
NotifyActiveTransformTween();
|
|
208
|
+
ProxyTransform proxy = GetProxyTransform(charIndex);
|
|
209
|
+
return proxy.AddTween(proxy.Target.DOShakePosition(duration, strength, vibrato, randomness, snapping, fadeOut));
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
public Tweener DOShakeRotation(int charIndex, float duration, float strength = 1, int vibrato = 10, float randomness = 90,
|
|
213
|
+
bool fadeOut = true)
|
|
214
|
+
{
|
|
215
|
+
NotifyActiveTransformTween();
|
|
216
|
+
ProxyTransform proxy = GetProxyTransform(charIndex);
|
|
217
|
+
return proxy.AddTween(proxy.Target.DOShakeRotation(duration, strength, vibrato, randomness, fadeOut));
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
public Tweener DOShakeRotation(int charIndex, float duration, Vector3 strength, int vibrato = 10, float randomness = 90,
|
|
221
|
+
bool fadeOut = true)
|
|
222
|
+
{
|
|
223
|
+
NotifyActiveTransformTween();
|
|
224
|
+
ProxyTransform proxy = GetProxyTransform(charIndex);
|
|
225
|
+
return proxy.AddTween(proxy.Target.DOShakeRotation(duration, strength, vibrato, randomness, fadeOut));
|
|
226
|
+
}
|
|
227
|
+
public Tweener DOShakeScale(int charIndex, float duration, float strength = 1, int vibrato = 10, float randomness = 90,
|
|
228
|
+
bool fadeOut = true)
|
|
229
|
+
{
|
|
230
|
+
NotifyActiveTransformTween();
|
|
231
|
+
ProxyTransform proxy = GetProxyTransform(charIndex);
|
|
232
|
+
return proxy.AddTween(proxy.Target.DOShakeScale(duration, strength, vibrato, randomness, fadeOut));
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
public Tweener DOShakeScale(int charIndex, float duration, Vector3 strength, int vibrato = 10, float randomness = 90,
|
|
236
|
+
bool fadeOut = true)
|
|
237
|
+
{
|
|
238
|
+
NotifyActiveTransformTween();
|
|
239
|
+
ProxyTransform proxy = GetProxyTransform(charIndex);
|
|
240
|
+
return proxy.AddTween(proxy.Target.DOShakeScale(duration, strength, vibrato, randomness, fadeOut));
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
public Tweener DOPath(int charIndex, Vector3[] path, float duration, PathType pathType = PathType.Linear,
|
|
244
|
+
PathMode pathMode = PathMode.Full3D, int resolution = 10, Color? gizmoColor = null)
|
|
245
|
+
{
|
|
246
|
+
NotifyActiveTransformTween();
|
|
247
|
+
ProxyTransform proxy = GetProxyTransform(charIndex);
|
|
248
|
+
return proxy.AddTween(proxy.Target.DOPath(path, duration, pathType, pathMode, resolution, gizmoColor));
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
public Tweener DOLocalPath(int charIndex, Vector3[] path, float duration, PathType pathType = PathType.Linear,
|
|
252
|
+
PathMode pathMode = PathMode.Full3D, int resolution = 10, Color? gizmoColor = null)
|
|
253
|
+
{
|
|
254
|
+
NotifyActiveTransformTween();
|
|
255
|
+
ProxyTransform proxy = GetProxyTransform(charIndex);
|
|
256
|
+
return proxy.AddTween(proxy.Target.DOLocalPath(path, duration, pathType, pathMode, resolution, gizmoColor));
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
public Tweener DOBlendableMoveBy(int charIndex, Vector3 byValue, float duration, bool snapping = false)
|
|
260
|
+
{
|
|
261
|
+
NotifyActiveTransformTween();
|
|
262
|
+
ProxyTransform proxy = GetProxyTransform(charIndex);
|
|
263
|
+
return proxy.AddTween(proxy.Target.DOBlendableMoveBy(byValue, duration, snapping));
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
public Tweener DOBlendableLocalMoveBy(int charIndex, Vector3 byValue, float duration, bool snapping = false)
|
|
267
|
+
{
|
|
268
|
+
NotifyActiveTransformTween();
|
|
269
|
+
ProxyTransform proxy = GetProxyTransform(charIndex);
|
|
270
|
+
return proxy.AddTween(proxy.Target.DOBlendableLocalMoveBy(byValue, duration, snapping));
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
public Tweener DOBlendableRotateBy(int charIndex, Vector3 byValue, float duration,
|
|
274
|
+
RotateMode rotateMode = RotateMode.Fast)
|
|
275
|
+
{
|
|
276
|
+
NotifyActiveTransformTween();
|
|
277
|
+
ProxyTransform proxy = GetProxyTransform(charIndex);
|
|
278
|
+
return proxy.AddTween(proxy.Target.DOBlendableRotateBy(byValue, duration, rotateMode));
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
public Tweener DOBlendableLocalRotateBy(int charIndex, Vector3 byValue, float duration,
|
|
282
|
+
RotateMode rotateMode = RotateMode.Fast)
|
|
283
|
+
{
|
|
284
|
+
NotifyActiveTransformTween();
|
|
285
|
+
ProxyTransform proxy = GetProxyTransform(charIndex);
|
|
286
|
+
return proxy.AddTween(proxy.Target.DOBlendableLocalRotateBy(byValue, duration, rotateMode));
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
public Tweener DOBlendableScaleBy(int charIndex, Vector3 byValue, float duration)
|
|
290
|
+
{
|
|
291
|
+
NotifyActiveTransformTween();
|
|
292
|
+
ProxyTransform proxy = GetProxyTransform(charIndex);
|
|
293
|
+
return proxy.AddTween(proxy.Target.DOBlendableScaleBy(byValue, duration));
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
public Tweener DOBlendablePunchRotation(int charIndex, Vector3 punch, float duration, int vibrato = 10, float elasticity = 1)
|
|
297
|
+
{
|
|
298
|
+
NotifyActiveTransformTween();
|
|
299
|
+
ProxyTransform proxy = GetProxyTransform(charIndex);
|
|
300
|
+
return proxy.AddTween(proxy.Target.DOBlendablePunchRotation(punch, duration, vibrato, elasticity));
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
#endif
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: c950f29d1869a0340ac85e2aadca2ee6
|
|
3
|
+
timeCreated: 1525910733
|
|
4
|
+
licenseType: Free
|
|
5
|
+
MonoImporter:
|
|
6
|
+
externalObjects: {}
|
|
7
|
+
serializedVersion: 2
|
|
8
|
+
defaultReferences: []
|
|
9
|
+
executionOrder: 0
|
|
10
|
+
icon: {instanceID: 0}
|
|
11
|
+
userData:
|
|
12
|
+
assetBundleName:
|
|
13
|
+
assetBundleVariant:
|