<commit_before><?xml version="1.0" encoding="UTF-8" ?>
<class name="Tween" inherits="RefCounted" version="4.0">
	<brief_description>
		Lightweight object used for general-purpose animation via script, using [Tweener]s.
	</brief_description>
	<description>
		Tweens are mostly useful for animations requiring a numerical property to be interpolated over a range of values. The name [i]tween[/i] comes from [i]in-betweening[/i], an animation technique where you specify [i]keyframes[/i] and the computer interpolates the frames that appear between them.
		[Tween] is more suited than [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]; it would be difficult to do the same thing with an [AnimationPlayer] node. Tweens are also more light-weight than [AnimationPlayer], so they are very much suited for simple animations or general tasks that don't require visual tweaking provided by the editor. They can be used in a fire-and-forget manner for some logic that normally would be done by code. You can e.g. make something shoot periodically by using a looped [CallbackTweener] with a delay.
		A [Tween] can be created by using either [method SceneTree.create_tween] or [method Node.create_tween]. [Tween]s created manually (i.e. by using [code]Tween.new()[/code]) are invalid. They can't be used for tweening values, but you can do manual interpolation with [method interpolate_value].
		A [Tween] animation is composed of a sequence of [Tweener]s, which by default are executed one after another. You can create a sequence by appending [Tweener]s to the [Tween]. Animating something with a [Tweener] is called tweening. Example tweening sequence looks like this:
		[codeblock]
		var tween = get_tree().create_tween()
		tween.tween_property($Sprite, "modulate", Color.red, 1)
		tween.tween_property($Sprite, "scale", Vector2(), 1)
		tween.tween_callback($Sprite.queue_free)
		[/codeblock]
		This sequence will make the [code]$Sprite[/code] node turn red, then shrink and finally the [method Node.queue_free] is called to remove the sprite. See methods [method tween_property], [method tween_interval], [method tween_callback] and [method tween_method] for more usage information.
		When a [Tweener] is created with one of the [code]tween_*[/code] methods, a chained method call can be used to tweak the properties of this [Tweener]. For example, if you want to set different transition type in the above example, you can do:
		[codeblock]
		var tween = get_tree().create_tween()
		tween.tween_property($Sprite, "modulate", Color.red, 1).set_trans(Tween.TRANS_SINE)
		tween.tween_property($Sprite, "scale", Vector2(), 1).set_trans(Tween.TRANS_BOUNCE)
		tween.tween_callback($Sprite.queue_free)
		[/codeblock]
		Most of the [Tween] methods can be chained this way too. In this example the [Tween] is bound and have set a default transition:
		[codeblock]
		var tween = get_tree().create_tween().bind_node(self).set_trans(Tween.TRANS_ELASTIC)
		tween.tween_property($Sprite, "modulate", Color.red, 1)
		tween.tween_property($Sprite, "scale", Vector2(), 1)
		tween.tween_callback($Sprite.queue_free)
		[/codeblock]
		Another interesting use for [Tween]s is animating arbitrary set of objects:
		[codeblock]
		var tween = create_tween()
		for sprite in get_children():
		    tween.tween_property(sprite, "position", Vector2(), 1)
		[/codeblock]
		In the example above, all children of a node are moved one after another to position (0, 0).
		Some [Tweener]s use transitions and eases. The first accepts an [enum TransitionType] constant, and refers to the way the timing of the animation is handled (see [url=https://easings.net/]easings.net[/url] for some examples). The second accepts an [enum EaseType] constant, and controls where the [code]trans_type[/code] 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 [enum TransitionType] constants with [constant EASE_IN_OUT], and use the one that looks best.
		[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]
		[b]Note:[/b] All [Tween]s will automatically start by default. To prevent a [Tween] from autostarting, you can call [method stop] immediately after it was created.
	</description>
	<tutorials>
	</tutorials>
	<methods>
		<method name="bind_node">
			<return type="Tween">
			</return>
			<argument index="0" name="node" type="Node">
			</argument>
			<description>
				Binds this [Tween] with the given [code]node[/code]. [Tween]s are processed directly by the [SceneTree], so they run independently of the animated nodes. When you bind a [Node] with the [Tween], the [Tween] will halt the animation when the object is not inside tree and the [Tween] will be automatically killed when the bound object is freed. Also [constant TWEEN_PAUSE_BOUND] will make the pausing behavior dependent on the bound node.
				For a shorter way to create and bind a [Tween], you can use [method Node.create_tween].
			</description>
		</method>
		<method name="chain">
			<return type="Tween">
			</return>
			<description>
				Used to chain two [Tweener]s after [method set_parallel] is called with [code]true[/code].
				[codeblock]
				var tween = create_tween().set_parallel(true)
				tween.tween_property(...)
				tween.tween_property(...) #will run parallelly with above
				tween.chain().tween_property(...) #will run after two above are finished
				[/codeblock]
			</description>
		</method>
		<method name="custom_step">
			<return type="bool">
			</return>
			<argument index="0" name="delta" type="float">
			</argument>
			<description>
				Processes the [Tween] by given [code]delta[/code] value, in seconds. Mostly useful when the [Tween] is paused, for controlling it manually.
				Returns [code]true[/code] if the [Tween] still has [Tweener]s that haven't finished.
				[b]Note:[/b] The [Tween] will become invalid after finished, but you can call [method stop] after the step, to keep it and reset.
				[b]Note:[/b] [method custom_step] will process only one step of the [Tween]. If the [code]delta[/code] is greater than the remaining time, the excessive time will not have any effect.
			</description>
		</method>
		<method name="interpolate_value">
			<return type="Variant">
			</return>
			<argument index="0" name="trans_type" type="Variant">
			</argument>
			<argument index="1" name="ease_type" type="Variant">
			</argument>
			<argument index="2" name="elapsed_time" type="float">
			</argument>
			<argument index="3" name="initial_value" type="float">
			</argument>
			<argument index="4" name="delta_value" type="int" enum="Tween.TransitionType">
			</argument>
			<argument index="5" name="duration" type="int" enum="Tween.EaseType">
			</argument>
			<description>
				This method can be used for manual interpolation of a value, when you don't want [Tween] to do animating for you. It's similar to [method @GlobalScope.lerp], but with support for custom transition and easing.
				[code]elapsed_time[/code] is the time in seconds that passed after the interping started and it's used to control the position of the interpolation. E.g. when it's equal to half of the [code]duration[/code], the interpolated value will be halfway between initial and final values. This value can also be greater than [code]duration[/code] or lower than 0, which will extrapolate the value.
				[code]initial_value[/code] is the starting value of the interpolation.
				[code]delta_value[/code] is the change of the value in the interpolation, i.e. it's equal to [code]final_value - initial_value[/code].
				[code]duration[/code] is the total time of the interpolation.
			</description>
		</method>
		<method name="is_running">
			<return type="bool">
			</return><commit_msg>Correct the description of Tween.custom_step<commit_after><?xml version="1.0" encoding="UTF-8" ?>
<class name="Tween" inherits="RefCounted" version="4.0">
	<brief_description>
		Lightweight object used for general-purpose animation via script, using [Tweener]s.
	</brief_description>
	<description>
		Tweens are mostly useful for animations requiring a numerical property to be interpolated over a range of values. The name [i]tween[/i] comes from [i]in-betweening[/i], an animation technique where you specify [i]keyframes[/i] and the computer interpolates the frames that appear between them.
		[Tween] is more suited than [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]; it would be difficult to do the same thing with an [AnimationPlayer] node. Tweens are also more light-weight than [AnimationPlayer], so they are very much suited for simple animations or general tasks that don't require visual tweaking provided by the editor. They can be used in a fire-and-forget manner for some logic that normally would be done by code. You can e.g. make something shoot periodically by using a looped [CallbackTweener] with a delay.
		A [Tween] can be created by using either [method SceneTree.create_tween] or [method Node.create_tween]. [Tween]s created manually (i.e. by using [code]Tween.new()[/code]) are invalid. They can't be used for tweening values, but you can do manual interpolation with [method interpolate_value].
		A [Tween] animation is composed of a sequence of [Tweener]s, which by default are executed one after another. You can create a sequence by appending [Tweener]s to the [Tween]. Animating something with a [Tweener] is called tweening. Example tweening sequence looks like this:
		[codeblock]
		var tween = get_tree().create_tween()
		tween.tween_property($Sprite, "modulate", Color.red, 1)
		tween.tween_property($Sprite, "scale", Vector2(), 1)
		tween.tween_callback($Sprite.queue_free)
		[/codeblock]
		This sequence will make the [code]$Sprite[/code] node turn red, then shrink and finally the [method Node.queue_free] is called to remove the sprite. See methods [method tween_property], [method tween_interval], [method tween_callback] and [method tween_method] for more usage information.
		When a [Tweener] is created with one of the [code]tween_*[/code] methods, a chained method call can be used to tweak the properties of this [Tweener]. For example, if you want to set different transition type in the above example, you can do:
		[codeblock]
		var tween = get_tree().create_tween()
		tween.tween_property($Sprite, "modulate", Color.red, 1).set_trans(Tween.TRANS_SINE)
		tween.tween_property($Sprite, "scale", Vector2(), 1).set_trans(Tween.TRANS_BOUNCE)
		tween.tween_callback($Sprite.queue_free)
		[/codeblock]
		Most of the [Tween] methods can be chained this way too. In this example the [Tween] is bound and have set a default transition:
		[codeblock]
		var tween = get_tree().create_tween().bind_node(self).set_trans(Tween.TRANS_ELASTIC)
		tween.tween_property($Sprite, "modulate", Color.red, 1)
		tween.tween_property($Sprite, "scale", Vector2(), 1)
		tween.tween_callback($Sprite.queue_free)
		[/codeblock]
		Another interesting use for [Tween]s is animating arbitrary set of objects:
		[codeblock]
		var tween = create_tween()
		for sprite in get_children():
		    tween.tween_property(sprite, "position", Vector2(), 1)
		[/codeblock]
		In the example above, all children of a node are moved one after another to position (0, 0).
		Some [Tweener]s use transitions and eases. The first accepts an [enum TransitionType] constant, and refers to the way the timing of the animation is handled (see [url=https://easings.net/]easings.net[/url] for some examples). The second accepts an [enum EaseType] constant, and controls where the [code]trans_type[/code] 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 [enum TransitionType] constants with [constant EASE_IN_OUT], and use the one that looks best.
		[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]
		[b]Note:[/b] All [Tween]s will automatically start by default. To prevent a [Tween] from autostarting, you can call [method stop] immediately after it was created.
	</description>
	<tutorials>
	</tutorials>
	<methods>
		<method name="bind_node">
			<return type="Tween">
			</return>
			<argument index="0" name="node" type="Node">
			</argument>
			<description>
				Binds this [Tween] with the given [code]node[/code]. [Tween]s are processed directly by the [SceneTree], so they run independently of the animated nodes. When you bind a [Node] with the [Tween], the [Tween] will halt the animation when the object is not inside tree and the [Tween] will be automatically killed when the bound object is freed. Also [constant TWEEN_PAUSE_BOUND] will make the pausing behavior dependent on the bound node.
				For a shorter way to create and bind a [Tween], you can use [method Node.create_tween].
			</description>
		</method>
		<method name="chain">
			<return type="Tween">
			</return>
			<description>
				Used to chain two [Tweener]s after [method set_parallel] is called with [code]true[/code].
				[codeblock]
				var tween = create_tween().set_parallel(true)
				tween.tween_property(...)
				tween.tween_property(...) #will run parallelly with above
				tween.chain().tween_property(...) #will run after two above are finished
				[/codeblock]
			</description>
		</method>
		<method name="custom_step">
			<return type="bool">
			</return>
			<argument index="0" name="delta" type="float">
			</argument>
			<description>
				Processes the [Tween] by given [code]delta[/code] value, in seconds. Mostly useful when the [Tween] is paused, for controlling it manually. Can also be used to end the [Tween] animation immediately, by using [code]delta[/code] longer than the whole duration.
				Returns [code]true[/code] if the [Tween] still has [Tweener]s that haven't finished.
				[b]Note:[/b] The [Tween] will become invalid after finished, but you can call [method stop] after the step, to keep it and reset.
			</description>
		</method>
		<method name="interpolate_value">
			<return type="Variant">
			</return>
			<argument index="0" name="trans_type" type="Variant">
			</argument>
			<argument index="1" name="ease_type" type="Variant">
			</argument>
			<argument index="2" name="elapsed_time" type="float">
			</argument>
			<argument index="3" name="initial_value" type="float">
			</argument>
			<argument index="4" name="delta_value" type="int" enum="Tween.TransitionType">
			</argument>
			<argument index="5" name="duration" type="int" enum="Tween.EaseType">
			</argument>
			<description>
				This method can be used for manual interpolation of a value, when you don't want [Tween] to do animating for you. It's similar to [method @GlobalScope.lerp], but with support for custom transition and easing.
				[code]elapsed_time[/code] is the time in seconds that passed after the interping started and it's used to control the position of the interpolation. E.g. when it's equal to half of the [code]duration[/code], the interpolated value will be halfway between initial and final values. This value can also be greater than [code]duration[/code] or lower than 0, which will extrapolate the value.
				[code]initial_value[/code] is the starting value of the interpolation.
				[code]delta_value[/code] is the change of the value in the interpolation, i.e. it's equal to [code]final_value - initial_value[/code].
				[code]duration[/code] is the total time of the interpolation.
			</description>
		</method>
		<method name="is_running">
			<return type="bool">
			</return>
{'fraction_non_alphanumeric': 0.10379619119687224, 'fraction_numerical': 0.00340522133938706, 'mean_word_length': 4.639758179231864, 'pattern_counts': {'":': 0, '<': 107, '<?xml version=': 2, '>': 107, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6234779', 'n_tokens_mistral': 5099, 'n_tokens_neox': 4639, 'n_words': 1893}