diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/classes/Color.xml | 26 | ||||
-rw-r--r-- | doc/classes/OS.xml | 1 | ||||
-rw-r--r-- | doc/classes/Vector2.xml | 2 | ||||
-rw-r--r-- | doc/classes/Vector3.xml | 2 | ||||
-rw-r--r-- | doc/translations/classes.pot | 4 | ||||
-rw-r--r-- | doc/translations/fr.po | 4 |
6 files changed, 20 insertions, 19 deletions
diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml index d495be2ffd..1af5c87532 100644 --- a/doc/classes/Color.xml +++ b/doc/classes/Color.xml @@ -149,32 +149,32 @@ Returns [code]true[/code] if this color and [code]color[/code] are approximately equal, by running [method @GDScript.is_equal_approx] on each component. </description> </method> - <method name="lightened"> + <method name="lerp"> <return type="Color"> </return> - <argument index="0" name="amount" type="float"> + <argument index="0" name="b" type="Color"> + </argument> + <argument index="1" name="t" type="float"> </argument> <description> - Returns a new color resulting from making this color lighter by the specified percentage (ratio from 0 to 1). + Returns the linear interpolation with another color. The interpolation factor [code]t[/code] is between 0 and 1. [codeblock] - var green = Color(0.0, 1.0, 0.0) - var lightgreen = green.lightened(0.2) # 20% lighter than regular green + var c1 = Color(1.0, 0.0, 0.0) + var c2 = Color(0.0, 1.0, 0.0) + var li_c = c1.lerp(c2, 0.5) # A color of an RGBA(128, 128, 0, 255) [/codeblock] </description> </method> - <method name="linear_interpolate"> + <method name="lightened"> <return type="Color"> </return> - <argument index="0" name="b" type="Color"> - </argument> - <argument index="1" name="t" type="float"> + <argument index="0" name="amount" type="float"> </argument> <description> - Returns the linear interpolation with another color. The interpolation factor [code]t[/code] is between 0 and 1. + Returns a new color resulting from making this color lighter by the specified percentage (ratio from 0 to 1). [codeblock] - var c1 = Color(1.0, 0.0, 0.0) - var c2 = Color(0.0, 1.0, 0.0) - var li_c = c1.linear_interpolate(c2, 0.5) # A color of an RGBA(128, 128, 0, 255) + var green = Color(0.0, 1.0, 0.0) + var lightgreen = green.lightened(0.2) # 20% lighter than regular green [/codeblock] </description> </method> diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index db79ee7765..6a70297f40 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -484,6 +484,7 @@ - [code]OS.shell_open("C:\\Users\name\Downloads")[/code] on Windows opens the file explorer at the user's Downloads folder. - [code]OS.shell_open("https://godotengine.org")[/code] opens the default web browser on the official Godot website. - [code]OS.shell_open("mailto:example@example.com")[/code] opens the default email client with the "To" field set to [code]example@example.com[/code]. See [url=https://blog.escapecreative.com/customizing-mailto-links/]Customizing [code]mailto:[/code] Links[/url] for a list of fields that can be added. + Use [method ProjectSettings.globalize_path] to convert a [code]res://[/code] or [code]user://[/code] path into a system path for use with this method. [b]Note:[/b] This method is implemented on Android, iOS, HTML5, Linux, macOS and Windows. </description> </method> diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml index 7b02a1a4c9..64ebc1fa09 100644 --- a/doc/classes/Vector2.xml +++ b/doc/classes/Vector2.xml @@ -193,7 +193,7 @@ Returns the vector's length squared. Prefer this method over [method length] if you need to sort vectors or need the squared length for some formula. </description> </method> - <method name="linear_interpolate"> + <method name="lerp"> <return type="Vector2"> </return> <argument index="0" name="b" type="Vector2"> diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml index 600c03ba7d..8c18ca8cc9 100644 --- a/doc/classes/Vector3.xml +++ b/doc/classes/Vector3.xml @@ -169,7 +169,7 @@ Returns the vector's length squared. Prefer this function over [method length] if you need to sort vectors or need the squared length for some formula. </description> </method> - <method name="linear_interpolate"> + <method name="lerp"> <return type="Vector3"> </return> <argument index="0" name="b" type="Vector3"> diff --git a/doc/translations/classes.pot b/doc/translations/classes.pot index 641d80c5ca..d5351403dd 100644 --- a/doc/translations/classes.pot +++ b/doc/translations/classes.pot @@ -480,7 +480,7 @@ msgid "" "[float], the return value is a [float].\n" "If both are of the same vector type ([Vector2], [Vector3] or [Color]), the " "return value will be of the same type ([code]lerp[/code] then calls the " -"vector type's [code]linear_interpolate[/code] method).\n" +"vector type's [code]lerp[/code] method).\n" "[codeblock]\n" "lerp(0, 4, 0.75) # Returns 3.0\n" "lerp(Vector2(1, 5), Vector2(3, 2), 0.5) # Returns Vector2(2, 3.5)\n" @@ -12703,7 +12703,7 @@ msgid "" "[codeblock]\n" "var c1 = Color(1.0, 0.0, 0.0)\n" "var c2 = Color(0.0, 1.0, 0.0)\n" -"var li_c = c1.linear_interpolate(c2, 0.5) # A color of an RGBA(128, 128, 0, " +"var li_c = c1.lerp(c2, 0.5) # A color of an RGBA(128, 128, 0, " "255)\n" "[/codeblock]" msgstr "" diff --git a/doc/translations/fr.po b/doc/translations/fr.po index 6926376c05..51313f873b 100644 --- a/doc/translations/fr.po +++ b/doc/translations/fr.po @@ -490,7 +490,7 @@ msgid "" "[float], the return value is a [float].\n" "If both are of the same vector type ([Vector2], [Vector3] or [Color]), the " "return value will be of the same type ([code]lerp[/code] then calls the " -"vector type's [code]linear_interpolate[/code] method).\n" +"vector type's [code]lerp[/code] method).\n" "[codeblock]\n" "lerp(0, 4, 0.75) # Returns 3.0\n" "lerp(Vector2(1, 5), Vector2(3, 2), 0.5) # Returns Vector2(2, 3.5)\n" @@ -12713,7 +12713,7 @@ msgid "" "[codeblock]\n" "var c1 = Color(1.0, 0.0, 0.0)\n" "var c2 = Color(0.0, 1.0, 0.0)\n" -"var li_c = c1.linear_interpolate(c2, 0.5) # A color of an RGBA(128, 128, 0, " +"var li_c = c1.lerp(c2, 0.5) # A color of an RGBA(128, 128, 0, " "255)\n" "[/codeblock]" msgstr "" |