[DOCS] Review and improve 17 classes (#11890)

This commit is contained in:
Jérôme GULLY 2017-10-09 12:49:12 +02:00 committed by Rémi Verschelde
parent cb4830ef5e
commit 9e93f5b478
17 changed files with 120 additions and 89 deletions

View File

@ -92,8 +92,10 @@
</methods>
<members>
<member name="dialog_hide_on_ok" type="bool" setter="set_hide_on_ok" getter="get_hide_on_ok">
If [code]true[/code] the dialog is hidden when accepted. Default value: [code]true[/code].
</member>
<member name="dialog_text" type="String" setter="set_text" getter="get_text">
The text displayed by this dialog.
</member>
</members>
<signals>

View File

@ -104,6 +104,7 @@
<return type="Array">
</return>
<description>
Returns a copy of this [code]Array[/code].
</description>
</method>
<method name="empty">

View File

@ -77,6 +77,9 @@
</methods>
<members>
<member name="data" type="Dictionary" setter="_set_data" getter="_get_data">
Returns a [Dictionary] with two keys :
[code]data[/code] : [PoolByteArray] with [code]true[/code]/[code]false[/code] [code]BitMap[/code] data.
[code]size[/code] : The [code]Bitmap[/code]'s size.
</member>
</members>
<constants>

View File

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="CanvasModulate" inherits="Node2D" category="Core" version="3.0.alpha.custom_build">
<brief_description>
Tint the entire canvas
Tint the entire canvas.
</brief_description>
<description>
CanvasModulate tints the canvas elements using its assigned color
[code]CanvasModulate[/code] tints the canvas elements using its assigned [code]color[/code].
</description>
<tutorials>
</tutorials>
@ -30,6 +30,7 @@
</methods>
<members>
<member name="color" type="Color" setter="set_color" getter="get_color">
The tint color to apply.
</member>
</members>
<constants>

View File

@ -38,6 +38,10 @@
</methods>
<members>
<member name="color" type="Color" setter="set_frame_color" getter="get_frame_color">
The color to fill the [code]ColorRect[/code].
[codeblock]
$ColorRect.color = Color(1, 0, 0, 1) # Set ColorRect node's color to red
[/codeblock]
</member>
</members>
<constants>

View File

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="ConvexPolygonShape" inherits="Shape" category="Core" version="3.0.alpha.custom_build">
<brief_description>
Convex Polygon Shape.
Convex polygon shape for 3D physics.
</brief_description>
<description>
Convex polygon shape resource, which can be set into a [PhysicsBody] or area.
Convex polygon shape resource, which can be added to a [PhysicsBody] or area.
</description>
<tutorials>
</tutorials>
@ -28,6 +28,7 @@
</methods>
<members>
<member name="points" type="PoolVector3Array" setter="set_points" getter="get_points">
The list of 3D points forming the convex polygon shape.
</member>
</members>
<constants>

View File

@ -16,7 +16,7 @@
<return type="PoolVector2Array">
</return>
<description>
Return a list of points in either clockwise or counter clockwise order, forming a convex polygon.
Returns a list of points in either clockwise or counter clockwise order, forming a convex polygon.
</description>
</method>
<method name="set_point_cloud">
@ -34,12 +34,13 @@
<argument index="0" name="points" type="PoolVector2Array">
</argument>
<description>
Set a list of points in either clockwise or counter clockwise order, forming a convex polygon.
Sets a list of points in either clockwise or counter clockwise order, forming a convex polygon.
</description>
</method>
</methods>
<members>
<member name="points" type="PoolVector2Array" setter="set_points" getter="get_points">
The polygon's list of vertices. Can be in either clockwise or counterclockwise order.
</member>
</members>
<constants>

View File

@ -85,6 +85,7 @@
<return type="int">
</return>
<description>
Returns the currently opened directory's drive index. See [method get_drive] to convert returned index to the name of the drive.
</description>
</method>
<method name="get_drive">

View File

@ -30,14 +30,14 @@
<return type="void">
</return>
<description>
Close the currently opened file.
Closes the currently opened file.
</description>
</method>
<method name="eof_reached" qualifiers="const">
<return type="bool">
</return>
<description>
Returns [code]true[/code] if the file cursor reached the end of the file.
Returns [code]true[/code] if the file cursor has reached the end of the file.
</description>
</method>
<method name="file_exists" qualifiers="const">
@ -46,42 +46,42 @@
<argument index="0" name="path" type="String">
</argument>
<description>
Returns [code]true[/code] if the file in the specified path exists.
Returns [code]true[/code] if the file exists in the given path.
</description>
</method>
<method name="get_16" qualifiers="const">
<return type="int">
</return>
<description>
Get the next 16 bits from the file as an integer.
Returns the next 16 bits from the file as an integer.
</description>
</method>
<method name="get_32" qualifiers="const">
<return type="int">
</return>
<description>
Get the next 32 bits from the file as an integer.
Returns the next 32 bits from the file as an integer.
</description>
</method>
<method name="get_64" qualifiers="const">
<return type="int">
</return>
<description>
Get the next 64 bits from the file as an integer.
Returns the next 64 bits from the file as an integer.
</description>
</method>
<method name="get_8" qualifiers="const">
<return type="int">
</return>
<description>
Get the next 8 bits from the file as an integer.
Returns the next 8 bits from the file as an integer.
</description>
</method>
<method name="get_as_text" qualifiers="const">
<return type="String">
</return>
<description>
Get the whole file as a [String].
Returns the whole file as a [String].
</description>
</method>
<method name="get_buffer" qualifiers="const">
@ -90,7 +90,7 @@
<argument index="0" name="len" type="int">
</argument>
<description>
Get next len bytes of the file as a [PoolByteArray].
Returns next [code]len[/code] bytes of the file as a [PoolByteArray].
</description>
</method>
<method name="get_csv_line" qualifiers="const">
@ -99,14 +99,14 @@
<argument index="0" name="delim" type="String" default="&quot;,&quot;">
</argument>
<description>
Get the next value of the file in CSV (Comma Separated Values) format. You can pass a different delimiter to use other than the default "," (comma).
Returns the next value of the file in CSV (Comma Separated Values) format. You can pass a different delimiter to use other than the default "," (comma).
</description>
</method>
<method name="get_double" qualifiers="const">
<return type="float">
</return>
<description>
Get the next 64 bits from the file as a floating point number.
Returns the next 64 bits from the file as a floating point number.
</description>
</method>
<method name="get_endian_swap">
@ -120,14 +120,14 @@
<return type="int" enum="Error">
</return>
<description>
Get the last error that happened when trying to perform operations. Compare with the [code]ERR_FILE_*[/code] constants from [@Global Scope].
Returns the last error that happened when trying to perform operations. Compare with the [code]ERR_FILE_*[/code] constants from [@Global Scope].
</description>
</method>
<method name="get_float" qualifiers="const">
<return type="float">
</return>
<description>
Get the next 32 bits from the file as a floating point number.
Returns the next 32 bits from the file as a floating point number.
</description>
</method>
<method name="get_len" qualifiers="const">
@ -141,7 +141,7 @@
<return type="String">
</return>
<description>
Get the next line of the file as a [String].
Returns the next line of the file as a [String].
</description>
</method>
<method name="get_md5" qualifiers="const">
@ -150,7 +150,7 @@
<argument index="0" name="path" type="String">
</argument>
<description>
Returns a MD5 String representing the file at the given path or an empty [String] on failure.
Returns an MD5 String representing the file at the given path or an empty [String] on failure.
</description>
</method>
<method name="get_modified_time" qualifiers="const">
@ -159,28 +159,28 @@
<argument index="0" name="file" type="String">
</argument>
<description>
Returns the modified time in unix timestamp of the [code]file[/code] or returns a [String] "ERROR IN [code]file[/code]". This unix timestamp can be converted to datetime by using [method OS.get_datetime_from_unix_time].
Returns the last time the [code]file[/code] was modified in unix timestamp format or returns a [String] "ERROR IN [code]file[/code]". This unix timestamp can be converted to datetime by using [method OS.get_datetime_from_unix_time].
</description>
</method>
<method name="get_pascal_string">
<return type="String">
</return>
<description>
Get a [String] saved in Pascal format from the file.
Returns a [String] saved in Pascal format from the file.
</description>
</method>
<method name="get_position" qualifiers="const">
<return type="int">
</return>
<description>
Returns the file cursor position.
Returns the file cursor's position.
</description>
</method>
<method name="get_real" qualifiers="const">
<return type="float">
</return>
<description>
Get the next bits from the file as a floating point number.
Returns the next bits from the file as a floating point number.
</description>
</method>
<method name="get_sha256" qualifiers="const">
@ -189,14 +189,14 @@
<argument index="0" name="path" type="String">
</argument>
<description>
Returns a SHA-256 String representing the file at the given path or an empty [String] on failure.
Returns a SHA-256 [String] representing the file at the given path or an empty [String] on failure.
</description>
</method>
<method name="get_var" qualifiers="const">
<return type="Variant">
</return>
<description>
Get the next Variant value from the file.
Returns the next [Variant] value from the file.
</description>
</method>
<method name="is_open" qualifiers="const">
@ -214,7 +214,7 @@
<argument index="1" name="flags" type="int">
</argument>
<description>
Open the file for writing or reading, depending on the flags.
Opens the file for writing or reading, depending on the flags.
</description>
</method>
<method name="open_compressed">
@ -227,7 +227,7 @@
<argument index="2" name="compression_mode" type="int" default="0">
</argument>
<description>
Open a compressed file for reading or writing. The compression_mode can be set as one of the COMPRESSION_* constants.
Opens a compressed file for reading or writing. Use COMPRESSION_* constants to set [code]compression_mode[/code].
</description>
</method>
<method name="open_encrypted">
@ -240,7 +240,7 @@
<argument index="2" name="key" type="PoolByteArray">
</argument>
<description>
Open an encrypted file in write or read mode. You need to pass a binary key to encrypt/decrypt it.
Opens an encrypted file in write or read mode. You need to pass a binary key to encrypt/decrypt it.
</description>
</method>
<method name="open_encrypted_with_pass">
@ -253,7 +253,7 @@
<argument index="2" name="pass" type="String">
</argument>
<description>
Open an encrypted file in write or read mode. You need to pass a password to encrypt/decrypt it.
Opens an encrypted file in write or read mode. You need to pass a password to encrypt/decrypt it.
</description>
</method>
<method name="seek">
@ -271,7 +271,7 @@
<argument index="0" name="position" type="int" default="0">
</argument>
<description>
Change the file reading/writing cursor to the specified position (in bytes from the end of the file). Note that this is an offset, so you should use negative numbers or the cursor will be at the end of the file.
Changes the file reading/writing cursor to the specified position (in bytes from the end of the file). Note that this is an offset, so you should use negative numbers or the cursor will be at the end of the file.
</description>
</method>
<method name="set_endian_swap">
@ -290,7 +290,7 @@
<argument index="0" name="value" type="int">
</argument>
<description>
Store an integer as 16 bits in the file.
Stores an integer as 16 bits in the file.
</description>
</method>
<method name="store_32">
@ -299,7 +299,7 @@
<argument index="0" name="value" type="int">
</argument>
<description>
Store an integer as 32 bits in the file.
Stores an integer as 32 bits in the file.
</description>
</method>
<method name="store_64">
@ -308,7 +308,7 @@
<argument index="0" name="value" type="int">
</argument>
<description>
Store an integer as 64 bits in the file.
Stores an integer as 64 bits in the file.
</description>
</method>
<method name="store_8">
@ -317,7 +317,7 @@
<argument index="0" name="value" type="int">
</argument>
<description>
Store an integer as 8 bits in the file.
Stores an integer as 8 bits in the file.
</description>
</method>
<method name="store_buffer">
@ -326,7 +326,7 @@
<argument index="0" name="buffer" type="PoolByteArray">
</argument>
<description>
Store the given array of bytes in the file.
Stores the given array of bytes in the file.
</description>
</method>
<method name="store_double">
@ -335,7 +335,7 @@
<argument index="0" name="value" type="float">
</argument>
<description>
Store a floating point number as 64 bits in the file.
Stores a floating point number as 64 bits in the file.
</description>
</method>
<method name="store_float">
@ -344,7 +344,7 @@
<argument index="0" name="value" type="float">
</argument>
<description>
Store a floating point number as 32 bits in the file.
Stores a floating point number as 32 bits in the file.
</description>
</method>
<method name="store_line">
@ -353,7 +353,7 @@
<argument index="0" name="line" type="String">
</argument>
<description>
Store the given [String] as a line in the file.
Stores the given [String] as a line in the file.
</description>
</method>
<method name="store_pascal_string">
@ -362,7 +362,7 @@
<argument index="0" name="string" type="String">
</argument>
<description>
Store the given [String] as a line in the file in Pascal format (i.e. also store the length of the string).
Stores the given [String] as a line in the file in Pascal format (i.e. also store the length of the string).
</description>
</method>
<method name="store_real">
@ -371,7 +371,7 @@
<argument index="0" name="value" type="float">
</argument>
<description>
Store a floating point number in the file.
Stores a floating point number in the file.
</description>
</method>
<method name="store_string">
@ -380,7 +380,7 @@
<argument index="0" name="string" type="String">
</argument>
<description>
Store the given [String] in the file.
Stores the given [String] in the file.
</description>
</method>
<method name="store_var">
@ -389,34 +389,34 @@
<argument index="0" name="value" type="Variant">
</argument>
<description>
Store any Variant value in the file.
Stores any Variant value in the file.
</description>
</method>
</methods>
<constants>
<constant name="READ" value="1">
Open the file for read operations.
Opens the file for read operations.
</constant>
<constant name="WRITE" value="2">
Open the file for write operations. Create it if the file does not exist and truncate if it exists.
Opens the file for write operations. Create it if the file does not exist and truncate if it exists.
</constant>
<constant name="READ_WRITE" value="3">
Open the file for read and write operations. Does not truncate the file.
Opens the file for read and write operations. Does not truncate the file.
</constant>
<constant name="WRITE_READ" value="7">
Open the file for read and write operations. Create it if the file does not exist and truncate if it exists.
Opens the file for read and write operations. Create it if the file does not exist and truncate if it exists.
</constant>
<constant name="COMPRESSION_FASTLZ" value="0">
Use the FastLZ compression method.
Uses the FastLZ compression method.
</constant>
<constant name="COMPRESSION_DEFLATE" value="1">
Use the Deflate compression method.
Uses the Deflate compression method.
</constant>
<constant name="COMPRESSION_ZSTD" value="2">
Use the Zstd compression method.
Uses the Zstd compression method.
</constant>
<constant name="COMPRESSION_GZIP" value="3">
Use the GZip compression method.
Uses the gzip compression method.
</constant>
</constants>
</class>

View File

@ -16,6 +16,7 @@
<return type="Variant">
</return>
<description>
Calls the referenced function previously set by [method set_function] or [method @GDScript.funcref].
</description>
</method>
<method name="set_function">
@ -24,7 +25,7 @@
<argument index="0" name="name" type="String">
</argument>
<description>
Set the name of the function to call on the object, without parentheses or any parameters.
The name of the referenced function to call on the object, without parentheses or any parameters.
</description>
</method>
<method name="set_instance">
@ -33,7 +34,7 @@
<argument index="0" name="instance" type="Object">
</argument>
<description>
Set the object on which to call the referenced function. This object must be of a type actually inheriting from [Object], not a built-in type such as [int], [Vector2] or [Dictionary].
The object containing the referenced function. This object must be of a type actually inheriting from [Object], not a built-in type such as [int], [Vector2] or [Dictionary].
</description>
</method>
</methods>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Gradient" inherits="Resource" category="Core" version="3.0.alpha.custom_build">
<brief_description>
Color interpolator node
Color interpolator node.
</brief_description>
<description>
Given a set of colors, this node will interpolate them in order, meaning, that if you have color 1, color 2 and color3, the ramp will interpolate (generate the colors between two colors) from color 1 to color 2 and from color 2 to color 3. Initially the ramp will have 2 colors (black and white), one (black) at ramp lower offset offset 0 and the other (white) at the ramp higher offset 1.
@ -122,8 +122,10 @@
</methods>
<members>
<member name="colors" type="PoolColorArray" setter="set_colors" getter="get_colors">
Gradient's colors returned as a [PoolColorArray].
</member>
<member name="offsets" type="PoolRealArray" setter="set_offsets" getter="get_offsets">
Gradient's offsets returned as a [PoolRealArray].
</member>
</members>
<constants>

View File

@ -30,6 +30,7 @@
</methods>
<members>
<member name="columns" type="int" setter="set_columns" getter="get_columns">
The number of columns in the [code]GridContainer[/code]. If modified, [code]GridContainer[/code] reorders its children to accommodate the new layout.
</member>
</members>
<constants>

View File

@ -4,7 +4,7 @@
A [Texture] based on an [Image].
</brief_description>
<description>
A [Texture] based on an [Image]. Can be created from an [Image].
A [Texture] based on an [Image]. Can be created from an [Image] with [method create_from_image].
</description>
<tutorials>
</tutorials>
@ -93,6 +93,7 @@
<argument index="0" name="size" type="Vector2">
</argument>
<description>
Resizes the [code]ImageTexture[/code] to the specified dimensions.
</description>
</method>
<method name="set_storage">

View File

@ -1,9 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="ImmediateGeometry" inherits="GeometryInstance" category="Core" version="3.0.alpha.custom_build">
<brief_description>
Node to draw simple geometry from code, ala OpenGL 1.x
Draws simple geometry from code.
</brief_description>
<description>
Draws simple geometry from code. Uses a drawing mode similar to OpenGL 1.x.
</description>
<tutorials>
</tutorials>
@ -31,7 +32,7 @@
<argument index="0" name="position" type="Vector3">
</argument>
<description>
Add a vertex with the currently set color/uv/etc.
Adds a vertex with the currently set color/uv/etc.
</description>
</method>
<method name="begin">
@ -50,14 +51,14 @@
<return type="void">
</return>
<description>
Clear everything that was drawn using begin/end.
Clears everything that was drawn using begin/end.
</description>
</method>
<method name="end">
<return type="void">
</return>
<description>
Call this when done adding a batch of geometry, otherwise it can't be displayed.
Ends a drawing context and displays the results.
</description>
</method>
<method name="set_color">
@ -66,7 +67,7 @@
<argument index="0" name="color" type="Color">
</argument>
<description>
Set the color that the next vertex will use to be drawn.
The current drawing color.
</description>
</method>
<method name="set_normal">
@ -75,7 +76,7 @@
<argument index="0" name="normal" type="Vector3">
</argument>
<description>
Set the normal that the next vertex will use to be drawn.
The next vertex's normal.
</description>
</method>
<method name="set_tangent">
@ -84,7 +85,7 @@
<argument index="0" name="tangent" type="Plane">
</argument>
<description>
Set the tangent (and binormal facing) that the next vertex will use to be drawn.
The next vertex's tangent (and binormal facing).
</description>
</method>
<method name="set_uv">
@ -93,7 +94,7 @@
<argument index="0" name="uv" type="Vector2">
</argument>
<description>
Set the UV that the next vertex will use to be drawn.
The next vertex's UV.
</description>
</method>
<method name="set_uv2">
@ -102,7 +103,7 @@
<argument index="0" name="uv" type="Vector2">
</argument>
<description>
Set the second layer of UV that the next vertex will use to be drawn.
The next vertex's second layer UV.
</description>
</method>
</methods>

View File

@ -15,7 +15,7 @@
<return type="int" enum="Label.Align">
</return>
<description>
Return the alignment mode (any of the ALIGN_* enumeration values).
Returns the alignment mode (any of the ALIGN_* enumeration values).
</description>
</method>
<method name="get_line_count" qualifiers="const">
@ -36,76 +36,77 @@
<return type="int">
</return>
<description>
Return the the number of lines to skipped before displaying.
Returns the the number of lines to skip before displaying.
</description>
</method>
<method name="get_max_lines_visible" qualifiers="const">
<return type="int">
</return>
<description>
Return the restricted number of lines to display. Returns -1 if unrestricted.
Returns the maximum number of lines to display. Returns -1 if unrestricted.
</description>
</method>
<method name="get_percent_visible" qualifiers="const">
<return type="float">
</return>
<description>
Return the restricted number of characters to display (as a percentage of the total text).
Returns the maximum number of characters to display as a percentage of the total text.
</description>
</method>
<method name="get_text" qualifiers="const">
<return type="String">
</return>
<description>
Return the label text. Text can contain newlines.
Returns the label text. Text can contain newlines.
</description>
</method>
<method name="get_total_character_count" qualifiers="const">
<return type="int">
</return>
<description>
Return the total length of the text.
Returns the total length of the text.
</description>
</method>
<method name="get_valign" qualifiers="const">
<return type="int" enum="Label.VAlign">
</return>
<description>
Return the vertical alignment mode (any of the VALIGN_* enumeration values).
Returns the vertical alignment mode (any of the VALIGN_* enumeration values).
</description>
</method>
<method name="get_visible_characters" qualifiers="const">
<return type="int">
</return>
<description>
Return the restricted number of characters to display. Returns -1 if unrestricted.
Returns the restricted number of characters to display. Returns -1 if unrestricted.
</description>
</method>
<method name="get_visible_line_count" qualifiers="const">
<return type="int">
</return>
<description>
Returns the number of lines shown. Useful if the [code]Label[/code] 's height cannot currently display all lines.
</description>
</method>
<method name="has_autowrap" qualifiers="const">
<return type="bool">
</return>
<description>
Return the state of the [i]autowrap[/i] mode (see [method set_autowrap]).
Returns [code]true[/code] if [i]autowrap[/i] mode (see [method set_autowrap]).
</description>
</method>
<method name="is_clipping_text" qualifiers="const">
<return type="bool">
</return>
<description>
Return [code]true[/code] if text would be cut off if it is too wide.
Returns [code]true[/code] if text would be cut off if it is too wide.
</description>
</method>
<method name="is_uppercase" qualifiers="const">
<return type="bool">
</return>
<description>
Return [code]true[/code] if text is displayed in all capitals.
Returns [code]true[/code] if text is displayed in all capitals.
</description>
</method>
<method name="set_align">

View File

@ -5,7 +5,7 @@
</brief_description>
<description>
A Texture capable of storing many smaller Textures with offsets.
You can dynamically add pieces(Textures) to this fLargeTexture] using different offsets.
You can dynamically add pieces([Texture]) to this [code]LargeTexture[/code] using different offsets.
</description>
<tutorials>
</tutorials>
@ -20,21 +20,21 @@
<argument index="1" name="texture" type="Texture">
</argument>
<description>
Add another [Texture] to this [LargeTexture], starting on offset "ofs".
Add another [Texture] to this [code]LargeTexture[/code], starting on offset "ofs".
</description>
</method>
<method name="clear">
<return type="void">
</return>
<description>
Clear the [LargeTexture].
Clears the [code]LargeTexture[/code].
</description>
</method>
<method name="get_piece_count" qualifiers="const">
<return type="int">
</return>
<description>
Return the number of pieces currently in this [LargeTexture].
Returns the number of pieces currently in this [code]LargeTexture[/code].
</description>
</method>
<method name="get_piece_offset" qualifiers="const">
@ -43,7 +43,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
Return the offset of the piece with index "idx".
Returns the offset of the piece with index "idx".
</description>
</method>
<method name="get_piece_texture" qualifiers="const">
@ -52,7 +52,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
Return the [Texture] of the piece with index "idx".
Returns the [Texture] of the piece with index "idx".
</description>
</method>
<method name="set_piece_offset">
@ -63,7 +63,7 @@
<argument index="1" name="ofs" type="Vector2">
</argument>
<description>
Set the offset of the piece with index "idx" to "ofs".
Sets the offset of the piece with index "idx" to "ofs".
</description>
</method>
<method name="set_piece_texture">
@ -74,7 +74,7 @@
<argument index="1" name="texture" type="Texture">
</argument>
<description>
Set the [Texture] of the piece with index "idx" to "ofs".
Sets the [Texture] of the piece with index "idx" to "ofs".
</description>
</method>
<method name="set_size">
@ -83,12 +83,16 @@
<argument index="0" name="size" type="Vector2">
</argument>
<description>
Set the size of this [LargeTexture].
Sets the size of this [code]LargeTexture[/code].
</description>
</method>
</methods>
<members>
<member name="_data" type="Array" setter="_set_data" getter="_get_data">
Returns an [Array] with offsets and textures data of each added piece. Schema is [offsets1, texture1, offsets2, texture2, large_texture_size].
[code]offsets[/code] : [Vector2] offsets of the texture piece.
[code]second[/code] : [StreamTexture] data of the texture piece.
[code]last entry[/code] : [Vector2] size of the entire large texture.
</member>
</members>
<constants>

