|
@@ -20,7 +20,7 @@ Tweens are useful for animations requiring a numerical property to be interpolat
|
|
|
|
|
|
``Tween`` is more suited than :ref:`AnimationPlayer<class_AnimationPlayer>` for animations where you don't know the final values in advance. For example, interpolating a dynamically-chosen camera zoom value is best done with a ``Tween`` node; it would be difficult to do the same thing with an :ref:`AnimationPlayer<class_AnimationPlayer>` node.
|
|
|
|
|
|
-Here is a brief usage example that causes a 2D node to move smoothly between two positions:
|
|
|
+Here is a brief usage example that makes a 2D node move smoothly between two positions:
|
|
|
|
|
|
::
|
|
|
|
|
@@ -32,7 +32,9 @@ Here is a brief usage example that causes a 2D node to move smoothly between two
|
|
|
|
|
|
Many methods require a property name, such as ``"position"`` above. You can find the correct property name by hovering over the property in the Inspector. You can also provide the components of a property directly by using ``"property:component"`` (eg. ``position:x``), where it would only apply to that particular component.
|
|
|
|
|
|
-Many of the methods accept ``trans_type`` and ``ease_type``. The first accepts an :ref:`TransitionType<enum_Tween_TransitionType>` constant, and refers to the way the timing of the animation is handled (see ``http://easings.net/`` for some examples). The second accepts an :ref:`EaseType<enum_Tween_EaseType>` constant, and controls the where ``trans_type`` is applied to the interpolation (in the beginning, the end, or both). If you don't know which transition and easing to pick, you can try different :ref:`TransitionType<enum_Tween_TransitionType>` constants with :ref:`EASE_IN_OUT<class_Tween_constant_EASE_IN_OUT>`, and use the one that looks best.
|
|
|
+Many of the methods accept ``trans_type`` and ``ease_type``. The first accepts an :ref:`TransitionType<enum_Tween_TransitionType>` constant, and refers to the way the timing of the animation is handled (see `easings.net <https://easings.net/>`_ for some examples). The second accepts an :ref:`EaseType<enum_Tween_EaseType>` constant, and controls the where ``trans_type`` is applied to the interpolation (in the beginning, the end, or both). If you don't know which transition and easing to pick, you can try different :ref:`TransitionType<enum_Tween_TransitionType>` constants with :ref:`EASE_IN_OUT<class_Tween_constant_EASE_IN_OUT>`, and use the one that looks best.
|
|
|
+
|
|
|
+**`Tween easing and transition types cheatsheet <https://raw.githubusercontent.com/godotengine/godot-docs/master/img/tween_cheatsheet.png>`_**
|
|
|
|
|
|
Properties
|
|
|
----------
|