Commit Graph

151 Commits

Author SHA1 Message Date
kobewi 492b0c322a
Fix Tween loop initial value
(cherry picked from commit 20aecefd9b)
2023-12-07 10:27:05 +01:00
Silc Lizard (Tokage) Renew 80c9533810 Rework blending method in Variant animation for Int/Array/String 2023-11-16 21:37:18 +09:00
Rémi Verschelde 0e6160a00f
Merge pull request #81525 from KoBeWi/tweening_the_impossible
Check if property exists before tweening
2023-11-09 20:03:53 +01:00
Mai Lavelle 5e15586ec2 Fixes to allow object-less callables throughout Godot
This fixes #81887
2023-10-06 16:31:35 -04:00
kobewi bf9d971215 Check if property exists before tweening 2023-09-11 12:59:43 +02:00
kobewi 598d9972c8 Prevent errors if Tween callback's object is freed 2023-08-29 14:50:53 +02:00
kobewi 1660575bd8 Fix initial value with delay in PropertyTweener 2023-08-17 10:28:26 +02:00
kobewi dbecf8bd1a Improve and clarify paused Tweens 2023-07-25 13:29:30 +02:00
Rakka Rage 780e21bcac Add TRANS_SPRING to Tween 2023-05-17 17:54:37 -04:00
kobewi 20f03884f2 Various Tween code improvements 2023-04-03 15:40:02 +02:00
John Pennycook 4cb2085543 Add get_loops_left() function to Tween
Implements godotengine/godot-proposals#5141.

Adds a new get_loops_left() function to Tween, allowing developers to
reason about how many times a tweening sequence will repeat and whether
to expect finished or loop_finished as the next signal.

Co-authored-by: Tomek <kobewi4e@gmail.com>
2023-03-20 20:49:31 -07:00
kobewi 45f4d59fa4 Check for type mismatch in PropertyTweener.from() 2023-02-28 17:16:56 +01:00
kobewi 17fe5c2b23 Fix tween_method() type validation 2023-02-12 22:08:25 +01:00
VolTer 5313bc90f6 Fix error messages of {}Tweener.new() 2023-01-30 17:58:20 +01:00
kobewi 1260cb0bfb Improve empty Tween error message 2023-01-16 10:30:21 +01:00
kobewi f64dd732b8 Improve some Tween internals 2023-01-11 14:08:14 +01:00
Rémi Verschelde d95794ec8a
One Copyright Update to rule them all
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.

It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).

We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).

Also fixed "cf." Frenchism - it's meant as "refer to / see".
2023-01-05 13:25:55 +01:00
kobewi a6e02f149f Improve RefCounted support in Tween 2023-01-01 18:45:17 +01:00
bruvzg 0103af1ddd
Fix MSVC warnings, rename shadowed variables, fix uninitialized values, change warnings=all to use /W4. 2022-10-07 11:32:33 +03:00
Dave Palais 0c46068af0 Change time parameters and variables to double type
Addresses #65313
2022-09-26 13:52:54 -05:00
kobewi 1a462bc84e Fix crash when playing Tween right after finishing 2022-09-16 14:20:12 +02:00
Silc Renew 9d47e079b7 Move some methods to Animation from Variant for refactoring 2022-09-15 04:52:43 +09:00
Micky 2b18a4002c Cast between float and ints in Tween.`tween_property()` 2022-08-30 10:53:31 +02:00
Silc Renew f7dd83ce60 Fix Quaternion Tween and implement ease baker 2022-08-22 19:04:58 +09:00
Juan Linietsky d4433ae6d3 Remove Signal connect binds
Remove the optional argument p_binds from `Object::connect` since it was deprecated by Callable.bind().
Changed all uses of it to Callable.bind()
2022-07-29 16:26:13 +02:00
reduz 455c06ecd4 Implement Vector4, Vector4i, Projection
Implement built-in classes Vector4, Vector4i and Projection.

* Two versions of Vector4 (float and integer).
* A Projection class, which is a 4x4 matrix specialized in projection types.

These types have been requested for a long time, but given they were very corner case they were not added before.
Because in Godot 4, reimplementing parts of the rendering engine is now possible, access to these types (heavily used by the rendering code) becomes a necessity.

**Q**: Why Projection and not Matrix4?
**A**: Godot does not use Matrix2, Matrix3, Matrix4x3, etc. naming convention because, within the engine, these types always have a *purpose*. As such, Godot names them: Transform2D, Transform3D or Basis. In this case, this 4x4 matrix is _always_ used as a _Projection_, hence the naming.
2022-07-23 14:00:01 +02:00
kobewi 45e4cb2bbf Fix error spam when tweened node leaves tree 2022-05-05 17:57:25 +02:00
Rémi Verschelde 931838b330
Merge pull request #60627 from aaronfranke/rename-elements
Rename Transform2D and Basis `elements` to `columns` and `rows` respectively
2022-05-03 14:40:01 +02:00
kobewi f473aab00d Improve Tween infinite loop detection 2022-05-01 00:24:07 +02:00
kobewi 7f0bc91844 Simplify Callable error text methods 2022-04-30 13:42:26 +02:00
Aaron Franke 1bf94dff3a
Rename Basis "elements" to "rows" 2022-04-29 08:02:56 -05:00
Aaron Franke b831fb0a54
Rename Transform2D "elements" to "columns" 2022-04-29 08:02:39 -05:00
Haoyu Qiu 6c01ef8f4c Miscellaneous Tween fixes 2022-04-28 21:19:01 +08:00
kobewi 3017530e26 Make Tween.interpolate_value() static 2022-04-17 23:13:39 +02:00
Rémi Verschelde 6bbd4def45
Merge pull request #59415 from KoBeWi/tween_time() 2022-04-02 00:31:40 +02:00
kobewi e04ae8c8bc Add get_total_elapsed_time() to Tween 2022-03-29 13:34:05 +02:00
kobewi d48dea7158 Force final value at the end of Tween 2022-03-27 03:09:12 +02:00
kobewi 038977a985 Better handle infinite Tween loops 2022-01-29 00:36:39 +01:00
kobewi 4f5c3d5a60 Fix not being able to stop() empty Tweens 2022-01-28 14:54:14 +01:00
kobewi 205f56f226 Fix Tween pause behavior 2022-01-09 19:38:18 +01:00
Rémi Verschelde fe52458154
Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +01:00
Rémi Verschelde 5945f43cc8
Merge pull request #54391 from DavidSichma/doc_interpolate_value 2021-11-01 22:38:42 +01:00
David Sichma b9c7c52a29
Fixed Tween::interpolate_value argument order. 2021-10-29 17:29:28 +02:00
kobewi 3ed20a2f5d Fix parallel Tweens not ending correctly 2021-10-28 21:04:22 +02:00
kobewi 11e7963a14 Refactor and move easing equations 2021-09-24 13:47:13 +02:00
kobewi 266955d15f Improvements to Tweens' Variant types 2021-09-16 02:08:26 +02:00
kobewi e092a132fe Various fixes to Tween code 2021-08-06 13:07:34 +02:00
kobewi 053f20be76 Add null check to Tween.bind_node() 2021-08-02 14:15:40 +02:00
Rémi Verschelde 92299989bd
Use Ref<T> references as iterators where relevant
And const when possible.
2021-07-26 19:27:11 +02:00
Aaron Franke 4e6efd1b07
Use C++ iterators for Lists in many situations 2021-07-23 17:38:28 -04:00