View File

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Light2D" inherits="Node2D" category="Core" version="3.0.alpha.custom_build">
<brief_description>
Node that casts light in a 2D environment.
Casts light in a 2D environment.
</brief_description>
<description>
Node that casts light in a 2D environment. Light is defined by a (usually grayscale) texture, a color, an energy value, a mode (see constants), and various other parameters (range and shadows-related). Note that Light2D can be used as a mask.
Casts light in a 2D environment. Light is defined by a (usually grayscale) texture, a color, an energy value, a mode (see constants), and various other parameters (range and shadows-related). Note that Light2D can be used as a mask.
</description>
<tutorials>
</tutorials>
@ -385,7 +385,7 @@
If [code]true[/code] the Light2D will cast shadows. Default value: [code]false[/code].
</member>
<member name="shadow_filter" type="int" setter="set_shadow_filter" getter="get_shadow_filter" enum="Light2D.ShadowFilter">
Shadow filter type. May be one of [code][None, PCF5, PCF9, PCF13][/code]. Default value: [code]None[/code].
Shadow filter type. Use SHADOW_FILTER_* constants to set [code]shadow_filter[/code]. Default value: [code]None[/code].
</member>
<member name="shadow_filter_smooth" type="float" setter="set_shadow_smooth" getter="get_shadow_smooth">
Smoothing value for shadows.
@ -408,7 +408,7 @@
Adds the value of pixels corresponding to the Light2D to the values of pixels under it. This is the common behaviour of a light.
</constant>
<constant name="MODE_SUB" value="1">
Subtract the value of pixels corresponding to the Light2D to the values of pixels under it, resulting in inversed light effect.
Subtracts the value of pixels corresponding to the Light2D to the values of pixels under it, resulting in inversed light effect.
</constant>
<constant name="MODE_MIX" value="2">
Mix the value of pixels corresponding to the Light2D to the values of pixels under it by linear interpolation.
@ -417,16 +417,22 @@
The light texture of the Light2D is used as a mask, hiding or revealing parts of the screen underneath depending on the value of each pixel of the light (mask) texture.
</constant>
<constant name="SHADOW_FILTER_NONE" value="0">
No filter applies to the shadow map. See [method shadow_filter].
</constant>
<constant name="SHADOW_FILTER_PCF3" value="1">
Percentage closer filtering (3 samples) applies to the shadow map. See [method shadow_filter].
</constant>
<constant name="SHADOW_FILTER_PCF5" value="2">
Percentage closer filtering (5 samples) applies to the shadow map. See [method shadow_filter].
</constant>
<constant name="SHADOW_FILTER_PCF7" value="3">
Percentage closer filtering (7 samples) applies to the shadow map. See [method shadow_filter].
</constant>
<constant name="SHADOW_FILTER_PCF9" value="4">
Percentage closer filtering (9 samples) applies to the shadow map. See [method shadow_filter].
</constant>
<constant name="SHADOW_FILTER_PCF13" value="5">
Percentage closer filtering (13 samples) applies to the shadow map. See [method shadow_filter].
</constant>
</constants>
</class>