Removed the doc folder.

This commit is contained in:
Relintai 2023-12-14 23:01:44 +01:00
parent 56a0f45686
commit fb1cf5ff2a
607 changed files with 0 additions and 3266974 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,35 +0,0 @@
BASEDIR = .
CLASSES = $(BASEDIR)/classes/ $(BASEDIR)/../modules/
OUTPUTDIR = $(BASEDIR)/_build
TOOLSDIR = $(BASEDIR)/tools
JSDIR = $(BASEDIR)/../platform/javascript
LANGARG ?= en
LANGCMD = -l $(LANGARG)
.ONESHELL:
clean:
rm -rf $(OUTPUTDIR)
doxygen:
rm -rf $(OUTPUTDIR)/doxygen
mkdir -p $(OUTPUTDIR)/doxygen
doxygen Doxyfile
markdown:
rm -rf $(OUTPUTDIR)/markdown
mkdir -p $(OUTPUTDIR)/markdown
pushd $(OUTPUTDIR)/markdown
python2 $(TOOLSDIR)/makemd.py $(CLASSES)
popd
rst:
rm -rf $(OUTPUTDIR)/rst
mkdir -p $(OUTPUTDIR)/rst
python3 $(TOOLSDIR)/make_rst.py -o $(OUTPUTDIR)/rst $(LANGCMD) $(CLASSES)
rstjs:
rm -rf $(OUTPUTDIR)/rstjs
mkdir -p $(OUTPUTDIR)/rstjs
npm --prefix $(JSDIR) ci
npm --prefix $(JSDIR) run docs -- --destination $(OUTPUTDIR)/rstjs/html5_shell_classref.rst

View File

@ -1,154 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="class">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:string" name="brief_description" />
<xs:element type="xs:string" name="description" />
<xs:element name="tutorials">
<xs:complexType>
<xs:sequence>
<xs:element name="link" maxOccurs="unbounded" minOccurs="0">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute type="xs:string" name="title" use="optional" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="methods" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element name="method" maxOccurs="unbounded" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element name="return" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:sequence />
</xs:sequence>
<xs:attribute type="xs:string" name="type" />
<xs:attribute type="xs:string" name="enum" use="optional" />
</xs:complexType>
</xs:element>
<xs:element name="returns_error" maxOccurs="unbounded" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:sequence />
</xs:sequence>
<xs:attribute type="xs:byte" name="number" />
</xs:complexType>
</xs:element>
<xs:element name="argument" maxOccurs="unbounded" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:sequence />
</xs:sequence>
<xs:attribute type="xs:byte" name="index" />
<xs:attribute type="xs:string" name="name" />
<xs:attribute type="xs:string" name="type" />
<xs:attribute type="xs:string" name="enum" use="optional" />
<xs:attribute type="xs:string" name="default" use="optional" />
</xs:complexType>
</xs:element>
<xs:element type="xs:string" name="description" />
</xs:sequence>
<xs:attribute type="xs:string" name="name" use="optional" />
<xs:attribute type="xs:string" name="qualifiers" use="optional" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="members" minOccurs="0">
<xs:complexType>
<xs:choice maxOccurs="unbounded" minOccurs="0">
<xs:element name="member">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute type="xs:string" name="name" />
<xs:attribute type="xs:string" name="type" />
<xs:attribute type="xs:string" name="setter" />
<xs:attribute type="xs:string" name="getter" />
<xs:attribute type="xs:string" name="overrides" use="optional" />
<xs:attribute type="xs:string" name="enum" use="optional" />
<xs:attribute type="xs:string" name="default" use="optional" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
<xs:element name="signals" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element name="signal" maxOccurs="unbounded" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element name="argument" maxOccurs="unbounded" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:sequence />
</xs:sequence>
<xs:attribute type="xs:byte" name="index" />
<xs:attribute type="xs:string" name="name" />
<xs:attribute type="xs:string" name="type" />
</xs:complexType>
</xs:element>
<xs:element type="xs:string" name="description" />
</xs:sequence>
<xs:attribute type="xs:string" name="name" use="optional" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="constants" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element name="constant" maxOccurs="unbounded" minOccurs="0">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute type="xs:string" name="name" />
<xs:attribute type="xs:string" name="value" />
<xs:attribute type="xs:string" name="enum" use="optional" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="theme_items" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element name="theme_item" maxOccurs="unbounded" minOccurs="0">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute type="xs:string" name="name" />
<xs:attribute type="xs:string" name="data_type" />
<xs:attribute type="xs:string" name="type" />
<xs:attribute type="xs:string" name="default" use="optional" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute type="xs:string" name="name" />
<xs:attribute type="xs:string" name="inherits" />
<xs:attribute type="xs:string" name="category" />
<xs:attribute type="xs:float" name="version" />
</xs:complexType>
</xs:element>
</xs:schema>

File diff suppressed because it is too large Load Diff

View File

@ -1,286 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AABB" version="4.2">
<brief_description>
Axis-Aligned Bounding Box.
</brief_description>
<description>
[AABB] consists of a position, a size, and several utility functions. It is typically used for fast overlap tests.
It uses floating-point coordinates. The 2D counterpart to [AABB] is [Rect2].
[b]Note:[/b] Unlike [Rect2], [AABB] does not have a variant that uses integer coordinates.
</description>
<tutorials>
<link title="Math tutorial index">$DOCS_URL/tutorials/math/index.md</link>
<link title="Vector math">$DOCS_URL/tutorials/math/vector_math.md</link>
<link title="Advanced vector math">$DOCS_URL/tutorials/math/vectors_advanced.md</link>
</tutorials>
<methods>
<method name="AABB">
<return type="AABB" />
<argument index="0" name="position" type="Vector3" />
<argument index="1" name="size" type="Vector3" />
<description>
Constructs an [AABB] from a position and size.
</description>
</method>
<method name="abs">
<return type="AABB" />
<description>
Returns an AABB with equivalent position and size, modified so that the most-negative corner is the origin and the size is positive.
</description>
</method>
<method name="create_from_points">
<return type="bool" />
<argument index="0" name="points" type="PoolVector3Array" />
<description>
</description>
</method>
<method name="encloses">
<return type="bool" />
<argument index="0" name="with" type="AABB" />
<description>
Returns [code]true[/code] if this [AABB] completely encloses another one.
</description>
</method>
<method name="expand">
<return type="AABB" />
<argument index="0" name="to_point" type="Vector3" />
<description>
Returns a copy of this [AABB] expanded to include a given point.
[b]Example:[/b]
[codeblock]
# position (-3, 2, 0), size (1, 1, 1)
var box = AABB(Vector3(-3, 2, 0), Vector3(1, 1, 1))
# position (-3, -1, 0), size (3, 4, 2), so we fit both the original AABB and Vector3(0, -1, 2)
var box2 = box.expand(Vector3(0, -1, 2))
[/codeblock]
</description>
</method>
<method name="expand_to">
<argument index="0" name="vector" type="Vector3" />
<description>
</description>
</method>
<method name="get_center">
<return type="Vector3" />
<description>
Returns the center of the [AABB], which is equal to [member position] + ([member size] / 2).
</description>
</method>
<method name="get_endpoint">
<return type="Vector3" />
<argument index="0" name="idx" type="int" />
<description>
Gets the position of the 8 endpoints of the [AABB] in space.
</description>
</method>
<method name="get_longest_axis">
<return type="Vector3" />
<description>
Returns the normalized longest axis of the [AABB].
</description>
</method>
<method name="get_longest_axis_index">
<return type="int" />
<description>
Returns the index of the longest axis of the [AABB] (according to [Vector3]'s [code]AXIS_*[/code] constants).
</description>
</method>
<method name="get_longest_axis_size">
<return type="float" />
<description>
Returns the scalar length of the longest axis of the [AABB].
</description>
</method>
<method name="get_position">
<return type="Vector3" />
<description>
</description>
</method>
<method name="get_shortest_axis">
<return type="Vector3" />
<description>
Returns the normalized shortest axis of the [AABB].
</description>
</method>
<method name="get_shortest_axis_index">
<return type="int" />
<description>
Returns the index of the shortest axis of the [AABB] (according to [Vector3]::AXIS* enum).
</description>
</method>
<method name="get_shortest_axis_size">
<return type="float" />
<description>
Returns the scalar length of the shortest axis of the [AABB].
</description>
</method>
<method name="get_size">
<return type="Vector3" />
<description>
</description>
</method>
<method name="get_support">
<return type="Vector3" />
<argument index="0" name="dir" type="Vector3" />
<description>
Returns the support point in a given direction. This is useful for collision detection algorithms.
</description>
</method>
<method name="get_volume">
<return type="float" />
<description>
Returns the volume of the [AABB].
</description>
</method>
<method name="grow">
<return type="AABB" />
<argument index="0" name="by" type="float" />
<description>
Returns a copy of the [AABB] grown a given amount of units towards all the sides.
</description>
</method>
<method name="grow_by">
<argument index="0" name="amount" type="float" />
<description>
</description>
</method>
<method name="has_no_surface">
<return type="bool" />
<description>
Returns [code]true[/code] if the [AABB] is empty.
</description>
</method>
<method name="has_no_volume">
<return type="bool" />
<description>
Returns [code]true[/code] if the [AABB] is flat or empty.
</description>
</method>
<method name="has_point">
<return type="bool" />
<argument index="0" name="point" type="Vector3" />
<description>
Returns [code]true[/code] if the [AABB] contains a point.
</description>
</method>
<method name="intersection">
<return type="AABB" />
<argument index="0" name="with" type="AABB" />
<description>
Returns the intersection between two [AABB]. An empty AABB (size 0,0,0) is returned on failure.
</description>
</method>
<method name="intersects">
<return type="bool" />
<argument index="0" name="with" type="AABB" />
<description>
Returns [code]true[/code] if the [AABB] overlaps with another.
</description>
</method>
<method name="intersects_inclusive">
<return type="bool" />
<argument index="0" name="aabb" type="AABB" />
<description>
</description>
</method>
<method name="intersects_plane">
<return type="bool" />
<argument index="0" name="plane" type="Plane" />
<description>
Returns [code]true[/code] if the [AABB] is on both sides of a plane.
</description>
</method>
<method name="intersects_ray">
<return type="bool" />
<argument index="0" name="from" type="Vector3" />
<argument index="1" name="dir" type="Vector3" />
<description>
</description>
</method>
<method name="intersects_rayv">
<return type="Vector3" />
<argument index="0" name="from" type="Vector3" />
<argument index="1" name="dir" type="Vector3" />
<description>
</description>
</method>
<method name="intersects_segment">
<return type="bool" />
<argument index="0" name="from" type="Vector3" />
<argument index="1" name="to" type="Vector3" />
<description>
Returns [code]true[/code] if the [AABB] intersects the line segment between [code]from[/code] and [code]to[/code].
</description>
</method>
<method name="intersects_segmentv">
<return type="Vector3" />
<argument index="0" name="from" type="Vector3" />
<argument index="1" name="to" type="Vector3" />
<description>
</description>
</method>
<method name="is_equal_approx">
<return type="bool" />
<argument index="0" name="aabb" type="AABB" />
<description>
Returns [code]true[/code] if this [AABB] and [code]aabb[/code] are approximately equal, by calling [method @GDScript.is_equal_approx] on each component.
</description>
</method>
<method name="merge">
<return type="AABB" />
<argument index="0" name="with" type="AABB" />
<description>
Returns a larger [AABB] that contains both this [AABB] and [code]with[/code].
</description>
</method>
<method name="merge_with">
<argument index="0" name="with" type="AABB" />
<description>
</description>
</method>
<method name="quantize">
<argument index="0" name="unit" type="float" />
<description>
</description>
</method>
<method name="quantized">
<return type="AABB" />
<argument index="0" name="unit" type="float" />
<description>
</description>
</method>
<method name="set_position">
<argument index="0" name="value" type="Vector3" />
<description>
</description>
</method>
<method name="set_size">
<argument index="0" name="value" type="Vector3" />
<description>
</description>
</method>
<method name="smits_intersect_ray">
<return type="bool" />
<argument index="0" name="from" type="Vector3" />
<argument index="1" name="dir" type="Vector3" />
<argument index="2" name="t0" type="float" />
<argument index="3" name="t1" type="float" />
<description>
</description>
</method>
</methods>
<members>
<member name="end" type="Vector3" setter="" getter="" default="Vector3( 0, 0, 0 )">
Ending corner. This is calculated as [code]position + size[/code]. Setting this value will change the size.
</member>
<member name="position" type="Vector3" setter="" getter="" default="Vector3( 0, 0, 0 )">
Beginning corner. Typically has values lower than [member end].
</member>
<member name="size" type="Vector3" setter="" getter="" default="Vector3( 0, 0, 0 )">
Size from [member position] to [member end]. Typically, all components are positive.
If the size is negative, you can use [method abs] to fix it.
</member>
</members>
<constants>
</constants>
</class>

View File

@ -1,91 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AESContext" inherits="Reference" version="4.2">
<brief_description>
Interface to low level AES encryption features.
</brief_description>
<description>
This class provides access to AES encryption/decryption of raw data. Both AES-ECB and AES-CBC mode are supported.
[codeblock]
extends Node
var aes = AESContext.new()
func _ready():
var key = "My secret key!!!" # Key must be either 16 or 32 bytes.
var data = "My secret text!!" # Data size must be multiple of 16 bytes, apply padding if needed.
# Encrypt ECB
aes.start(AESContext.MODE_ECB_ENCRYPT, key.to_utf8())
var encrypted = aes.update(data.to_utf8())
aes.finish()
# Decrypt ECB
aes.start(AESContext.MODE_ECB_DECRYPT, key.to_utf8())
var decrypted = aes.update(encrypted)
aes.finish()
# Check ECB
assert(decrypted == data.to_utf8())
var iv = "My secret iv!!!!" # IV must be of exactly 16 bytes.
# Encrypt CBC
aes.start(AESContext.MODE_CBC_ENCRYPT, key.to_utf8(), iv.to_utf8())
encrypted = aes.update(data.to_utf8())
aes.finish()
# Decrypt CBC
aes.start(AESContext.MODE_CBC_DECRYPT, key.to_utf8(), iv.to_utf8())
decrypted = aes.update(encrypted)
aes.finish()
# Check CBC
assert(decrypted == data.to_utf8())
[/codeblock]
</description>
<tutorials>
</tutorials>
<methods>
<method name="finish">
<return type="void" />
<description>
Close this AES context so it can be started again. See [method start].
</description>
</method>
<method name="get_iv_state">
<return type="PoolByteArray" />
<description>
Get the current IV state for this context (IV gets updated when calling [method update]). You normally don't need this function.
[b]Note:[/b] This function only makes sense when the context is started with [constant MODE_CBC_ENCRYPT] or [constant MODE_CBC_DECRYPT].
</description>
</method>
<method name="start">
<return type="int" enum="Error" />
<argument index="0" name="mode" type="int" enum="AESContext.Mode" />
<argument index="1" name="key" type="PoolByteArray" />
<argument index="2" name="iv" type="PoolByteArray" default="PoolByteArray( )" />
<description>
Start the AES context in the given [code]mode[/code]. A [code]key[/code] of either 16 or 32 bytes must always be provided, while an [code]iv[/code] (initialization vector) of exactly 16 bytes, is only needed when [code]mode[/code] is either [constant MODE_CBC_ENCRYPT] or [constant MODE_CBC_DECRYPT].
</description>
</method>
<method name="update">
<return type="PoolByteArray" />
<argument index="0" name="src" type="PoolByteArray" />
<description>
Run the desired operation for this AES context. Will return a [PoolByteArray] containing the result of encrypting (or decrypting) the given [code]src[/code]. See [method start] for mode of operation.
[b]Note:[/b] The size of [code]src[/code] must be a multiple of 16. Apply some padding if needed.
</description>
</method>
</methods>
<constants>
<constant name="MODE_ECB_ENCRYPT" value="0" enum="Mode">
AES electronic codebook encryption mode.
</constant>
<constant name="MODE_ECB_DECRYPT" value="1" enum="Mode">
AES electronic codebook decryption mode.
</constant>
<constant name="MODE_CBC_ENCRYPT" value="2" enum="Mode">
AES cipher blocker chaining encryption mode.
</constant>
<constant name="MODE_CBC_DECRYPT" value="3" enum="Mode">
AES cipher blocker chaining decryption mode.
</constant>
<constant name="MODE_MAX" value="4" enum="Mode">
Maximum value for the mode enum.
</constant>
</constants>
</class>

View File

@ -1,266 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AStar" inherits="Reference" version="4.2">
<brief_description>
An implementation of A* to find the shortest paths among connected points in space.
</brief_description>
<description>
A* (A star) is a computer algorithm that is widely used in pathfinding and graph traversal, the process of plotting short paths among vertices (points), passing through a given set of edges (segments). It enjoys widespread use due to its performance and accuracy. Godot's A* implementation uses points in three-dimensional space and Euclidean distances by default.
You must add points manually with [method add_point] and create segments manually with [method connect_points]. Then you can test if there is a path between two points with the [method are_points_connected] function, get a path containing indices by [method get_id_path], or one containing actual coordinates with [method get_point_path].
It is also possible to use non-Euclidean distances. To do so, create a class that extends [code]AStar[/code] and override methods [method _compute_cost] and [method _estimate_cost]. Both take two indices and return a length, as is shown in the following example.
[codeblock]
class MyAStar:
extends AStar
func _compute_cost(u, v):
return abs(u - v)
func _estimate_cost(u, v):
return min(0, abs(u - v) - 1)
[/codeblock]
[method _estimate_cost] should return a lower bound of the distance, i.e. [code]_estimate_cost(u, v) &lt;= _compute_cost(u, v)[/code]. This serves as a hint to the algorithm because the custom [code]_compute_cost[/code] might be computation-heavy. If this is not the case, make [method _estimate_cost] return the same value as [method _compute_cost] to provide the algorithm with the most accurate information.
If the default [method _estimate_cost] and [method _compute_cost] methods are used, or if the supplied [method _estimate_cost] method returns a lower bound of the cost, then the paths returned by A* will be the lowest-cost paths. Here, the cost of a path equals the sum of the [method _compute_cost] results of all segments in the path multiplied by the [code]weight_scale[/code]s of the endpoints of the respective segments. If the default methods are used and the [code]weight_scale[/code]s of all points are set to [code]1.0[/code], then this equals the sum of Euclidean distances of all segments in the path.
</description>
<tutorials>
</tutorials>
<methods>
<method name="_compute_cost" qualifiers="virtual">
<return type="float" />
<argument index="0" name="from_id" type="int" />
<argument index="1" name="to_id" type="int" />
<description>
Called when computing the cost between two connected points.
Note that this function is hidden in the default [code]AStar[/code] class.
</description>
</method>
<method name="_estimate_cost" qualifiers="virtual">
<return type="float" />
<argument index="0" name="from_id" type="int" />
<argument index="1" name="to_id" type="int" />
<description>
Called when estimating the cost between a point and the path's ending point.
Note that this function is hidden in the default [code]AStar[/code] class.
</description>
</method>
<method name="add_point">
<return type="void" />
<argument index="0" name="id" type="int" />
<argument index="1" name="position" type="Vector3" />
<argument index="2" name="weight_scale" type="float" default="1.0" />
<description>
Adds a new point at the given position with the given identifier. The [code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must be 0.0 or greater.
The [code]weight_scale[/code] is multiplied by the result of [method _compute_cost] when determining the overall cost of traveling across a segment from a neighboring point to this point. Thus, all else being equal, the algorithm prefers points with lower [code]weight_scale[/code]s to form a path.
[codeblock]
var astar = AStar.new()
astar.add_point(1, Vector3(1, 0, 0), 4) # Adds the point (1, 0, 0) with weight_scale 4 and id 1
[/codeblock]
If there already exists a point for the given [code]id[/code], its position and weight scale are updated to the given values.
</description>
</method>
<method name="are_points_connected" qualifiers="const">
<return type="bool" />
<argument index="0" name="id" type="int" />
<argument index="1" name="to_id" type="int" />
<argument index="2" name="bidirectional" type="bool" default="true" />
<description>
Returns whether the two given points are directly connected by a segment. If [code]bidirectional[/code] is [code]false[/code], returns whether movement from [code]id[/code] to [code]to_id[/code] is possible through this segment.
</description>
</method>
<method name="clear">
<return type="void" />
<description>
Clears all the points and segments.
</description>
</method>
<method name="connect_points">
<return type="void" />
<argument index="0" name="id" type="int" />
<argument index="1" name="to_id" type="int" />
<argument index="2" name="bidirectional" type="bool" default="true" />
<description>
Creates a segment between the given points. If [code]bidirectional[/code] is [code]false[/code], only movement from [code]id[/code] to [code]to_id[/code] is allowed, not the reverse direction.
[codeblock]
var astar = AStar.new()
astar.add_point(1, Vector3(1, 1, 0))
astar.add_point(2, Vector3(0, 5, 0))
astar.connect_points(1, 2, false)
[/codeblock]
</description>
</method>
<method name="disconnect_points">
<return type="void" />
<argument index="0" name="id" type="int" />
<argument index="1" name="to_id" type="int" />
<argument index="2" name="bidirectional" type="bool" default="true" />
<description>
Deletes the segment between the given points. If [code]bidirectional[/code] is [code]false[/code], only movement from [code]id[/code] to [code]to_id[/code] is prevented, and a unidirectional segment possibly remains.
</description>
</method>
<method name="get_available_point_id" qualifiers="const">
<return type="int" />
<description>
Returns the next available point ID with no point associated to it.
</description>
</method>
<method name="get_closest_point" qualifiers="const">
<return type="int" />
<argument index="0" name="to_position" type="Vector3" />
<argument index="1" name="include_disabled" type="bool" default="false" />
<description>
Returns the ID of the closest point to [code]to_position[/code], optionally taking disabled points into account. Returns [code]-1[/code] if there are no points in the points pool.
[b]Note:[/b] If several points are the closest to [code]to_position[/code], the one with the smallest ID will be returned, ensuring a deterministic result.
</description>
</method>
<method name="get_closest_position_in_segment" qualifiers="const">
<return type="Vector3" />
<argument index="0" name="to_position" type="Vector3" />
<description>
Returns the closest position to [code]to_position[/code] that resides inside a segment between two connected points.
[codeblock]
var astar = AStar.new()
astar.add_point(1, Vector3(0, 0, 0))
astar.add_point(2, Vector3(0, 5, 0))
astar.connect_points(1, 2)
var res = astar.get_closest_position_in_segment(Vector3(3, 3, 0)) # Returns (0, 3, 0)
[/codeblock]
The result is in the segment that goes from [code]y = 0[/code] to [code]y = 5[/code]. It's the closest position in the segment to the given point.
</description>
</method>
<method name="get_id_path">
<return type="PoolIntArray" />
<argument index="0" name="from_id" type="int" />
<argument index="1" name="to_id" type="int" />
<description>
Returns an array with the IDs of the points that form the path found by AStar between the given points. The array is ordered from the starting point to the ending point of the path.
[codeblock]
var astar = AStar.new()
astar.add_point(1, Vector3(0, 0, 0))
astar.add_point(2, Vector3(0, 1, 0), 1) # Default weight is 1
astar.add_point(3, Vector3(1, 1, 0))
astar.add_point(4, Vector3(2, 0, 0))
astar.connect_points(1, 2, false)
astar.connect_points(2, 3, false)
astar.connect_points(4, 3, false)
astar.connect_points(1, 4, false)
var res = astar.get_id_path(1, 3) # Returns [1, 2, 3]
[/codeblock]
If you change the 2nd point's weight to 3, then the result will be [code][1, 4, 3][/code] instead, because now even though the distance is longer, it's "easier" to get through point 4 than through point 2.
</description>
</method>
<method name="get_point_capacity" qualifiers="const">
<return type="int" />
<description>
Returns the capacity of the structure backing the points, useful in conjunction with [code]reserve_space[/code].
</description>
</method>
<method name="get_point_connections">
<return type="PoolIntArray" />
<argument index="0" name="id" type="int" />
<description>
Returns an array with the IDs of the points that form the connection with the given point.
[codeblock]
var astar = AStar.new()
astar.add_point(1, Vector3(0, 0, 0))
astar.add_point(2, Vector3(0, 1, 0))
astar.add_point(3, Vector3(1, 1, 0))
astar.add_point(4, Vector3(2, 0, 0))
astar.connect_points(1, 2, true)
astar.connect_points(1, 3, true)
var neighbors = astar.get_point_connections(1) # Returns [2, 3]
[/codeblock]
</description>
</method>
<method name="get_point_count" qualifiers="const">
<return type="int" />
<description>
Returns the number of points currently in the points pool.
</description>
</method>
<method name="get_point_path">
<return type="PoolVector3Array" />
<argument index="0" name="from_id" type="int" />
<argument index="1" name="to_id" type="int" />
<description>
Returns an array with the points that are in the path found by AStar between the given points. The array is ordered from the starting point to the ending point of the path.
[b]Note:[/b] This method is not thread-safe. If called from a [Thread], it will return an empty [PoolVector3Array] and will print an error message.
</description>
</method>
<method name="get_point_position" qualifiers="const">
<return type="Vector3" />
<argument index="0" name="id" type="int" />
<description>
Returns the position of the point associated with the given [code]id[/code].
</description>
</method>
<method name="get_point_weight_scale" qualifiers="const">
<return type="float" />
<argument index="0" name="id" type="int" />
<description>
Returns the weight scale of the point associated with the given [code]id[/code].
</description>
</method>
<method name="get_points">
<return type="Array" />
<description>
Returns an array of all points.
</description>
</method>
<method name="has_point" qualifiers="const">
<return type="bool" />
<argument index="0" name="id" type="int" />
<description>
Returns whether a point associated with the given [code]id[/code] exists.
</description>
</method>
<method name="is_point_disabled" qualifiers="const">
<return type="bool" />
<argument index="0" name="id" type="int" />
<description>
Returns whether a point is disabled or not for pathfinding. By default, all points are enabled.
</description>
</method>
<method name="remove_point">
<return type="void" />
<argument index="0" name="id" type="int" />
<description>
Removes the point associated with the given [code]id[/code] from the points pool.
</description>
</method>
<method name="reserve_space">
<return type="void" />
<argument index="0" name="num_nodes" type="int" />
<description>
Reserves space internally for [code]num_nodes[/code] points, useful if you're adding a known large number of points at once, for a grid for instance. New capacity must be greater or equals to old capacity.
</description>
</method>
<method name="set_point_disabled">
<return type="void" />
<argument index="0" name="id" type="int" />
<argument index="1" name="disabled" type="bool" default="true" />
<description>
Disables or enables the specified point for pathfinding. Useful for making a temporary obstacle.
</description>
</method>
<method name="set_point_position">
<return type="void" />
<argument index="0" name="id" type="int" />
<argument index="1" name="position" type="Vector3" />
<description>
Sets the [code]position[/code] for the point with the given [code]id[/code].
</description>
</method>
<method name="set_point_weight_scale">
<return type="void" />
<argument index="0" name="id" type="int" />
<argument index="1" name="weight_scale" type="float" />
<description>
Sets the [code]weight_scale[/code] for the point with the given [code]id[/code]. The [code]weight_scale[/code] is multiplied by the result of [method _compute_cost] when determining the overall cost of traveling across a segment from a neighboring point to this point.
</description>
</method>
</methods>
<constants>
</constants>
</class>

View File

@ -1,252 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AStar2D" inherits="Reference" version="4.2">
<brief_description>
AStar class representation that uses 2D vectors as edges.
</brief_description>
<description>
This is a wrapper for the [AStar] class which uses 2D vectors instead of 3D vectors.
</description>
<tutorials>
</tutorials>
<methods>
<method name="_compute_cost" qualifiers="virtual">
<return type="float" />
<argument index="0" name="from_id" type="int" />
<argument index="1" name="to_id" type="int" />
<description>
Called when computing the cost between two connected points.
Note that this function is hidden in the default [code]AStar2D[/code] class.
</description>
</method>
<method name="_estimate_cost" qualifiers="virtual">
<return type="float" />
<argument index="0" name="from_id" type="int" />
<argument index="1" name="to_id" type="int" />
<description>
Called when estimating the cost between a point and the path's ending point.
Note that this function is hidden in the default [code]AStar2D[/code] class.
</description>
</method>
<method name="add_point">
<return type="void" />
<argument index="0" name="id" type="int" />
<argument index="1" name="position" type="Vector2" />
<argument index="2" name="weight_scale" type="float" default="1.0" />
<description>
Adds a new point at the given position with the given identifier. The [code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must be 0.0 or greater.
The [code]weight_scale[/code] is multiplied by the result of [method _compute_cost] when determining the overall cost of traveling across a segment from a neighboring point to this point. Thus, all else being equal, the algorithm prefers points with lower [code]weight_scale[/code]s to form a path.
[codeblock]
var astar = AStar2D.new()
astar.add_point(1, Vector2(1, 0), 4) # Adds the point (1, 0) with weight_scale 4 and id 1
[/codeblock]
If there already exists a point for the given [code]id[/code], its position and weight scale are updated to the given values.
</description>
</method>
<method name="are_points_connected" qualifiers="const">
<return type="bool" />
<argument index="0" name="id" type="int" />
<argument index="1" name="to_id" type="int" />
<argument index="2" name="bidirectional" type="bool" default="true" />
<description>
Returns whether there is a connection/segment between the given points. If [code]bidirectional[/code] is [code]false[/code], returns whether movement from [code]id[/code] to [code]to_id[/code] is possible through this segment.
</description>
</method>
<method name="clear">
<return type="void" />
<description>
Clears all the points and segments.
</description>
</method>
<method name="connect_points">
<return type="void" />
<argument index="0" name="id" type="int" />
<argument index="1" name="to_id" type="int" />
<argument index="2" name="bidirectional" type="bool" default="true" />
<description>
Creates a segment between the given points. If [code]bidirectional[/code] is [code]false[/code], only movement from [code]id[/code] to [code]to_id[/code] is allowed, not the reverse direction.
[codeblock]
var astar = AStar2D.new()
astar.add_point(1, Vector2(1, 1))
astar.add_point(2, Vector2(0, 5))
astar.connect_points(1, 2, false)
[/codeblock]
</description>
</method>
<method name="disconnect_points">
<return type="void" />
<argument index="0" name="id" type="int" />
<argument index="1" name="to_id" type="int" />
<argument index="2" name="bidirectional" type="bool" default="true" />
<description>
Deletes the segment between the given points. If [code]bidirectional[/code] is [code]false[/code], only movement from [code]id[/code] to [code]to_id[/code] is prevented, and a unidirectional segment possibly remains.
</description>
</method>
<method name="get_available_point_id" qualifiers="const">
<return type="int" />
<description>
Returns the next available point ID with no point associated to it.
</description>
</method>
<method name="get_closest_point" qualifiers="const">
<return type="int" />
<argument index="0" name="to_position" type="Vector2" />
<argument index="1" name="include_disabled" type="bool" default="false" />
<description>
Returns the ID of the closest point to [code]to_position[/code], optionally taking disabled points into account. Returns [code]-1[/code] if there are no points in the points pool.
[b]Note:[/b] If several points are the closest to [code]to_position[/code], the one with the smallest ID will be returned, ensuring a deterministic result.
</description>
</method>
<method name="get_closest_position_in_segment" qualifiers="const">
<return type="Vector2" />
<argument index="0" name="to_position" type="Vector2" />
<description>
Returns the closest position to [code]to_position[/code] that resides inside a segment between two connected points.
[codeblock]
var astar = AStar2D.new()
astar.add_point(1, Vector2(0, 0))
astar.add_point(2, Vector2(0, 5))
astar.connect_points(1, 2)
var res = astar.get_closest_position_in_segment(Vector2(3, 3)) # Returns (0, 3)
[/codeblock]
The result is in the segment that goes from [code]y = 0[/code] to [code]y = 5[/code]. It's the closest position in the segment to the given point.
</description>
</method>
<method name="get_id_path">
<return type="PoolIntArray" />
<argument index="0" name="from_id" type="int" />
<argument index="1" name="to_id" type="int" />
<description>
Returns an array with the IDs of the points that form the path found by AStar2D between the given points. The array is ordered from the starting point to the ending point of the path.
[codeblock]
var astar = AStar2D.new()
astar.add_point(1, Vector2(0, 0))
astar.add_point(2, Vector2(0, 1), 1) # Default weight is 1
astar.add_point(3, Vector2(1, 1))
astar.add_point(4, Vector2(2, 0))
astar.connect_points(1, 2, false)
astar.connect_points(2, 3, false)
astar.connect_points(4, 3, false)
astar.connect_points(1, 4, false)
var res = astar.get_id_path(1, 3) # Returns [1, 2, 3]
[/codeblock]
If you change the 2nd point's weight to 3, then the result will be [code][1, 4, 3][/code] instead, because now even though the distance is longer, it's "easier" to get through point 4 than through point 2.
</description>
</method>
<method name="get_point_capacity" qualifiers="const">
<return type="int" />
<description>
Returns the capacity of the structure backing the points, useful in conjunction with [code]reserve_space[/code].
</description>
</method>
<method name="get_point_connections">
<return type="PoolIntArray" />
<argument index="0" name="id" type="int" />
<description>
Returns an array with the IDs of the points that form the connection with the given point.
[codeblock]
var astar = AStar2D.new()
astar.add_point(1, Vector2(0, 0))
astar.add_point(2, Vector2(0, 1))
astar.add_point(3, Vector2(1, 1))
astar.add_point(4, Vector2(2, 0))
astar.connect_points(1, 2, true)
astar.connect_points(1, 3, true)
var neighbors = astar.get_point_connections(1) # Returns [2, 3]
[/codeblock]
</description>
</method>
<method name="get_point_count" qualifiers="const">
<return type="int" />
<description>
Returns the number of points currently in the points pool.
</description>
</method>
<method name="get_point_path">
<return type="PoolVector2Array" />
<argument index="0" name="from_id" type="int" />
<argument index="1" name="to_id" type="int" />
<description>
Returns an array with the points that are in the path found by AStar2D between the given points. The array is ordered from the starting point to the ending point of the path.
[b]Note:[/b] This method is not thread-safe. If called from a [Thread], it will return an empty [PoolVector2Array] and will print an error message.
</description>
</method>
<method name="get_point_position" qualifiers="const">
<return type="Vector2" />
<argument index="0" name="id" type="int" />
<description>
Returns the position of the point associated with the given [code]id[/code].
</description>
</method>
<method name="get_point_weight_scale" qualifiers="const">
<return type="float" />
<argument index="0" name="id" type="int" />
<description>
Returns the weight scale of the point associated with the given [code]id[/code].
</description>
</method>
<method name="get_points">
<return type="Array" />
<description>
Returns an array of all points.
</description>
</method>
<method name="has_point" qualifiers="const">
<return type="bool" />
<argument index="0" name="id" type="int" />
<description>
Returns whether a point associated with the given [code]id[/code] exists.
</description>
</method>
<method name="is_point_disabled" qualifiers="const">
<return type="bool" />
<argument index="0" name="id" type="int" />
<description>
Returns whether a point is disabled or not for pathfinding. By default, all points are enabled.
</description>
</method>
<method name="remove_point">
<return type="void" />
<argument index="0" name="id" type="int" />
<description>
Removes the point associated with the given [code]id[/code] from the points pool.
</description>
</method>
<method name="reserve_space">
<return type="void" />
<argument index="0" name="num_nodes" type="int" />
<description>
Reserves space internally for [code]num_nodes[/code] points, useful if you're adding a known large number of points at once, for a grid for instance. New capacity must be greater or equals to old capacity.
</description>
</method>
<method name="set_point_disabled">
<return type="void" />
<argument index="0" name="id" type="int" />
<argument index="1" name="disabled" type="bool" default="true" />
<description>
Disables or enables the specified point for pathfinding. Useful for making a temporary obstacle.
</description>
</method>
<method name="set_point_position">
<return type="void" />
<argument index="0" name="id" type="int" />
<argument index="1" name="position" type="Vector2" />
<description>
Sets the [code]position[/code] for the point with the given [code]id[/code].
</description>
</method>
<method name="set_point_weight_scale">
<return type="void" />
<argument index="0" name="id" type="int" />
<argument index="1" name="weight_scale" type="float" />
<description>
Sets the [code]weight_scale[/code] for the point with the given [code]id[/code]. The [code]weight_scale[/code] is multiplied by the result of [method _compute_cost] when determining the overall cost of traveling across a segment from a neighboring point to this point.
</description>
</method>
</methods>
<constants>
</constants>
</class>

View File

@ -1,88 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AcceptDialog" inherits="WindowDialog" version="4.2">
<brief_description>
Base dialog for user notification.
</brief_description>
<description>
This dialog is useful for small notifications to the user about an event. It can only be accepted or closed, with the same result.
</description>
<tutorials>
</tutorials>
<methods>
<method name="add_button">
<return type="Button" />
<argument index="0" name="text" type="String" />
<argument index="1" name="right" type="bool" default="false" />
<argument index="2" name="action" type="String" default="&quot;&quot;" />
<description>
Adds a button with label [code]text[/code] and a custom [code]action[/code] to the dialog and returns the created button. [code]action[/code] will be passed to the [signal custom_action] signal when pressed.
If [code]true[/code], [code]right[/code] will place the button to the right of any sibling buttons.
You can use [method remove_button] method to remove a button created with this method from the dialog.
</description>
</method>
<method name="add_cancel">
<return type="Button" />
<argument index="0" name="name" type="String" />
<description>
Adds a button with label [code]name[/code] and a cancel action to the dialog and returns the created button.
You can use [method remove_button] method to remove a button created with this method from the dialog.
</description>
</method>
<method name="get_label">
<return type="Label" />
<description>
Returns the label used for built-in text.
[b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member CanvasItem.visible] property.
</description>
</method>
<method name="get_ok">
<return type="Button" />
<description>
Returns the OK [Button] instance.
[b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member CanvasItem.visible] property.
</description>
</method>
<method name="register_text_enter">
<return type="void" />
<argument index="0" name="line_edit" type="Node" />
<description>
Registers a [LineEdit] in the dialog. When the enter key is pressed, the dialog will be accepted.
</description>
</method>
<method name="remove_button">
<return type="void" />
<argument index="0" name="button" type="Control" />
<description>
Removes the [code]button[/code] from the dialog. Does NOT free the [code]button[/code]. The [code]button[/code] must be a [Button] added with [method add_button] or [method add_cancel] method. After removal, pressing the [code]button[/code] will no longer emit this dialog's [signal custom_action] signal or cancel this dialog.
</description>
</method>
</methods>
<members>
<member name="dialog_autowrap" type="bool" setter="set_autowrap" getter="has_autowrap" default="false">
Sets autowrapping for the text in the dialog.
</member>
<member name="dialog_hide_on_ok" type="bool" setter="set_hide_on_ok" getter="get_hide_on_ok" default="true">
If [code]true[/code], the dialog is hidden when the OK button is pressed. You can set it to [code]false[/code] if you want to do e.g. input validation when receiving the [signal confirmed] signal, and handle hiding the dialog in your own logic.
[b]Note:[/b] Some nodes derived from this class can have a different default value, and potentially their own built-in logic overriding this setting. For example [FileDialog] defaults to [code]false[/code], and has its own input validation code that is called when you press OK, which eventually hides the dialog if the input is valid. As such, this property can't be used in [FileDialog] to disable hiding the dialog when pressing OK.
</member>
<member name="dialog_text" type="String" setter="set_text" getter="get_text" default="&quot;&quot;">
The text displayed by the dialog.
</member>
<member name="window_title" type="String" setter="set_title" getter="get_title" overrides="WindowDialog" default="&quot;Alert!&quot;" />
</members>
<signals>
<signal name="confirmed">
<description>
Emitted when the dialog is accepted, i.e. the OK button is pressed.
</description>
</signal>
<signal name="custom_action">
<argument index="0" name="action" type="String" />
<description>
Emitted when a custom button is pressed. See [method add_button].
</description>
</signal>
</signals>
<constants>
</constants>
</class>

View File

@ -1,72 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimatedSprite" inherits="Node2D" version="4.2">
<brief_description>
Sprite node that contains multiple textures as frames to play for animation.
</brief_description>
<description>
[AnimatedSprite] is similar to the [Sprite] node, except it carries multiple textures as animation frames. Animations are created using a [SpriteFrames] resource, which allows you to import image files (or a folder containing said files) to provide the animation frames for the sprite. The [SpriteFrames] resource can be configured in the editor via the SpriteFrames bottom panel.
[b]Note:[/b] You can associate a set of normal maps by creating additional animations with a [code]_normal[/code] suffix. For example, having 2 animations [code]run[/code] and [code]run_normal[/code] will make it so the [code]run[/code] animation uses the normal map.
</description>
<tutorials>
<link title="2D Sprite animation">$DOCS_URL/tutorials/2d/2d_sprite_animation.md</link>
<link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link>
</tutorials>
<methods>
<method name="play">
<return type="void" />
<argument index="0" name="anim" type="StringName" default="@&quot;&quot;" />
<argument index="1" name="backwards" type="bool" default="false" />
<description>
</description>
</method>
<method name="stop">
<return type="void" />
<description>
Stops the current animation (does not reset the frame counter).
</description>
</method>
</methods>
<members>
<member name="animation" type="StringName" setter="set_animation" getter="get_animation" default="@&quot;default&quot;">
The current animation from the [member frames] resource. If this value changes, the [code]frame[/code] counter is reset.
</member>
<member name="centered" type="bool" setter="set_centered" getter="is_centered" default="true">
If [code]true[/code], texture will be centered.
</member>
<member name="flip_h" type="bool" setter="set_flip_h" getter="is_flipped_h" default="false">
If [code]true[/code], texture is flipped horizontally.
</member>
<member name="flip_v" type="bool" setter="set_flip_v" getter="is_flipped_v" default="false">
If [code]true[/code], texture is flipped vertically.
</member>
<member name="frame" type="int" setter="set_frame" getter="get_frame" default="0">
The displayed animation frame's index.
</member>
<member name="frames" type="SpriteFrames" setter="set_sprite_frames" getter="get_sprite_frames">
The [SpriteFrames] resource containing the animation(s). Allows you the option to load, edit, clear, make unique and save the states of the [SpriteFrames] resource.
</member>
<member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2( 0, 0 )">
The texture's drawing offset.
</member>
<member name="playing" type="bool" setter="set_playing" getter="is_playing" default="false">
If [code]true[/code], the [member animation] is currently playing.
</member>
<member name="speed_scale" type="float" setter="set_speed_scale" getter="get_speed_scale" default="1.0">
The animation speed is multiplied by this value.
</member>
</members>
<signals>
<signal name="animation_finished">
<description>
Emitted when the animation is finished (when it plays the last frame). If the animation is looping, this signal is emitted every time the last frame is drawn.
</description>
</signal>
<signal name="frame_changed">
<description>
Emitted when [member frame] changed.
</description>
</signal>
</signals>
<constants>
</constants>
</class>

View File

@ -1,60 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimatedSprite3D" inherits="SpriteBase3D" version="4.2">
<brief_description>
2D sprite node in 3D world, that can use multiple 2D textures for animation.
</brief_description>
<description>
Animations are created using a [SpriteFrames] resource, which can be configured in the editor via the SpriteFrames panel.
</description>
<tutorials>
<link title="2D Sprite animation (also applies to 3D)">$DOCS_URL/tutorials/2d/2d_sprite_animation.md</link>
</tutorials>
<methods>
<method name="is_playing" qualifiers="const">
<return type="bool" />
<description>
Returns [code]true[/code] if an animation is currently being played.
</description>
</method>
<method name="play">
<return type="void" />
<argument index="0" name="anim" type="StringName" default="@&quot;&quot;" />
<description>
</description>
</method>
<method name="stop">
<return type="void" />
<description>
Stops the current animation (does not reset the frame counter).
</description>
</method>
</methods>
<members>
<member name="animation" type="StringName" setter="set_animation" getter="get_animation" default="@&quot;default&quot;">
The current animation from the [code]frames[/code] resource. If this value changes, the [code]frame[/code] counter is reset.
</member>
<member name="frame" type="int" setter="set_frame" getter="get_frame" default="0">
The displayed animation frame's index.
</member>
<member name="frames" type="SpriteFrames" setter="set_sprite_frames" getter="get_sprite_frames">
The [SpriteFrames] resource containing the animation(s).
</member>
<member name="playing" type="bool" setter="_set_playing" getter="_is_playing" default="false">
If [code]true[/code], the [member animation] is currently playing.
</member>
</members>
<signals>
<signal name="animation_finished">
<description>
Emitted when the animation is finished (when it plays the last frame). If the animation is looping, this signal is emitted every time the last frame is drawn.
</description>
</signal>
<signal name="frame_changed">
<description>
Emitted when [member frame] changed.
</description>
</signal>
</signals>
<constants>
</constants>
</class>

View File

@ -1,78 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimatedTexture" inherits="Texture" version="4.2">
<brief_description>
Proxy texture for simple frame-based animations.
</brief_description>
<description>
[AnimatedTexture] is a resource format for frame-based animations, where multiple textures can be chained automatically with a predefined delay for each frame. Unlike [AnimationPlayer] or [AnimatedSprite], it isn't a [Node], but has the advantage of being usable anywhere a [Texture] resource can be used, e.g. in a [TileSet].
The playback of the animation is controlled by the [member fps] property as well as each frame's optional delay (see [method set_frame_delay]). The animation loops, i.e. it will restart at frame 0 automatically after playing the last frame.
[AnimatedTexture] currently requires all frame textures to have the same size, otherwise the bigger ones will be cropped to match the smallest one.
[b]Note:[/b] AnimatedTexture doesn't support using [AtlasTexture]s. Each frame needs to be a separate [Texture].
</description>
<tutorials>
</tutorials>
<methods>
<method name="get_frame_delay" qualifiers="const">
<return type="float" />
<argument index="0" name="frame" type="int" />
<description>
Returns the given frame's delay value.
</description>
</method>
<method name="get_frame_texture" qualifiers="const">
<return type="Texture" />
<argument index="0" name="frame" type="int" />
<description>
Returns the given frame's [Texture].
</description>
</method>
<method name="set_frame_delay">
<return type="void" />
<argument index="0" name="frame" type="int" />
<argument index="1" name="delay" type="float" />
<description>
Sets an additional delay (in seconds) between this frame and the next one, that will be added to the time interval defined by [member fps]. By default, frames have no delay defined. If a delay value is defined, the final time interval between this frame and the next will be [code]1.0 / fps + delay[/code].
For example, for an animation with 3 frames, 2 FPS and a frame delay on the second frame of 1.2, the resulting playback will be:
[codeblock]
Frame 0: 0.5 s (1 / fps)
Frame 1: 1.7 s (1 / fps + 1.2)
Frame 2: 0.5 s (1 / fps)
Total duration: 2.7 s
[/codeblock]
</description>
</method>
<method name="set_frame_texture">
<return type="void" />
<argument index="0" name="frame" type="int" />
<argument index="1" name="texture" type="Texture" />
<description>
Assigns a [Texture] to the given frame. Frame IDs start at 0, so the first frame has ID 0, and the last frame of the animation has ID [member frames] - 1.
You can define any number of textures up to [constant MAX_FRAMES], but keep in mind that only frames from 0 to [member frames] - 1 will be part of the animation.
</description>
</method>
</methods>
<members>
<member name="current_frame" type="int" setter="set_current_frame" getter="get_current_frame">
Sets the currently visible frame of the texture.
</member>
<member name="fps" type="float" setter="set_fps" getter="get_fps" default="4.0">
Animation speed in frames per second. This value defines the default time interval between two frames of the animation, and thus the overall duration of the animation loop based on the [member frames] property. A value of 0 means no predefined number of frames per second, the animation will play according to each frame's frame delay (see [method set_frame_delay]).
For example, an animation with 8 frames, no frame delay and a [code]fps[/code] value of 2 will run for 4 seconds, with each frame lasting 0.5 seconds.
</member>
<member name="frames" type="int" setter="set_frames" getter="get_frames" default="1">
Number of frames to use in the animation. While you can create the frames independently with [method set_frame_texture], you need to set this value for the animation to take new frames into account. The maximum number of frames is [constant MAX_FRAMES].
</member>
<member name="oneshot" type="bool" setter="set_oneshot" getter="get_oneshot" default="false">
If [code]true[/code], the animation will only play once and will not loop back to the first frame after reaching the end. Note that reaching the end will not set [member pause] to [code]true[/code].
</member>
<member name="pause" type="bool" setter="set_pause" getter="get_pause" default="false">
If [code]true[/code], the animation will pause where it currently is (i.e. at [member current_frame]). The animation will continue from where it was paused when changing this property to [code]false[/code].
</member>
<member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" overrides="Resource" default="false" />
</members>
<constants>
<constant name="MAX_FRAMES" value="256">
The maximum number of frames supported by [AnimatedTexture]. If you need more frames in your animation, use [AnimationPlayer] or [AnimatedSprite].
</constant>
</constants>
</class>

View File

@ -1,577 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Animation" inherits="Resource" version="4.2">
<brief_description>
Contains data used to animate everything in the engine.
</brief_description>
<description>
An Animation resource contains data used to animate everything in the engine. Animations are divided into tracks, and each track must be linked to a node. The state of that node can be changed through time, by adding timed keys (events) to the track.
[codeblock]
# This creates an animation that makes the node "Enemy" move to the right by
# 100 pixels in 0.5 seconds.
var animation = Animation.new()
var track_index = animation.add_track(Animation.TYPE_VALUE)
animation.track_set_path(track_index, "Enemy:position:x")
animation.track_insert_key(track_index, 0.0, 0)
animation.track_insert_key(track_index, 0.5, 100)
[/codeblock]
Animations are just data containers, and must be added to nodes such as an [AnimationPlayer] or [AnimationTreePlayer] to be played back. Animation tracks have different types, each with its own set of dedicated methods. Check [enum TrackType] to see available types.
</description>
<tutorials>
<link>$DOCS_URL/tutorials/animation/index.md</link>
</tutorials>
<methods>
<method name="add_track">
<return type="int" />
<argument index="0" name="type" type="int" enum="Animation.TrackType" />
<argument index="1" name="at_position" type="int" default="-1" />
<description>
Adds a track to the Animation.
</description>
</method>
<method name="animation_track_get_key_animation" qualifiers="const">
<return type="StringName" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="key_idx" type="int" />
<description>
Returns the animation name at the key identified by [code]key_idx[/code]. The [code]track_idx[/code] must be the index of an Animation Track.
</description>
</method>
<method name="animation_track_insert_key">
<return type="int" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="time" type="float" />
<argument index="2" name="animation" type="StringName" />
<description>
</description>
</method>
<method name="animation_track_set_key_animation">
<return type="void" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="key_idx" type="int" />
<argument index="2" name="animation" type="StringName" />
<description>
</description>
</method>
<method name="audio_track_get_key_end_offset" qualifiers="const">
<return type="float" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="key_idx" type="int" />
<description>
Returns the end offset of the key identified by [code]key_idx[/code]. The [code]track_idx[/code] must be the index of an Audio Track.
End offset is the number of seconds cut off at the ending of the audio stream.
</description>
</method>
<method name="audio_track_get_key_start_offset" qualifiers="const">
<return type="float" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="key_idx" type="int" />
<description>
Returns the start offset of the key identified by [code]key_idx[/code]. The [code]track_idx[/code] must be the index of an Audio Track.
Start offset is the number of seconds cut off at the beginning of the audio stream.
</description>
</method>
<method name="audio_track_get_key_stream" qualifiers="const">
<return type="Resource" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="key_idx" type="int" />
<description>
Returns the audio stream of the key identified by [code]key_idx[/code]. The [code]track_idx[/code] must be the index of an Audio Track.
</description>
</method>
<method name="audio_track_insert_key">
<return type="int" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="time" type="float" />
<argument index="2" name="stream" type="Resource" />
<argument index="3" name="start_offset" type="float" default="0" />
<argument index="4" name="end_offset" type="float" default="0" />
<description>
Inserts an Audio Track key at the given [code]time[/code] in seconds. The [code]track_idx[/code] must be the index of an Audio Track.
[code]stream[/code] is the [AudioStream] resource to play. [code]start_offset[/code] is the number of seconds cut off at the beginning of the audio stream, while [code]end_offset[/code] is at the ending.
</description>
</method>
<method name="audio_track_set_key_end_offset">
<return type="void" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="key_idx" type="int" />
<argument index="2" name="offset" type="float" />
<description>
Sets the end offset of the key identified by [code]key_idx[/code] to value [code]offset[/code]. The [code]track_idx[/code] must be the index of an Audio Track.
</description>
</method>
<method name="audio_track_set_key_start_offset">
<return type="void" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="key_idx" type="int" />
<argument index="2" name="offset" type="float" />
<description>
Sets the start offset of the key identified by [code]key_idx[/code] to value [code]offset[/code]. The [code]track_idx[/code] must be the index of an Audio Track.
</description>
</method>
<method name="audio_track_set_key_stream">
<return type="void" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="key_idx" type="int" />
<argument index="2" name="stream" type="Resource" />
<description>
Sets the stream of the key identified by [code]key_idx[/code] to value [code]stream[/code]. The [code]track_idx[/code] must be the index of an Audio Track.
</description>
</method>
<method name="bezier_track_get_key_in_handle" qualifiers="const">
<return type="Vector2" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="key_idx" type="int" />
<description>
Returns the in handle of the key identified by [code]key_idx[/code]. The [code]track_idx[/code] must be the index of a Bezier Track.
</description>
</method>
<method name="bezier_track_get_key_out_handle" qualifiers="const">
<return type="Vector2" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="key_idx" type="int" />
<description>
Returns the out handle of the key identified by [code]key_idx[/code]. The [code]track_idx[/code] must be the index of a Bezier Track.
</description>
</method>
<method name="bezier_track_get_key_value" qualifiers="const">
<return type="float" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="key_idx" type="int" />
<description>
Returns the value of the key identified by [code]key_idx[/code]. The [code]track_idx[/code] must be the index of a Bezier Track.
</description>
</method>
<method name="bezier_track_insert_key">
<return type="int" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="time" type="float" />
<argument index="2" name="value" type="float" />
<argument index="3" name="in_handle" type="Vector2" default="Vector2( 0, 0 )" />
<argument index="4" name="out_handle" type="Vector2" default="Vector2( 0, 0 )" />
<description>
Inserts a Bezier Track key at the given [code]time[/code] in seconds. The [code]track_idx[/code] must be the index of a Bezier Track.
[code]in_handle[/code] is the left-side weight of the added Bezier curve point, [code]out_handle[/code] is the right-side one, while [code]value[/code] is the actual value at this point.
</description>
</method>
<method name="bezier_track_interpolate" qualifiers="const">
<return type="float" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="time" type="float" />
<description>
Returns the interpolated value at the given [code]time[/code] (in seconds). The [code]track_idx[/code] must be the index of a Bezier Track.
</description>
</method>
<method name="bezier_track_set_key_in_handle">
<return type="void" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="key_idx" type="int" />
<argument index="2" name="in_handle" type="Vector2" />
<description>
Sets the in handle of the key identified by [code]key_idx[/code] to value [code]in_handle[/code]. The [code]track_idx[/code] must be the index of a Bezier Track.
</description>
</method>
<method name="bezier_track_set_key_out_handle">
<return type="void" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="key_idx" type="int" />
<argument index="2" name="out_handle" type="Vector2" />
<description>
Sets the out handle of the key identified by [code]key_idx[/code] to value [code]out_handle[/code]. The [code]track_idx[/code] must be the index of a Bezier Track.
</description>
</method>
<method name="bezier_track_set_key_value">
<return type="void" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="key_idx" type="int" />
<argument index="2" name="value" type="float" />
<description>
Sets the value of the key identified by [code]key_idx[/code] to the given value. The [code]track_idx[/code] must be the index of a Bezier Track.
</description>
</method>
<method name="clear">
<return type="void" />
<description>
Clear the animation (clear all tracks and reset all).
</description>
</method>
<method name="copy_track">
<return type="void" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="to_animation" type="Animation" />
<description>
Adds a new track that is a copy of the given track from [code]to_animation[/code].
</description>
</method>
<method name="find_track" qualifiers="const">
<return type="int" />
<argument index="0" name="path" type="NodePath" />
<argument index="1" name="type" type="int" enum="Animation.TrackType" />
<description>
Returns the index of the specified track. If the track is not found, return -1.
</description>
</method>
<method name="get_track_count" qualifiers="const">
<return type="int" />
<description>
Returns the amount of tracks in the animation.
</description>
</method>
<method name="method_track_get_key_indices" qualifiers="const">
<return type="PoolIntArray" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="time_sec" type="float" />
<argument index="2" name="delta" type="float" />
<description>
Returns all the key indices of a method track, given a position and delta time.
</description>
</method>
<method name="method_track_get_name" qualifiers="const">
<return type="StringName" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="key_idx" type="int" />
<description>
Returns the method name of a method track.
</description>
</method>
<method name="method_track_get_params" qualifiers="const">
<return type="Array" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="key_idx" type="int" />
<description>
Returns the arguments values to be called on a method track for a given key in a given track.
</description>
</method>
<method name="position_track_insert_key">
<return type="int" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="time" type="float" />
<argument index="2" name="position" type="Vector3" />
<description>
</description>
</method>
<method name="remove_track">
<return type="void" />
<argument index="0" name="track_idx" type="int" />
<description>
Removes a track by specifying the track index.
</description>
</method>
<method name="rotation_track_insert_key">
<return type="int" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="time" type="float" />
<argument index="2" name="rotation" type="Quaternion" />
<description>
</description>
</method>
<method name="scale_track_insert_key">
<return type="int" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="time" type="float" />
<argument index="2" name="scale" type="Vector3" />
<description>
</description>
</method>
<method name="track_find_key" qualifiers="const">
<return type="int" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="time" type="float" />
<argument index="2" name="exact" type="bool" default="false" />
<description>
Finds the key index by time in a given track. Optionally, only find it if the exact time is given.
</description>
</method>
<method name="track_get_interpolation_loop_wrap" qualifiers="const">
<return type="bool" />
<argument index="0" name="track_idx" type="int" />
<description>
Returns [code]true[/code] if the track at [code]idx[/code] wraps the interpolation loop. New tracks wrap the interpolation loop by default.
</description>
</method>
<method name="track_get_interpolation_type" qualifiers="const">
<return type="int" enum="Animation.InterpolationType" />
<argument index="0" name="track_idx" type="int" />
<description>
Returns the interpolation type of a given track.
</description>
</method>
<method name="track_get_key_count" qualifiers="const">
<return type="int" />
<argument index="0" name="track_idx" type="int" />
<description>
Returns the amount of keys in a given track.
</description>
</method>
<method name="track_get_key_time" qualifiers="const">
<return type="float" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="key_idx" type="int" />
<description>
Returns the time at which the key is located.
</description>
</method>
<method name="track_get_key_transition" qualifiers="const">
<return type="float" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="key_idx" type="int" />
<description>
Returns the transition curve (easing) for a specific key (see the built-in math function [method @GDScript.ease]).
</description>
</method>
<method name="track_get_key_value" qualifiers="const">
<return type="Variant" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="key_idx" type="int" />
<description>
Returns the value of a given key in a given track.
</description>
</method>
<method name="track_get_path" qualifiers="const">
<return type="NodePath" />
<argument index="0" name="track_idx" type="int" />
<description>
Gets the path of a track. For more information on the path format, see [method track_set_path].
</description>
</method>
<method name="track_get_type" qualifiers="const">
<return type="int" enum="Animation.TrackType" />
<argument index="0" name="track_idx" type="int" />
<description>
Gets the type of a track.
</description>
</method>
<method name="track_insert_key">
<return type="void" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="time" type="float" />
<argument index="2" name="key" type="Variant" />
<argument index="3" name="transition" type="float" default="1" />
<description>
Insert a generic key in a given track.
</description>
</method>
<method name="track_is_enabled" qualifiers="const">
<return type="bool" />
<argument index="0" name="track_idx" type="int" />
<description>
Returns [code]true[/code] if the track at index [code]idx[/code] is enabled.
</description>
</method>
<method name="track_is_imported" qualifiers="const">
<return type="bool" />
<argument index="0" name="track_idx" type="int" />
<description>
Returns [code]true[/code] if the given track is imported. Else, return [code]false[/code].
</description>
</method>
<method name="track_move_down">
<return type="void" />
<argument index="0" name="track_idx" type="int" />
<description>
Moves a track down.
</description>
</method>
<method name="track_move_to">
<return type="void" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="to_idx" type="int" />
<description>
Changes the index position of track [code]idx[/code] to the one defined in [code]to_idx[/code].
</description>
</method>
<method name="track_move_up">
<return type="void" />
<argument index="0" name="track_idx" type="int" />
<description>
Moves a track up.
</description>
</method>
<method name="track_remove_key">
<return type="void" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="key_idx" type="int" />
<description>
Removes a key by index in a given track.
</description>
</method>
<method name="track_remove_key_at_position">
<return type="void" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="position" type="float" />
<description>
Removes a key by position (seconds) in a given track.
</description>
</method>
<method name="track_set_enabled">
<return type="void" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="enabled" type="bool" />
<description>
Enables/disables the given track. Tracks are enabled by default.
</description>
</method>
<method name="track_set_imported">
<return type="void" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="imported" type="bool" />
<description>
Sets the given track as imported or not.
</description>
</method>
<method name="track_set_interpolation_loop_wrap">
<return type="void" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="interpolation" type="bool" />
<description>
If [code]true[/code], the track at [code]idx[/code] wraps the interpolation loop.
</description>
</method>
<method name="track_set_interpolation_type">
<return type="void" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="interpolation" type="int" enum="Animation.InterpolationType" />
<description>
Sets the interpolation type of a given track.
</description>
</method>
<method name="track_set_key_time">
<return type="void" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="key_idx" type="int" />
<argument index="2" name="time" type="float" />
<description>
Sets the time of an existing key.
</description>
</method>
<method name="track_set_key_transition">
<return type="void" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="key_idx" type="int" />
<argument index="2" name="transition" type="float" />
<description>
Sets the transition curve (easing) for a specific key (see the built-in math function [method @GDScript.ease]).
</description>
</method>
<method name="track_set_key_value">
<return type="void" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="key" type="int" />
<argument index="2" name="value" type="Variant" />
<description>
Sets the value of an existing key.
</description>
</method>
<method name="track_set_path">
<return type="void" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="path" type="NodePath" />
<description>
Sets the path of a track. Paths must be valid scene-tree paths to a node and must be specified starting from the parent node of the node that will reproduce the animation. Tracks that control properties or bones must append their name after the path, separated by [code]":"[/code].
For example, [code]"character/skeleton:ankle"[/code] or [code]"character/mesh:transform/local"[/code].
</description>
</method>
<method name="track_swap">
<return type="void" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="with_idx" type="int" />
<description>
Swaps the track [code]idx[/code]'s index position with the track [code]with_idx[/code].
</description>
</method>
<method name="value_track_get_key_indices" qualifiers="const">
<return type="PoolIntArray" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="time_sec" type="float" />
<argument index="2" name="delta" type="float" />
<description>
Returns all the key indices of a value track, given a position and delta time.
</description>
</method>
<method name="value_track_get_update_mode" qualifiers="const">
<return type="int" enum="Animation.UpdateMode" />
<argument index="0" name="track_idx" type="int" />
<description>
Returns the update mode of a value track.
</description>
</method>
<method name="value_track_interpolate" qualifiers="const">
<return type="Variant" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="time_sec" type="float" />
<description>
Returns the interpolated value at the given time (in seconds). The [code]track_idx[/code] must be the index of a value track.
</description>
</method>
<method name="value_track_set_update_mode">
<return type="void" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="mode" type="int" enum="Animation.UpdateMode" />
<description>
Sets the update mode (see [enum UpdateMode]) of a value track.
</description>
</method>
</methods>
<members>
<member name="length" type="float" setter="set_length" getter="get_length" default="1.0">
The total length of the animation (in seconds).
[b]Note:[/b] Length is not delimited by the last key, as this one may be before or after the end to ensure correct interpolation and looping.
</member>
<member name="loop" type="bool" setter="set_loop" getter="has_loop" default="false">
A flag indicating that the animation must loop. This is used for correct interpolation of animation cycles, and for hinting the player that it must restart the animation.
</member>
<member name="step" type="float" setter="set_step" getter="get_step" default="0.1">
The animation step value.
</member>
</members>
<signals>
<signal name="tracks_changed">
<description>
Emitted when there's a change in the list of tracks, e.g. tracks are added, moved or have changed paths.
</description>
</signal>
</signals>
<constants>
<constant name="TYPE_VALUE" value="0" enum="TrackType">
Value tracks set values in node properties, but only those which can be Interpolated.
</constant>
<constant name="TYPE_POSITION_3D" value="1" enum="TrackType">
</constant>
<constant name="TYPE_ROTATION_3D" value="2" enum="TrackType">
</constant>
<constant name="TYPE_SCALE_3D" value="3" enum="TrackType">
</constant>
<constant name="TYPE_METHOD" value="4" enum="TrackType">
Method tracks call functions with given arguments per key.
</constant>
<constant name="TYPE_BEZIER" value="5" enum="TrackType">
Bezier tracks are used to interpolate a value using custom curves. They can also be used to animate sub-properties of vectors and colors (e.g. alpha value of a [Color]).
</constant>
<constant name="TYPE_AUDIO" value="6" enum="TrackType">
Audio tracks are used to play an audio stream with either type of [AudioStreamPlayer]. The stream can be trimmed and previewed in the animation.
</constant>
<constant name="TYPE_ANIMATION" value="7" enum="TrackType">
Animation tracks play animations in other [AnimationPlayer] nodes.
</constant>
<constant name="INTERPOLATION_NEAREST" value="0" enum="InterpolationType">
No interpolation (nearest value).
</constant>
<constant name="INTERPOLATION_LINEAR" value="1" enum="InterpolationType">
Linear interpolation.
</constant>
<constant name="INTERPOLATION_CUBIC" value="2" enum="InterpolationType">
Cubic interpolation.
</constant>
<constant name="UPDATE_CONTINUOUS" value="0" enum="UpdateMode">
Update between keyframes.
</constant>
<constant name="UPDATE_DISCRETE" value="1" enum="UpdateMode">
Update at the keyframes and hold the value.
</constant>
<constant name="UPDATE_TRIGGER" value="2" enum="UpdateMode">
Update at the keyframes.
</constant>
<constant name="UPDATE_CAPTURE" value="3" enum="UpdateMode">
Same as linear interpolation, but also interpolates from the current value (i.e. dynamically at runtime) if the first key isn't at 0 seconds.
</constant>
</constants>
</class>

View File

@ -1,183 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimationNode" inherits="Resource" version="4.2">
<brief_description>
Base resource for [AnimationTree] nodes.
</brief_description>
<description>
Base resource for [AnimationTree] nodes. In general, it's not used directly, but you can create custom ones with custom blending formulas.
Inherit this when creating nodes mainly for use in [AnimationNodeBlendTree], otherwise [AnimationRootNode] should be used instead.
</description>
<tutorials>
<link>$DOCS_URL/tutorials/animation/animation_tree.md</link>
</tutorials>
<methods>
<method name="add_input">
<return type="void" />
<argument index="0" name="name" type="String" />
<description>
Adds an input to the node. This is only useful for nodes created for use in an [AnimationNodeBlendTree].
</description>
</method>
<method name="blend_animation">
<return type="void" />
<argument index="0" name="animation" type="StringName" />
<argument index="1" name="time" type="float" />
<argument index="2" name="delta" type="float" />
<argument index="3" name="seeked" type="bool" />
<argument index="4" name="blend" type="float" />
<description>
</description>
</method>
<method name="blend_input">
<return type="float" />
<argument index="0" name="input_index" type="int" />
<argument index="1" name="time" type="float" />
<argument index="2" name="seek" type="bool" />
<argument index="3" name="blend" type="float" />
<argument index="4" name="filter" type="int" enum="AnimationNode.FilterAction" default="0" />
<argument index="5" name="optimize" type="bool" default="true" />
<description>
Blend an input. This is only useful for nodes created for an [AnimationNodeBlendTree]. The [code]time[/code] parameter is a relative delta, unless [code]seek[/code] is [code]true[/code], in which case it is absolute. A filter mode may be optionally passed (see [enum FilterAction] for options).
</description>
</method>
<method name="blend_node">
<return type="float" />
<argument index="0" name="name" type="StringName" />
<argument index="1" name="node" type="AnimationNode" />
<argument index="2" name="time" type="float" />
<argument index="3" name="seek" type="bool" />
<argument index="4" name="blend" type="float" />
<argument index="5" name="filter" type="int" enum="AnimationNode.FilterAction" default="0" />
<argument index="6" name="optimize" type="bool" default="true" />
<description>
</description>
</method>
<method name="get_caption" qualifiers="virtual">
<return type="String" />
<description>
When inheriting from [AnimationRootNode], implement this virtual method to override the text caption for this node.
</description>
</method>
<method name="get_child_by_name" qualifiers="virtual">
<return type="Object" />
<argument index="0" name="name" type="String" />
<description>
When inheriting from [AnimationRootNode], implement this virtual method to return a child node by its [code]name[/code].
</description>
</method>
<method name="get_child_nodes" qualifiers="virtual">
<return type="Dictionary" />
<description>
When inheriting from [AnimationRootNode], implement this virtual method to return all children nodes in order as a [code]name: node[/code] dictionary.
</description>
</method>
<method name="get_input_count" qualifiers="const">
<return type="int" />
<description>
Amount of inputs in this node, only useful for nodes that go into [AnimationNodeBlendTree].
</description>
</method>
<method name="get_input_name">
<return type="String" />
<argument index="0" name="input" type="int" />
<description>
Gets the name of an input by index.
</description>
</method>
<method name="get_parameter" qualifiers="const">
<return type="Variant" />
<argument index="0" name="name" type="StringName" />
<description>
</description>
</method>
<method name="get_parameter_default_value" qualifiers="virtual">
<return type="Variant" />
<argument index="0" name="name" type="String" />
<description>
When inheriting from [AnimationRootNode], implement this virtual method to return the default value of parameter "[code]name[/code]". Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees.
</description>
</method>
<method name="get_parameter_list" qualifiers="virtual">
<return type="Array" />
<description>
When inheriting from [AnimationRootNode], implement this virtual method to return a list of the properties on this node. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees. Format is similar to [method Object.get_property_list].
</description>
</method>
<method name="has_filter" qualifiers="virtual">
<return type="bool" />
<description>
When inheriting from [AnimationRootNode], implement this virtual method to return whether the blend tree editor should display filter editing on this node.
</description>
</method>
<method name="is_path_filtered" qualifiers="const">
<return type="bool" />
<argument index="0" name="path" type="NodePath" />
<description>
Returns whether the given path is filtered.
</description>
</method>
<method name="process" qualifiers="virtual">
<return type="void" />
<argument index="0" name="time" type="float" />
<argument index="1" name="seek" type="bool" />
<description>
When inheriting from [AnimationRootNode], implement this virtual method to run some code when this node is processed. The [code]time[/code] parameter is a relative delta, unless [code]seek[/code] is [code]true[/code], in which case it is absolute.
Here, call the [method blend_input], [method blend_node] or [method blend_animation] functions. You can also use [method get_parameter] and [method set_parameter] to modify local memory.
This function should return the time left for the current animation to finish (if unsure, pass the value from the main blend being called).
</description>
</method>
<method name="remove_input">
<return type="void" />
<argument index="0" name="index" type="int" />
<description>
Removes an input, call this only when inactive.
</description>
</method>
<method name="set_filter_path">
<return type="void" />
<argument index="0" name="path" type="NodePath" />
<argument index="1" name="enable" type="bool" />
<description>
Adds or removes a path for the filter.
</description>
</method>
<method name="set_parameter">
<return type="void" />
<argument index="0" name="name" type="StringName" />
<argument index="1" name="value" type="Variant" />
<description>
</description>
</method>
</methods>
<members>
<member name="filter_enabled" type="bool" setter="set_filter_enabled" getter="is_filter_enabled">
If [code]true[/code], filtering is enabled.
</member>
</members>
<signals>
<signal name="removed_from_graph">
<description>
Emitted when the node was removed from the graph.
</description>
</signal>
<signal name="tree_changed">
<description>
Emitted by nodes that inherit from this class and that have an internal tree when one of their nodes changes. The nodes that emit this signal are [AnimationNodeBlendSpace1D], [AnimationNodeBlendSpace2D], [AnimationNodeStateMachine], and [AnimationNodeBlendTree].
</description>
</signal>
</signals>
<constants>
<constant name="FILTER_IGNORE" value="0" enum="FilterAction">
Do not use filtering.
</constant>
<constant name="FILTER_PASS" value="1" enum="FilterAction">
Paths matching the filter will be allowed to pass.
</constant>
<constant name="FILTER_STOP" value="2" enum="FilterAction">
Paths matching the filter will be discarded.
</constant>
<constant name="FILTER_BLEND" value="3" enum="FilterAction">
Paths matching the filter will be blended (by the blend value).
</constant>
</constants>
</class>

View File

@ -1,21 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimationNodeAdd2" inherits="AnimationNode" version="4.2">
<brief_description>
Blends two animations additively inside of an [AnimationNodeBlendTree].
</brief_description>
<description>
A resource to add to an [AnimationNodeBlendTree]. Blends two animations additively based on an amount value in the [code][0.0, 1.0][/code] range.
</description>
<tutorials>
<link>$DOCS_URL/tutorials/animation/animation_tree.md</link>
</tutorials>
<methods>
</methods>
<members>
<member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync" default="false">
If [code]true[/code], sets the [code]optimization[/code] to [code]false[/code] when calling [method AnimationNode.blend_input], forcing the blended animations to update every frame.
</member>
</members>
<constants>
</constants>
</class>

View File

@ -1,26 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimationNodeAdd3" inherits="AnimationNode" version="4.2">
<brief_description>
Blends two of three animations additively inside of an [AnimationNodeBlendTree].
</brief_description>
<description>
A resource to add to an [AnimationNodeBlendTree]. Blends two animations together additively out of three based on a value in the [code][-1.0, 1.0][/code] range.
This node has three inputs:
- The base animation to add to
- A -add animation to blend with when the blend amount is in the [code][-1.0, 0.0][/code] range.
- A +add animation to blend with when the blend amount is in the [code][0.0, 1.0][/code] range
</description>
<tutorials>
<link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.md</link>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
</methods>
<members>
<member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync" default="false">
If [code]true[/code], sets the [code]optimization[/code] to [code]false[/code] when calling [method AnimationNode.blend_input], forcing the blended animations to update every frame.
</member>
</members>
<constants>
</constants>
</class>

View File

@ -1,23 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimationNodeAnimation" inherits="AnimationRootNode" version="4.2">
<brief_description>
Input animation to use in an [AnimationNodeBlendTree].
</brief_description>
<description>
A resource to add to an [AnimationNodeBlendTree]. Only features one output set using the [member animation] property. Use it as an input for [AnimationNode] that blend animations together.
</description>
<tutorials>
<link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.md</link>
<link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
</methods>
<members>
<member name="animation" type="StringName" setter="set_animation" getter="get_animation" default="@&quot;&quot;">
Animation to use as an output. It is one of the animations provided by [member AnimationTree.anim_player].
</member>
</members>
<constants>
</constants>
</class>

View File

@ -1,23 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimationNodeBlend2" inherits="AnimationNode" version="4.2">
<brief_description>
Blends two animations linearly inside of an [AnimationNodeBlendTree].
</brief_description>
<description>
A resource to add to an [AnimationNodeBlendTree]. Blends two animations linearly based on an amount value in the [code][0.0, 1.0][/code] range.
</description>
<tutorials>
<link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.md</link>
<link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
</methods>
<members>
<member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync" default="false">
If [code]true[/code], sets the [code]optimization[/code] to [code]false[/code] when calling [method AnimationNode.blend_input], forcing the blended animations to update every frame.
</member>
</members>
<constants>
</constants>
</class>

View File

@ -1,25 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimationNodeBlend3" inherits="AnimationNode" version="4.2">
<brief_description>
Blends two of three animations linearly inside of an [AnimationNodeBlendTree].
</brief_description>
<description>
A resource to add to an [AnimationNodeBlendTree]. Blends two animations together linearly out of three based on a value in the [code][-1.0, 1.0][/code] range.
This node has three inputs:
- The base animation
- A -blend animation to blend with when the blend amount is in the [code][-1.0, 0.0][/code] range.
- A +blend animation to blend with when the blend amount is in the [code][0.0, 1.0][/code] range
</description>
<tutorials>
<link>$DOCS_URL/tutorials/animation/animation_tree.md</link>
</tutorials>
<methods>
</methods>
<members>
<member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync" default="false">
If [code]true[/code], sets the [code]optimization[/code] to [code]false[/code] when calling [method AnimationNode.blend_input], forcing the blended animations to update every frame.
</member>
</members>
<constants>
</constants>
</class>

View File

@ -1,85 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimationNodeBlendSpace1D" inherits="AnimationRootNode" version="4.2">
<brief_description>
Blends linearly between two of any number of [AnimationNode] of any type placed on a virtual axis.
</brief_description>
<description>
A resource to add to an [AnimationNodeBlendTree].
This is a virtual axis on which you can add any type of [AnimationNode] using [method add_blend_point].
Outputs the linear blend of the two [AnimationNode]s closest to the node's current value.
You can set the extents of the axis using the [member min_space] and [member max_space].
</description>
<tutorials>
<link>$DOCS_URL/tutorials/animation/animation_tree.md</link>
</tutorials>
<methods>
<method name="add_blend_point">
<return type="void" />
<argument index="0" name="node" type="AnimationRootNode" />
<argument index="1" name="pos" type="float" />
<argument index="2" name="at_index" type="int" default="-1" />
<description>
Adds a new point that represents a [code]node[/code] on the virtual axis at a given position set by [code]pos[/code]. You can insert it at a specific index using the [code]at_index[/code] argument. If you use the default value for [code]at_index[/code], the point is inserted at the end of the blend points array.
</description>
</method>
<method name="get_blend_point_count" qualifiers="const">
<return type="int" />
<description>
Returns the number of points on the blend axis.
</description>
</method>
<method name="get_blend_point_node" qualifiers="const">
<return type="AnimationRootNode" />
<argument index="0" name="point" type="int" />
<description>
Returns the [AnimationNode] referenced by the point at index [code]point[/code].
</description>
</method>
<method name="get_blend_point_position" qualifiers="const">
<return type="float" />
<argument index="0" name="point" type="int" />
<description>
Returns the position of the point at index [code]point[/code].
</description>
</method>
<method name="remove_blend_point">
<return type="void" />
<argument index="0" name="point" type="int" />
<description>
Removes the point at index [code]point[/code] from the blend axis.
</description>
</method>
<method name="set_blend_point_node">
<return type="void" />
<argument index="0" name="point" type="int" />
<argument index="1" name="node" type="AnimationRootNode" />
<description>
Changes the [AnimationNode] referenced by the point at index [code]point[/code].
</description>
</method>
<method name="set_blend_point_position">
<return type="void" />
<argument index="0" name="point" type="int" />
<argument index="1" name="pos" type="float" />
<description>
Updates the position of the point at index [code]point[/code] on the blend axis.
</description>
</method>
</methods>
<members>
<member name="max_space" type="float" setter="set_max_space" getter="get_max_space" default="1.0">
The blend space's axis's upper limit for the points' position. See [method add_blend_point].
</member>
<member name="min_space" type="float" setter="set_min_space" getter="get_min_space" default="-1.0">
The blend space's axis's lower limit for the points' position. See [method add_blend_point].
</member>
<member name="snap" type="float" setter="set_snap" getter="get_snap" default="0.1">
Position increment to snap to when moving a point on the axis.
</member>
<member name="value_label" type="String" setter="set_value_label" getter="get_value_label" default="&quot;value&quot;">
Label of the virtual axis of the blend space.
</member>
</members>
<constants>
</constants>
</class>

View File

@ -1,141 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimationNodeBlendSpace2D" inherits="AnimationRootNode" version="4.2">
<brief_description>
Blends linearly between three [AnimationNode] of any type placed in a 2D space.
</brief_description>
<description>
A resource to add to an [AnimationNodeBlendTree].
This node allows you to blend linearly between three animations using a [Vector2] weight.
You can add vertices to the blend space with [method add_blend_point] and automatically triangulate it by setting [member auto_triangles] to [code]true[/code]. Otherwise, use [method add_triangle] and [method remove_triangle] to create up the blend space by hand.
</description>
<tutorials>
<link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.md</link>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
<method name="add_blend_point">
<return type="void" />
<argument index="0" name="node" type="AnimationRootNode" />
<argument index="1" name="pos" type="Vector2" />
<argument index="2" name="at_index" type="int" default="-1" />
<description>
Adds a new point that represents a [code]node[/code] at the position set by [code]pos[/code]. You can insert it at a specific index using the [code]at_index[/code] argument. If you use the default value for [code]at_index[/code], the point is inserted at the end of the blend points array.
</description>
</method>
<method name="add_triangle">
<return type="void" />
<argument index="0" name="x" type="int" />
<argument index="1" name="y" type="int" />
<argument index="2" name="z" type="int" />
<argument index="3" name="at_index" type="int" default="-1" />
<description>
Creates a new triangle using three points [code]x[/code], [code]y[/code], and [code]z[/code]. Triangles can overlap. You can insert the triangle at a specific index using the [code]at_index[/code] argument. If you use the default value for [code]at_index[/code], the point is inserted at the end of the blend points array.
</description>
</method>
<method name="get_blend_point_count" qualifiers="const">
<return type="int" />
<description>
Returns the number of points in the blend space.
</description>
</method>
<method name="get_blend_point_node" qualifiers="const">
<return type="AnimationRootNode" />
<argument index="0" name="point" type="int" />
<description>
Returns the [AnimationRootNode] referenced by the point at index [code]point[/code].
</description>
</method>
<method name="get_blend_point_position" qualifiers="const">
<return type="Vector2" />
<argument index="0" name="point" type="int" />
<description>
Returns the position of the point at index [code]point[/code].
</description>
</method>
<method name="get_triangle_count" qualifiers="const">
<return type="int" />
<description>
Returns the number of triangles in the blend space.
</description>
</method>
<method name="get_triangle_point">
<return type="int" />
<argument index="0" name="triangle" type="int" />
<argument index="1" name="point" type="int" />
<description>
Returns the position of the point at index [code]point[/code] in the triangle of index [code]triangle[/code].
</description>
</method>
<method name="remove_blend_point">
<return type="void" />
<argument index="0" name="point" type="int" />
<description>
Removes the point at index [code]point[/code] from the blend space.
</description>
</method>
<method name="remove_triangle">
<return type="void" />
<argument index="0" name="triangle" type="int" />
<description>
Removes the triangle at index [code]triangle[/code] from the blend space.
</description>
</method>
<method name="set_blend_point_node">
<return type="void" />
<argument index="0" name="point" type="int" />
<argument index="1" name="node" type="AnimationRootNode" />
<description>
Changes the [AnimationNode] referenced by the point at index [code]point[/code].
</description>
</method>
<method name="set_blend_point_position">
<return type="void" />
<argument index="0" name="point" type="int" />
<argument index="1" name="pos" type="Vector2" />
<description>
Updates the position of the point at index [code]point[/code] on the blend axis.
</description>
</method>
</methods>
<members>
<member name="auto_triangles" type="bool" setter="set_auto_triangles" getter="get_auto_triangles" default="true">
If [code]true[/code], the blend space is triangulated automatically. The mesh updates every time you add or remove points with [method add_blend_point] and [method remove_blend_point].
</member>
<member name="blend_mode" type="int" setter="set_blend_mode" getter="get_blend_mode" enum="AnimationNodeBlendSpace2D.BlendMode" default="0">
Controls the interpolation between animations. See [enum BlendMode] constants.
</member>
<member name="max_space" type="Vector2" setter="set_max_space" getter="get_max_space" default="Vector2( 1, 1 )">
The blend space's X and Y axes' upper limit for the points' position. See [method add_blend_point].
</member>
<member name="min_space" type="Vector2" setter="set_min_space" getter="get_min_space" default="Vector2( -1, -1 )">
The blend space's X and Y axes' lower limit for the points' position. See [method add_blend_point].
</member>
<member name="snap" type="Vector2" setter="set_snap" getter="get_snap" default="Vector2( 0.1, 0.1 )">
Position increment to snap to when moving a point.
</member>
<member name="x_label" type="String" setter="set_x_label" getter="get_x_label" default="&quot;x&quot;">
Name of the blend space's X axis.
</member>
<member name="y_label" type="String" setter="set_y_label" getter="get_y_label" default="&quot;y&quot;">
Name of the blend space's Y axis.
</member>
</members>
<signals>
<signal name="triangles_updated">
<description>
Emitted every time the blend space's triangles are created, removed, or when one of their vertices changes position.
</description>
</signal>
</signals>
<constants>
<constant name="BLEND_MODE_INTERPOLATED" value="0" enum="BlendMode">
The interpolation between animations is linear.
</constant>
<constant name="BLEND_MODE_DISCRETE" value="1" enum="BlendMode">
The blend space plays the animation of the node the blending position is closest to. Useful for frame-by-frame 2D animations.
</constant>
<constant name="BLEND_MODE_DISCRETE_CARRY" value="2" enum="BlendMode">
Similar to [constant BLEND_MODE_DISCRETE], but starts the new animation at the last animation's playback position.
</constant>
</constants>
</class>

View File

@ -1,101 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimationNodeBlendTree" inherits="AnimationRootNode" version="4.2">
<brief_description>
[AnimationTree] node resource that contains many blend type nodes.
</brief_description>
<description>
This node may contain a sub-tree of any other blend type nodes, such as [AnimationNodeTransition], [AnimationNodeBlend2], [AnimationNodeBlend3], [AnimationNodeOneShot], etc. This is one of the most commonly used roots.
An [AnimationNodeOutput] node named [code]output[/code] is created by default.
</description>
<tutorials>
<link>$DOCS_URL/tutorials/animation/animation_tree.md</link>
</tutorials>
<methods>
<method name="add_node">
<return type="void" />
<argument index="0" name="name" type="StringName" />
<argument index="1" name="node" type="AnimationNode" />
<argument index="2" name="position" type="Vector2" default="Vector2( 0, 0 )" />
<description>
</description>
</method>
<method name="connect_node">
<return type="void" />
<argument index="0" name="input_node" type="StringName" />
<argument index="1" name="input_index" type="int" />
<argument index="2" name="output_node" type="StringName" />
<description>
</description>
</method>
<method name="disconnect_node">
<return type="void" />
<argument index="0" name="input_node" type="StringName" />
<argument index="1" name="input_index" type="int" />
<description>
</description>
</method>
<method name="get_node" qualifiers="const">
<return type="AnimationNode" />
<argument index="0" name="name" type="StringName" />
<description>
</description>
</method>
<method name="get_node_position" qualifiers="const">
<return type="Vector2" />
<argument index="0" name="name" type="StringName" />
<description>
</description>
</method>
<method name="has_node" qualifiers="const">
<return type="bool" />
<argument index="0" name="name" type="StringName" />
<description>
</description>
</method>
<method name="remove_node">
<return type="void" />
<argument index="0" name="name" type="StringName" />
<description>
</description>
</method>
<method name="rename_node">
<return type="void" />
<argument index="0" name="name" type="StringName" />
<argument index="1" name="new_name" type="StringName" />
<description>
</description>
</method>
<method name="set_node_position">
<return type="void" />
<argument index="0" name="name" type="StringName" />
<argument index="1" name="position" type="Vector2" />
<description>
</description>
</method>
</methods>
<members>
<member name="graph_offset" type="Vector2" setter="set_graph_offset" getter="get_graph_offset" default="Vector2( 0, 0 )">
The global offset of all sub-nodes.
</member>
</members>
<constants>
<constant name="CONNECTION_OK" value="0">
The connection was successful.
</constant>
<constant name="CONNECTION_ERROR_NO_INPUT" value="1">
The input node is [code]null[/code].
</constant>
<constant name="CONNECTION_ERROR_NO_INPUT_INDEX" value="2">
The specified input port is out of range.
</constant>
<constant name="CONNECTION_ERROR_NO_OUTPUT" value="3">
The output node is [code]null[/code].
</constant>
<constant name="CONNECTION_ERROR_SAME_NODE" value="4">
Input and output nodes are the same.
</constant>
<constant name="CONNECTION_ERROR_CONNECTION_EXISTS" value="5">
The specified connection already exists.
</constant>
</constants>
</class>

View File

@ -1,40 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimationNodeOneShot" inherits="AnimationNode" version="4.2">
<brief_description>
Plays an animation once in [AnimationNodeBlendTree].
</brief_description>
<description>
A resource to add to an [AnimationNodeBlendTree]. This node will execute a sub-animation and return once it finishes. Blend times for fading in and out can be customized, as well as filters.
</description>
<tutorials>
<link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.md</link>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
</methods>
<members>
<member name="autorestart" type="bool" setter="set_autorestart" getter="has_autorestart" default="false">
If [code]true[/code], the sub-animation will restart automatically after finishing.
</member>
<member name="autorestart_delay" type="float" setter="set_autorestart_delay" getter="get_autorestart_delay" default="1.0">
The delay after which the automatic restart is triggered, in seconds.
</member>
<member name="autorestart_random_delay" type="float" setter="set_autorestart_random_delay" getter="get_autorestart_random_delay" default="0.0">
If [member autorestart] is [code]true[/code], a random additional delay (in seconds) between 0 and this value will be added to [member autorestart_delay].
</member>
<member name="fadein_time" type="float" setter="set_fadein_time" getter="get_fadein_time" default="0.1">
</member>
<member name="fadeout_time" type="float" setter="set_fadeout_time" getter="get_fadeout_time" default="0.1">
</member>
<member name="mix_mode" type="int" setter="set_mix_mode" getter="get_mix_mode" enum="AnimationNodeOneShot.MixMode" default="0">
</member>
<member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync" default="false">
</member>
</members>
<constants>
<constant name="MIX_MODE_BLEND" value="0" enum="MixMode">
</constant>
<constant name="MIX_MODE_ADD" value="1" enum="MixMode">
</constant>
</constants>
</class>

View File

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimationNodeOutput" inherits="AnimationNode" version="4.2">
<brief_description>
Generic output node to be added to [AnimationNodeBlendTree].
</brief_description>
<description>
</description>
<tutorials>
<link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.md</link>
<link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
</methods>
<constants>
</constants>
</class>

View File

@ -1,174 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimationNodeStateMachine" inherits="AnimationRootNode" version="4.2">
<brief_description>
State machine for control of animations.
</brief_description>
<description>
Contains multiple nodes representing animation states, connected in a graph. Node transitions can be configured to happen automatically or via code, using a shortest-path algorithm. Retrieve the [AnimationNodeStateMachinePlayback] object from the [AnimationTree] node to control it programmatically.
[b]Example:[/b]
[codeblock]
var state_machine = $AnimationTree.get("parameters/playback")
state_machine.travel("some_state")
[/codeblock]
</description>
<tutorials>
<link>$DOCS_URL/tutorials/animation/animation_tree.md</link>
</tutorials>
<methods>
<method name="add_node">
<return type="void" />
<argument index="0" name="name" type="StringName" />
<argument index="1" name="node" type="AnimationNode" />
<argument index="2" name="position" type="Vector2" default="Vector2( 0, 0 )" />
<description>
</description>
</method>
<method name="add_transition">
<return type="void" />
<argument index="0" name="from" type="StringName" />
<argument index="1" name="to" type="StringName" />
<argument index="2" name="transition" type="AnimationNodeStateMachineTransition" />
<description>
</description>
</method>
<method name="get_end_node" qualifiers="const">
<return type="String" />
<description>
Returns the graph's end node.
</description>
</method>
<method name="get_graph_offset" qualifiers="const">
<return type="Vector2" />
<description>
Returns the draw offset of the graph. Used for display in the editor.
</description>
</method>
<method name="get_node" qualifiers="const">
<return type="AnimationNode" />
<argument index="0" name="name" type="StringName" />
<description>
</description>
</method>
<method name="get_node_name" qualifiers="const">
<return type="StringName" />
<argument index="0" name="node" type="AnimationNode" />
<description>
Returns the given animation node's name.
</description>
</method>
<method name="get_node_position" qualifiers="const">
<return type="Vector2" />
<argument index="0" name="name" type="StringName" />
<description>
</description>
</method>
<method name="get_start_node" qualifiers="const">
<return type="String" />
<description>
Returns the graph's end node.
</description>
</method>
<method name="get_transition" qualifiers="const">
<return type="AnimationNodeStateMachineTransition" />
<argument index="0" name="idx" type="int" />
<description>
Returns the given transition.
</description>
</method>
<method name="get_transition_count" qualifiers="const">
<return type="int" />
<description>
Returns the number of connections in the graph.
</description>
</method>
<method name="get_transition_from" qualifiers="const">
<return type="StringName" />
<argument index="0" name="idx" type="int" />
<description>
Returns the given transition's start node.
</description>
</method>
<method name="get_transition_to" qualifiers="const">
<return type="StringName" />
<argument index="0" name="idx" type="int" />
<description>
Returns the given transition's end node.
</description>
</method>
<method name="has_node" qualifiers="const">
<return type="bool" />
<argument index="0" name="name" type="StringName" />
<description>
</description>
</method>
<method name="has_transition" qualifiers="const">
<return type="bool" />
<argument index="0" name="from" type="StringName" />
<argument index="1" name="to" type="StringName" />
<description>
</description>
</method>
<method name="remove_node">
<return type="void" />
<argument index="0" name="name" type="StringName" />
<description>
</description>
</method>
<method name="remove_transition">
<return type="void" />
<argument index="0" name="from" type="StringName" />
<argument index="1" name="to" type="StringName" />
<description>
</description>
</method>
<method name="remove_transition_by_index">
<return type="void" />
<argument index="0" name="idx" type="int" />
<description>
Deletes the given transition by index.
</description>
</method>
<method name="rename_node">
<return type="void" />
<argument index="0" name="name" type="StringName" />
<argument index="1" name="new_name" type="StringName" />
<description>
</description>
</method>
<method name="replace_node">
<return type="void" />
<argument index="0" name="name" type="StringName" />
<argument index="1" name="node" type="AnimationNode" />
<description>
</description>
</method>
<method name="set_end_node">
<return type="void" />
<argument index="0" name="name" type="StringName" />
<description>
</description>
</method>
<method name="set_graph_offset">
<return type="void" />
<argument index="0" name="offset" type="Vector2" />
<description>
Sets the draw offset of the graph. Used for display in the editor.
</description>
</method>
<method name="set_node_position">
<return type="void" />
<argument index="0" name="name" type="StringName" />
<argument index="1" name="position" type="Vector2" />
<description>
</description>
</method>
<method name="set_start_node">
<return type="void" />
<argument index="0" name="name" type="StringName" />
<description>
</description>
</method>
</methods>
<constants>
</constants>
</class>

View File

@ -1,71 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimationNodeStateMachinePlayback" inherits="Resource" version="4.2">
<brief_description>
Playback control for [AnimationNodeStateMachine].
</brief_description>
<description>
Allows control of [AnimationTree] state machines created with [AnimationNodeStateMachine]. Retrieve with [code]$AnimationTree.get("parameters/playback")[/code].
[b]Example:[/b]
[codeblock]
var state_machine = $AnimationTree.get("parameters/playback")
state_machine.travel("some_state")
[/codeblock]
</description>
<tutorials>
<link>$DOCS_URL/tutorials/animation/animation_tree.md</link>
</tutorials>
<methods>
<method name="get_current_length" qualifiers="const">
<return type="float" />
<description>
</description>
</method>
<method name="get_current_node" qualifiers="const">
<return type="StringName" />
<description>
Returns the currently playing animation state.
</description>
</method>
<method name="get_current_play_position" qualifiers="const">
<return type="float" />
<description>
Returns the playback position within the current animation state.
</description>
</method>
<method name="get_travel_path" qualifiers="const">
<return type="PoolStringArray" />
<description>
Returns the current travel path as computed internally by the A* algorithm.
</description>
</method>
<method name="is_playing" qualifiers="const">
<return type="bool" />
<description>
Returns [code]true[/code] if an animation is playing.
</description>
</method>
<method name="start">
<return type="void" />
<argument index="0" name="node" type="StringName" />
<description>
</description>
</method>
<method name="stop">
<return type="void" />
<description>
Stops the currently playing animation.
</description>
</method>
<method name="travel">
<return type="void" />
<argument index="0" name="to_node" type="StringName" />
<description>
</description>
</method>
</methods>
<members>
<member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" overrides="Resource" default="true" />
</members>
<constants>
</constants>
</class>

View File

@ -1,53 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimationNodeStateMachineTransition" inherits="Resource" version="4.2">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
<link>$DOCS_URL/tutorials/animation/animation_tree.md</link>
</tutorials>
<methods>
</methods>
<members>
<member name="advance_condition" type="StringName" setter="set_advance_condition" getter="get_advance_condition" default="@&quot;&quot;">
Turn on auto advance when this condition is set. The provided name will become a boolean parameter on the [AnimationTree] that can be controlled from code (see [url=$DOCS_URL/tutorials/animation/animation_tree.html#controlling-from-code][/url]). For example, if [member AnimationTree.tree_root] is an [AnimationNodeStateMachine] and [member advance_condition] is set to [code]"idle"[/code]:
[codeblock]
$animation_tree["parameters/conditions/idle"] = is_on_floor and (linear_velocity.x == 0)
[/codeblock]
</member>
<member name="auto_advance" type="bool" setter="set_auto_advance" getter="has_auto_advance" default="false">
Turn on the transition automatically when this state is reached. This works best with [constant SWITCH_MODE_AT_END].
</member>
<member name="disabled" type="bool" setter="set_disabled" getter="is_disabled" default="false">
Don't use this transition during [method AnimationNodeStateMachinePlayback.travel] or [member auto_advance].
</member>
<member name="priority" type="int" setter="set_priority" getter="get_priority" default="1">
Lower priority transitions are preferred when travelling through the tree via [method AnimationNodeStateMachinePlayback.travel] or [member auto_advance].
</member>
<member name="switch_mode" type="int" setter="set_switch_mode" getter="get_switch_mode" enum="AnimationNodeStateMachineTransition.SwitchMode" default="0">
The transition type.
</member>
<member name="xfade_time" type="float" setter="set_xfade_time" getter="get_xfade_time" default="0.0">
The time to cross-fade between this state and the next.
</member>
</members>
<signals>
<signal name="advance_condition_changed">
<description>
Emitted when [member advance_condition] is changed.
</description>
</signal>
</signals>
<constants>
<constant name="SWITCH_MODE_IMMEDIATE" value="0" enum="SwitchMode">
Switch to the next state immediately. The current state will end and blend into the beginning of the new one.
</constant>
<constant name="SWITCH_MODE_SYNC" value="1" enum="SwitchMode">
Switch to the next state immediately, but will seek the new state to the playback position of the old state.
</constant>
<constant name="SWITCH_MODE_AT_END" value="2" enum="SwitchMode">
Wait for the current state playback to end, then switch to the beginning of the next state animation.
</constant>
</constants>
</class>

View File

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimationNodeTimeScale" inherits="AnimationNode" version="4.2">
<brief_description>
A time-scaling animation node to be used with [AnimationTree].
</brief_description>
<description>
Allows scaling the speed of the animation (or reversing it) in any children nodes. Setting it to 0 will pause the animation.
</description>
<tutorials>
<link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.md</link>
<link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
</tutorials>
<methods>
</methods>
<constants>
</constants>
</class>

View File

@ -1,27 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimationNodeTimeSeek" inherits="AnimationNode" version="4.2">
<brief_description>
A time-seeking animation node to be used with [AnimationTree].
</brief_description>
<description>
This node can be used to cause a seek command to happen to any sub-children of the animation graph. Use this node type to play an [Animation] from the start or a certain playback position inside the [AnimationNodeBlendTree]. After setting the time and changing the animation playback, the seek node automatically goes into sleep mode on the next process frame by setting its [code]seek_position[/code] value to [code]-1.0[/code].
[codeblock]
# Play child animation from the start.
animation_tree.set("parameters/Seek/seek_position", 0.0)
# Alternative syntax (same result as above).
animation_tree["parameters/Seek/seek_position"] = 0.0
# Play child animation from 12 second timestamp.
animation_tree.set("parameters/Seek/seek_position", 12.0)
# Alternative syntax (same result as above).
animation_tree["parameters/Seek/seek_position"] = 12.0
[/codeblock]
</description>
<tutorials>
<link>$DOCS_URL/tutorials/animation/animation_tree.md</link>
</tutorials>
<methods>
</methods>
<constants>
</constants>
</class>

View File

@ -1,52 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimationNodeTransition" inherits="AnimationNode" version="4.2">
<brief_description>
A generic animation transition node for [AnimationTree].
</brief_description>
<description>
Simple state machine for cases which don't require a more advanced [AnimationNodeStateMachine]. Animations can be connected to the inputs and transition times can be specified.
</description>
<tutorials>
<link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.md</link>
<link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
<method name="get_input_caption" qualifiers="const">
<return type="String" />
<argument index="0" name="input" type="int" />
<description>
</description>
</method>
<method name="is_input_set_as_auto_advance" qualifiers="const">
<return type="bool" />
<argument index="0" name="input" type="int" />
<description>
</description>
</method>
<method name="set_input_as_auto_advance">
<return type="void" />
<argument index="0" name="input" type="int" />
<argument index="1" name="enable" type="bool" />
<description>
</description>
</method>
<method name="set_input_caption">
<return type="void" />
<argument index="0" name="input" type="int" />
<argument index="1" name="caption" type="String" />
<description>
</description>
</method>
</methods>
<members>
<member name="input_count" type="int" setter="set_enabled_inputs" getter="get_enabled_inputs" default="0">
The number of available input ports for this node.
</member>
<member name="xfade_time" type="float" setter="set_cross_fade_time" getter="get_cross_fade_time" default="0.0">
Cross-fading time (in seconds) between each animation connected to the inputs.
</member>
</members>
<constants>
</constants>
</class>

View File

@ -1,251 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimationPlayer" inherits="Node" version="4.2">
<brief_description>
Container and player of [Animation] resources.
</brief_description>
<description>
An animation player is used for general-purpose playback of [Animation] resources. It contains a dictionary of animations (referenced by name) and custom blend times between their transitions. Additionally, animations can be played and blended in different channels.
[AnimationPlayer] is more suited than [Tween] for animations where you know the final values in advance. For example, fading a screen in and out is more easily done with an [AnimationPlayer] node thanks to the animation tools provided by the editor. That particular example can also be implemented with a [Tween] node, but it requires doing everything by code.
Updating the target properties of animations occurs at process time.
</description>
<tutorials>
<link title="Animation tutorial index">$DOCS_URL/tutorials/animation/index.md</link>
<link title="2D Sprite animation">$DOCS_URL/tutorials/2d/2d_sprite_animation.md</link>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
<method name="add_animation">
<return type="int" enum="Error" />
<argument index="0" name="name" type="StringName" />
<argument index="1" name="animation" type="Animation" />
<description>
</description>
</method>
<method name="advance">
<return type="void" />
<argument index="0" name="delta" type="float" />
<description>
Shifts position in the animation timeline and immediately updates the animation. [code]delta[/code] is the time in seconds to shift. Events between the current frame and [code]delta[/code] are handled.
</description>
</method>
<method name="animation_get_next" qualifiers="const">
<return type="StringName" />
<argument index="0" name="anim_from" type="StringName" />
<description>
</description>
</method>
<method name="animation_set_next">
<return type="void" />
<argument index="0" name="anim_from" type="StringName" />
<argument index="1" name="anim_to" type="StringName" />
<description>
</description>
</method>
<method name="clear_caches">
<return type="void" />
<description>
[AnimationPlayer] caches animated nodes. It may not notice if a node disappears; [method clear_caches] forces it to update the cache again.
</description>
</method>
<method name="clear_queue">
<return type="void" />
<description>
Clears all queued, unplayed animations.
</description>
</method>
<method name="find_animation" qualifiers="const">
<return type="StringName" />
<argument index="0" name="animation" type="Animation" />
<description>
Returns the name of [code]animation[/code] or an empty string if not found.
</description>
</method>
<method name="get_animation" qualifiers="const">
<return type="Animation" />
<argument index="0" name="name" type="StringName" />
<description>
</description>
</method>
<method name="get_animation_list" qualifiers="const">
<return type="PoolStringArray" />
<description>
Returns the list of stored animation names.
</description>
</method>
<method name="get_blend_time" qualifiers="const">
<return type="float" />
<argument index="0" name="anim_from" type="StringName" />
<argument index="1" name="anim_to" type="StringName" />
<description>
</description>
</method>
<method name="get_playing_speed" qualifiers="const">
<return type="float" />
<description>
Gets the actual playing speed of current animation or 0 if not playing. This speed is the [member playback_speed] property multiplied by [code]custom_speed[/code] argument specified when calling the [method play] method.
</description>
</method>
<method name="get_queue">
<return type="PoolStringArray" />
<description>
Returns a list of the animation names that are currently queued to play.
</description>
</method>
<method name="has_animation" qualifiers="const">
<return type="bool" />
<argument index="0" name="name" type="StringName" />
<description>
</description>
</method>
<method name="is_playing" qualifiers="const">
<return type="bool" />
<description>
Returns [code]true[/code] if playing an animation.
</description>
</method>
<method name="play">
<return type="void" />
<argument index="0" name="name" type="StringName" default="&quot;&quot;" />
<argument index="1" name="custom_blend" type="float" default="-1" />
<argument index="2" name="custom_speed" type="float" default="1.0" />
<argument index="3" name="from_end" type="bool" default="false" />
<description>
</description>
</method>
<method name="play_backwards">
<return type="void" />
<argument index="0" name="name" type="StringName" default="&quot;&quot;" />
<argument index="1" name="custom_blend" type="float" default="-1" />
<description>
</description>
</method>
<method name="queue">
<return type="void" />
<argument index="0" name="name" type="StringName" />
<description>
</description>
</method>
<method name="remove_animation">
<return type="void" />
<argument index="0" name="name" type="StringName" />
<description>
</description>
</method>
<method name="rename_animation">
<return type="void" />
<argument index="0" name="name" type="StringName" />
<argument index="1" name="newname" type="StringName" />
<description>
</description>
</method>
<method name="seek">
<return type="void" />
<argument index="0" name="seconds" type="float" />
<argument index="1" name="update" type="bool" default="false" />
<description>
Seeks the animation to the [code]seconds[/code] point in time (in seconds). If [code]update[/code] is [code]true[/code], the animation updates too, otherwise it updates at process time. Events between the current frame and [code]seconds[/code] are skipped.
[b]Note:[/b] Seeking to the end of the animation doesn't emit [signal animation_finished]. If you want to skip animation and emit the signal, use [method advance].
</description>
</method>
<method name="set_blend_time">
<return type="void" />
<argument index="0" name="anim_from" type="StringName" />
<argument index="1" name="anim_to" type="StringName" />
<argument index="2" name="sec" type="float" />
<description>
</description>
</method>
<method name="stop">
<return type="void" />
<argument index="0" name="reset" type="bool" default="true" />
<description>
Stops or pauses the currently playing animation. If [code]reset[/code] is [code]true[/code], the animation position is reset to [code]0[/code] and the playback speed is reset to [code]1.0[/code].
If [code]reset[/code] is [code]false[/code], the [member current_animation_position] will be kept and calling [method play] or [method play_backwards] without arguments or with the same animation name as [member assigned_animation] will resume the animation.
</description>
</method>
</methods>
<members>
<member name="assigned_animation" type="String" setter="set_assigned_animation" getter="get_assigned_animation">
If playing, the current animation; otherwise, the animation last played. When set, would change the animation, but would not play it unless currently playing. See also [member current_animation].
</member>
<member name="autoplay" type="String" setter="set_autoplay" getter="get_autoplay" default="&quot;&quot;">
The name of the animation to play when the scene loads.
</member>
<member name="current_animation" type="String" setter="set_current_animation" getter="get_current_animation" default="&quot;&quot;">
The name of the currently playing animation. If no animation is playing, the property's value is an empty string. Changing this value does not restart the animation. See [method play] for more information on playing animations.
[b]Note:[/b] While this property appears in the inspector, it's not meant to be edited, and it's not saved in the scene. This property is mainly used to get the currently playing animation, and internally for animation playback tracks. For more information, see [Animation].
</member>
<member name="current_animation_length" type="float" setter="" getter="get_current_animation_length">
The length (in seconds) of the currently being played animation.
</member>
<member name="current_animation_position" type="float" setter="" getter="get_current_animation_position">
The position (in seconds) of the currently playing animation.
</member>
<member name="method_call_mode" type="int" setter="set_method_call_mode" getter="get_method_call_mode" enum="AnimationPlayer.AnimationMethodCallMode" default="0">
The call mode to use for Call Method tracks.
</member>
<member name="playback_active" type="bool" setter="set_active" getter="is_active">
If [code]true[/code], updates animations in response to process-related notifications.
</member>
<member name="playback_default_blend_time" type="float" setter="set_default_blend_time" getter="get_default_blend_time" default="0.0">
The default time in which to blend animations. Ranges from 0 to 4096 with 0.01 precision.
</member>
<member name="playback_process_mode" type="int" setter="set_animation_process_mode" getter="get_animation_process_mode" enum="AnimationPlayer.AnimationProcessMode" default="1">
The process notification in which to update animations.
</member>
<member name="playback_speed" type="float" setter="set_speed_scale" getter="get_speed_scale" default="1.0">
The speed scaling ratio. For instance, if this value is 1, then the animation plays at normal speed. If it's 0.5, then it plays at half speed. If it's 2, then it plays at double speed.
</member>
<member name="reset_on_save" type="bool" setter="set_reset_on_save_enabled" getter="is_reset_on_save_enabled" default="true">
This is used by the editor. If set to [code]true[/code], the scene will be saved with the effects of the reset animation applied (as if it had been seeked to time 0), then reverted after saving.
In other words, the saved scene file will contain the "default pose", as defined by the reset animation, if any, with the editor keeping the values that the nodes had before saving.
</member>
<member name="root_node" type="NodePath" setter="set_root" getter="get_root" default="NodePath(&quot;..&quot;)">
The node from which node path references will travel.
</member>
</members>
<signals>
<signal name="animation_changed">
<argument index="0" name="old_name" type="StringName" />
<argument index="1" name="new_name" type="String" />
<description>
Emitted when a queued animation plays after the previous animation was finished. See [method queue].
[b]Note:[/b] The signal is not emitted when the animation is changed via [method play] or from [AnimationTree].
</description>
</signal>
<signal name="animation_finished">
<argument index="0" name="anim_name" type="StringName" />
<description>
Notifies when an animation finished playing.
</description>
</signal>
<signal name="animation_started">
<argument index="0" name="anim_name" type="StringName" />
<description>
Notifies when an animation starts playing.
</description>
</signal>
<signal name="caches_cleared">
<description>
Notifies when the caches have been cleared, either automatically, or manually via [method clear_caches].
</description>
</signal>
</signals>
<constants>
<constant name="ANIMATION_PROCESS_PHYSICS" value="0" enum="AnimationProcessMode">
Process animation during the physics process. This is especially useful when animating physics bodies.
</constant>
<constant name="ANIMATION_PROCESS_IDLE" value="1" enum="AnimationProcessMode">
Process animation during the idle process.
</constant>
<constant name="ANIMATION_PROCESS_MANUAL" value="2" enum="AnimationProcessMode">
Do not process animation. Use [method advance] to process the animation manually.
</constant>
<constant name="ANIMATION_METHOD_CALL_DEFERRED" value="0" enum="AnimationMethodCallMode">
Batch method calls during the animation process, then do the calls after events are processed. This avoids bugs involving deleting nodes or modifying the AnimationPlayer while playing.
</constant>
<constant name="ANIMATION_METHOD_CALL_IMMEDIATE" value="1" enum="AnimationMethodCallMode">
Make method calls immediately when reached in the animation.
</constant>
</constants>
</class>

View File

@ -1,13 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimationRootNode" inherits="AnimationNode" version="4.2">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<constants>
</constants>
</class>

View File

@ -1,13 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimationTrackEditPlugin" inherits="Reference" version="4.2">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<constants>
</constants>
</class>

View File

@ -1,65 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimationTree" inherits="Node" version="4.2">
<brief_description>
A node to be used for advanced animation transitions in an [AnimationPlayer].
</brief_description>
<description>
A node to be used for advanced animation transitions in an [AnimationPlayer].
[b]Note:[/b] When linked with an [AnimationPlayer], several properties and methods of the corresponding [AnimationPlayer] will not function as expected. Playback and transitions should be handled using only the [AnimationTree] and its constituent [AnimationNode](s). The [AnimationPlayer] node should be used solely for adding, deleting, and editing animations.
</description>
<tutorials>
<link title="Using AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.md</link>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
<method name="advance">
<return type="void" />
<argument index="0" name="delta" type="float" />
<description>
Manually advance the animations by the specified time (in seconds).
</description>
</method>
<method name="get_root_motion_transform" qualifiers="const">
<return type="Transform" />
<description>
Retrieve the motion of the [member root_motion_track] as a [Transform] that can be used elsewhere. If [member root_motion_track] is not a path to a track of type [constant Animation.TYPE_POSITION_3D], [constant Animation.TYPE_SCALE_3D] or [constant Animation.TYPE_ROTATION_3D], returns an identity transformation. See also [member root_motion_track] and [RootMotionView].
</description>
</method>
<method name="rename_parameter">
<return type="void" />
<argument index="0" name="old_name" type="String" />
<argument index="1" name="new_name" type="String" />
<description>
</description>
</method>
</methods>
<members>
<member name="active" type="bool" setter="set_active" getter="is_active" default="false">
If [code]true[/code], the [AnimationTree] will be processing.
</member>
<member name="anim_player" type="NodePath" setter="set_animation_player" getter="get_animation_player" default="NodePath(&quot;&quot;)">
The path to the [AnimationPlayer] used for animating.
</member>
<member name="process_mode" type="int" setter="set_process_mode" getter="get_process_mode" enum="AnimationTree.AnimationProcessMode" default="1">
The process mode of this [AnimationTree]. See [enum AnimationProcessMode] for available modes.
</member>
<member name="root_motion_track" type="NodePath" setter="set_root_motion_track" getter="get_root_motion_track" default="NodePath(&quot;&quot;)">
The path to the Animation track used for root motion. Paths must be valid scene-tree paths to a node, and must be specified starting from the parent node of the node that will reproduce the animation. To specify a track that controls properties or bones, append its name after the path, separated by [code]":"[/code]. For example, [code]"character/skeleton:ankle"[/code] or [code]"character/mesh:transform/local"[/code].
If the track has type [constant Animation.TYPE_POSITION_3D], [constant Animation.TYPE_ROTATION_3D] or [constant Animation.TYPE_SCALE_3D], the transformation will be cancelled visually, and the animation will appear to stay in place. See also [method get_root_motion_transform] and [RootMotionView].
</member>
<member name="tree_root" type="AnimationNode" setter="set_tree_root" getter="get_tree_root">
The root animation node of this [AnimationTree]. See [AnimationNode].
</member>
</members>
<constants>
<constant name="ANIMATION_PROCESS_PHYSICS" value="0" enum="AnimationProcessMode">
The animations will progress during the physics frame (i.e. [method Node._physics_process]).
</constant>
<constant name="ANIMATION_PROCESS_IDLE" value="1" enum="AnimationProcessMode">
The animations will progress during the idle frame (i.e. [method Node._process]).
</constant>
<constant name="ANIMATION_PROCESS_MANUAL" value="2" enum="AnimationProcessMode">
The animations will only progress manually (see [method advance]).
</constant>
</constants>
</class>

View File

@ -1,200 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Area" inherits="CollisionObject" version="4.2">
<brief_description>
3D area for detection and physics and audio influence.
</brief_description>
<description>
3D area that detects [CollisionObject] nodes overlapping, entering, or exiting. Can also alter or override local physics parameters (gravity, damping) and route audio to a custom audio bus.
To give the area its shape, add a [CollisionShape] or a [CollisionPolygon] node as a [i]direct[/i] child (or add multiple such nodes as direct children) of the area.
[b]Warning:[/b] See [ConcavePolygonShape] (also called "trimesh") for a warning about possibly unexpected behavior when using that shape for an area.
[b]Warning:[/b] With a non-uniform scale this node will probably not function as expected. Please make sure to keep its scale uniform (i.e. the same on all axes), and change the size(s) of its collision shape(s) instead.
</description>
<tutorials>
<link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
<link title="GUI in 3D Demo">https://godotengine.org/asset-library/asset/127</link>
</tutorials>
<methods>
<method name="get_overlapping_areas" qualifiers="const">
<return type="Array" />
<description>
Returns a list of intersecting [Area]s. The overlapping area's [member CollisionObject.collision_layer] must be part of this area's [member CollisionObject.collision_mask] in order to be detected.
For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead.
</description>
</method>
<method name="get_overlapping_bodies" qualifiers="const">
<return type="Array" />
<description>
Returns a list of intersecting [PhysicsBody]s. The overlapping body's [member CollisionObject.collision_layer] must be part of this area's [member CollisionObject.collision_mask] in order to be detected.
For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead.
</description>
</method>
<method name="overlaps_area" qualifiers="const">
<return type="bool" />
<argument index="0" name="area" type="Node" />
<description>
If [code]true[/code], the given area overlaps the Area.
[b]Note:[/b] The result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead.
</description>
</method>
<method name="overlaps_body" qualifiers="const">
<return type="bool" />
<argument index="0" name="body" type="Node" />
<description>
If [code]true[/code], the given physics body overlaps the Area.
[b]Note:[/b] The result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead.
The [code]body[/code] argument can either be a [PhysicsBody] or a [GridMap] instance (while GridMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body).
</description>
</method>
</methods>
<members>
<member name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp" default="0.1">
The rate at which objects stop spinning in this area. Represents the angular velocity lost per second.
See [member ProjectSettings.physics/3d/default_angular_damp] for more details about damping.
</member>
<member name="audio_bus_name" type="StringName" setter="set_audio_bus" getter="get_audio_bus" default="@&quot;Master&quot;">
The name of the area's audio bus.
</member>
<member name="audio_bus_override" type="bool" setter="set_audio_bus_override" getter="is_overriding_audio_bus" default="false">
If [code]true[/code], the area's audio bus overrides the default audio bus.
</member>
<member name="gravity" type="float" setter="set_gravity" getter="get_gravity" default="9.8">
The area's gravity intensity (in meters per second squared). This value multiplies the gravity vector. This is useful to alter the force of gravity without altering its direction.
</member>
<member name="gravity_distance_scale" type="float" setter="set_gravity_distance_scale" getter="get_gravity_distance_scale" default="0.0">
The falloff factor for point gravity. The greater the value, the faster gravity decreases with distance.
</member>
<member name="gravity_point" type="bool" setter="set_gravity_is_point" getter="is_gravity_a_point" default="false">
If [code]true[/code], gravity is calculated from a point (set via [member gravity_vec]). See also [member space_override].
</member>
<member name="gravity_vec" type="Vector3" setter="set_gravity_vector" getter="get_gravity_vector" default="Vector3( 0, -1, 0 )">
The area's gravity vector (not normalized). If gravity is a point (see [member gravity_point]), this will be the point of attraction.
</member>
<member name="linear_damp" type="float" setter="set_linear_damp" getter="get_linear_damp" default="0.1">
The rate at which objects stop moving in this area. Represents the linear velocity lost per second.
See [member ProjectSettings.physics/3d/default_linear_damp] for more details about damping.
</member>
<member name="monitorable" type="bool" setter="set_monitorable" getter="is_monitorable" default="true">
If [code]true[/code], other monitoring areas can detect this area.
</member>
<member name="monitoring" type="bool" setter="set_monitoring" getter="is_monitoring" default="true">
If [code]true[/code], the area detects bodies or areas entering and exiting it.
</member>
<member name="priority" type="float" setter="set_priority" getter="get_priority" default="0.0">
The area's priority. Higher priority areas are processed first.
</member>
<member name="reverb_bus_amount" type="float" setter="set_reverb_amount" getter="get_reverb_amount" default="0.0">
The degree to which this area applies reverb to its associated audio. Ranges from [code]0[/code] to [code]1[/code] with [code]0.1[/code] precision.
</member>
<member name="reverb_bus_enable" type="bool" setter="set_use_reverb_bus" getter="is_using_reverb_bus" default="false">
If [code]true[/code], the area applies reverb to its associated audio.
</member>
<member name="reverb_bus_name" type="StringName" setter="set_reverb_bus" getter="get_reverb_bus" default="@&quot;Master&quot;">
The reverb bus name to use for this area's associated audio.
</member>
<member name="reverb_bus_uniformity" type="float" setter="set_reverb_uniformity" getter="get_reverb_uniformity" default="0.0">
The degree to which this area's reverb is a uniform effect. Ranges from [code]0[/code] to [code]1[/code] with [code]0.1[/code] precision.
</member>
<member name="space_override" type="int" setter="set_space_override_mode" getter="get_space_override_mode" enum="Area.SpaceOverride" default="0">
Override mode for gravity and damping calculations within this area. See [enum SpaceOverride] for possible values.
</member>
</members>
<signals>
<signal name="area_entered">
<argument index="0" name="area" type="Area" />
<description>
Emitted when another Area enters this Area. Requires [member monitoring] to be set to [code]true[/code].
[code]area[/code] the other Area.
</description>
</signal>
<signal name="area_exited">
<argument index="0" name="area" type="Area" />
<description>
Emitted when another Area exits this Area. Requires [member monitoring] to be set to [code]true[/code].
[code]area[/code] the other Area.
</description>
</signal>
<signal name="area_shape_entered">
<argument index="0" name="area_rid" type="RID" />
<argument index="1" name="area" type="Area" />
<argument index="2" name="area_shape_index" type="int" />
<argument index="3" name="local_shape_index" type="int" />
<description>
Emitted when one of another Area's [Shape]s enters one of this Area's [Shape]s. Requires [member monitoring] to be set to [code]true[/code].
[code]area_rid[/code] the [RID] of the other Area's [CollisionObject] used by the [PhysicsServer].
[code]area[/code] the other Area.
[code]area_shape_index[/code] the index of the [Shape] of the other Area used by the [PhysicsServer]. Get the [CollisionShape] node with [code]area.shape_owner_get_owner(area_shape_index)[/code].
[code]local_shape_index[/code] the index of the [Shape] of this Area used by the [PhysicsServer]. Get the [CollisionShape] node with [code]self.shape_owner_get_owner(local_shape_index)[/code].
</description>
</signal>
<signal name="area_shape_exited">
<argument index="0" name="area_rid" type="RID" />
<argument index="1" name="area" type="Area" />
<argument index="2" name="area_shape_index" type="int" />
<argument index="3" name="local_shape_index" type="int" />
<description>
Emitted when one of another Area's [Shape]s enters one of this Area's [Shape]s. Requires [member monitoring] to be set to [code]true[/code].
[code]area_rid[/code] the [RID] of the other Area's [CollisionObject] used by the [PhysicsServer].
[code]area[/code] the other Area.
[code]area_shape_index[/code] the index of the [Shape] of the other Area used by the [PhysicsServer]. Get the [CollisionShape] node with [code]area.shape_owner_get_owner(area_shape_index)[/code].
[code]local_shape_index[/code] the index of the [Shape] of this Area used by the [PhysicsServer]. Get the [CollisionShape] node with [code]self.shape_owner_get_owner(local_shape_index)[/code].
</description>
</signal>
<signal name="body_entered">
<argument index="0" name="body" type="Node" />
<description>
Emitted when a [PhysicsBody] or [GridMap] enters this Area. Requires [member monitoring] to be set to [code]true[/code]. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape]s.
[code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody] or [GridMap].
</description>
</signal>
<signal name="body_exited">
<argument index="0" name="body" type="Node" />
<description>
Emitted when a [PhysicsBody] or [GridMap] exits this Area. Requires [member monitoring] to be set to [code]true[/code]. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape]s.
[code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody] or [GridMap].
</description>
</signal>
<signal name="body_shape_entered">
<argument index="0" name="body_rid" type="RID" />
<argument index="1" name="body" type="Node" />
<argument index="2" name="body_shape_index" type="int" />
<argument index="3" name="local_shape_index" type="int" />
<description>
Emitted when one of a [PhysicsBody] or [GridMap]'s [Shape]s enters one of this Area's [Shape]s. Requires [member monitoring] to be set to [code]true[/code]. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape]s.
[code]body_rid[/code] the [RID] of the [PhysicsBody] or [MeshLibrary]'s [CollisionObject] used by the [PhysicsServer].
[code]body[/code] the [Node], if it exists in the tree, of the [PhysicsBody] or [GridMap].
[code]body_shape_index[/code] the index of the [Shape] of the [PhysicsBody] or [GridMap] used by the [PhysicsServer]. Get the [CollisionShape] node with [code]body.shape_owner_get_owner(body_shape_index)[/code].
[code]local_shape_index[/code] the index of the [Shape] of this Area used by the [PhysicsServer]. Get the [CollisionShape] node with [code]self.shape_owner_get_owner(local_shape_index)[/code].
</description>
</signal>
<signal name="body_shape_exited">
<argument index="0" name="body_rid" type="RID" />
<argument index="1" name="body" type="Node" />
<argument index="2" name="body_shape_index" type="int" />
<argument index="3" name="local_shape_index" type="int" />
<description>
Emitted when one of a [PhysicsBody] or [GridMap]'s [Shape]s enters one of this Area's [Shape]s. Requires [member monitoring] to be set to [code]true[/code]. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape]s.
[code]body_rid[/code] the [RID] of the [PhysicsBody] or [MeshLibrary]'s [CollisionObject] used by the [PhysicsServer].
[code]body[/code] the [Node], if it exists in the tree, of the [PhysicsBody] or [GridMap].
[code]body_shape_index[/code] the index of the [Shape] of the [PhysicsBody] or [GridMap] used by the [PhysicsServer]. Get the [CollisionShape] node with [code]body.shape_owner_get_owner(body_shape_index)[/code].
[code]local_shape_index[/code] the index of the [Shape] of this Area used by the [PhysicsServer]. Get the [CollisionShape] node with [code]self.shape_owner_get_owner(local_shape_index)[/code].
</description>
</signal>
</signals>
<constants>
<constant name="SPACE_OVERRIDE_DISABLED" value="0" enum="SpaceOverride">
This area does not affect gravity/damping.
</constant>
<constant name="SPACE_OVERRIDE_COMBINE" value="1" enum="SpaceOverride">
This area adds its gravity/damping values to whatever has been calculated so far (in [member priority] order).
</constant>
<constant name="SPACE_OVERRIDE_COMBINE_REPLACE" value="2" enum="SpaceOverride">
This area adds its gravity/damping values to whatever has been calculated so far (in [member priority] order), ignoring any lower priority areas.
</constant>
<constant name="SPACE_OVERRIDE_REPLACE" value="3" enum="SpaceOverride">
This area replaces any gravity/damping, even the defaults, ignoring any lower priority areas.
</constant>
<constant name="SPACE_OVERRIDE_REPLACE_COMBINE" value="4" enum="SpaceOverride">
This area replaces any gravity/damping calculated so far (in [member priority] order), but keeps calculating the rest of the areas.
</constant>
</constants>
</class>

View File

@ -1,189 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Area2D" inherits="CollisionObject2D" version="4.2">
<brief_description>
2D area for detection and physics and audio influence.
</brief_description>
<description>
2D area that detects [CollisionObject2D] nodes overlapping, entering, or exiting. Can also alter or override local physics parameters (gravity, damping) and route audio to a custom audio bus.
To give the area its shape, add a [CollisionShape2D] or a [CollisionPolygon2D] node as a [i]direct[/i] child (or add multiple such nodes as direct children) of the area.
[b]Warning:[/b] See [ConcavePolygonShape2D] for a warning about possibly unexpected behavior when using that shape for an area.
</description>
<tutorials>
<link title="Using Area2D">$DOCS_URL/tutorials/physics/using_area_2d.md</link>
<link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link>
<link title="2D Pong Demo">https://godotengine.org/asset-library/asset/121</link>
<link title="2D Platformer Demo">https://godotengine.org/asset-library/asset/120</link>
</tutorials>
<methods>
<method name="get_overlapping_areas" qualifiers="const">
<return type="Array" />
<description>
Returns a list of intersecting [Area2D]s. The overlapping area's [member CollisionObject2D.collision_layer] must be part of this area's [member CollisionObject2D.collision_mask] in order to be detected.
For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead.
</description>
</method>
<method name="get_overlapping_bodies" qualifiers="const">
<return type="Array" />
<description>
Returns a list of intersecting [PhysicsBody2D]s. The overlapping body's [member CollisionObject2D.collision_layer] must be part of this area's [member CollisionObject2D.collision_mask] in order to be detected.
For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead.
</description>
</method>
<method name="overlaps_area" qualifiers="const">
<return type="bool" />
<argument index="0" name="area" type="Node" />
<description>
If [code]true[/code], the given area overlaps the Area2D.
[b]Note:[/b] The result of this test is not immediate after moving objects. For performance, the list of overlaps is updated once per frame and before the physics step. Consider using signals instead.
</description>
</method>
<method name="overlaps_body" qualifiers="const">
<return type="bool" />
<argument index="0" name="body" type="Node" />
<description>
If [code]true[/code], the given physics body overlaps the Area2D.
[b]Note:[/b] The result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead.
The [code]body[/code] argument can either be a [PhysicsBody2D] or a [TileMap] instance (while TileMaps are not physics bodies themselves, they register their tiles with collision shapes as a virtual physics body).
</description>
</method>
</methods>
<members>
<member name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp" default="1.0">
The rate at which objects stop spinning in this area. Represents the angular velocity lost per second.
See [member ProjectSettings.physics/2d/default_angular_damp] for more details about damping.
</member>
<member name="audio_bus_name" type="StringName" setter="set_audio_bus_name" getter="get_audio_bus_name" default="@&quot;Master&quot;">
The name of the area's audio bus.
</member>
<member name="audio_bus_override" type="bool" setter="set_audio_bus_override" getter="is_overriding_audio_bus" default="false">
If [code]true[/code], the area's audio bus overrides the default audio bus.
</member>
<member name="gravity" type="float" setter="set_gravity" getter="get_gravity" default="98.0">
The area's gravity intensity (in pixels per second squared). This value multiplies the gravity vector. This is useful to alter the force of gravity without altering its direction.
</member>
<member name="gravity_distance_scale" type="float" setter="set_gravity_distance_scale" getter="get_gravity_distance_scale" default="0.0">
The falloff factor for point gravity. The greater the value, the faster gravity decreases with distance.
</member>
<member name="gravity_point" type="bool" setter="set_gravity_is_point" getter="is_gravity_a_point" default="false">
If [code]true[/code], gravity is calculated from a point (set via [member gravity_vec]). See also [member space_override].
</member>
<member name="gravity_vec" type="Vector2" setter="set_gravity_vector" getter="get_gravity_vector" default="Vector2( 0, 1 )">
The area's gravity vector (not normalized). If gravity is a point (see [member gravity_point]), this will be the point of attraction.
</member>
<member name="linear_damp" type="float" setter="set_linear_damp" getter="get_linear_damp" default="0.1">
The rate at which objects stop moving in this area. Represents the linear velocity lost per second.
See [member ProjectSettings.physics/2d/default_linear_damp] for more details about damping.
</member>
<member name="monitorable" type="bool" setter="set_monitorable" getter="is_monitorable" default="true">
If [code]true[/code], other monitoring areas can detect this area.
</member>
<member name="monitoring" type="bool" setter="set_monitoring" getter="is_monitoring" default="true">
If [code]true[/code], the area detects bodies or areas entering and exiting it.
</member>
<member name="priority" type="float" setter="set_priority" getter="get_priority" default="0.0">
The area's priority. Higher priority areas are processed first.
</member>
<member name="space_override" type="int" setter="set_space_override_mode" getter="get_space_override_mode" enum="Area2D.SpaceOverride" default="0">
Override mode for gravity and damping calculations within this area. See [enum SpaceOverride] for possible values.
</member>
</members>
<signals>
<signal name="area_entered">
<argument index="0" name="area" type="Area2D" />
<description>
Emitted when another Area2D enters this Area2D. Requires [member monitoring] to be set to [code]true[/code].
[code]area[/code] the other Area2D.
</description>
</signal>
<signal name="area_exited">
<argument index="0" name="area" type="Area2D" />
<description>
Emitted when another Area2D exits this Area2D. Requires [member monitoring] to be set to [code]true[/code].
[code]area[/code] the other Area2D.
</description>
</signal>
<signal name="area_shape_entered">
<argument index="0" name="area_rid" type="RID" />
<argument index="1" name="area" type="Area2D" />
<argument index="2" name="area_shape_index" type="int" />
<argument index="3" name="local_shape_index" type="int" />
<description>
Emitted when one of another Area2D's [Shape2D]s enters one of this Area2D's [Shape2D]s. Requires [member monitoring] to be set to [code]true[/code].
[code]area_rid[/code] the [RID] of the other Area2D's [CollisionObject2D] used by the [Physics2DServer].
[code]area[/code] the other Area2D.
[code]area_shape_index[/code] the index of the [Shape2D] of the other Area2D used by the [Physics2DServer]. Get the [CollisionShape2D] node with [code]area.shape_owner_get_owner(area_shape_index)[/code].
[code]local_shape_index[/code] the index of the [Shape2D] of this Area2D used by the [Physics2DServer]. Get the [CollisionShape2D] node with [code]self.shape_owner_get_owner(local_shape_index)[/code].
</description>
</signal>
<signal name="area_shape_exited">
<argument index="0" name="area_rid" type="RID" />
<argument index="1" name="area" type="Area2D" />
<argument index="2" name="area_shape_index" type="int" />
<argument index="3" name="local_shape_index" type="int" />
<description>
Emitted when one of another Area2D's [Shape2D]s exits one of this Area2D's [Shape2D]s. Requires [member monitoring] to be set to [code]true[/code].
[code]area_rid[/code] the [RID] of the other Area2D's [CollisionObject2D] used by the [Physics2DServer].
[code]area[/code] the other Area2D.
[code]area_shape_index[/code] the index of the [Shape2D] of the other Area2D used by the [Physics2DServer]. Get the [CollisionShape2D] node with [code]area.shape_owner_get_owner(area_shape_index)[/code].
[code]local_shape_index[/code] the index of the [Shape2D] of this Area2D used by the [Physics2DServer]. Get the [CollisionShape2D] node with [code]self.shape_owner_get_owner(local_shape_index)[/code].
</description>
</signal>
<signal name="body_entered">
<argument index="0" name="body" type="Node" />
<description>
Emitted when a [PhysicsBody2D] or [TileMap] enters this Area2D. Requires [member monitoring] to be set to [code]true[/code]. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s.
[code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap].
</description>
</signal>
<signal name="body_exited">
<argument index="0" name="body" type="Node" />
<description>
Emitted when a [PhysicsBody2D] or [TileMap] exits this Area2D. Requires [member monitoring] to be set to [code]true[/code]. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s.
[code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap].
</description>
</signal>
<signal name="body_shape_entered">
<argument index="0" name="body_rid" type="RID" />
<argument index="1" name="body" type="Node" />
<argument index="2" name="body_shape_index" type="int" />
<argument index="3" name="local_shape_index" type="int" />
<description>
Emitted when one of a [PhysicsBody2D] or [TileMap]'s [Shape2D]s enters one of this Area2D's [Shape2D]s. Requires [member monitoring] to be set to [code]true[/code]. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s.
[code]body_rid[/code] the [RID] of the [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [Physics2DServer].
[code]body[/code] the [Node], if it exists in the tree, of the [PhysicsBody2D] or [TileMap].
[code]body_shape_index[/code] the index of the [Shape2D] of the [PhysicsBody2D] or [TileMap] used by the [Physics2DServer]. Get the [CollisionShape2D] node with [code]body.shape_owner_get_owner(body_shape_index)[/code].
[code]local_shape_index[/code] the index of the [Shape2D] of this Area2D used by the [Physics2DServer]. Get the [CollisionShape2D] node with [code]self.shape_owner_get_owner(local_shape_index)[/code].
</description>
</signal>
<signal name="body_shape_exited">
<argument index="0" name="body_rid" type="RID" />
<argument index="1" name="body" type="Node" />
<argument index="2" name="body_shape_index" type="int" />
<argument index="3" name="local_shape_index" type="int" />
<description>
Emitted when one of a [PhysicsBody2D] or [TileMap]'s [Shape2D]s exits one of this Area2D's [Shape2D]s. Requires [member monitoring] to be set to [code]true[/code]. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s.
[code]body_rid[/code] the [RID] of the [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [Physics2DServer].
[code]body[/code] the [Node], if it exists in the tree, of the [PhysicsBody2D] or [TileMap].
[code]body_shape_index[/code] the index of the [Shape2D] of the [PhysicsBody2D] or [TileMap] used by the [Physics2DServer]. Get the [CollisionShape2D] node with [code]body.shape_owner_get_owner(body_shape_index)[/code].
[code]local_shape_index[/code] the index of the [Shape2D] of this Area2D used by the [Physics2DServer]. Get the [CollisionShape2D] node with [code]self.shape_owner_get_owner(local_shape_index)[/code].
</description>
</signal>
</signals>
<constants>
<constant name="SPACE_OVERRIDE_DISABLED" value="0" enum="SpaceOverride">
This area does not affect gravity/damping.
</constant>
<constant name="SPACE_OVERRIDE_COMBINE" value="1" enum="SpaceOverride">
This area adds its gravity/damping values to whatever has been calculated so far (in [member priority] order).
</constant>
<constant name="SPACE_OVERRIDE_COMBINE_REPLACE" value="2" enum="SpaceOverride">
This area adds its gravity/damping values to whatever has been calculated so far (in [member priority] order), ignoring any lower priority areas.
</constant>
<constant name="SPACE_OVERRIDE_REPLACE" value="3" enum="SpaceOverride">
This area replaces any gravity/damping, even the defaults, ignoring any lower priority areas.
</constant>
<constant name="SPACE_OVERRIDE_REPLACE_COMBINE" value="4" enum="SpaceOverride">
This area replaces any gravity/damping calculated so far (in [member priority] order), but keeps calculating the rest of the areas.
</constant>
</constants>
</class>

View File

@ -1,389 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Array" version="4.2">
<brief_description>
A generic array datatype.
</brief_description>
<description>
A generic array that can contain several elements of any type, accessible by a numerical index starting at 0. Negative indices can be used to count from the back, like in Python (-1 is the last element, -2 is the second to last, etc.).
[b]Example:[/b]
[codeblock]
var array = ["One", 2, 3, "Four"]
print(array[0]) # One.
print(array[2]) # 3.
print(array[-1]) # Four.
array[2] = "Three"
print(array[-2]) # Three.
[/codeblock]
Arrays can be concatenated using the [code]+[/code] operator:
[codeblock]
var array1 = ["One", 2]
var array2 = [3, "Four"]
print(array1 + array2) # ["One", 2, 3, "Four"]
[/codeblock]
[b]Note:[/b] Concatenating with the [code]+=[/code] operator will create a new array, which has a cost. If you want to append another array to an existing array, [method append_array] is more efficient.
[b]Note:[/b] Arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use [method duplicate].
[b]Note:[/b] When declaring an array with [code]const[/code], the array itself can still be mutated by defining the values at individual indices or pushing/removing elements. Using [code]const[/code] will only prevent assigning the constant with another value after it was initialized.
</description>
<tutorials>
</tutorials>
<methods>
<method name="Array">
<return type="Array" />
<argument index="0" name="from" type="PoolColorArray" />
<description>
Constructs an array from a [PoolColorArray].
</description>
</method>
<method name="Array">
<return type="Array" />
<argument index="0" name="from" type="PoolVector3iArray" />
<description>
</description>
</method>
<method name="Array">
<return type="Array" />
<argument index="0" name="from" type="PoolVector3Array" />
<description>
Constructs an array from a [PoolVector3Array].
</description>
</method>
<method name="Array">
<return type="Array" />
<argument index="0" name="from" type="PoolVector2iArray" />
<description>
</description>
</method>
<method name="Array">
<return type="Array" />
<argument index="0" name="from" type="PoolVector2Array" />
<description>
Constructs an array from a [PoolVector2Array].
</description>
</method>
<method name="Array">
<return type="Array" />
<argument index="0" name="from" type="PoolStringArray" />
<description>
Constructs an array from a [PoolStringArray].
</description>
</method>
<method name="Array">
<return type="Array" />
<argument index="0" name="from" type="PoolRealArray" />
<description>
Constructs an array from a [PoolRealArray].
</description>
</method>
<method name="Array">
<return type="Array" />
<argument index="0" name="from" type="PoolIntArray" />
<description>
Constructs an array from a [PoolIntArray].
</description>
</method>
<method name="Array">
<return type="Array" />
<argument index="0" name="from" type="PoolByteArray" />
<description>
Constructs an array from a [PoolByteArray].
</description>
</method>
<method name="append">
<argument index="0" name="value" type="Variant" />
<description>
Appends an element at the end of the array (alias of [method push_back]).
</description>
</method>
<method name="append_array">
<argument index="0" name="array" type="Array" />
<description>
Appends another array at the end of this array.
[codeblock]
var array1 = [1, 2, 3]
var array2 = [4, 5, 6]
array1.append_array(array2)
print(array1) # Prints [1, 2, 3, 4, 5, 6].
[/codeblock]
</description>
</method>
<method name="back">
<return type="Variant" />
<description>
Returns the last element of the array. Prints an error and returns [code]null[/code] if the array is empty.
[b]Note:[/b] Calling this function is not the same as writing [code]array[-1][/code]. If the array is empty, accessing by index will pause project execution when running from the editor.
</description>
</method>
<method name="bsearch">
<return type="int" />
<argument index="0" name="value" type="Variant" />
<argument index="1" name="before" type="bool" default="true" />
<description>
Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a [code]before[/code] specifier can be passed. If [code]false[/code], the returned index comes after all existing entries of the value in the array.
[b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior.
</description>
</method>
<method name="bsearch_custom">
<return type="int" />
<argument index="0" name="value" type="Variant" />
<argument index="1" name="obj" type="Object" />
<argument index="2" name="func" type="String" />
<argument index="3" name="before" type="bool" default="true" />
<description>
Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search and a custom comparison method declared in the [code]obj[/code]. Optionally, a [code]before[/code] specifier can be passed. If [code]false[/code], the returned index comes after all existing entries of the value in the array. The custom method receives two arguments (an element from the array and the value searched for) and must return [code]true[/code] if the first argument is less than the second, and return [code]false[/code] otherwise.
[codeblock]
func cardinal_to_algebraic(a):
match a:
"one":
return 1
"two":
return 2
"three":
return 3
"four":
return 4
_:
return 0
func compare(a, b):
return cardinal_to_algebraic(a) &lt; cardinal_to_algebraic(b)
func _ready():
var a = ["one", "two", "three", "four"]
# `compare` is defined in this object, so we use `self` as the `obj` parameter.
print(a.bsearch_custom("three", self, "compare", true)) # Expected value is 2.
[/codeblock]
[b]Note:[/b] Calling [method bsearch_custom] on an unsorted array results in unexpected behavior.
</description>
</method>
<method name="clear">
<description>
Clears the array. This is equivalent to using [method resize] with a size of [code]0[/code].
</description>
</method>
<method name="count">
<return type="int" />
<argument index="0" name="value" type="Variant" />
<description>
Returns the number of times an element is in the array.
</description>
</method>
<method name="duplicate">
<return type="Array" />
<argument index="0" name="deep" type="bool" default="false" />
<description>
Returns a copy of the array.
If [code]deep[/code] is [code]true[/code], a deep copy is performed: all nested arrays and dictionaries are duplicated and will not be shared with the original array. If [code]false[/code], a shallow copy is made and references to the original nested arrays and dictionaries are kept, so that modifying a sub-array or dictionary in the copy will also impact those referenced in the source array.
</description>
</method>
<method name="empty">
<return type="bool" />
<description>
Returns [code]true[/code] if the array is empty.
</description>
</method>
<method name="erase">
<argument index="0" name="value" type="Variant" />
<description>
Removes the first occurrence of a value from the array. If the value does not exist in the array, nothing happens. To remove an element by index, use [method remove] instead.
[b]Note:[/b] This method acts in-place and doesn't return a value.
[b]Note:[/b] On large arrays, this method will be slower if the removed element is close to the beginning of the array (index 0). This is because all elements placed after the removed element have to be reindexed.
</description>
</method>
<method name="fill">
<argument index="0" name="value" type="Variant" />
<description>
Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements:
[codeblock]
var array = []
array.resize(10)
array.fill(0) # Initialize the 10 elements to 0.
[/codeblock]
[b]Note:[/b] If [code]value[/code] is of a reference type ([Object]-derived, [Array], [Dictionary], etc.) then the array is filled with the references to the same object, i.e. no duplicates are created.
</description>
</method>
<method name="find">
<return type="int" />
<argument index="0" name="what" type="Variant" />
<argument index="1" name="from" type="int" default="0" />
<description>
Searches the array for a value and returns its index or [code]-1[/code] if not found. Optionally, the initial search index can be passed. Returns [code]-1[/code] if [code]from[/code] is out of bounds.
</description>
</method>
<method name="find_last">
<return type="int" />
<argument index="0" name="value" type="Variant" />
<description>
Searches the array in reverse order for a value and returns its index or [code]-1[/code] if not found.
</description>
</method>
<method name="front">
<return type="Variant" />
<description>
Returns the first element of the array. Prints an error and returns [code]null[/code] if the array is empty.
[b]Note:[/b] Calling this function is not the same as writing [code]array[0][/code]. If the array is empty, accessing by index will pause project execution when running from the editor.
</description>
</method>
<method name="has">
<return type="bool" />
<argument index="0" name="value" type="Variant" />
<description>
Returns [code]true[/code] if the array contains the given value.
[codeblock]
["inside", 7].has("inside") # True
["inside", 7].has("outside") # False
["inside", 7].has(7) # True
["inside", 7].has("7") # False
[/codeblock]
[b]Note:[/b] This is equivalent to using the [code]in[/code] operator as follows:
[codeblock]
# Will evaluate to `true`.
if 2 in [2, 4, 6, 8]:
pass
[/codeblock]
</description>
</method>
<method name="hash">
<return type="int" />
<description>
Returns a hashed 32-bit integer value representing the array and its contents.
[b]Note:[/b] [Array]s with equal content will always produce identical hash values. However, the reverse is not true. Returning identical hash values does [i]not[/i] imply the arrays are equal, because different arrays can have identical hash values due to hash collisions.
</description>
</method>
<method name="insert">
<argument index="0" name="position" type="int" />
<argument index="1" name="value" type="Variant" />
<description>
Inserts a new element at a given position in the array. The position must be valid, or at the end of the array ([code]pos == size()[/code]).
[b]Note:[/b] This method acts in-place and doesn't return a value.
[b]Note:[/b] On large arrays, this method will be slower if the inserted element is close to the beginning of the array (index 0). This is because all elements placed after the newly inserted element have to be reindexed.
</description>
</method>
<method name="invert">
<description>
Reverses the order of the elements in the array.
</description>
</method>
<method name="max">
<return type="Variant" />
<description>
Returns the maximum value contained in the array if all elements are of comparable types. If the elements can't be compared, [code]null[/code] is returned.
</description>
</method>
<method name="min">
<return type="Variant" />
<description>
Returns the minimum value contained in the array if all elements are of comparable types. If the elements can't be compared, [code]null[/code] is returned.
</description>
</method>
<method name="pop_at">
<return type="Variant" />
<argument index="0" name="position" type="int" />
<description>
Removes and returns the element of the array at index [code]position[/code]. If negative, [code]position[/code] is considered relative to the end of the array. Leaves the array untouched and returns [code]null[/code] if the array is empty or if it's accessed out of bounds. An error message is printed when the array is accessed out of bounds, but not when the array is empty.
[b]Note:[/b] On large arrays, this method can be slower than [method pop_back] as it will reindex the array's elements that are located after the removed element. The larger the array and the lower the index of the removed element, the slower [method pop_at] will be.
</description>
</method>
<method name="pop_back">
<return type="Variant" />
<description>
Removes and returns the last element of the array. Returns [code]null[/code] if the array is empty, without printing an error message. See also [method pop_front].
</description>
</method>
<method name="pop_front">
<return type="Variant" />
<description>
Removes and returns the first element of the array. Returns [code]null[/code] if the array is empty, without printing an error message. See also [method pop_back].
[b]Note:[/b] On large arrays, this method is much slower than [method pop_back] as it will reindex all the array's elements every time it's called. The larger the array, the slower [method pop_front] will be.
</description>
</method>
<method name="push_back">
<argument index="0" name="value" type="Variant" />
<description>
Appends an element at the end of the array. See also [method push_front].
</description>
</method>
<method name="push_front">
<argument index="0" name="value" type="Variant" />
<description>
Adds an element at the beginning of the array. See also [method push_back].
[b]Note:[/b] On large arrays, this method is much slower than [method push_back] as it will reindex all the array's elements every time it's called. The larger the array, the slower [method push_front] will be.
</description>
</method>
<method name="remove">
<argument index="0" name="position" type="int" />
<description>
Removes an element from the array by index. If the index does not exist in the array, nothing happens. To remove an element by searching for its value, use [method erase] instead.
[b]Note:[/b] This method acts in-place and doesn't return a value.
[b]Note:[/b] On large arrays, this method will be slower if the removed element is close to the beginning of the array (index 0). This is because all elements placed after the removed element have to be reindexed.
</description>
</method>
<method name="resize">
<argument index="0" name="size" type="int" />
<description>
Resizes the array to contain a different number of elements. If the array size is smaller, elements are cleared, if bigger, new elements are [code]null[/code].
</description>
</method>
<method name="rfind">
<return type="int" />
<argument index="0" name="what" type="Variant" />
<argument index="1" name="from" type="int" default="-1" />
<description>
Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array.
</description>
</method>
<method name="shuffle">
<description>
Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array. If the adjusted start index is out of bounds, this method searches from the end of the array.
</description>
</method>
<method name="size">
<return type="int" />
<description>
Returns the number of elements in the array.
</description>
</method>
<method name="slice">
<return type="Array" />
<argument index="0" name="begin" type="int" />
<argument index="1" name="end" type="int" />
<argument index="2" name="step" type="int" default="1" />
<argument index="3" name="deep" type="bool" default="false" />
<description>
Duplicates the subset described in the function and returns it in an array, deeply copying the array if [code]deep[/code] is [code]true[/code]. Lower and upper index are inclusive, with the [code]step[/code] describing the change between indices while slicing.
</description>
</method>
<method name="sort">
<description>
Sorts the array.
[b]Note:[/b] Strings are sorted in alphabetical order (as opposed to natural order). This may lead to unexpected behavior when sorting an array of strings ending with a sequence of numbers. Consider the following example:
[codeblock]
var strings = ["string1", "string2", "string10", "string11"]
strings.sort()
print(strings) # Prints [string1, string10, string11, string2]
[/codeblock]
</description>
</method>
<method name="sort_custom">
<argument index="0" name="obj" type="Object" />
<argument index="1" name="func" type="String" />
<description>
Sorts the array using a custom method. The arguments are an object that holds the method and the name of such method. The custom method receives two arguments (a pair of elements from the array) and must return either [code]true[/code] or [code]false[/code].
For two elements [code]a[/code] and [code]b[/code], if the given method returns [code]true[/code], element [code]b[/code] will be after element [code]a[/code] in the array.
[b]Note:[/b] You cannot randomize the return value as the heapsort algorithm expects a deterministic result. Doing so will result in unexpected behavior.
[codeblock]
class MyCustomSorter:
static func sort_ascending(a, b):
if a[0] &lt; b[0]:
return true
return false
var my_items = [[5, "Potato"], [9, "Rice"], [4, "Tomato"]]
my_items.sort_custom(MyCustomSorter, "sort_ascending")
print(my_items) # Prints [[4, Tomato], [5, Potato], [9, Rice]].
[/codeblock]
</description>
</method>
</methods>
<constants>
</constants>
</class>

View File

@ -1,232 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="ArrayMesh" inherits="Mesh" version="4.2">
<brief_description>
[Mesh] type that provides utility for constructing a surface from arrays.
</brief_description>
<description>
The [ArrayMesh] is used to construct a [Mesh] by specifying the attributes as arrays.
The most basic example is the creation of a single triangle:
[codeblock]
var vertices = PoolVector3Array()
vertices.push_back(Vector3(0, 1, 0))
vertices.push_back(Vector3(1, 0, 0))
vertices.push_back(Vector3(0, 0, 1))
# Initialize the ArrayMesh.
var arr_mesh = ArrayMesh.new()
var arrays = []
arrays.resize(ArrayMesh.ARRAY_MAX)
arrays[ArrayMesh.ARRAY_VERTEX] = vertices
# Create the Mesh.
arr_mesh.add_surface_from_arrays(Mesh.PRIMITIVE_TRIANGLES, arrays)
var m = MeshInstance.new()
m.mesh = arr_mesh
[/codeblock]
The [MeshInstance] is ready to be added to the [SceneTree] to be shown.
See also [ImmediateGeometry], [MeshDataTool] and [SurfaceTool] for procedural geometry generation.
[b]Note:[/b] Godot uses clockwise [url=https://learnopengl.com/Advanced-OpenGL/Face-culling]winding order[/url] for front faces of triangle primitive modes.
</description>
<tutorials>
<link>$DOCS_URL/tutorials/3d/procedural_geometry/arraymesh.md</link>
</tutorials>
<methods>
<method name="add_blend_shape">
<return type="void" />
<argument index="0" name="name" type="StringName" />
<description>
</description>
</method>
<method name="add_surface_from_arrays">
<return type="void" />
<argument index="0" name="primitive" type="int" enum="Mesh.PrimitiveType" />
<argument index="1" name="arrays" type="Array" />
<argument index="2" name="blend_shapes" type="Array" default="[ ]" />
<argument index="3" name="compress_flags" type="int" default="2194432" />
<description>
Creates a new surface.
Surfaces are created to be rendered using a [code]primitive[/code], which may be any of the types defined in [enum Mesh.PrimitiveType]. (As a note, when using indices, it is recommended to only use points, lines, or triangles.) [method Mesh.get_surface_count] will become the [code]surf_idx[/code] for this new surface.
The [code]arrays[/code] argument is an array of arrays. See [enum ArrayType] for the values used in this array. For example, [code]arrays[0][/code] is the array of vertices. That first vertex sub-array is always required; the others are optional. Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data and the index array defines the vertex order. All sub-arrays must have the same length as the vertex array or be empty, except for [constant ARRAY_INDEX] if it is used.
[code]compress_flags[/code] is a bitfield made of [enum Mesh.ArrayFormat] values. It defaults to [constant Mesh.ARRAY_COMPRESS_DEFAULT].
[b]Note:[/b] The default [code]compress_flags[/code] enable [constant Mesh.ARRAY_COMPRESS_COLOR], which makes vertex colors stored as 8-bit unsigned integers. This will clamp overbright vertex colors to [code]Color(1, 1, 1, 1)[/code] and reduce their precision. To store HDR vertex colors, remove the vertex color compression flag by passing [code]Mesh.ARRAY_COMPRESS_DEFAULT ^ Mesh.ARRAY_COMPRESS_COLOR[/code] as the value of [code]compress_flags[/code].
</description>
</method>
<method name="clear_blend_shapes">
<return type="void" />
<description>
Removes all blend shapes from this [ArrayMesh].
</description>
</method>
<method name="clear_surfaces">
<return type="void" />
<description>
Removes all surfaces from this [ArrayMesh].
</description>
</method>
<method name="get_blend_shape_count" qualifiers="const">
<return type="int" />
<description>
Returns the number of blend shapes that the [ArrayMesh] holds.
</description>
</method>
<method name="get_blend_shape_name" qualifiers="const">
<return type="StringName" />
<argument index="0" name="index" type="int" />
<description>
Returns the name of the blend shape at this index.
</description>
</method>
<method name="regen_normalmaps">
<return type="void" />
<description>
Will regenerate normal maps for the [ArrayMesh].
</description>
</method>
<method name="set_blend_shape_name">
<return type="void" />
<argument index="0" name="index" type="int" />
<argument index="1" name="name" type="StringName" />
<description>
</description>
</method>
<method name="surface_find_by_name" qualifiers="const">
<return type="int" />
<argument index="0" name="name" type="String" />
<description>
Returns the index of the first surface with this name held within this [ArrayMesh]. If none are found, -1 is returned.
</description>
</method>
<method name="surface_get_array_index_len" qualifiers="const">
<return type="int" />
<argument index="0" name="surf_idx" type="int" />
<description>
Returns the length in indices of the index array in the requested surface (see [method add_surface_from_arrays]).
</description>
</method>
<method name="surface_get_array_len" qualifiers="const">
<return type="int" />
<argument index="0" name="surf_idx" type="int" />
<description>
Returns the length in vertices of the vertex array in the requested surface (see [method add_surface_from_arrays]).
</description>
</method>
<method name="surface_get_format" qualifiers="const">
<return type="int" />
<argument index="0" name="surf_idx" type="int" />
<description>
Returns the format mask of the requested surface (see [method add_surface_from_arrays]).
</description>
</method>
<method name="surface_get_name" qualifiers="const">
<return type="String" />
<argument index="0" name="surf_idx" type="int" />
<description>
Gets the name assigned to this surface.
</description>
</method>
<method name="surface_get_primitive_type" qualifiers="const">
<return type="int" enum="Mesh.PrimitiveType" />
<argument index="0" name="surf_idx" type="int" />
<description>
Returns the primitive type of the requested surface (see [method add_surface_from_arrays]).
</description>
</method>
<method name="surface_remove">
<return type="void" />
<argument index="0" name="surf_idx" type="int" />
<description>
Removes a surface at position [code]surf_idx[/code], shifting greater surfaces one [code]surf_idx[/code] slot down.
</description>
</method>
<method name="surface_set_name">
<return type="void" />
<argument index="0" name="surf_idx" type="int" />
<argument index="1" name="name" type="String" />
<description>
Sets a name for a given surface.
</description>
</method>
<method name="surface_update_region">
<return type="void" />
<argument index="0" name="surf_idx" type="int" />
<argument index="1" name="offset" type="int" />
<argument index="2" name="data" type="PoolByteArray" />
<description>
Updates a specified region of mesh arrays on the GPU.
[b]Warning:[/b] Only use if you know what you are doing. You can easily cause crashes by calling this function with improper arguments.
</description>
</method>
</methods>
<members>
<member name="blend_shape_mode" type="int" setter="set_blend_shape_mode" getter="get_blend_shape_mode" enum="Mesh.BlendShapeMode" default="1">
Sets the blend shape mode to one of [enum Mesh.BlendShapeMode].
</member>
<member name="custom_aabb" type="AABB" setter="set_custom_aabb" getter="get_custom_aabb" default="AABB( 0, 0, 0, 0, 0, 0 )">
Overrides the [AABB] with one defined by user for use with frustum culling. Especially useful to avoid unexpected culling when using a shader to offset vertices.
</member>
</members>
<constants>
<constant name="NO_INDEX_ARRAY" value="-1">
Default value used for index_array_len when no indices are present.
</constant>
<constant name="ARRAY_WEIGHTS_SIZE" value="4">
Amount of weights/bone indices per vertex (always 4).
</constant>
<constant name="ARRAY_VERTEX" value="0" enum="ArrayType">
[PoolVector3Array], [PoolVector2Array], or [Array] of vertex positions.
</constant>
<constant name="ARRAY_NORMAL" value="1" enum="ArrayType">
[PoolVector3Array] of vertex normals.
</constant>
<constant name="ARRAY_TANGENT" value="2" enum="ArrayType">
[PoolRealArray] of vertex tangents. Each element in groups of 4 floats, first 3 floats determine the tangent, and the last the binormal direction as -1 or 1.
</constant>
<constant name="ARRAY_COLOR" value="3" enum="ArrayType">
[PoolColorArray] of vertex colors.
</constant>
<constant name="ARRAY_TEX_UV" value="4" enum="ArrayType">
[PoolVector2Array] for UV coordinates.
</constant>
<constant name="ARRAY_TEX_UV2" value="5" enum="ArrayType">
[PoolVector2Array] for second UV coordinates.
</constant>
<constant name="ARRAY_BONES" value="6" enum="ArrayType">
[PoolRealArray] or [PoolIntArray] of bone indices. Each element in groups of 4 floats.
</constant>
<constant name="ARRAY_WEIGHTS" value="7" enum="ArrayType">
[PoolRealArray] of bone weights. Each element in groups of 4 floats.
</constant>
<constant name="ARRAY_INDEX" value="8" enum="ArrayType">
[PoolIntArray] of integers used as indices referencing vertices, colors, normals, tangents, and textures. All of those arrays must have the same number of elements as the vertex array. No index can be beyond the vertex array size. When this index array is present, it puts the function into "index mode," where the index selects the *i*'th vertex, normal, tangent, color, UV, etc. This means if you want to have different normals or colors along an edge, you have to duplicate the vertices.
For triangles, the index array is interpreted as triples, referring to the vertices of each triangle. For lines, the index array is in pairs indicating the start and end of each line.
</constant>
<constant name="ARRAY_MAX" value="9" enum="ArrayType">
Represents the size of the [enum ArrayType] enum.
</constant>
<constant name="ARRAY_FORMAT_VERTEX" value="1" enum="ArrayFormat">
Array format will include vertices (mandatory).
</constant>
<constant name="ARRAY_FORMAT_NORMAL" value="2" enum="ArrayFormat">
Array format will include normals.
</constant>
<constant name="ARRAY_FORMAT_TANGENT" value="4" enum="ArrayFormat">
Array format will include tangents.
</constant>
<constant name="ARRAY_FORMAT_COLOR" value="8" enum="ArrayFormat">
Array format will include a color array.
</constant>
<constant name="ARRAY_FORMAT_TEX_UV" value="16" enum="ArrayFormat">
Array format will include UVs.
</constant>
<constant name="ARRAY_FORMAT_TEX_UV2" value="32" enum="ArrayFormat">
Array format will include another set of UVs.
</constant>
<constant name="ARRAY_FORMAT_BONES" value="64" enum="ArrayFormat">
Array format will include bone indices.
</constant>
<constant name="ARRAY_FORMAT_WEIGHTS" value="128" enum="ArrayFormat">
Array format will include bone weights.
</constant>
<constant name="ARRAY_FORMAT_INDEX" value="256" enum="ArrayFormat">
Index array will be used.
</constant>
</constants>
</class>

View File

@ -1,52 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AspectRatioContainer" inherits="Container" version="4.2">
<brief_description>
Container that preserves its child controls' aspect ratio.
</brief_description>
<description>
Arranges child controls in a way to preserve their aspect ratio automatically whenever the container is resized. Solves the problem where the container size is dynamic and the contents' size needs to adjust accordingly without losing proportions.
</description>
<tutorials>
<link title="GUI containers">$DOCS_URL/tutorials/ui/gui_containers.md</link>
</tutorials>
<methods>
</methods>
<members>
<member name="alignment_horizontal" type="int" setter="set_alignment_horizontal" getter="get_alignment_horizontal" enum="AspectRatioContainer.AlignMode" default="1">
Specifies the horizontal relative position of child controls.
</member>
<member name="alignment_vertical" type="int" setter="set_alignment_vertical" getter="get_alignment_vertical" enum="AspectRatioContainer.AlignMode" default="1">
Specifies the vertical relative position of child controls.
</member>
<member name="ratio" type="float" setter="set_ratio" getter="get_ratio" default="1.0">
The aspect ratio to enforce on child controls. This is the width divided by the height. The ratio depends on the [member stretch_mode].
</member>
<member name="stretch_mode" type="int" setter="set_stretch_mode" getter="get_stretch_mode" enum="AspectRatioContainer.StretchMode" default="2">
The stretch mode used to align child controls.
</member>
</members>
<constants>
<constant name="STRETCH_WIDTH_CONTROLS_HEIGHT" value="0" enum="StretchMode">
The height of child controls is automatically adjusted based on the width of the container.
</constant>
<constant name="STRETCH_HEIGHT_CONTROLS_WIDTH" value="1" enum="StretchMode">
The width of child controls is automatically adjusted based on the height of the container.
</constant>
<constant name="STRETCH_FIT" value="2" enum="StretchMode">
The bounding rectangle of child controls is automatically adjusted to fit inside the container while keeping the aspect ratio.
</constant>
<constant name="STRETCH_COVER" value="3" enum="StretchMode">
The width and height of child controls is automatically adjusted to make their bounding rectangle cover the entire area of the container while keeping the aspect ratio.
When the bounding rectangle of child controls exceed the container's size and [member Control.rect_clip_content] is enabled, this allows to show only the container's area restricted by its own bounding rectangle.
</constant>
<constant name="ALIGN_BEGIN" value="0" enum="AlignMode">
Aligns child controls with the beginning (left or top) of the container.
</constant>
<constant name="ALIGN_CENTER" value="1" enum="AlignMode">
Aligns child controls with the center of the container.
</constant>
<constant name="ALIGN_END" value="2" enum="AlignMode">
Aligns child controls with the end (right or bottom) of the container.
</constant>
</constants>
</class>

View File

@ -1,32 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AtlasTexture" inherits="Texture" version="4.2">
<brief_description>
Crops out one part of a texture, such as a texture from a texture atlas.
</brief_description>
<description>
[Texture] resource that crops out one part of the [member atlas] texture, defined by [member region]. The main use case is cropping out textures from a texture atlas, which is a big texture file that packs multiple smaller textures. Consists of a [Texture] for the [member atlas], a [member region] that defines the area of [member atlas] to use, and a [member margin] that defines the border width.
[AtlasTexture] cannot be used in an [AnimatedTexture], cannot be tiled in nodes such as [TextureRect], and does not work properly if used inside of other [AtlasTexture] resources. Multiple [AtlasTexture] resources can be used to crop multiple textures from the atlas. Using a texture atlas helps to optimize video memory costs and render calls compared to using multiple small files.
[b]Note:[/b] AtlasTextures don't support repetition. The [constant Texture.FLAG_REPEAT] and [constant Texture.FLAG_MIRRORED_REPEAT] flags are ignored when using an AtlasTexture.
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
<member name="atlas" type="Texture" setter="set_atlas" getter="get_atlas">
The texture that contains the atlas. Can be any [Texture] subtype.
</member>
<member name="filter_clip" type="bool" setter="set_filter_clip" getter="has_filter_clip" default="false">
If [code]true[/code], clips the area outside of the region to avoid bleeding of the surrounding texture pixels.
</member>
<member name="margin" type="Rect2" setter="set_margin" getter="get_margin" default="Rect2( 0, 0, 0, 0 )">
The margin around the region. The [Rect2]'s [member Rect2.size] parameter ("w" and "h" in the editor) resizes the texture so it fits within the margin.
</member>
<member name="region" type="Rect2" setter="set_region" getter="get_region" default="Rect2( 0, 0, 0, 0 )">
The AtlasTexture's used region.
</member>
<member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" overrides="Resource" default="false" />
</members>
<constants>
</constants>
</class>

View File

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioBusLayout" inherits="Resource" version="4.2">
<brief_description>
Stores information about the audio buses.
</brief_description>
<description>
Stores position, muting, solo, bypass, effects, effect position, volume, and the connections between buses. See [AudioServer] for usage.
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<constants>
</constants>
</class>

View File

@ -1,16 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffect" inherits="Resource" version="4.2">
<brief_description>
Audio effect for audio.
</brief_description>
<description>
Base resource for audio bus. Applies an audio effect on the bus that the resource is applied on.
</description>
<tutorials>
<link title="Audio Mic Record Demo">https://godotengine.org/asset-library/asset/527</link>
</tutorials>
<methods>
</methods>
<constants>
</constants>
</class>

View File

@ -1,21 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectAmplify" inherits="AudioEffect" version="4.2">
<brief_description>
Adds an amplifying audio effect to an audio bus.
Increases or decreases the volume of the selected audio bus.
</brief_description>
<description>
Increases or decreases the volume being routed through the audio bus.
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
<member name="volume_db" type="float" setter="set_volume_db" getter="get_volume_db" default="0.0">
Amount of amplification in decibels. Positive values make the sound louder, negative values make it quieter. Value can range from -80 to 24.
</member>
</members>
<constants>
</constants>
</class>

View File

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectBandLimitFilter" inherits="AudioEffectFilter" version="4.2">
<brief_description>
Adds a band limit filter to the audio bus.
</brief_description>
<description>
Limits the frequencies in a range around the [member AudioEffectFilter.cutoff_hz] and allows frequencies outside of this range to pass.
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<constants>
</constants>
</class>

View File

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectBandPassFilter" inherits="AudioEffectFilter" version="4.2">
<brief_description>
Adds a band pass filter to the audio bus.
</brief_description>
<description>
Attenuates the frequencies inside of a range around the [member AudioEffectFilter.cutoff_hz] and cuts frequencies outside of this band.
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<constants>
</constants>
</class>

View File

@ -1,69 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectCapture" inherits="AudioEffect" version="4.2">
<brief_description>
Captures audio from an audio bus in real-time.
</brief_description>
<description>
AudioEffectCapture is an AudioEffect which copies all audio frames from the attached audio effect bus into its internal ring buffer.
Application code should consume these audio frames from this ring buffer using [method get_buffer] and process it as needed, for example to capture data from an [AudioStreamMicrophone], implement application-defined effects, or to transmit audio over the network. When capturing audio data from a microphone, the format of the samples will be stereo 32-bit floating point PCM.
[b]Note:[/b] [member ProjectSettings.audio/enable_audio_input] must be [code]true[/code] for audio input to work. See also that setting's description for caveats related to permissions and operating system privacy settings.
</description>
<tutorials>
<link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.md</link>
<link title="Audio Mic Record Demo">https://github.com/Relintai/pandemonium_demo_projects/tree/master/audio/mic_record</link>
</tutorials>
<methods>
<method name="can_get_buffer" qualifiers="const">
<return type="bool" />
<argument index="0" name="frames" type="int" />
<description>
Returns [code]true[/code] if at least [code]frames[/code] audio frames are available to read in the internal ring buffer.
</description>
</method>
<method name="clear_buffer">
<return type="void" />
<description>
Clears the internal ring buffer.
</description>
</method>
<method name="get_buffer">
<return type="PoolVector2Array" />
<argument index="0" name="frames" type="int" />
<description>
Gets the next [code]frames[/code] audio samples from the internal ring buffer.
Returns a [PoolVector2Array] containing exactly [code]frames[/code] audio samples if available, or an empty [PoolVector2Array] if insufficient data was available.
</description>
</method>
<method name="get_buffer_length_frames" qualifiers="const">
<return type="int" />
<description>
Returns the total size of the internal ring buffer in frames.
</description>
</method>
<method name="get_discarded_frames" qualifiers="const">
<return type="int" />
<description>
Returns the number of audio frames discarded from the audio bus due to full buffer.
</description>
</method>
<method name="get_frames_available" qualifiers="const">
<return type="int" />
<description>
Returns the number of frames available to read using [method get_buffer].
</description>
</method>
<method name="get_pushed_frames" qualifiers="const">
<return type="int" />
<description>
Returns the number of audio frames inserted from the audio bus.
</description>
</method>
</methods>
<members>
<member name="buffer_length" type="float" setter="set_buffer_length" getter="get_buffer_length" default="0.1">
Length of the internal ring buffer, in seconds. Setting the buffer length will have no effect if already initialized.
</member>
</members>
<constants>
</constants>
</class>

View File

@ -1,176 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectChorus" inherits="AudioEffect" version="4.2">
<brief_description>
Adds a chorus audio effect.
</brief_description>
<description>
Adds a chorus audio effect. The effect applies a filter with voices to duplicate the audio source and manipulate it through the filter.
</description>
<tutorials>
</tutorials>
<methods>
<method name="get_voice_cutoff_hz" qualifiers="const">
<return type="float" />
<argument index="0" name="voice_idx" type="int" />
<description>
</description>
</method>
<method name="get_voice_delay_ms" qualifiers="const">
<return type="float" />
<argument index="0" name="voice_idx" type="int" />
<description>
</description>
</method>
<method name="get_voice_depth_ms" qualifiers="const">
<return type="float" />
<argument index="0" name="voice_idx" type="int" />
<description>
</description>
</method>
<method name="get_voice_level_db" qualifiers="const">
<return type="float" />
<argument index="0" name="voice_idx" type="int" />
<description>
</description>
</method>
<method name="get_voice_pan" qualifiers="const">
<return type="float" />
<argument index="0" name="voice_idx" type="int" />
<description>
</description>
</method>
<method name="get_voice_rate_hz" qualifiers="const">
<return type="float" />
<argument index="0" name="voice_idx" type="int" />
<description>
</description>
</method>
<method name="set_voice_cutoff_hz">
<return type="void" />
<argument index="0" name="voice_idx" type="int" />
<argument index="1" name="cutoff_hz" type="float" />
<description>
</description>
</method>
<method name="set_voice_delay_ms">
<return type="void" />
<argument index="0" name="voice_idx" type="int" />
<argument index="1" name="delay_ms" type="float" />
<description>
</description>
</method>
<method name="set_voice_depth_ms">
<return type="void" />
<argument index="0" name="voice_idx" type="int" />
<argument index="1" name="depth_ms" type="float" />
<description>
</description>
</method>
<method name="set_voice_level_db">
<return type="void" />
<argument index="0" name="voice_idx" type="int" />
<argument index="1" name="level_db" type="float" />
<description>
</description>
</method>
<method name="set_voice_pan">
<return type="void" />
<argument index="0" name="voice_idx" type="int" />
<argument index="1" name="pan" type="float" />
<description>
</description>
</method>
<method name="set_voice_rate_hz">
<return type="void" />
<argument index="0" name="voice_idx" type="int" />
<argument index="1" name="rate_hz" type="float" />
<description>
</description>
</method>
</methods>
<members>
<member name="dry" type="float" setter="set_dry" getter="get_dry" default="1.0">
The effect's raw signal.
</member>
<member name="voice/1/cutoff_hz" type="float" setter="set_voice_cutoff_hz" getter="get_voice_cutoff_hz" default="8000.0">
The voice's cutoff frequency.
</member>
<member name="voice/1/delay_ms" type="float" setter="set_voice_delay_ms" getter="get_voice_delay_ms" default="15.0">
The voice's signal delay.
</member>
<member name="voice/1/depth_ms" type="float" setter="set_voice_depth_ms" getter="get_voice_depth_ms" default="2.0">
The voice filter's depth.
</member>
<member name="voice/1/level_db" type="float" setter="set_voice_level_db" getter="get_voice_level_db" default="0.0">
The voice's volume.
</member>
<member name="voice/1/pan" type="float" setter="set_voice_pan" getter="get_voice_pan" default="-0.5">
The voice's pan level.
</member>
<member name="voice/1/rate_hz" type="float" setter="set_voice_rate_hz" getter="get_voice_rate_hz" default="0.8">
The voice's filter rate.
</member>
<member name="voice/2/cutoff_hz" type="float" setter="set_voice_cutoff_hz" getter="get_voice_cutoff_hz" default="8000.0">
The voice's cutoff frequency.
</member>
<member name="voice/2/delay_ms" type="float" setter="set_voice_delay_ms" getter="get_voice_delay_ms" default="20.0">
The voice's signal delay.
</member>
<member name="voice/2/depth_ms" type="float" setter="set_voice_depth_ms" getter="get_voice_depth_ms" default="3.0">
The voice filter's depth.
</member>
<member name="voice/2/level_db" type="float" setter="set_voice_level_db" getter="get_voice_level_db" default="0.0">
The voice's volume.
</member>
<member name="voice/2/pan" type="float" setter="set_voice_pan" getter="get_voice_pan" default="0.5">
The voice's pan level.
</member>
<member name="voice/2/rate_hz" type="float" setter="set_voice_rate_hz" getter="get_voice_rate_hz" default="1.2">
The voice's filter rate.
</member>
<member name="voice/3/cutoff_hz" type="float" setter="set_voice_cutoff_hz" getter="get_voice_cutoff_hz">
The voice's cutoff frequency.
</member>
<member name="voice/3/delay_ms" type="float" setter="set_voice_delay_ms" getter="get_voice_delay_ms">
The voice's signal delay.
</member>
<member name="voice/3/depth_ms" type="float" setter="set_voice_depth_ms" getter="get_voice_depth_ms">
The voice filter's depth.
</member>
<member name="voice/3/level_db" type="float" setter="set_voice_level_db" getter="get_voice_level_db">
The voice's volume.
</member>
<member name="voice/3/pan" type="float" setter="set_voice_pan" getter="get_voice_pan">
The voice's pan level.
</member>
<member name="voice/3/rate_hz" type="float" setter="set_voice_rate_hz" getter="get_voice_rate_hz">
The voice's filter rate.
</member>
<member name="voice/4/cutoff_hz" type="float" setter="set_voice_cutoff_hz" getter="get_voice_cutoff_hz">
The voice's cutoff frequency.
</member>
<member name="voice/4/delay_ms" type="float" setter="set_voice_delay_ms" getter="get_voice_delay_ms">
The voice's signal delay.
</member>
<member name="voice/4/depth_ms" type="float" setter="set_voice_depth_ms" getter="get_voice_depth_ms">
The voice filter's depth.
</member>
<member name="voice/4/level_db" type="float" setter="set_voice_level_db" getter="get_voice_level_db">
The voice's volume.
</member>
<member name="voice/4/pan" type="float" setter="set_voice_pan" getter="get_voice_pan">
The voice's pan level.
</member>
<member name="voice/4/rate_hz" type="float" setter="set_voice_rate_hz" getter="get_voice_rate_hz">
The voice's filter rate.
</member>
<member name="voice_count" type="int" setter="set_voice_count" getter="get_voice_count" default="2">
The amount of voices in the effect.
</member>
<member name="wet" type="float" setter="set_wet" getter="get_wet" default="0.5">
The effect's processed signal.
</member>
</members>
<constants>
</constants>
</class>

View File

@ -1,44 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectCompressor" inherits="AudioEffect" version="4.2">
<brief_description>
Adds a compressor audio effect to an audio bus.
Reduces sounds that exceed a certain threshold level, smooths out the dynamics and increases the overall volume.
</brief_description>
<description>
Dynamic range compressor reduces the level of the sound when the amplitude goes over a certain threshold in Decibels. One of the main uses of a compressor is to increase the dynamic range by clipping as little as possible (when sound goes over 0dB).
Compressor has many uses in the mix:
- In the Master bus to compress the whole output (although an [AudioEffectLimiter] is probably better).
- In voice channels to ensure they sound as balanced as possible.
- Sidechained. This can reduce the sound level sidechained with another audio bus for threshold detection. This technique is common in video game mixing to the level of music and SFX while voices are being heard.
- Accentuates transients by using a wider attack, making effects sound more punchy.
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
<member name="attack_us" type="float" setter="set_attack_us" getter="get_attack_us" default="20.0">
Compressor's reaction time when the signal exceeds the threshold, in microseconds. Value can range from 20 to 2000.
</member>
<member name="gain" type="float" setter="set_gain" getter="get_gain" default="0.0">
Gain applied to the output signal.
</member>
<member name="mix" type="float" setter="set_mix" getter="get_mix" default="1.0">
Balance between original signal and effect signal. Value can range from 0 (totally dry) to 1 (totally wet).
</member>
<member name="ratio" type="float" setter="set_ratio" getter="get_ratio" default="4.0">
Amount of compression applied to the audio once it passes the threshold level. The higher the ratio, the more the loud parts of the audio will be compressed. Value can range from 1 to 48.
</member>
<member name="release_ms" type="float" setter="set_release_ms" getter="get_release_ms" default="250.0">
Compressor's delay time to stop reducing the signal after the signal level falls below the threshold, in milliseconds. Value can range from 20 to 2000.
</member>
<member name="sidechain" type="StringName" setter="set_sidechain" getter="get_sidechain" default="@&quot;&quot;">
Reduce the sound level using another audio bus for threshold detection.
</member>
<member name="threshold" type="float" setter="set_threshold" getter="get_threshold" default="0.0">
The level above which compression is applied to the audio. Value can range from -60 to 0.
</member>
</members>
<constants>
</constants>
</class>

View File

@ -1,57 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectDelay" inherits="AudioEffect" version="4.2">
<brief_description>
Adds a delay audio effect to an audio bus. Plays input signal back after a period of time.
Two tap delay and feedback options.
</brief_description>
<description>
Plays input signal back after a period of time. The delayed signal may be played back multiple times to create the sound of a repeating, decaying echo. Delay effects range from a subtle echo effect to a pronounced blending of previous sounds with new sounds.
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
<member name="dry" type="float" setter="set_dry" getter="get_dry" default="1.0">
Output percent of original sound. At 0, only delayed sounds are output. Value can range from 0 to 1.
</member>
<member name="feedback/active" type="bool" setter="set_feedback_active" getter="is_feedback_active" default="false">
If [code]true[/code], feedback is enabled.
</member>
<member name="feedback/delay_ms" type="float" setter="set_feedback_delay_ms" getter="get_feedback_delay_ms" default="340.0">
Feedback delay time in milliseconds.
</member>
<member name="feedback/level_db" type="float" setter="set_feedback_level_db" getter="get_feedback_level_db" default="-6.0">
Sound level for [code]tap1[/code].
</member>
<member name="feedback/lowpass" type="float" setter="set_feedback_lowpass" getter="get_feedback_lowpass" default="16000.0">
Low-pass filter for feedback, in Hz. Frequencies below this value are filtered out of the source signal.
</member>
<member name="tap1/active" type="bool" setter="set_tap1_active" getter="is_tap1_active" default="true">
If [code]true[/code], [code]tap1[/code] will be enabled.
</member>
<member name="tap1/delay_ms" type="float" setter="set_tap1_delay_ms" getter="get_tap1_delay_ms" default="250.0">
[code]tap1[/code] delay time in milliseconds.
</member>
<member name="tap1/level_db" type="float" setter="set_tap1_level_db" getter="get_tap1_level_db" default="-6.0">
Sound level for [code]tap1[/code].
</member>
<member name="tap1/pan" type="float" setter="set_tap1_pan" getter="get_tap1_pan" default="0.2">
Pan position for [code]tap1[/code]. Value can range from -1 (fully left) to 1 (fully right).
</member>
<member name="tap2/active" type="bool" setter="set_tap2_active" getter="is_tap2_active" default="true">
If [code]true[/code], [code]tap2[/code] will be enabled.
</member>
<member name="tap2/delay_ms" type="float" setter="set_tap2_delay_ms" getter="get_tap2_delay_ms" default="500.0">
[b]Tap2[/b] delay time in milliseconds.
</member>
<member name="tap2/level_db" type="float" setter="set_tap2_level_db" getter="get_tap2_level_db" default="-12.0">
Sound level for [code]tap2[/code].
</member>
<member name="tap2/pan" type="float" setter="set_tap2_pan" getter="get_tap2_pan" default="-0.4">
Pan position for [code]tap2[/code]. Value can range from -1 (fully left) to 1 (fully right).
</member>
</members>
<constants>
</constants>
</class>

View File

@ -1,49 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectDistortion" inherits="AudioEffect" version="4.2">
<brief_description>
Adds a distortion audio effect to an Audio bus.
Modify the sound to make it distorted.
</brief_description>
<description>
Different types are available: clip, tan, lo-fi (bit crushing), overdrive, or waveshape.
By distorting the waveform the frequency content change, which will often make the sound "crunchy" or "abrasive". For games, it can simulate sound coming from some saturated device or speaker very efficiently.
</description>
<tutorials>
<link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.md</link>
</tutorials>
<methods>
</methods>
<members>
<member name="drive" type="float" setter="set_drive" getter="get_drive" default="0.0">
Distortion power. Value can range from 0 to 1.
</member>
<member name="keep_hf_hz" type="float" setter="set_keep_hf_hz" getter="get_keep_hf_hz" default="16000.0">
High-pass filter, in Hz. Frequencies higher than this value will not be affected by the distortion. Value can range from 1 to 20000.
</member>
<member name="mode" type="int" setter="set_mode" getter="get_mode" enum="AudioEffectDistortion.Mode" default="0">
Distortion type.
</member>
<member name="post_gain" type="float" setter="set_post_gain" getter="get_post_gain" default="0.0">
Increases or decreases the volume after the effect. Value can range from -80 to 24.
</member>
<member name="pre_gain" type="float" setter="set_pre_gain" getter="get_pre_gain" default="0.0">
Increases or decreases the volume before the effect. Value can range from -60 to 60.
</member>
</members>
<constants>
<constant name="MODE_CLIP" value="0" enum="Mode">
Digital distortion effect which cuts off peaks at the top and bottom of the waveform.
</constant>
<constant name="MODE_ATAN" value="1" enum="Mode">
</constant>
<constant name="MODE_LOFI" value="2" enum="Mode">
Low-resolution digital distortion effect. You can use it to emulate the sound of early digital audio devices.
</constant>
<constant name="MODE_OVERDRIVE" value="3" enum="Mode">
Emulates the warm distortion produced by a field effect transistor, which is commonly used in solid-state musical instrument amplifiers.
</constant>
<constant name="MODE_WAVESHAPE" value="4" enum="Mode">
Waveshaper distortions are used mainly by electronic musicians to achieve an extra-abrasive sound.
</constant>
</constants>
</class>

View File

@ -1,37 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectEQ" inherits="AudioEffect" version="4.2">
<brief_description>
Base class for audio equalizers. Gives you control over frequencies.
Use it to create a custom equalizer if [AudioEffectEQ6], [AudioEffectEQ10] or [AudioEffectEQ21] don't fit your needs.
</brief_description>
<description>
AudioEffectEQ gives you control over frequencies. Use it to compensate for existing deficiencies in audio. AudioEffectEQs are useful on the Master bus to completely master a mix and give it more character. They are also useful when a game is run on a mobile device, to adjust the mix to that kind of speakers (it can be added but disabled when headphones are plugged).
</description>
<tutorials>
</tutorials>
<methods>
<method name="get_band_count" qualifiers="const">
<return type="int" />
<description>
Returns the number of bands of the equalizer.
</description>
</method>
<method name="get_band_gain_db" qualifiers="const">
<return type="float" />
<argument index="0" name="band_idx" type="int" />
<description>
Returns the band's gain at the specified index, in dB.
</description>
</method>
<method name="set_band_gain_db">
<return type="void" />
<argument index="0" name="band_idx" type="int" />
<argument index="1" name="volume_db" type="float" />
<description>
Sets band's gain at the specified index, in dB.
</description>
</method>
</methods>
<constants>
</constants>
</class>

View File

@ -1,27 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectEQ10" inherits="AudioEffectEQ" version="4.2">
<brief_description>
Adds a 10-band equalizer audio effect to an Audio bus. Gives you control over frequencies from 31 Hz to 16000 Hz.
Each frequency can be modulated between -60/+24 dB.
</brief_description>
<description>
Frequency bands:
Band 1: 31 Hz
Band 2: 62 Hz
Band 3: 125 Hz
Band 4: 250 Hz
Band 5: 500 Hz
Band 6: 1000 Hz
Band 7: 2000 Hz
Band 8: 4000 Hz
Band 9: 8000 Hz
Band 10: 16000 Hz
See also [AudioEffectEQ], [AudioEffectEQ6], [AudioEffectEQ21].
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<constants>
</constants>
</class>

View File

@ -1,38 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectEQ21" inherits="AudioEffectEQ" version="4.2">
<brief_description>
Adds a 21-band equalizer audio effect to an Audio bus. Gives you control over frequencies from 22 Hz to 22000 Hz.
Each frequency can be modulated between -60/+24 dB.
</brief_description>
<description>
Frequency bands:
Band 1: 22 Hz
Band 2: 32 Hz
Band 3: 44 Hz
Band 4: 63 Hz
Band 5: 90 Hz
Band 6: 125 Hz
Band 7: 175 Hz
Band 8: 250 Hz
Band 9: 350 Hz
Band 10: 500 Hz
Band 11: 700 Hz
Band 12: 1000 Hz
Band 13: 1400 Hz
Band 14: 2000 Hz
Band 15: 2800 Hz
Band 16: 4000 Hz
Band 17: 5600 Hz
Band 18: 8000 Hz
Band 19: 11000 Hz
Band 20: 16000 Hz
Band 21: 22000 Hz
See also [AudioEffectEQ], [AudioEffectEQ6], [AudioEffectEQ10].
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<constants>
</constants>
</class>

View File

@ -1,23 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectEQ6" inherits="AudioEffectEQ" version="4.2">
<brief_description>
Adds a 6-band equalizer audio effect to an Audio bus. Gives you control over frequencies from 32 Hz to 10000 Hz.
Each frequency can be modulated between -60/+24 dB.
</brief_description>
<description>
Frequency bands:
Band 1: 32 Hz
Band 2: 100 Hz
Band 3: 320 Hz
Band 4: 1000 Hz
Band 5: 3200 Hz
Band 6: 10000 Hz
See also [AudioEffectEQ], [AudioEffectEQ10], [AudioEffectEQ21].
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<constants>
</constants>
</class>

View File

@ -1,37 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectFilter" inherits="AudioEffect" version="4.2">
<brief_description>
Adds a filter to the audio bus.
</brief_description>
<description>
Allows frequencies other than the [member cutoff_hz] to pass.
</description>
<tutorials>
<link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.md</link>
</tutorials>
<methods>
</methods>
<members>
<member name="cutoff_hz" type="float" setter="set_cutoff" getter="get_cutoff" default="2000.0">
Threshold frequency for the filter, in Hz.
</member>
<member name="db" type="int" setter="set_db" getter="get_db" enum="AudioEffectFilter.FilterDB" default="0">
</member>
<member name="gain" type="float" setter="set_gain" getter="get_gain" default="1.0">
Gain amount of the frequencies after the filter.
</member>
<member name="resonance" type="float" setter="set_resonance" getter="get_resonance" default="0.5">
Amount of boost in the frequency range near the cutoff frequency.
</member>
</members>
<constants>
<constant name="FILTER_6DB" value="0" enum="FilterDB">
</constant>
<constant name="FILTER_12DB" value="1" enum="FilterDB">
</constant>
<constant name="FILTER_18DB" value="2" enum="FilterDB">
</constant>
<constant name="FILTER_24DB" value="3" enum="FilterDB">
</constant>
</constants>
</class>

View File

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectHighPassFilter" inherits="AudioEffectFilter" version="4.2">
<brief_description>
Adds a high-pass filter to the Audio Bus.
</brief_description>
<description>
Cuts frequencies lower than the [member AudioEffectFilter.cutoff_hz] and allows higher frequencies to pass.
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<constants>
</constants>
</class>

View File

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectHighShelfFilter" inherits="AudioEffectFilter" version="4.2">
<brief_description>
Reduces all frequencies above the [member AudioEffectFilter.cutoff_hz].
</brief_description>
<description>
</description>
<tutorials>
<link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.md</link>
</tutorials>
<methods>
</methods>
<constants>
</constants>
</class>

View File

@ -1,13 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectInstance" inherits="Reference" version="4.2">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<constants>
</constants>
</class>

View File

@ -1,29 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectLimiter" inherits="AudioEffect" version="4.2">
<brief_description>
Adds a soft-clip limiter audio effect to an Audio bus.
</brief_description>
<description>
A limiter is similar to a compressor, but it's less flexible and designed to disallow sound going over a given dB threshold. Adding one in the Master bus is always recommended to reduce the effects of clipping.
Soft clipping starts to reduce the peaks a little below the threshold level and progressively increases its effect as the input level increases such that the threshold is never exceeded.
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
<member name="ceiling_db" type="float" setter="set_ceiling_db" getter="get_ceiling_db" default="-0.1">
The waveform's maximum allowed value, in decibels. Value can range from -20 to -0.1.
</member>
<member name="soft_clip_db" type="float" setter="set_soft_clip_db" getter="get_soft_clip_db" default="2.0">
Applies a gain to the limited waves, in decibels. Value can range from 0 to 6.
</member>
<member name="soft_clip_ratio" type="float" setter="set_soft_clip_ratio" getter="get_soft_clip_ratio" default="10.0">
</member>
<member name="threshold_db" type="float" setter="set_threshold_db" getter="get_threshold_db" default="0.0">
Threshold from which the limiter begins to be active, in decibels. Value can range from -30 to 0.
</member>
</members>
<constants>
</constants>
</class>

View File

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectLowPassFilter" inherits="AudioEffectFilter" version="4.2">
<brief_description>
Adds a low-pass filter to the Audio bus.
</brief_description>
<description>
Cuts frequencies higher than the [member AudioEffectFilter.cutoff_hz] and allows lower frequencies to pass.
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<constants>
</constants>
</class>

View File

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectLowShelfFilter" inherits="AudioEffectFilter" version="4.2">
<brief_description>
Reduces all frequencies below the [member AudioEffectFilter.cutoff_hz].
</brief_description>
<description>
</description>
<tutorials>
<link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.md</link>
</tutorials>
<methods>
</methods>
<constants>
</constants>
</class>

View File

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectNotchFilter" inherits="AudioEffectFilter" version="4.2">
<brief_description>
Adds a notch filter to the Audio bus.
</brief_description>
<description>
Attenuates frequencies in a narrow band around the [member AudioEffectFilter.cutoff_hz] and cuts frequencies outside of this range.
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<constants>
</constants>
</class>

View File

@ -1,20 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectPanner" inherits="AudioEffect" version="4.2">
<brief_description>
Adds a panner audio effect to an Audio bus. Pans sound left or right.
</brief_description>
<description>
Determines how much of an audio signal is sent to the left and right buses.
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
<member name="pan" type="float" setter="set_pan" getter="get_pan" default="0.0">
Pan position. Value can range from -1 (fully left) to 1 (fully right).
</member>
</members>
<constants>
</constants>
</class>

View File

@ -1,33 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectPhaser" inherits="AudioEffect" version="4.2">
<brief_description>
Adds a phaser audio effect to an Audio bus.
Combines the original signal with a copy that is slightly out of phase with the original.
</brief_description>
<description>
Combines phase-shifted signals with the original signal. The movement of the phase-shifted signals is controlled using a low-frequency oscillator.
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
<member name="depth" type="float" setter="set_depth" getter="get_depth" default="1.0">
Governs how high the filter frequencies sweep. Low value will primarily affect bass frequencies. High value can sweep high into the treble. Value can range from 0.1 to 4.
</member>
<member name="feedback" type="float" setter="set_feedback" getter="get_feedback" default="0.7">
Output percent of modified sound. Value can range from 0.1 to 0.9.
</member>
<member name="range_max_hz" type="float" setter="set_range_max_hz" getter="get_range_max_hz" default="1600.0">
Determines the maximum frequency affected by the LFO modulations, in Hz. Value can range from 10 to 10000.
</member>
<member name="range_min_hz" type="float" setter="set_range_min_hz" getter="get_range_min_hz" default="440.0">
Determines the minimum frequency affected by the LFO modulations, in Hz. Value can range from 10 to 10000.
</member>
<member name="rate_hz" type="float" setter="set_rate_hz" getter="get_rate_hz" default="0.5">
Adjusts the rate in Hz at which the effect sweeps up and down across the frequency range.
</member>
</members>
<constants>
</constants>
</class>

View File

@ -1,45 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectPitchShift" inherits="AudioEffect" version="4.2">
<brief_description>
Adds a pitch-shifting audio effect to an Audio bus.
Raises or lowers the pitch of original sound.
</brief_description>
<description>
Allows modulation of pitch independently of tempo. All frequencies can be increased/decreased with minimal effect on transients.
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
<member name="fft_size" type="int" setter="set_fft_size" getter="get_fft_size" enum="AudioEffectPitchShift.FFT_Size" default="3">
The size of the [url=https://en.wikipedia.org/wiki/Fast_Fourier_transform]Fast Fourier transform[/url] buffer. Higher values smooth out the effect over time, but have greater latency. The effects of this higher latency are especially noticeable on sounds that have sudden amplitude changes.
</member>
<member name="oversampling" type="int" setter="set_oversampling" getter="get_oversampling" default="4">
The oversampling factor to use. Higher values result in better quality, but are more demanding on the CPU and may cause audio cracking if the CPU can't keep up.
</member>
<member name="pitch_scale" type="float" setter="set_pitch_scale" getter="get_pitch_scale" default="1.0">
The pitch scale to use. [code]1.0[/code] is the default pitch and plays sounds unaltered. [member pitch_scale] can range from [code]0.0[/code] (infinitely low pitch, inaudible) to [code]16[/code] (16 times higher than the initial pitch).
</member>
</members>
<constants>
<constant name="FFT_SIZE_256" value="0" enum="FFT_Size">
Use a buffer of 256 samples for the Fast Fourier transform. Lowest latency, but least stable over time.
</constant>
<constant name="FFT_SIZE_512" value="1" enum="FFT_Size">
Use a buffer of 512 samples for the Fast Fourier transform. Low latency, but less stable over time.
</constant>
<constant name="FFT_SIZE_1024" value="2" enum="FFT_Size">
Use a buffer of 1024 samples for the Fast Fourier transform. This is a compromise between latency and stability over time.
</constant>
<constant name="FFT_SIZE_2048" value="3" enum="FFT_Size">
Use a buffer of 2048 samples for the Fast Fourier transform. High latency, but stable over time.
</constant>
<constant name="FFT_SIZE_4096" value="4" enum="FFT_Size">
Use a buffer of 4096 samples for the Fast Fourier transform. Highest latency, but most stable over time.
</constant>
<constant name="FFT_SIZE_MAX" value="5" enum="FFT_Size">
Represents the size of the [enum FFT_Size] enum.
</constant>
</constants>
</class>

View File

@ -1,43 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectRecord" inherits="AudioEffect" version="4.2">
<brief_description>
Audio effect used for recording the sound from an audio bus.
</brief_description>
<description>
Allows the user to record the sound from an audio bus. This can include all audio output by Godot when used on the "Master" audio bus.
Can be used (with an [AudioStreamMicrophone]) to record from a microphone.
It sets and gets the format in which the audio file will be recorded (8-bit, 16-bit, or compressed). It checks whether or not the recording is active, and if it is, records the sound. It then returns the recorded sample.
</description>
<tutorials>
<link title="Recording with microphone">$DOCS_URL/tutorials/audio/recording_with_microphone.md</link>
<link title="Audio Mic Record Demo">https://godotengine.org/asset-library/asset/527</link>
</tutorials>
<methods>
<method name="get_recording" qualifiers="const">
<return type="AudioStreamSample" />
<description>
Returns the recorded sample.
</description>
</method>
<method name="is_recording_active" qualifiers="const">
<return type="bool" />
<description>
Returns whether the recording is active or not.
</description>
</method>
<method name="set_recording_active">
<return type="void" />
<argument index="0" name="record" type="bool" />
<description>
If [code]true[/code], the sound will be recorded. Note that restarting the recording will remove the previously recorded sample.
</description>
</method>
</methods>
<members>
<member name="format" type="int" setter="set_format" getter="get_format" enum="AudioStreamSample.Format" default="1">
Specifies the format in which the sample will be recorded. See [enum AudioStreamSample.Format] for available formats.
</member>
</members>
<constants>
</constants>
</class>

View File

@ -1,43 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectReverb" inherits="AudioEffect" version="4.2">
<brief_description>
Adds a reverberation audio effect to an Audio bus.
Simulates the sound of acoustic environments such as rooms, concert halls, caverns, or an open spaces.
</brief_description>
<description>
Simulates rooms of different sizes. Its parameters can be adjusted to simulate the sound of a specific room.
</description>
<tutorials>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
</methods>
<members>
<member name="damping" type="float" setter="set_damping" getter="get_damping" default="0.5">
Defines how reflective the imaginary room's walls are. Value can range from 0 to 1.
</member>
<member name="dry" type="float" setter="set_dry" getter="get_dry" default="1.0">
Output percent of original sound. At 0, only modified sound is outputted. Value can range from 0 to 1.
</member>
<member name="hipass" type="float" setter="set_hpf" getter="get_hpf" default="0.0">
High-pass filter passes signals with a frequency higher than a certain cutoff frequency and attenuates signals with frequencies lower than the cutoff frequency. Value can range from 0 to 1.
</member>
<member name="predelay_feedback" type="float" setter="set_predelay_feedback" getter="get_predelay_feedback" default="0.4">
Output percent of predelay. Value can range from 0 to 1.
</member>
<member name="predelay_msec" type="float" setter="set_predelay_msec" getter="get_predelay_msec" default="150.0">
Time between the original signal and the early reflections of the reverb signal, in milliseconds.
</member>
<member name="room_size" type="float" setter="set_room_size" getter="get_room_size" default="0.8">
Dimensions of simulated room. Bigger means more echoes. Value can range from 0 to 1.
</member>
<member name="spread" type="float" setter="set_spread" getter="get_spread" default="1.0">
Widens or narrows the stereo image of the reverb tail. 1 means fully widens. Value can range from 0 to 1.
</member>
<member name="wet" type="float" setter="set_wet" getter="get_wet" default="0.5">
Output percent of modified sound. At 0, only original sound is outputted. Value can range from 0 to 1.
</member>
</members>
<constants>
</constants>
</class>

View File

@ -1,46 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectSpectrumAnalyzer" inherits="AudioEffect" version="4.2">
<brief_description>
Audio effect that can be used for real-time audio visualizations.
</brief_description>
<description>
This audio effect does not affect sound output, but can be used for real-time audio visualizations.
See also [AudioStreamGenerator] for procedurally generating sounds.
</description>
<tutorials>
<link title="Audio Spectrum Demo">https://godotengine.org/asset-library/asset/528</link>
<link title="Godot 3.2 will get new audio features">https://godotengine.org/article/godot-32-will-get-new-audio-features</link>
</tutorials>
<methods>
</methods>
<members>
<member name="buffer_length" type="float" setter="set_buffer_length" getter="get_buffer_length" default="2.0">
The length of the buffer to keep (in seconds). Higher values keep data around for longer, but require more memory.
</member>
<member name="fft_size" type="int" setter="set_fft_size" getter="get_fft_size" enum="AudioEffectSpectrumAnalyzer.FFT_Size" default="2">
The size of the [url=https://en.wikipedia.org/wiki/Fast_Fourier_transform]Fast Fourier transform[/url] buffer. Higher values smooth out the spectrum analysis over time, but have greater latency. The effects of this higher latency are especially noticeable with sudden amplitude changes.
</member>
<member name="tap_back_pos" type="float" setter="set_tap_back_pos" getter="get_tap_back_pos" default="0.01">
</member>
</members>
<constants>
<constant name="FFT_SIZE_256" value="0" enum="FFT_Size">
Use a buffer of 256 samples for the Fast Fourier transform. Lowest latency, but least stable over time.
</constant>
<constant name="FFT_SIZE_512" value="1" enum="FFT_Size">
Use a buffer of 512 samples for the Fast Fourier transform. Low latency, but less stable over time.
</constant>
<constant name="FFT_SIZE_1024" value="2" enum="FFT_Size">
Use a buffer of 1024 samples for the Fast Fourier transform. This is a compromise between latency and stability over time.
</constant>
<constant name="FFT_SIZE_2048" value="3" enum="FFT_Size">
Use a buffer of 2048 samples for the Fast Fourier transform. High latency, but stable over time.
</constant>
<constant name="FFT_SIZE_4096" value="4" enum="FFT_Size">
Use a buffer of 4096 samples for the Fast Fourier transform. Highest latency, but most stable over time.
</constant>
<constant name="FFT_SIZE_MAX" value="5" enum="FFT_Size">
Represents the size of the [enum FFT_Size] enum.
</constant>
</constants>
</class>

View File

@ -1,27 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectSpectrumAnalyzerInstance" inherits="AudioEffectInstance" version="4.2">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
<methods>
<method name="get_magnitude_for_frequency_range" qualifiers="const">
<return type="Vector2" />
<argument index="0" name="from_hz" type="float" />
<argument index="1" name="to_hz" type="float" />
<argument index="2" name="mode" type="int" enum="AudioEffectSpectrumAnalyzerInstance.MagnitudeMode" default="1" />
<description>
</description>
</method>
</methods>
<constants>
<constant name="MAGNITUDE_AVERAGE" value="0" enum="MagnitudeMode">
Use the average value as magnitude.
</constant>
<constant name="MAGNITUDE_MAX" value="1" enum="MagnitudeMode">
Use the maximum value as magnitude.
</constant>
</constants>
</class>

View File

@ -1,21 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectStereoEnhance" inherits="AudioEffect" version="4.2">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
<member name="pan_pullout" type="float" setter="set_pan_pullout" getter="get_pan_pullout" default="1.0">
</member>
<member name="surround" type="float" setter="set_surround" getter="get_surround" default="0.0">
</member>
<member name="time_pullout_ms" type="float" setter="set_time_pullout" getter="get_time_pullout" default="0.0">
</member>
</members>
<constants>
</constants>
</class>

View File

@ -1,342 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioServer" inherits="Object" version="4.2">
<brief_description>
Server interface for low-level audio access.
</brief_description>
<description>
[AudioServer] is a low-level server interface for audio access. It is in charge of creating sample data (playable audio) as well as its playback via a voice interface.
</description>
<tutorials>
<link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.md</link>
<link title="Audio Device Changer Demo">https://godotengine.org/asset-library/asset/525</link>
<link title="Audio Mic Record Demo">https://godotengine.org/asset-library/asset/527</link>
<link title="Audio Spectrum Demo">https://godotengine.org/asset-library/asset/528</link>
</tutorials>
<methods>
<method name="add_bus">
<return type="void" />
<argument index="0" name="at_position" type="int" default="-1" />
<description>
Adds a bus at [code]at_position[/code].
</description>
</method>
<method name="add_bus_effect">
<return type="void" />
<argument index="0" name="bus_idx" type="int" />
<argument index="1" name="effect" type="AudioEffect" />
<argument index="2" name="at_position" type="int" default="-1" />
<description>
Adds an [AudioEffect] effect to the bus [code]bus_idx[/code] at [code]at_position[/code].
</description>
</method>
<method name="capture_get_device_list">
<return type="Array" />
<description>
Returns the names of all audio input devices detected on the system.
[b]Note:[/b] [member ProjectSettings.audio/enable_audio_input] must be [code]true[/code] for audio input to work. See also that setting's description for caveats related to permissions and operating system privacy settings.
</description>
</method>
<method name="generate_bus_layout" qualifiers="const">
<return type="AudioBusLayout" />
<description>
Generates an [AudioBusLayout] using the available buses and effects.
</description>
</method>
<method name="get_bus_channels" qualifiers="const">
<return type="int" />
<argument index="0" name="bus_idx" type="int" />
<description>
Returns the amount of channels of the bus at index [code]bus_idx[/code].
</description>
</method>
<method name="get_bus_effect">
<return type="AudioEffect" />
<argument index="0" name="bus_idx" type="int" />
<argument index="1" name="effect_idx" type="int" />
<description>
Returns the [AudioEffect] at position [code]effect_idx[/code] in bus [code]bus_idx[/code].
</description>
</method>
<method name="get_bus_effect_count">
<return type="int" />
<argument index="0" name="bus_idx" type="int" />
<description>
Returns the number of effects on the bus at [code]bus_idx[/code].
</description>
</method>
<method name="get_bus_effect_instance">
<return type="AudioEffectInstance" />
<argument index="0" name="bus_idx" type="int" />
<argument index="1" name="effect_idx" type="int" />
<argument index="2" name="channel" type="int" default="0" />
<description>
Returns the [AudioEffectInstance] assigned to the given bus and effect indices (and optionally channel).
</description>
</method>
<method name="get_bus_index" qualifiers="const">
<return type="int" />
<argument index="0" name="bus_name" type="StringName" />
<description>
</description>
</method>
<method name="get_bus_name" qualifiers="const">
<return type="String" />
<argument index="0" name="bus_idx" type="int" />
<description>
Returns the name of the bus with the index [code]bus_idx[/code].
</description>
</method>
<method name="get_bus_peak_volume_left_db" qualifiers="const">
<return type="float" />
<argument index="0" name="bus_idx" type="int" />
<argument index="1" name="channel" type="int" />
<description>
Returns the peak volume of the left speaker at bus index [code]bus_idx[/code] and channel index [code]channel[/code].
</description>
</method>
<method name="get_bus_peak_volume_right_db" qualifiers="const">
<return type="float" />
<argument index="0" name="bus_idx" type="int" />
<argument index="1" name="channel" type="int" />
<description>
Returns the peak volume of the right speaker at bus index [code]bus_idx[/code] and channel index [code]channel[/code].
</description>
</method>
<method name="get_bus_send" qualifiers="const">
<return type="StringName" />
<argument index="0" name="bus_idx" type="int" />
<description>
Returns the name of the bus that the bus at index [code]bus_idx[/code] sends to.
</description>
</method>
<method name="get_bus_volume_db" qualifiers="const">
<return type="float" />
<argument index="0" name="bus_idx" type="int" />
<description>
Returns the volume of the bus at index [code]bus_idx[/code] in dB.
</description>
</method>
<method name="get_device_list">
<return type="Array" />
<description>
Returns the names of all audio devices detected on the system.
</description>
</method>
<method name="get_mix_rate" qualifiers="const">
<return type="float" />
<description>
Returns the sample rate at the output of the [AudioServer].
</description>
</method>
<method name="get_output_latency" qualifiers="const">
<return type="float" />
<description>
Returns the audio driver's output latency. This can be expensive, it is not recommended to call this every frame.
</description>
</method>
<method name="get_speaker_mode" qualifiers="const">
<return type="int" enum="AudioServer.SpeakerMode" />
<description>
Returns the speaker configuration.
</description>
</method>
<method name="get_time_since_last_mix" qualifiers="const">
<return type="float" />
<description>
Returns the relative time since the last mix occurred.
</description>
</method>
<method name="get_time_to_next_mix" qualifiers="const">
<return type="float" />
<description>
Returns the relative time until the next mix occurs.
</description>
</method>
<method name="is_bus_bypassing_effects" qualifiers="const">
<return type="bool" />
<argument index="0" name="bus_idx" type="int" />
<description>
If [code]true[/code], the bus at index [code]bus_idx[/code] is bypassing effects.
</description>
</method>
<method name="is_bus_effect_enabled" qualifiers="const">
<return type="bool" />
<argument index="0" name="bus_idx" type="int" />
<argument index="1" name="effect_idx" type="int" />
<description>
If [code]true[/code], the effect at index [code]effect_idx[/code] on the bus at index [code]bus_idx[/code] is enabled.
</description>
</method>
<method name="is_bus_mute" qualifiers="const">
<return type="bool" />
<argument index="0" name="bus_idx" type="int" />
<description>
If [code]true[/code], the bus at index [code]bus_idx[/code] is muted.
</description>
</method>
<method name="is_bus_solo" qualifiers="const">
<return type="bool" />
<argument index="0" name="bus_idx" type="int" />
<description>
If [code]true[/code], the bus at index [code]bus_idx[/code] is in solo mode.
</description>
</method>
<method name="is_enabled" qualifiers="const">
<return type="bool" />
<description>
If [code]false[/code], the audio server is disabled / muted.
</description>
</method>
<method name="lock">
<return type="void" />
<description>
Locks the audio driver's main loop.
[b]Note:[/b] Remember to unlock it afterwards.
</description>
</method>
<method name="move_bus">
<return type="void" />
<argument index="0" name="index" type="int" />
<argument index="1" name="to_index" type="int" />
<description>
Moves the bus from index [code]index[/code] to index [code]to_index[/code].
</description>
</method>
<method name="remove_bus">
<return type="void" />
<argument index="0" name="index" type="int" />
<description>
Removes the bus at index [code]index[/code].
</description>
</method>
<method name="remove_bus_effect">
<return type="void" />
<argument index="0" name="bus_idx" type="int" />
<argument index="1" name="effect_idx" type="int" />
<description>
Removes the effect at index [code]effect_idx[/code] from the bus at index [code]bus_idx[/code].
</description>
</method>
<method name="set_bus_bypass_effects">
<return type="void" />
<argument index="0" name="bus_idx" type="int" />
<argument index="1" name="enable" type="bool" />
<description>
If [code]true[/code], the bus at index [code]bus_idx[/code] is bypassing effects.
</description>
</method>
<method name="set_bus_effect_enabled">
<return type="void" />
<argument index="0" name="bus_idx" type="int" />
<argument index="1" name="effect_idx" type="int" />
<argument index="2" name="enabled" type="bool" />
<description>
If [code]true[/code], the effect at index [code]effect_idx[/code] on the bus at index [code]bus_idx[/code] is enabled.
</description>
</method>
<method name="set_bus_layout">
<return type="void" />
<argument index="0" name="bus_layout" type="AudioBusLayout" />
<description>
Overwrites the currently used [AudioBusLayout].
</description>
</method>
<method name="set_bus_mute">
<return type="void" />
<argument index="0" name="bus_idx" type="int" />
<argument index="1" name="enable" type="bool" />
<description>
If [code]true[/code], the bus at index [code]bus_idx[/code] is muted.
</description>
</method>
<method name="set_bus_name">
<return type="void" />
<argument index="0" name="bus_idx" type="int" />
<argument index="1" name="name" type="String" />
<description>
Sets the name of the bus at index [code]bus_idx[/code] to [code]name[/code].
</description>
</method>
<method name="set_bus_send">
<return type="void" />
<argument index="0" name="bus_idx" type="int" />
<argument index="1" name="send" type="StringName" />
<description>
</description>
</method>
<method name="set_bus_solo">
<return type="void" />
<argument index="0" name="bus_idx" type="int" />
<argument index="1" name="enable" type="bool" />
<description>
If [code]true[/code], the bus at index [code]bus_idx[/code] is in solo mode.
</description>
</method>
<method name="set_bus_volume_db">
<return type="void" />
<argument index="0" name="bus_idx" type="int" />
<argument index="1" name="volume_db" type="float" />
<description>
Sets the volume of the bus at index [code]bus_idx[/code] to [code]volume_db[/code].
</description>
</method>
<method name="set_enabled">
<return type="void" />
<argument index="0" name="enabled" type="bool" />
<description>
Allows disabling / muting the audio server. As well as muting, this will minimize audio CPU usage.
</description>
</method>
<method name="swap_bus_effects">
<return type="void" />
<argument index="0" name="bus_idx" type="int" />
<argument index="1" name="effect_idx" type="int" />
<argument index="2" name="by_effect_idx" type="int" />
<description>
Swaps the position of two effects in bus [code]bus_idx[/code].
</description>
</method>
<method name="unlock">
<return type="void" />
<description>
Unlocks the audio driver's main loop. (After locking it, you should always unlock it.)
</description>
</method>
</methods>
<members>
<member name="bus_count" type="int" setter="set_bus_count" getter="get_bus_count" default="1">
Number of available audio buses.
</member>
<member name="capture_device" type="String" setter="capture_set_device" getter="capture_get_device" default="&quot;Default&quot;">
Name of the current device for audio input (see [method capture_get_device_list]). On systems with multiple audio inputs (such as analog, USB and HDMI audio), this can be used to select the audio input device. The value [code]"Default"[/code] will record audio on the system-wide default audio input. If an invalid device name is set, the value will be reverted back to [code]"Default"[/code].
[b]Note:[/b] [member ProjectSettings.audio/enable_audio_input] must be [code]true[/code] for audio input to work. See also that setting's description for caveats related to permissions and operating system privacy settings.
</member>
<member name="device" type="String" setter="set_device" getter="get_device" default="&quot;Default&quot;">
Name of the current device for audio output (see [method get_device_list]). On systems with multiple audio outputs (such as analog, USB and HDMI audio), this can be used to select the audio output device. The value [code]"Default"[/code] will play audio on the system-wide default audio output. If an invalid device name is set, the value will be reverted back to [code]"Default"[/code].
</member>
<member name="global_rate_scale" type="float" setter="set_global_rate_scale" getter="get_global_rate_scale" default="1.0">
Scales the rate at which audio is played (i.e. setting it to [code]0.5[/code] will make the audio be played twice as fast).
</member>
</members>
<signals>
<signal name="bus_layout_changed">
<description>
Emitted when the [AudioBusLayout] changes.
</description>
</signal>
</signals>
<constants>
<constant name="SPEAKER_MODE_STEREO" value="0" enum="SpeakerMode">
Two or fewer speakers were detected.
</constant>
<constant name="SPEAKER_SURROUND_31" value="1" enum="SpeakerMode">
A 3.1 channel surround setup was detected.
</constant>
<constant name="SPEAKER_SURROUND_51" value="2" enum="SpeakerMode">
A 5.1 channel surround setup was detected.
</constant>
<constant name="SPEAKER_SURROUND_71" value="3" enum="SpeakerMode">
A 7.1 channel surround setup was detected.
</constant>
</constants>
</class>

View File

@ -1,25 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioStream" inherits="Resource" version="4.2">
<brief_description>
Base class for audio streams.
</brief_description>
<description>
Base class for audio streams. Audio streams are used for sound effects and music playback, and support WAV (via [AudioStreamSample]) and OGG (via [AudioStreamOGGVorbis]) file formats.
</description>
<tutorials>
<link title="Audio streams">$DOCS_URL/tutorials/audio/audio_streams.md</link>
<link title="Audio Generator Demo">https://godotengine.org/asset-library/asset/526</link>
<link title="Audio Mic Record Demo">https://godotengine.org/asset-library/asset/527</link>
<link title="Audio Spectrum Demo">https://godotengine.org/asset-library/asset/528</link>
</tutorials>
<methods>
<method name="get_length" qualifiers="const">
<return type="float" />
<description>
Returns the length of the audio stream in seconds.
</description>
</method>
</methods>
<constants>
</constants>
</class>

View File

@ -1,29 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioStreamGenerator" inherits="AudioStream" version="4.2">
<brief_description>
Audio stream that generates sounds procedurally.
</brief_description>
<description>
This audio stream does not play back sounds, but expects a script to generate audio data for it instead. See also [AudioStreamGeneratorPlayback].
See also [AudioEffectSpectrumAnalyzer] for performing real-time audio spectrum analysis.
[b]Note:[/b] Due to performance constraints, this class is best used from C# or from a compiled language via GDNative. If you still want to use this class from GDScript, consider using a lower [member mix_rate] such as 11,025 Hz or 22,050 Hz.
</description>
<tutorials>
<link title="Audio Generator Demo">https://godotengine.org/asset-library/asset/526</link>
<link title="Godot 3.2 will get new audio features">https://godotengine.org/article/godot-32-will-get-new-audio-features</link>
</tutorials>
<methods>
</methods>
<members>
<member name="buffer_length" type="float" setter="set_buffer_length" getter="get_buffer_length" default="0.5">
The length of the buffer to generate (in seconds). Lower values result in less latency, but require the script to generate audio data faster, resulting in increased CPU usage and more risk for audio cracking if the CPU can't keep up.
</member>
<member name="mix_rate" type="float" setter="set_mix_rate" getter="get_mix_rate" default="44100.0">
The sample rate to use (in Hz). Higher values are more demanding for the CPU to generate, but result in better quality.
In games, common sample rates in use are [code]11025[/code], [code]16000[/code], [code]22050[/code], [code]32000[/code], [code]44100[/code], and [code]48000[/code].
According to the [url=https://en.wikipedia.org/wiki/Nyquist%E2%80%93Shannon_sampling_theorem]Nyquist-Shannon sampling theorem[/url], there is no quality difference to human hearing when going past 40,000 Hz (since most humans can only hear up to ~20,000 Hz, often less). If you are generating lower-pitched sounds such as voices, lower sample rates such as [code]32000[/code] or [code]22050[/code] may be usable with no loss in quality.
</member>
</members>
<constants>
</constants>
</class>

View File

@ -1,55 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioStreamGeneratorPlayback" inherits="AudioStreamPlaybackResampled" version="4.2">
<brief_description>
Plays back audio generated using [AudioStreamGenerator].
</brief_description>
<description>
This class is meant to be used with [AudioStreamGenerator] to play back the generated audio in real-time.
</description>
<tutorials>
<link title="Audio Generator Demo">https://godotengine.org/asset-library/asset/526</link>
<link title="Godot 3.2 will get new audio features">https://godotengine.org/article/godot-32-will-get-new-audio-features</link>
</tutorials>
<methods>
<method name="can_push_buffer" qualifiers="const">
<return type="bool" />
<argument index="0" name="amount" type="int" />
<description>
Returns [code]true[/code] if a buffer of the size [code]amount[/code] can be pushed to the audio sample data buffer without overflowing it, [code]false[/code] otherwise.
</description>
</method>
<method name="clear_buffer">
<return type="void" />
<description>
Clears the audio sample data buffer.
</description>
</method>
<method name="get_frames_available" qualifiers="const">
<return type="int" />
<description>
Returns the number of frames that can be pushed to the audio sample data buffer without overflowing it. If the result is [code]0[/code], the buffer is full.
</description>
</method>
<method name="get_skips" qualifiers="const">
<return type="int" />
<description>
</description>
</method>
<method name="push_buffer">
<return type="bool" />
<argument index="0" name="frames" type="PoolVector2Array" />
<description>
Pushes several audio data frames to the buffer. This is usually more efficient than [method push_frame] in C# and compiled languages via GDNative, but [method push_buffer] may be [i]less[/i] efficient in GDScript.
</description>
</method>
<method name="push_frame">
<return type="bool" />
<argument index="0" name="frame" type="Vector2" />
<description>
Pushes a single audio data frame to the buffer. This is usually less efficient than [method push_buffer] in C# and compiled languages via GDNative, but [method push_frame] may be [i]more[/i] efficient in GDScript.
</description>
</method>
</methods>
<constants>
</constants>
</class>

View File

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioStreamMicrophone" inherits="AudioStream" version="4.2">
<brief_description>
Plays real-time audio input data.
</brief_description>
<description>
When used directly in an [AudioStreamPlayer] node, [AudioStreamMicrophone] plays back microphone input in real-time. This can be used in conjunction with [AudioEffectCapture] to process the data or save it.
[b]Note:[/b] [member ProjectSettings.audio/enable_audio_input] must be [code]true[/code] for audio input to work. See also that setting's description for caveats related to permissions and operating system privacy settings.
</description>
<tutorials>
<link title="Audio Mic Record Demo">https://github.com/Relintai/pandemonium_demo_projects/tree/master/audio/mic_record</link>
</tutorials>
<methods>
</methods>
<constants>
</constants>
</class>

View File

@ -1,16 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioStreamPlayback" inherits="Reference" version="4.2">
<brief_description>
Meta class for playing back audio.
</brief_description>
<description>
Can play, loop, pause a scroll through audio. See [AudioStream] and [AudioStreamOGGVorbis] for usage.
</description>
<tutorials>
<link title="Audio Generator Demo">https://godotengine.org/asset-library/asset/526</link>
</tutorials>
<methods>
</methods>
<constants>
</constants>
</class>

View File

@ -1,13 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioStreamPlaybackResampled" inherits="AudioStreamPlayback" version="4.2">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<constants>
</constants>
</class>

View File

@ -1,97 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioStreamPlayer" inherits="Node" version="4.2">
<brief_description>
Plays back audio non-positionally.
</brief_description>
<description>
Plays an audio stream non-positionally.
To play audio positionally, use [AudioStreamPlayer2D] or [AudioStreamPlayer3D] instead of [AudioStreamPlayer].
</description>
<tutorials>
<link title="Audio streams">$DOCS_URL/tutorials/audio/audio_streams.md</link>
<link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link>
<link title="Audio Device Changer Demo">https://godotengine.org/asset-library/asset/525</link>
<link title="Audio Generator Demo">https://godotengine.org/asset-library/asset/526</link>
<link title="Audio Mic Record Demo">https://godotengine.org/asset-library/asset/527</link>
<link title="Audio Spectrum Demo">https://godotengine.org/asset-library/asset/528</link>
</tutorials>
<methods>
<method name="get_playback_position">
<return type="float" />
<description>
Returns the position in the [AudioStream] in seconds.
</description>
</method>
<method name="get_stream_playback">
<return type="AudioStreamPlayback" />
<description>
Returns the [AudioStreamPlayback] object associated with this [AudioStreamPlayer].
</description>
</method>
<method name="play">
<return type="void" />
<argument index="0" name="from_position" type="float" default="0.0" />
<description>
Plays the audio from the given [code]from_position[/code], in seconds.
</description>
</method>
<method name="seek">
<return type="void" />
<argument index="0" name="to_position" type="float" />
<description>
Sets the position from which audio will be played, in seconds.
</description>
</method>
<method name="stop">
<return type="void" />
<description>
Stops the audio.
</description>
</method>
</methods>
<members>
<member name="autoplay" type="bool" setter="set_autoplay" getter="is_autoplay_enabled" default="false">
If [code]true[/code], audio plays when added to scene tree.
</member>
<member name="bus" type="StringName" setter="set_bus" getter="get_bus" default="@&quot;Master&quot;">
Bus on which this audio is playing.
[b]Note:[/b] When setting this property, keep in mind that no validation is performed to see if the given name matches an existing bus. This is because audio bus layouts might be loaded after this property is set. If this given name can't be resolved at runtime, it will fall back to [code]"Master"[/code].
</member>
<member name="mix_target" type="int" setter="set_mix_target" getter="get_mix_target" enum="AudioStreamPlayer.MixTarget" default="0">
If the audio configuration has more than two speakers, this sets the target channels. See [enum MixTarget] constants.
</member>
<member name="pitch_scale" type="float" setter="set_pitch_scale" getter="get_pitch_scale" default="1.0">
The pitch and the tempo of the audio, as a multiplier of the audio sample's sample rate.
</member>
<member name="playing" type="bool" setter="_set_playing" getter="is_playing" default="false">
If [code]true[/code], audio is playing.
</member>
<member name="stream" type="AudioStream" setter="set_stream" getter="get_stream">
The [AudioStream] object to be played.
</member>
<member name="stream_paused" type="bool" setter="set_stream_paused" getter="get_stream_paused" default="false">
If [code]true[/code], the playback is paused. You can resume it by setting [code]stream_paused[/code] to [code]false[/code].
</member>
<member name="volume_db" type="float" setter="set_volume_db" getter="get_volume_db" default="0.0">
Volume of sound, in dB.
</member>
</members>
<signals>
<signal name="finished">
<description>
Emitted when the audio stops playing.
</description>
</signal>
</signals>
<constants>
<constant name="MIX_TARGET_STEREO" value="0" enum="MixTarget">
The audio will be played only on the first channel.
</constant>
<constant name="MIX_TARGET_SURROUND" value="1" enum="MixTarget">
The audio will be played on all surround channels.
</constant>
<constant name="MIX_TARGET_CENTER" value="2" enum="MixTarget">
The audio will be played on the second channel, which is usually the center.
</constant>
</constants>
</class>

View File

@ -1,94 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioStreamPlayer2D" inherits="Node2D" version="4.2">
<brief_description>
Plays positional sound in 2D space.
</brief_description>
<description>
Plays audio that dampens with distance from a given position.
By default, audio is heard from the screen center. This can be changed by adding a [Listener2D] node to the scene and enabling it by calling [method Listener2D.make_current] on it.
See also [AudioStreamPlayer] to play a sound non-positionally.
[b]Note:[/b] Hiding an [AudioStreamPlayer2D] node does not disable its audio output. To temporarily disable an [AudioStreamPlayer2D]'s audio output, set [member volume_db] to a very low value like [code]-100[/code] (which isn't audible to human hearing).
</description>
<tutorials>
<link>$DOCS_URL/tutorials/audio/audio_streams.md</link>
</tutorials>
<methods>
<method name="get_playback_position">
<return type="float" />
<description>
Returns the position in the [AudioStream].
</description>
</method>
<method name="get_stream_playback">
<return type="AudioStreamPlayback" />
<description>
Returns the [AudioStreamPlayback] object associated with this [AudioStreamPlayer2D].
</description>
</method>
<method name="play">
<return type="void" />
<argument index="0" name="from_position" type="float" default="0.0" />
<description>
Plays the audio from the given position [code]from_position[/code], in seconds.
</description>
</method>
<method name="seek">
<return type="void" />
<argument index="0" name="to_position" type="float" />
<description>
Sets the position from which audio will be played, in seconds.
</description>
</method>
<method name="stop">
<return type="void" />
<description>
Stops the audio.
</description>
</method>
</methods>
<members>
<member name="area_mask" type="int" setter="set_area_mask" getter="get_area_mask" default="1">
Determines which [Area2D] layers affect the sound for reverb and audio bus effects. Areas can be used to redirect [AudioStream]s so that they play in a certain audio bus. An example of how you might use this is making a "water" area so that sounds played in the water are redirected through an audio bus to make them sound like they are being played underwater.
</member>
<member name="attenuation" type="float" setter="set_attenuation" getter="get_attenuation" default="1.0">
Dampens audio over distance with this as an exponent.
</member>
<member name="autoplay" type="bool" setter="set_autoplay" getter="is_autoplay_enabled" default="false">
If [code]true[/code], audio plays when added to scene tree.
</member>
<member name="bus" type="StringName" setter="set_bus" getter="get_bus" default="@&quot;Master&quot;">
Bus on which this audio is playing.
[b]Note:[/b] When setting this property, keep in mind that no validation is performed to see if the given name matches an existing bus. This is because audio bus layouts might be loaded after this property is set. If this given name can't be resolved at runtime, it will fall back to [code]"Master"[/code].
</member>
<member name="max_distance" type="float" setter="set_max_distance" getter="get_max_distance" default="2000.0">
Maximum distance from which audio is still hearable.
</member>
<member name="panning_strength" type="float" setter="set_panning_strength" getter="get_panning_strength" default="1.0">
Scales the panning strength for this node by multiplying the base [member ProjectSettings.audio/2d_panning_strength] with this factor. Higher values will pan audio from left to right more dramatically than lower values.
</member>
<member name="pitch_scale" type="float" setter="set_pitch_scale" getter="get_pitch_scale" default="1.0">
The pitch and the tempo of the audio, as a multiplier of the audio sample's sample rate.
</member>
<member name="playing" type="bool" setter="_set_playing" getter="is_playing" default="false">
If [code]true[/code], audio is playing.
</member>
<member name="stream" type="AudioStream" setter="set_stream" getter="get_stream">
The [AudioStream] object to be played.
</member>
<member name="stream_paused" type="bool" setter="set_stream_paused" getter="get_stream_paused" default="false">
If [code]true[/code], the playback is paused. You can resume it by setting [code]stream_paused[/code] to [code]false[/code].
</member>
<member name="volume_db" type="float" setter="set_volume_db" getter="get_volume_db" default="0.0">
Base volume without dampening.
</member>
</members>
<signals>
<signal name="finished">
<description>
Emitted when the audio stops playing.
</description>
</signal>
</signals>
<constants>
</constants>
</class>

View File

@ -1,149 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioStreamPlayer3D" inherits="Spatial" version="4.2">
<brief_description>
Plays positional sound in 3D space.
</brief_description>
<description>
Plays a sound effect with directed sound effects, dampens with distance if needed, generates effect of hearable position in space. For greater realism, a low-pass filter is automatically applied to distant sounds. This can be disabled by setting [member attenuation_filter_cutoff_hz] to [code]20500[/code].
By default, audio is heard from the camera position. This can be changed by adding a [Listener] node to the scene and enabling it by calling [method Listener.make_current] on it.
See also [AudioStreamPlayer] to play a sound non-positionally.
[b]Note:[/b] Hiding an [AudioStreamPlayer3D] node does not disable its audio output. To temporarily disable an [AudioStreamPlayer3D]'s audio output, set [member unit_db] to a very low value like [code]-100[/code] (which isn't audible to human hearing).
</description>
<tutorials>
<link>$DOCS_URL/tutorials/audio/audio_streams.md</link>
</tutorials>
<methods>
<method name="get_playback_position">
<return type="float" />
<description>
Returns the position in the [AudioStream].
</description>
</method>
<method name="get_stream_playback">
<return type="AudioStreamPlayback" />
<description>
Returns the [AudioStreamPlayback] object associated with this [AudioStreamPlayer3D].
</description>
</method>
<method name="play">
<return type="void" />
<argument index="0" name="from_position" type="float" default="0.0" />
<description>
Plays the audio from the given position [code]from_position[/code], in seconds.
</description>
</method>
<method name="seek">
<return type="void" />
<argument index="0" name="to_position" type="float" />
<description>
Sets the position from which audio will be played, in seconds.
</description>
</method>
<method name="stop">
<return type="void" />
<description>
Stops the audio.
</description>
</method>
</methods>
<members>
<member name="area_mask" type="int" setter="set_area_mask" getter="get_area_mask" default="1">
Determines which [Area] layers affect the sound for reverb and audio bus effects. Areas can be used to redirect [AudioStream]s so that they play in a certain audio bus. An example of how you might use this is making a "water" area so that sounds played in the water are redirected through an audio bus to make them sound like they are being played underwater.
</member>
<member name="attenuation_filter_cutoff_hz" type="float" setter="set_attenuation_filter_cutoff_hz" getter="get_attenuation_filter_cutoff_hz" default="5000.0">
Dampens audio using a low-pass filter above this frequency, in Hz. To disable the dampening effect entirely, set this to [code]20500[/code] as this frequency is above the human hearing limit.
</member>
<member name="attenuation_filter_db" type="float" setter="set_attenuation_filter_db" getter="get_attenuation_filter_db" default="-24.0">
Amount how much the filter affects the loudness, in decibels.
</member>
<member name="attenuation_model" type="int" setter="set_attenuation_model" getter="get_attenuation_model" enum="AudioStreamPlayer3D.AttenuationModel" default="0">
Decides if audio should get quieter with distance linearly, quadratically, logarithmically, or not be affected by distance, effectively disabling attenuation.
</member>
<member name="autoplay" type="bool" setter="set_autoplay" getter="is_autoplay_enabled" default="false">
If [code]true[/code], audio plays when the AudioStreamPlayer3D node is added to scene tree.
</member>
<member name="bus" type="StringName" setter="set_bus" getter="get_bus" default="@&quot;Master&quot;">
The bus on which this audio is playing.
[b]Note:[/b] When setting this property, keep in mind that no validation is performed to see if the given name matches an existing bus. This is because audio bus layouts might be loaded after this property is set. If this given name can't be resolved at runtime, it will fall back to [code]"Master"[/code].
</member>
<member name="doppler_tracking" type="int" setter="set_doppler_tracking" getter="get_doppler_tracking" enum="AudioStreamPlayer3D.DopplerTracking" default="0">
Decides in which step the [url=https://en.wikipedia.org/wiki/Doppler_effect]Doppler effect[/url] should be calculated.
[b]Note:[/b] Only effective if the current [Camera]'s [member Camera.doppler_tracking] property is set to a value other than [constant Camera.DOPPLER_TRACKING_DISABLED].
</member>
<member name="emission_angle_degrees" type="float" setter="set_emission_angle" getter="get_emission_angle" default="45.0">
The angle in which the audio reaches cameras undampened.
</member>
<member name="emission_angle_enabled" type="bool" setter="set_emission_angle_enabled" getter="is_emission_angle_enabled" default="false">
If [code]true[/code], the audio should be dampened according to the direction of the sound.
</member>
<member name="emission_angle_filter_attenuation_db" type="float" setter="set_emission_angle_filter_attenuation_db" getter="get_emission_angle_filter_attenuation_db" default="-12.0">
Dampens audio if camera is outside of [member emission_angle_degrees] and [member emission_angle_enabled] is set by this factor, in decibels.
</member>
<member name="max_db" type="float" setter="set_max_db" getter="get_max_db" default="3.0">
Sets the absolute maximum of the soundlevel, in decibels.
</member>
<member name="max_distance" type="float" setter="set_max_distance" getter="get_max_distance" default="0.0">
Sets the distance from which the [member out_of_range_mode] takes effect. Has no effect if set to 0.
</member>
<member name="out_of_range_mode" type="int" setter="set_out_of_range_mode" getter="get_out_of_range_mode" enum="AudioStreamPlayer3D.OutOfRangeMode" default="0">
Decides if audio should pause when source is outside of [member max_distance] range.
</member>
<member name="panning_strength" type="float" setter="set_panning_strength" getter="get_panning_strength" default="1.0">
Scales the panning strength for this node by multiplying the base [member ProjectSettings.audio/3d_panning_strength] with this factor. Higher values will pan audio from left to right more dramatically than lower values.
</member>
<member name="pitch_scale" type="float" setter="set_pitch_scale" getter="get_pitch_scale" default="1.0">
The pitch and the tempo of the audio, as a multiplier of the audio sample's sample rate.
</member>
<member name="playing" type="bool" setter="_set_playing" getter="is_playing" default="false">
If [code]true[/code], audio is playing.
</member>
<member name="stream" type="AudioStream" setter="set_stream" getter="get_stream">
The [AudioStream] resource to be played.
</member>
<member name="stream_paused" type="bool" setter="set_stream_paused" getter="get_stream_paused" default="false">
If [code]true[/code], the playback is paused. You can resume it by setting [member stream_paused] to [code]false[/code].
</member>
<member name="unit_db" type="float" setter="set_unit_db" getter="get_unit_db" default="0.0">
The base sound level unaffected by dampening, in decibels.
</member>
<member name="unit_size" type="float" setter="set_unit_size" getter="get_unit_size" default="1.0">
The factor for the attenuation effect. Higher values make the sound audible over a larger distance.
</member>
</members>
<signals>
<signal name="finished">
<description>
Emitted when the audio stops playing.
</description>
</signal>
</signals>
<constants>
<constant name="ATTENUATION_INVERSE_DISTANCE" value="0" enum="AttenuationModel">
Linear dampening of loudness according to distance.
</constant>
<constant name="ATTENUATION_INVERSE_SQUARE_DISTANCE" value="1" enum="AttenuationModel">
Squared dampening of loudness according to distance.
</constant>
<constant name="ATTENUATION_LOGARITHMIC" value="2" enum="AttenuationModel">
Logarithmic dampening of loudness according to distance.
</constant>
<constant name="ATTENUATION_DISABLED" value="3" enum="AttenuationModel">
No dampening of loudness according to distance. The sound will still be heard positionally, unlike an [AudioStreamPlayer]. [constant ATTENUATION_DISABLED] can be combined with a [member max_distance] value greater than [code]0.0[/code] to achieve linear attenuation clamped to a sphere of a defined size.
</constant>
<constant name="OUT_OF_RANGE_MIX" value="0" enum="OutOfRangeMode">
Mix this audio in, even when it's out of range. This increases CPU usage, but keeps the sound playing at the correct position if the camera leaves and enters the [AudioStreamPlayer3D]'s [member max_distance] radius.
</constant>
<constant name="OUT_OF_RANGE_PAUSE" value="1" enum="OutOfRangeMode">
Pause this audio when it gets out of range. This decreases CPU usage, but will cause the sound to restart if the camera leaves and enters the [AudioStreamPlayer3D]'s [member max_distance] radius.
</constant>
<constant name="DOPPLER_TRACKING_DISABLED" value="0" enum="DopplerTracking">
Disables doppler tracking.
</constant>
<constant name="DOPPLER_TRACKING_IDLE_STEP" value="1" enum="DopplerTracking">
Executes doppler tracking in idle step (every rendered frame).
</constant>
<constant name="DOPPLER_TRACKING_PHYSICS_STEP" value="2" enum="DopplerTracking">
Executes doppler tracking in physics step (every simulated physics frame).
</constant>
</constants>
</class>

View File

@ -1,23 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioStreamRandomPitch" inherits="AudioStream" version="4.2">
<brief_description>
Plays audio with random pitch shifting.
</brief_description>
<description>
Randomly varies pitch on each start.
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
<member name="audio_stream" type="AudioStream" setter="set_audio_stream" getter="get_audio_stream">
The current [AudioStream].
</member>
<member name="random_pitch" type="float" setter="set_random_pitch" getter="get_random_pitch" default="1.1">
The intensity of random pitch variation.
</member>
</members>
<constants>
</constants>
</class>

View File

@ -1,71 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioStreamSample" inherits="AudioStream" version="4.2">
<brief_description>
Stores audio data loaded from WAV files.
</brief_description>
<description>
AudioStreamSample stores sound samples loaded from WAV files. To play the stored sound, use an [AudioStreamPlayer] (for non-positional audio) or [AudioStreamPlayer2D]/[AudioStreamPlayer3D] (for positional audio). The sound can be looped.
This class can also be used to store dynamically-generated PCM audio data. See also [AudioStreamGenerator] for procedural audio generation.
</description>
<tutorials>
</tutorials>
<methods>
<method name="save_to_wav">
<return type="int" enum="Error" />
<argument index="0" name="path" type="String" />
<description>
Saves the AudioStreamSample as a WAV file to [code]path[/code]. Samples with IMA ADPCM format can't be saved.
[b]Note:[/b] A [code].wav[/code] extension is automatically appended to [code]path[/code] if it is missing.
</description>
</method>
</methods>
<members>
<member name="data" type="PoolByteArray" setter="set_data" getter="get_data" default="PoolByteArray( )">
Contains the audio data in bytes.
[b]Note:[/b] This property expects signed PCM8 data. To convert unsigned PCM8 to signed PCM8, subtract 128 from each byte.
</member>
<member name="format" type="int" setter="set_format" getter="get_format" enum="AudioStreamSample.Format" default="0">
Audio format. See [enum Format] constants for values.
</member>
<member name="loop_begin" type="int" setter="set_loop_begin" getter="get_loop_begin" default="0">
The loop start point (in number of samples, relative to the beginning of the sample). This information will be imported automatically from the WAV file if present.
</member>
<member name="loop_end" type="int" setter="set_loop_end" getter="get_loop_end" default="0">
The loop end point (in number of samples, relative to the beginning of the sample). This information will be imported automatically from the WAV file if present.
</member>
<member name="loop_mode" type="int" setter="set_loop_mode" getter="get_loop_mode" enum="AudioStreamSample.LoopMode" default="0">
The loop mode. This information will be imported automatically from the WAV file if present. See [enum LoopMode] constants for values.
</member>
<member name="mix_rate" type="int" setter="set_mix_rate" getter="get_mix_rate" default="44100">
The sample rate for mixing this audio. Higher values require more storage space, but result in better quality.
In games, common sample rates in use are [code]11025[/code], [code]16000[/code], [code]22050[/code], [code]32000[/code], [code]44100[/code], and [code]48000[/code].
According to the [url=https://en.wikipedia.org/wiki/Nyquist%E2%80%93Shannon_sampling_theorem]Nyquist-Shannon sampling theorem[/url], there is no quality difference to human hearing when going past 40,000 Hz (since most humans can only hear up to ~20,000 Hz, often less). If you are using lower-pitched sounds such as voices, lower sample rates such as [code]32000[/code] or [code]22050[/code] may be usable with no loss in quality.
</member>
<member name="stereo" type="bool" setter="set_stereo" getter="is_stereo" default="false">
If [code]true[/code], audio is stereo.
</member>
</members>
<constants>
<constant name="FORMAT_8_BITS" value="0" enum="Format">
8-bit audio codec.
</constant>
<constant name="FORMAT_16_BITS" value="1" enum="Format">
16-bit audio codec.
</constant>
<constant name="FORMAT_IMA_ADPCM" value="2" enum="Format">
Audio is compressed using IMA ADPCM.
</constant>
<constant name="LOOP_DISABLED" value="0" enum="LoopMode">
Audio does not loop.
</constant>
<constant name="LOOP_FORWARD" value="1" enum="LoopMode">
Audio loops the data between [member loop_begin] and [member loop_end], playing forward only.
</constant>
<constant name="LOOP_PING_PONG" value="2" enum="LoopMode">
Audio loops the data between [member loop_begin] and [member loop_end], playing back and forth.
</constant>
<constant name="LOOP_BACKWARD" value="3" enum="LoopMode">
Audio loops the data between [member loop_begin] and [member loop_end], playing backward only.
</constant>
</constants>
</class>

View File

@ -1,33 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BackBufferCopy" inherits="Node2D" version="4.2">
<brief_description>
Copies a region of the screen (or the whole screen) to a buffer so it can be accessed in your shader scripts through the [code]texture(SCREEN_TEXTURE, ...)[/code] function.
</brief_description>
<description>
Node for back-buffering the currently-displayed screen. The region defined in the [BackBufferCopy] node is buffered with the content of the screen it covers, or the entire screen according to the copy mode set. Use the [code]texture(SCREEN_TEXTURE, ...)[/code] function in your shader scripts to access the buffer.
[b]Note:[/b] Since this node inherits from [Node2D] (and not [Control]), anchors and margins won't apply to child [Control]-derived nodes. This can be problematic when resizing the window. To avoid this, add [Control]-derived nodes as [i]siblings[/i] to the [BackBufferCopy] node instead of adding them as children.
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
<member name="copy_mode" type="int" setter="set_copy_mode" getter="get_copy_mode" enum="BackBufferCopy.CopyMode" default="1">
Buffer mode. See [enum CopyMode] constants.
</member>
<member name="rect" type="Rect2" setter="set_rect" getter="get_rect" default="Rect2( -100, -100, 200, 200 )">
The area covered by the [BackBufferCopy]. Only used if [member copy_mode] is [constant COPY_MODE_RECT].
</member>
</members>
<constants>
<constant name="COPY_MODE_DISABLED" value="0" enum="CopyMode">
Disables the buffering mode. This means the [BackBufferCopy] node will directly use the portion of screen it covers.
</constant>
<constant name="COPY_MODE_RECT" value="1" enum="CopyMode">
[BackBufferCopy] buffers a rectangular region.
</constant>
<constant name="COPY_MODE_VIEWPORT" value="2" enum="CopyMode">
[BackBufferCopy] buffers the entire screen.
</constant>
</constants>
</class>

View File

@ -1,129 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BaseButton" inherits="Control" version="4.2">
<brief_description>
Base class for different kinds of buttons.
</brief_description>
<description>
BaseButton is the abstract base class for buttons, so it shouldn't be used directly (it doesn't display anything). Other types of buttons inherit from it.
</description>
<tutorials>
</tutorials>
<methods>
<method name="_pressed" qualifiers="virtual">
<return type="void" />
<description>
Called when the button is pressed. If you need to know the button's pressed state (and [member toggle_mode] is active), use [method _toggled] instead.
</description>
</method>
<method name="_toggled" qualifiers="virtual">
<return type="void" />
<argument index="0" name="button_pressed" type="bool" />
<description>
Called when the button is toggled (only if [member toggle_mode] is active).
</description>
</method>
<method name="get_draw_mode" qualifiers="const">
<return type="int" enum="BaseButton.DrawMode" />
<description>
Returns the visual state used to draw the button. This is useful mainly when implementing your own draw code by either overriding _draw() or connecting to "draw" signal. The visual state of the button is defined by the [enum DrawMode] enum.
</description>
</method>
<method name="is_hovered" qualifiers="const">
<return type="bool" />
<description>
Returns [code]true[/code] if the mouse has entered the button and has not left it yet.
</description>
</method>
<method name="set_pressed_no_signal">
<return type="void" />
<argument index="0" name="pressed" type="bool" />
<description>
Changes the [member pressed] state of the button, without emitting [signal toggled]. Use when you just want to change the state of the button without sending the pressed event (e.g. when initializing scene). Only works if [member toggle_mode] is [code]true[/code].
[b]Note:[/b] This method doesn't unpress other buttons in its button [member group].
</description>
</method>
</methods>
<members>
<member name="action_mode" type="int" setter="set_action_mode" getter="get_action_mode" enum="BaseButton.ActionMode" default="1">
Determines when the button is considered clicked, one of the [enum ActionMode] constants.
</member>
<member name="button_mask" type="int" setter="set_button_mask" getter="get_button_mask" default="1">
Binary mask to choose which mouse buttons this button will respond to.
To allow both left-click and right-click, use [code]BUTTON_MASK_LEFT | BUTTON_MASK_RIGHT[/code].
</member>
<member name="disabled" type="bool" setter="set_disabled" getter="is_disabled" default="false">
If [code]true[/code], the button is in disabled state and can't be clicked or toggled.
</member>
<member name="enabled_focus_mode" type="int" setter="set_enabled_focus_mode" getter="get_enabled_focus_mode" enum="Control.FocusMode" default="2">
[i]Deprecated.[/i] This property has been deprecated due to redundancy and will be removed in Godot 4.0. This property no longer has any effect when set. Please use [member Control.focus_mode] instead.
</member>
<member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" overrides="Control" enum="Control.FocusMode" default="2" />
<member name="group" type="ButtonGroup" setter="set_button_group" getter="get_button_group">
[ButtonGroup] associated to the button.
</member>
<member name="keep_pressed_outside" type="bool" setter="set_keep_pressed_outside" getter="is_keep_pressed_outside" default="false">
If [code]true[/code], the button stays pressed when moving the cursor outside the button while pressing it.
[b]Note:[/b] This property only affects the button's visual appearance. Signals will be emitted at the same moment regardless of this property's value.
</member>
<member name="pressed" type="bool" setter="set_pressed" getter="is_pressed" default="false">
If [code]true[/code], the button's state is pressed. Means the button is pressed down or toggled (if [member toggle_mode] is active). Only works if [member toggle_mode] is [code]true[/code].
[b]Note:[/b] Setting [member pressed] will result in [signal toggled] to be emitted. If you want to change the pressed state without emitting that signal, use [method set_pressed_no_signal].
</member>
<member name="shortcut" type="ShortCut" setter="set_shortcut" getter="get_shortcut">
[ShortCut] associated to the button.
</member>
<member name="shortcut_in_tooltip" type="bool" setter="set_shortcut_in_tooltip" getter="is_shortcut_in_tooltip_enabled" default="true">
If [code]true[/code], the button will add information about its shortcut in the tooltip.
</member>
<member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode" default="false">
If [code]true[/code], the button is in toggle mode. Makes the button flip state between pressed and unpressed each time its area is clicked.
</member>
</members>
<signals>
<signal name="button_down">
<description>
Emitted when the button starts being held down.
</description>
</signal>
<signal name="button_up">
<description>
Emitted when the button stops being held down.
</description>
</signal>
<signal name="pressed">
<description>
Emitted when the button is toggled or pressed. This is on [signal button_down] if [member action_mode] is [constant ACTION_MODE_BUTTON_PRESS] and on [signal button_up] otherwise.
If you need to know the button's pressed state (and [member toggle_mode] is active), use [signal toggled] instead.
</description>
</signal>
<signal name="toggled">
<argument index="0" name="button_pressed" type="bool" />
<description>
Emitted when the button was just toggled between pressed and normal states (only if [member toggle_mode] is active). The new state is contained in the [code]button_pressed[/code] argument.
</description>
</signal>
</signals>
<constants>
<constant name="DRAW_NORMAL" value="0" enum="DrawMode">
The normal state (i.e. not pressed, not hovered, not toggled and enabled) of buttons.
</constant>
<constant name="DRAW_PRESSED" value="1" enum="DrawMode">
The state of buttons are pressed.
</constant>
<constant name="DRAW_HOVER" value="2" enum="DrawMode">
The state of buttons are hovered.
</constant>
<constant name="DRAW_DISABLED" value="3" enum="DrawMode">
The state of buttons are disabled.
</constant>
<constant name="DRAW_HOVER_PRESSED" value="4" enum="DrawMode">
The state of buttons are both hovered and pressed.
</constant>
<constant name="ACTION_MODE_BUTTON_PRESS" value="0" enum="ActionMode">
Require just a press to consider the button clicked.
</constant>
<constant name="ACTION_MODE_BUTTON_RELEASE" value="1" enum="ActionMode">
Require a press and a subsequent release before considering the button clicked.
</constant>
</constants>
</class>

View File

@ -1,507 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Basis" version="4.2">
<brief_description>
3×3 matrix datatype.
</brief_description>
<description>
3×3 matrix used for 3D rotation and scale. Almost always used as an orthogonal basis for a Transform.
Contains 3 vector fields X, Y and Z as its columns, which are typically interpreted as the local basis vectors of a transformation. For such use, it is composed of a scaling and a rotation matrix, in that order (M = R.S).
Can also be accessed as array of 3D vectors. These vectors are normally orthogonal to each other, but are not necessarily normalized (due to scaling).
For more information, read the "Matrices and transforms" documentation article.
</description>
<tutorials>
<link title="Math tutorial index">$DOCS_URL/tutorials/math/index.md</link>
<link title="Matrices and transforms">$DOCS_URL/tutorials/math/matrices_and_transforms.md</link>
<link title="Using 3D transforms">$DOCS_URL/tutorials/3d/using_transforms.md</link>
<link title="Matrix Transform Demo">https://godotengine.org/asset-library/asset/584</link>
<link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
<link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link>
<link title="2.5D Demo">https://godotengine.org/asset-library/asset/583</link>
</tutorials>
<methods>
<method name="Basis">
<return type="Basis" />
<argument index="0" name="from" type="Quaternion" />
<description>
Constructs a pure rotation basis matrix from the given quaternion.
</description>
</method>
<method name="Basis">
<return type="Basis" />
<argument index="0" name="from" type="Vector3" />
<description>
Constructs a pure rotation basis matrix from the given Euler angles (in the YXZ convention: when *composing*, first Y, then X, and Z last), given in the vector format as (X angle, Y angle, Z angle).
Consider using the [Quaternion] constructor instead, which uses a quaternion instead of Euler angles.
</description>
</method>
<method name="Basis">
<return type="Basis" />
<argument index="0" name="axis" type="Vector3" />
<argument index="1" name="phi" type="float" />
<description>
Constructs a pure rotation basis matrix, rotated around the given [code]axis[/code] by [code]phi[/code], in radians. The axis must be a normalized vector.
</description>
</method>
<method name="Basis">
<return type="Basis" />
<argument index="0" name="x_axis" type="Vector3" />
<argument index="1" name="y_axis" type="Vector3" />
<argument index="2" name="z_axis" type="Vector3" />
<description>
Constructs a basis matrix from 3 axis vectors (matrix columns).
</description>
</method>
<method name="determinant">
<return type="float" />
<description>
Returns the determinant of the basis matrix. If the basis is uniformly scaled, its determinant is the square of the scale.
A negative determinant means the basis has a negative scale. A zero determinant means the basis isn't invertible, and is usually considered invalid.
</description>
</method>
<method name="diagonalize">
<return type="Basis" />
<description>
</description>
</method>
<method name="from_z">
<argument index="0" name="z" type="Vector3" />
<description>
</description>
</method>
<method name="get_axis">
<return type="Vector3" />
<argument index="0" name="i" type="int" />
<description>
</description>
</method>
<method name="get_column">
<return type="Vector3" />
<argument index="0" name="i" type="int" />
<description>
</description>
</method>
<method name="get_euler">
<return type="Vector3" />
<description>
Returns the basis's rotation in the form of Euler angles (in the YXZ convention: when decomposing, first Z, then X, and Y last). The returned vector contains the rotation angles in the format (X angle, Y angle, Z angle).
Consider using the [method get_rotation_quaternion] method instead, which returns a [Quaternion] quaternion instead of Euler angles.
</description>
</method>
<method name="get_euler_xyz">
<return type="Vector3" />
<description>
</description>
</method>
<method name="get_euler_xzy">
<return type="Vector3" />
<description>
</description>
</method>
<method name="get_euler_yxz">
<return type="Vector3" />
<description>
</description>
</method>
<method name="get_euler_zxy">
<return type="Vector3" />
<description>
</description>
</method>
<method name="get_euler_zyx">
<return type="Vector3" />
<description>
</description>
</method>
<method name="get_main_diagonal">
<return type="Vector3" />
<description>
</description>
</method>
<method name="get_orthogonal_index">
<return type="int" />
<description>
This function considers a discretization of rotations into 24 points on unit sphere, lying along the vectors (x,y,z) with each component being either -1, 0, or 1, and returns the index of the point best representing the orientation of the object. It is mainly used by the [GridMap] editor. For further details, refer to the Godot source code.
</description>
</method>
<method name="get_quaternion">
<return type="Quaternion" />
<description>
</description>
</method>
<method name="get_rotation">
<return type="Vector3" />
<description>
</description>
</method>
<method name="get_rotation_euler">
<return type="Vector3" />
<description>
</description>
</method>
<method name="get_rotation_quaternion">
<return type="Quaternion" />
<description>
Returns the basis's rotation in the form of a quaternion. See [method get_euler] if you need Euler angles, but keep in mind quaternions should generally be preferred to Euler angles.
</description>
</method>
<method name="get_row">
<return type="Vector3" />
<argument index="0" name="i" type="int" />
<description>
</description>
</method>
<method name="get_scale">
<return type="Vector3" />
<description>
Assuming that the matrix is the combination of a rotation and scaling, return the absolute value of scaling factors along each axis.
</description>
</method>
<method name="get_scale_abs">
<return type="Vector3" />
<description>
</description>
</method>
<method name="get_scale_local">
<return type="Vector3" />
<description>
</description>
</method>
<method name="get_uniform_scale">
<return type="float" />
<description>
</description>
</method>
<method name="inverse">
<return type="Basis" />
<description>
Returns the inverse of the matrix.
</description>
</method>
<method name="invert">
<description>
</description>
</method>
<method name="is_diagonal">
<return type="bool" />
<description>
</description>
</method>
<method name="is_equal_approx">
<return type="bool" />
<argument index="0" name="b" type="Basis" />
<description>
</description>
</method>
<method name="is_equal_approx_ratio">
<return type="bool" />
<argument index="0" name="b" type="Basis" />
<argument index="1" name="epsilon" type="float" default="1e-05" />
<description>
</description>
</method>
<method name="is_orthogonal">
<return type="bool" />
<description>
</description>
</method>
<method name="is_rotation">
<return type="bool" />
<description>
</description>
</method>
<method name="is_symmetric">
<return type="bool" />
<description>
</description>
</method>
<method name="lerp">
<return type="Basis" />
<argument index="0" name="to" type="Basis" />
<argument index="1" name="weight" type="float" />
<description>
</description>
</method>
<method name="make_scale_uniform">
<description>
</description>
</method>
<method name="orthogonalize">
<description>
</description>
</method>
<method name="orthogonalized">
<return type="Basis" />
<description>
</description>
</method>
<method name="orthonormalize">
<description>
</description>
</method>
<method name="orthonormalized">
<return type="Basis" />
<description>
Returns the orthonormalized version of the matrix (useful to call from time to time to avoid rounding error for orthogonal matrices). This performs a Gram-Schmidt orthonormalization on the basis of the matrix.
</description>
</method>
<method name="rotate">
<argument index="0" name="axis" type="Vector3" />
<argument index="1" name="phi" type="float" />
<description>
</description>
</method>
<method name="rotate_local">
<return type="Basis" />
<argument index="0" name="axis" type="Vector3" />
<argument index="1" name="phi" type="float" />
<description>
</description>
</method>
<method name="rotate_to_align">
<argument index="0" name="direction" type="Vector3" />
<argument index="1" name="end_direction" type="Vector3" />
<description>
</description>
</method>
<method name="rotated">
<return type="Basis" />
<argument index="0" name="axis" type="Vector3" />
<argument index="1" name="phi" type="float" />
<description>
Introduce an additional rotation around the given axis by phi (radians). The axis must be a normalized vector.
</description>
</method>
<method name="rotatedq">
<return type="Basis" />
<argument index="0" name="quat" type="Quaternion" />
<description>
</description>
</method>
<method name="rotatedv">
<return type="Basis" />
<argument index="0" name="euler" type="Vector3" />
<description>
</description>
</method>
<method name="rotateq">
<argument index="0" name="quat" type="Quaternion" />
<description>
</description>
</method>
<method name="rotatev">
<argument index="0" name="euler" type="Vector3" />
<description>
</description>
</method>
<method name="scale">
<argument index="0" name="scale" type="Vector3" />
<description>
</description>
</method>
<method name="scale_local">
<argument index="0" name="scale" type="Vector3" />
<description>
</description>
</method>
<method name="scale_orthogonal">
<argument index="0" name="scale" type="Vector3" />
<description>
</description>
</method>
<method name="scaled">
<return type="Basis" />
<argument index="0" name="scale" type="Vector3" />
<description>
Introduce an additional scaling specified by the given 3D scaling factor.
</description>
</method>
<method name="scaled_local">
<return type="Basis" />
<argument index="0" name="scale" type="Vector3" />
<description>
</description>
</method>
<method name="scaled_orthogonal">
<return type="Basis" />
<argument index="0" name="scale" type="Vector3" />
<description>
</description>
</method>
<method name="set_axis">
<argument index="0" name="i" type="int" />
<argument index="1" name="axis" type="Vector3" />
<description>
</description>
</method>
<method name="set_axis_angle_scale">
<argument index="0" name="axis" type="Vector3" />
<argument index="1" name="phi" type="float" />
<argument index="2" name="scale" type="Vector3" />
<description>
</description>
</method>
<method name="set_column">
<argument index="0" name="index" type="int" />
<argument index="1" name="value" type="Vector3" />
<description>
</description>
</method>
<method name="set_columns">
<argument index="0" name="x" type="Vector3" />
<argument index="1" name="y" type="Vector3" />
<argument index="2" name="z" type="Vector3" />
<description>
</description>
</method>
<method name="set_diagonal">
<argument index="0" name="diag" type="Vector3" />
<description>
</description>
</method>
<method name="set_euler">
<argument index="0" name="euler" type="Vector3" />
<description>
</description>
</method>
<method name="set_euler_scale">
<argument index="0" name="euler" type="Vector3" />
<argument index="1" name="scale" type="Vector3" />
<description>
</description>
</method>
<method name="set_euler_xyz">
<argument index="0" name="euler" type="Vector3" />
<description>
</description>
</method>
<method name="set_euler_xzy">
<argument index="0" name="euler" type="Vector3" />
<description>
</description>
</method>
<method name="set_euler_yxz">
<argument index="0" name="euler" type="Vector3" />
<description>
</description>
</method>
<method name="set_euler_zxy">
<argument index="0" name="euler" type="Vector3" />
<description>
</description>
</method>
<method name="set_euler_zyx">
<argument index="0" name="euler" type="Vector3" />
<description>
</description>
</method>
<method name="set_orthogonal_index">
<argument index="0" name="index" type="int" />
<description>
</description>
</method>
<method name="set_quaternion">
<argument index="0" name="quaternion" type="Quaternion" />
<description>
</description>
</method>
<method name="set_quaternion_scale">
<argument index="0" name="quat" type="Quaternion" />
<argument index="1" name="scale" type="Vector3" />
<description>
</description>
</method>
<method name="set_row">
<argument index="0" name="i" type="int" />
<argument index="1" name="axis" type="Vector3" />
<description>
</description>
</method>
<method name="set_zero">
<description>
</description>
</method>
<method name="slerp">
<return type="Basis" />
<argument index="0" name="to" type="Basis" />
<argument index="1" name="weight" type="float" />
<description>
Assuming that the matrix is a proper rotation matrix, slerp performs a spherical-linear interpolation with another rotation matrix.
</description>
</method>
<method name="tdotx">
<return type="float" />
<argument index="0" name="with" type="Vector3" />
<description>
Transposed dot product with the X axis of the matrix.
</description>
</method>
<method name="tdoty">
<return type="float" />
<argument index="0" name="with" type="Vector3" />
<description>
Transposed dot product with the Y axis of the matrix.
</description>
</method>
<method name="tdotz">
<return type="float" />
<argument index="0" name="with" type="Vector3" />
<description>
Transposed dot product with the Z axis of the matrix.
</description>
</method>
<method name="transpose">
<description>
</description>
</method>
<method name="transpose_xform">
<return type="Basis" />
<argument index="0" name="m" type="Basis" />
<description>
</description>
</method>
<method name="transposed">
<return type="Basis" />
<description>
Returns the transposed version of the matrix.
</description>
</method>
<method name="xform">
<return type="Vector3" />
<argument index="0" name="v3_or_v3i" type="Variant" />
<description>
</description>
</method>
<method name="xform_inv">
<return type="Vector3" />
<argument index="0" name="v3_or_v3i" type="Variant" />
<description>
</description>
</method>
</methods>
<members>
<member name="x" type="Vector3" setter="" getter="" default="Vector3( 1, 0, 0 )">
The basis matrix's X vector (column 0). Equivalent to array index [code]0[/code].
</member>
<member name="y" type="Vector3" setter="" getter="" default="Vector3( 0, 1, 0 )">
The basis matrix's Y vector (column 1). Equivalent to array index [code]1[/code].
</member>
<member name="z" type="Vector3" setter="" getter="" default="Vector3( 0, 0, 1 )">
The basis matrix's Z vector (column 2). Equivalent to array index [code]2[/code].
</member>
</members>
<constants>
<constant name="IDENTITY" value="Basis( 1, 0, 0, 0, 1, 0, 0, 0, 1 )">
The identity basis, with no rotation or scaling applied.
This is identical to calling [code]Basis()[/code] without any parameters. This constant can be used to make your code clearer, and for consistency with C#.
</constant>
<constant name="FLIP_X" value="Basis( -1, 0, 0, 0, 1, 0, 0, 0, 1 )">
The basis that will flip something along the X axis when used in a transformation.
</constant>
<constant name="FLIP_Y" value="Basis( 1, 0, 0, 0, -1, 0, 0, 0, 1 )">
The basis that will flip something along the Y axis when used in a transformation.
</constant>
<constant name="FLIP_Z" value="Basis( 1, 0, 0, 0, 1, 0, 0, 0, -1 )">
The basis that will flip something along the Z axis when used in a transformation.
</constant>
</constants>
</class>

View File

@ -1,93 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BitMap" inherits="Resource" version="4.2">
<brief_description>
Boolean matrix.
</brief_description>
<description>
A two-dimensional array of boolean values, can be used to efficiently store a binary matrix (every matrix element takes only one bit) and query the values using natural cartesian coordinates.
</description>
<tutorials>
</tutorials>
<methods>
<method name="convert_to_image" qualifiers="const">
<return type="Image" />
<description>
Returns an image of the same size as the bitmap and with a [enum Image.Format] of type [code]FORMAT_L8[/code]. [code]true[/code] bits of the bitmap are being converted into white pixels, and [code]false[/code] bits into black.
</description>
</method>
<method name="create">
<return type="void" />
<argument index="0" name="size" type="Vector2" />
<description>
Creates a bitmap with the specified size, filled with [code]false[/code].
</description>
</method>
<method name="create_from_image_alpha">
<return type="void" />
<argument index="0" name="image" type="Image" />
<argument index="1" name="threshold" type="float" default="0.1" />
<description>
Creates a bitmap that matches the given image dimensions, every element of the bitmap is set to [code]false[/code] if the alpha value of the image at that position is equal to [code]threshold[/code] or less, and [code]true[/code] in other case.
</description>
</method>
<method name="get_bit" qualifiers="const">
<return type="bool" />
<argument index="0" name="position" type="Vector2" />
<description>
Returns bitmap's value at the specified position.
</description>
</method>
<method name="get_size" qualifiers="const">
<return type="Vector2" />
<description>
Returns bitmap's dimensions.
</description>
</method>
<method name="get_true_bit_count" qualifiers="const">
<return type="int" />
<description>
Returns the amount of bitmap elements that are set to [code]true[/code].
</description>
</method>
<method name="grow_mask">
<return type="void" />
<argument index="0" name="pixels" type="int" />
<argument index="1" name="rect" type="Rect2" />
<description>
Applies morphological dilation or erosion to the bitmap. If [code]pixels[/code] is positive, dilation is applied to the bitmap. If [code]pixels[/code] is negative, erosion is applied to the bitmap. [code]rect[/code] defines the area where the morphological operation is applied. Pixels located outside the [code]rect[/code] are unaffected by [method grow_mask].
</description>
</method>
<method name="opaque_to_polygons" qualifiers="const">
<return type="Array" />
<argument index="0" name="rect" type="Rect2" />
<argument index="1" name="epsilon" type="float" default="2.0" />
<description>
</description>
</method>
<method name="resize">
<return type="void" />
<argument index="0" name="new_size" type="Vector2" />
<description>
Resizes the image to [code]new_size[/code].
</description>
</method>
<method name="set_bit">
<return type="void" />
<argument index="0" name="position" type="Vector2" />
<argument index="1" name="bit" type="bool" />
<description>
Sets the bitmap's element at the specified position, to the specified value.
</description>
</method>
<method name="set_bit_rect">
<return type="void" />
<argument index="0" name="rect" type="Rect2" />
<argument index="1" name="bit" type="bool" />
<description>
Sets a rectangular portion of the bitmap to the specified value.
</description>
</method>
</methods>
<constants>
</constants>
</class>

View File

@ -1,91 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BitmapFont" inherits="Font" version="4.2">
<brief_description>
Renders text using fonts under the [url=https://www.angelcode.com/products/bmfont/]BMFont[/url] format.
Handles files with the [code].fnt[/code] extension.
</brief_description>
<description>
Renders text using [code]*.fnt[/code] fonts containing texture atlases. Supports distance fields. For using vector font files like TTF directly, see [DynamicFont].
</description>
<tutorials>
</tutorials>
<methods>
<method name="add_char">
<return type="void" />
<argument index="0" name="character" type="int" />
<argument index="1" name="texture" type="int" />
<argument index="2" name="rect" type="Rect2" />
<argument index="3" name="align" type="Vector2" default="Vector2( 0, 0 )" />
<argument index="4" name="advance" type="float" default="-1" />
<description>
Adds a character to the font, where [code]character[/code] is the Unicode value, [code]texture[/code] is the texture index, [code]rect[/code] is the region in the texture (in pixels!), [code]align[/code] is the (optional) alignment for the character and [code]advance[/code] is the (optional) advance.
</description>
</method>
<method name="add_kerning_pair">
<return type="void" />
<argument index="0" name="char_a" type="int" />
<argument index="1" name="char_b" type="int" />
<argument index="2" name="kerning" type="int" />
<description>
Adds a kerning pair to the [BitmapFont] as a difference. Kerning pairs are special cases where a typeface advance is determined by the next character.
</description>
</method>
<method name="add_texture">
<return type="void" />
<argument index="0" name="texture" type="Texture" />
<description>
Adds a texture to the [BitmapFont].
</description>
</method>
<method name="clear">
<return type="void" />
<description>
Clears all the font data and settings.
</description>
</method>
<method name="create_from_fnt">
<return type="int" enum="Error" />
<argument index="0" name="path" type="String" />
<description>
Creates a BitmapFont from the [code]*.fnt[/code] file at [code]path[/code].
</description>
</method>
<method name="get_kerning_pair" qualifiers="const">
<return type="int" />
<argument index="0" name="char_a" type="int" />
<argument index="1" name="char_b" type="int" />
<description>
Returns a kerning pair as a difference.
</description>
</method>
<method name="get_texture" qualifiers="const">
<return type="Texture" />
<argument index="0" name="idx" type="int" />
<description>
Returns the font atlas texture at index [code]idx[/code].
</description>
</method>
<method name="get_texture_count" qualifiers="const">
<return type="int" />
<description>
Returns the number of textures in the BitmapFont atlas.
</description>
</method>
</methods>
<members>
<member name="ascent" type="float" setter="set_ascent" getter="get_ascent" default="0.0">
Ascent (number of pixels above the baseline).
</member>
<member name="distance_field" type="bool" setter="set_distance_field_hint" getter="is_distance_field_hint" default="false">
If [code]true[/code], distance field hint is enabled.
</member>
<member name="fallback" type="BitmapFont" setter="set_fallback" getter="get_fallback">
The fallback font.
</member>
<member name="height" type="float" setter="set_height" getter="get_height" default="1.0">
Total font height (ascent plus descent) in pixels.
</member>
</members>
<constants>
</constants>
</class>

View File

@ -1,38 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BoxContainer" inherits="Container" version="4.2">
<brief_description>
Base class for box containers.
</brief_description>
<description>
Arranges child controls vertically or horizontally, and rearranges the controls automatically when their minimum size changes.
</description>
<tutorials>
<link title="GUI containers">$DOCS_URL/tutorials/ui/gui_containers.md</link>
</tutorials>
<methods>
<method name="add_spacer">
<return type="void" />
<argument index="0" name="begin" type="bool" />
<description>
Adds a control to the box as a spacer. If [code]true[/code], [code]begin[/code] will insert the spacer control in front of other children.
</description>
</method>
</methods>
<members>
<member name="alignment" type="int" setter="set_alignment" getter="get_alignment" enum="BoxContainer.AlignMode" default="0">
The alignment of the container's children (must be one of [constant ALIGN_BEGIN], [constant ALIGN_CENTER] or [constant ALIGN_END]).
</member>
<member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" overrides="Control" enum="Control.MouseFilter" default="1" />
</members>
<constants>
<constant name="ALIGN_BEGIN" value="0" enum="AlignMode">
Aligns children with the beginning of the container.
</constant>
<constant name="ALIGN_CENTER" value="1" enum="AlignMode">
Aligns children with the center of the container.
</constant>
<constant name="ALIGN_END" value="2" enum="AlignMode">
Aligns children with the end of the container.
</constant>
</constants>
</class>

View File

@ -1,23 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BoxShape" inherits="Shape" version="4.2">
<brief_description>
Box shape resource.
</brief_description>
<description>
3D box shape that can be a child of a [PhysicsBody] or [Area].
</description>
<tutorials>
<link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link>
<link title="3D Kinematic Character Demo">https://godotengine.org/asset-library/asset/126</link>
<link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
</tutorials>
<methods>
</methods>
<members>
<member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3( 1, 1, 1 )">
The box's half extents. The width, height and depth of this shape is twice the half extents.
</member>
</members>
<constants>
</constants>
</class>

View File

@ -1,123 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Button" inherits="BaseButton" version="4.2">
<brief_description>
Standard themed Button.
</brief_description>
<description>
Button is the standard themed button. It can contain text and an icon, and will display them according to the current [Theme].
[b]Example of creating a button and assigning an action when pressed by code:[/b]
[codeblock]
func _ready():
var button = Button.new()
button.text = "Click me"
button.connect("pressed", self, "_button_pressed")
add_child(button)
func _button_pressed():
print("Hello world!")
[/codeblock]
Buttons (like all Control nodes) can also be created in the editor, but some situations may require creating them from code.
See also [BaseButton] which contains common properties and methods associated with this node.
[b]Note:[/b] Buttons do not interpret touch input and therefore don't support multitouch, since mouse emulation can only press one button at a given time. Use [TouchScreenButton] for buttons that trigger gameplay movement or actions, as [TouchScreenButton] supports multitouch.
</description>
<tutorials>
<link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link>
<link title="OS Test Demo">https://godotengine.org/asset-library/asset/677</link>
</tutorials>
<methods>
</methods>
<members>
<member name="align" type="int" setter="set_text_align" getter="get_text_align" enum="Button.TextAlign" default="1">
Text alignment policy for the button's text, use one of the [enum TextAlign] constants.
</member>
<member name="clip_text" type="bool" setter="set_clip_text" getter="get_clip_text" default="false">
When this property is enabled, text that is too large to fit the button is clipped, when disabled the Button will always be wide enough to hold the text.
</member>
<member name="expand_icon" type="bool" setter="set_expand_icon" getter="is_expand_icon" default="false">
When enabled, the button's icon will expand/shrink to fit the button's size while keeping its aspect.
</member>
<member name="flat" type="bool" setter="set_flat" getter="is_flat" default="false">
Flat buttons don't display decoration.
</member>
<member name="icon" type="Texture" setter="set_button_icon" getter="get_button_icon">
Button's icon, if text is present the icon will be placed before the text.
To edit margin and spacing of the icon, use [code]hseparation[/code] theme property of [Button] and [code]content_margin_*[/code] properties of the used [StyleBox]es.
</member>
<member name="icon_align" type="int" setter="set_icon_align" getter="get_icon_align" enum="Button.TextAlign" default="0">
Specifies if the icon should be aligned to the left, right, or center of a button. Uses the same [enum TextAlign] constants as the text alignment. If centered, text will draw on top of the icon.
</member>
<member name="text" type="String" setter="set_text" getter="get_text" default="&quot;&quot;">
The button's text that will be displayed inside the button's area.
</member>
</members>
<constants>
<constant name="ALIGN_LEFT" value="0" enum="TextAlign">
Align the text to the left.
</constant>
<constant name="ALIGN_CENTER" value="1" enum="TextAlign">
Align the text to the center.
</constant>
<constant name="ALIGN_RIGHT" value="2" enum="TextAlign">
Align the text to the right.
</constant>
</constants>
<theme_items>
<theme_item name="font_color" data_type="color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
Default text [Color] of the [Button].
</theme_item>
<theme_item name="font_color_disabled" data_type="color" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )">
Text [Color] used when the [Button] is disabled.
</theme_item>
<theme_item name="font_color_focus" data_type="color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
Text [Color] used when the [Button] is focused. Only replaces the normal text color of the button. Disabled, hovered, and pressed states take precedence over this color.
</theme_item>
<theme_item name="font_color_hover" data_type="color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
Text [Color] used when the [Button] is being hovered.
</theme_item>
<theme_item name="font_color_hover_pressed" data_type="color" type="Color" default="Color( 1, 1, 1, 1 )">
Text [Color] used when the [Button] is being hovered and pressed.
</theme_item>
<theme_item name="font_color_pressed" data_type="color" type="Color" default="Color( 1, 1, 1, 1 )">
Text [Color] used when the [Button] is being pressed.
</theme_item>
<theme_item name="icon_color_disabled" data_type="color" type="Color" default="Color( 1, 1, 1, 0.4 )">
Icon modulate [Color] used when the [Button] is disabled.
</theme_item>
<theme_item name="icon_color_focus" data_type="color" type="Color" default="Color( 1, 1, 1, 1 )">
Icon modulate [Color] used when the [Button] is focused. Only replaces the normal modulate color of the button. Disabled, hovered, and pressed states take precedence over this color.
</theme_item>
<theme_item name="icon_color_hover" data_type="color" type="Color" default="Color( 1, 1, 1, 1 )">
Icon modulate [Color] used when the [Button] is being hovered.
</theme_item>
<theme_item name="icon_color_hover_pressed" data_type="color" type="Color" default="Color( 1, 1, 1, 1 )">
Icon modulate [Color] used when the [Button] is being hovered and pressed.
</theme_item>
<theme_item name="icon_color_normal" data_type="color" type="Color" default="Color( 1, 1, 1, 1 )">
Default icon modulate [Color] of the [Button].
</theme_item>
<theme_item name="icon_color_pressed" data_type="color" type="Color" default="Color( 1, 1, 1, 1 )">
Icon modulate [Color] used when the [Button] is being pressed.
</theme_item>
<theme_item name="hseparation" data_type="constant" type="int" default="2">
The horizontal space between [Button]'s icon and text.
</theme_item>
<theme_item name="font" data_type="font" type="Font">
[Font] of the [Button]'s text.
</theme_item>
<theme_item name="disabled" data_type="style" type="StyleBox">
[StyleBox] used when the [Button] is disabled.
</theme_item>
<theme_item name="focus" data_type="style" type="StyleBox">
[StyleBox] used when the [Button] is focused. It is displayed over the current [StyleBox], so using [StyleBoxEmpty] will just disable the focus visual effect.
</theme_item>
<theme_item name="hover" data_type="style" type="StyleBox">
[StyleBox] used when the [Button] is being hovered.
</theme_item>
<theme_item name="normal" data_type="style" type="StyleBox">
Default [StyleBox] for the [Button].
</theme_item>
<theme_item name="pressed" data_type="style" type="StyleBox">
[StyleBox] used when the [Button] is being pressed.
</theme_item>
</theme_items>
</class>

View File

@ -1,39 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="ButtonGroup" inherits="Resource" version="4.2">
<brief_description>
Group of Buttons.
</brief_description>
<description>
Group of [Button]. All direct and indirect children buttons become radios. Only one allows being pressed.
[member BaseButton.toggle_mode] should be [code]true[/code].
</description>
<tutorials>
</tutorials>
<methods>
<method name="get_buttons">
<return type="Array" />
<description>
Returns an [Array] of [Button]s who have this as their [ButtonGroup] (see [member BaseButton.group]).
</description>
</method>
<method name="get_pressed_button">
<return type="BaseButton" />
<description>
Returns the current pressed button.
</description>
</method>
</methods>
<members>
<member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" overrides="Resource" default="true" />
</members>
<signals>
<signal name="pressed">
<argument index="0" name="button" type="Object" />
<description>
Emitted when one of the buttons of the group is pressed.
</description>
</signal>
</signals>
<constants>
</constants>
</class>

View File

@ -1,32 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="CBoxContainer" inherits="BoxContainer" version="4.2">
<brief_description>
Horizontal or vertical box container.
</brief_description>
<description>
Horizontal or vertical box container depending on it's [member mode] setting. See [BoxContainer].
</description>
<tutorials>
<link title="GUI containers">$DOCS_URL/tutorials/ui/gui_containers.md</link>
</tutorials>
<methods>
</methods>
<members>
<member name="mode" type="int" setter="set_mode" getter="get_mode" enum="CBoxContainer.ContainerMode" default="0">
Sets whether this [CBoxContainer] will act as a [HBoxContainer] or a [VBoxContainer].
</member>
</members>
<constants>
<constant name="CONTAINER_MODE_HORIZONTAL" value="0" enum="ContainerMode">
This [CBoxContainer] will act as a [HBoxContainer].
</constant>
<constant name="CONTAINER_MODE_VERTICAL" value="1" enum="ContainerMode">
This [CBoxContainer] will act as a [VBoxContainer].
</constant>
</constants>
<theme_items>
<theme_item name="separation" data_type="constant" type="int" default="4">
The horizontal or vertical space between the [CBoxContainer]'s elements.
</theme_item>
</theme_items>
</class>

View File

@ -1,379 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="CPUParticles" inherits="GeometryInstance" version="4.2">
<brief_description>
CPU-based 3D particle emitter.
</brief_description>
<description>
CPU-based 3D particle node used to create a variety of particle systems and effects.
See also [Particles], which provides the same functionality with hardware acceleration, but may not run on older devices.
[b]Note:[/b] Unlike [Particles], the visibility rect is generated on-the-fly and doesn't need to be configured by the user.
</description>
<tutorials>
</tutorials>
<methods>
<method name="get_param" qualifiers="const">
<return type="float" />
<argument index="0" name="param" type="int" enum="CPUParticles.Parameter" />
<description>
Returns the base value of the parameter specified by [enum Parameter].
</description>
</method>
<method name="get_param_curve" qualifiers="const">
<return type="Curve" />
<argument index="0" name="param" type="int" enum="CPUParticles.Parameter" />
<description>
Returns the [Curve] of the parameter specified by [enum Parameter].
</description>
</method>
<method name="get_param_randomness" qualifiers="const">
<return type="float" />
<argument index="0" name="param" type="int" enum="CPUParticles.Parameter" />
<description>
Returns the randomness factor of the parameter specified by [enum Parameter].
</description>
</method>
<method name="get_particle_flag" qualifiers="const">
<return type="bool" />
<argument index="0" name="flag" type="int" enum="CPUParticles.Flags" />
<description>
Returns the enabled state of the given flag (see [enum Flags] for options).
</description>
</method>
<method name="restart">
<return type="void" />
<description>
Restarts the particle emitter.
</description>
</method>
<method name="set_param">
<return type="void" />
<argument index="0" name="param" type="int" enum="CPUParticles.Parameter" />
<argument index="1" name="value" type="float" />
<description>
Sets the base value of the parameter specified by [enum Parameter].
</description>
</method>
<method name="set_param_curve">
<return type="void" />
<argument index="0" name="param" type="int" enum="CPUParticles.Parameter" />
<argument index="1" name="curve" type="Curve" />
<description>
Sets the [Curve] of the parameter specified by [enum Parameter].
</description>
</method>
<method name="set_param_randomness">
<return type="void" />
<argument index="0" name="param" type="int" enum="CPUParticles.Parameter" />
<argument index="1" name="randomness" type="float" />
<description>
Sets the randomness factor of the parameter specified by [enum Parameter].
</description>
</method>
<method name="set_particle_flag">
<return type="void" />
<argument index="0" name="flag" type="int" enum="CPUParticles.Flags" />
<argument index="1" name="enable" type="bool" />
<description>
Enables or disables the given flag (see [enum Flags] for options).
</description>
</method>
</methods>
<members>
<member name="amount" type="int" setter="set_amount" getter="get_amount" default="8">
The number of particles emitted in one emission cycle (corresponding to the [member lifetime]).
[b]Note:[/b] Changing [member amount] will reset the particle emission, therefore removing all particles that were already emitted before changing [member amount].
</member>
<member name="angle" type="float" setter="set_param" getter="get_param" default="0.0">
Initial rotation applied to each particle, in degrees.
</member>
<member name="angle_curve" type="Curve" setter="set_param_curve" getter="get_param_curve">
Each particle's rotation will be animated along this [Curve].
</member>
<member name="angle_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
Rotation randomness ratio.
</member>
<member name="angular_velocity" type="float" setter="set_param" getter="get_param" default="0.0">
Initial angular velocity applied to each particle in [i]degrees[/i] per second. Sets the speed of rotation of the particle.
</member>
<member name="angular_velocity_curve" type="Curve" setter="set_param_curve" getter="get_param_curve">
Each particle's angular velocity will vary along this [Curve].
</member>
<member name="angular_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
Angular velocity randomness ratio.
</member>
<member name="anim_offset" type="float" setter="set_param" getter="get_param" default="0.0">
Particle animation offset.
</member>
<member name="anim_offset_curve" type="Curve" setter="set_param_curve" getter="get_param_curve">
Each particle's animation offset will vary along this [Curve].
</member>
<member name="anim_offset_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
Animation offset randomness ratio.
</member>
<member name="anim_speed" type="float" setter="set_param" getter="get_param" default="0.0">
Particle animation speed.
</member>
<member name="anim_speed_curve" type="Curve" setter="set_param_curve" getter="get_param_curve">
Each particle's animation speed will vary along this [Curve].
</member>
<member name="anim_speed_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
Animation speed randomness ratio.
</member>
<member name="color" type="Color" setter="set_color" getter="get_color" default="Color( 1, 1, 1, 1 )">
Each particle's initial color.
[b]Note:[/b] [member color] multiplies the particle mesh's vertex colors. To have a visible effect on a [SpatialMaterial], [member SpatialMaterial.vertex_color_use_as_albedo] [i]must[/i] be [code]true[/code]. For a [ShaderMaterial], [code]ALBEDO *= COLOR.rgb;[/code] must be inserted in the shader's [code]fragment()[/code] function. Otherwise, [member color] will have no visible effect.
</member>
<member name="color_initial_ramp" type="Gradient" setter="set_color_initial_ramp" getter="get_color_initial_ramp">
Each particle's initial color will vary along this [GradientTexture] (multiplied with [member color]).
[b]Note:[/b] [member color_initial_ramp] multiplies the particle mesh's vertex colors. To have a visible effect on a [SpatialMaterial], [member SpatialMaterial.vertex_color_use_as_albedo] [i]must[/i] be [code]true[/code]. For a [ShaderMaterial], [code]ALBEDO *= COLOR.rgb;[/code] must be inserted in the shader's [code]fragment()[/code] function. Otherwise, [member color_initial_ramp] will have no visible effect.
</member>
<member name="color_ramp" type="Gradient" setter="set_color_ramp" getter="get_color_ramp">
Each particle's color will vary along this [GradientTexture] over its lifetime (multiplied with [member color]).
[b]Note:[/b] [member color_ramp] multiplies the particle mesh's vertex colors. To have a visible effect on a [SpatialMaterial], [member SpatialMaterial.vertex_color_use_as_albedo] [i]must[/i] be [code]true[/code]. For a [ShaderMaterial], [code]ALBEDO *= COLOR.rgb;[/code] must be inserted in the shader's [code]fragment()[/code] function. Otherwise, [member color_ramp] will have no visible effect.
</member>
<member name="damping" type="float" setter="set_param" getter="get_param" default="0.0">
The rate at which particles lose velocity.
</member>
<member name="damping_curve" type="Curve" setter="set_param_curve" getter="get_param_curve">
Damping will vary along this [Curve].
</member>
<member name="damping_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
Damping randomness ratio.
</member>
<member name="direction" type="Vector3" setter="set_direction" getter="get_direction" default="Vector3( 1, 0, 0 )">
Unit vector specifying the particles' emission direction.
</member>
<member name="draw_order" type="int" setter="set_draw_order" getter="get_draw_order" enum="CPUParticles.DrawOrder" default="0">
Particle draw order. Uses [enum DrawOrder] values.
</member>
<member name="emission_box_extents" type="Vector3" setter="set_emission_box_extents" getter="get_emission_box_extents">
The rectangle's extents if [member emission_shape] is set to [constant EMISSION_SHAPE_BOX].
</member>
<member name="emission_colors" type="PoolColorArray" setter="set_emission_colors" getter="get_emission_colors">
Sets the [Color]s to modulate particles by when using [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS].
[b]Note:[/b] [member emission_colors] multiplies the particle mesh's vertex colors. To have a visible effect on a [SpatialMaterial], [member SpatialMaterial.vertex_color_use_as_albedo] [i]must[/i] be [code]true[/code]. For a [ShaderMaterial], [code]ALBEDO *= COLOR.rgb;[/code] must be inserted in the shader's [code]fragment()[/code] function. Otherwise, [member emission_colors] will have no visible effect.
</member>
<member name="emission_normals" type="PoolVector3Array" setter="set_emission_normals" getter="get_emission_normals">
Sets the direction the particles will be emitted in when using [constant EMISSION_SHAPE_DIRECTED_POINTS].
</member>
<member name="emission_points" type="PoolVector3Array" setter="set_emission_points" getter="get_emission_points">
Sets the initial positions to spawn particles when using [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS].
</member>
<member name="emission_ring_axis" type="Vector3" setter="set_emission_ring_axis" getter="get_emission_ring_axis">
The axis for the ring shaped emitter when using [constant EMISSION_SHAPE_RING].
</member>
<member name="emission_ring_height" type="float" setter="set_emission_ring_height" getter="get_emission_ring_height">
The height for the ring shaped emitter when using [constant EMISSION_SHAPE_RING].
</member>
<member name="emission_ring_inner_radius" type="float" setter="set_emission_ring_inner_radius" getter="get_emission_ring_inner_radius">
The inner radius for the ring shaped emitter when using [constant EMISSION_SHAPE_RING].
</member>
<member name="emission_ring_radius" type="float" setter="set_emission_ring_radius" getter="get_emission_ring_radius">
The radius for the ring shaped emitter when using [constant EMISSION_SHAPE_RING].
</member>
<member name="emission_shape" type="int" setter="set_emission_shape" getter="get_emission_shape" enum="CPUParticles.EmissionShape" default="0">
Particles will be emitted inside this region. See [enum EmissionShape] for possible values.
</member>
<member name="emission_sphere_radius" type="float" setter="set_emission_sphere_radius" getter="get_emission_sphere_radius">
The sphere's radius if [enum EmissionShape] is set to [constant EMISSION_SHAPE_SPHERE].
</member>
<member name="emitting" type="bool" setter="set_emitting" getter="is_emitting" default="true">
If [code]true[/code], particles are being emitted.
</member>
<member name="explosiveness" type="float" setter="set_explosiveness_ratio" getter="get_explosiveness_ratio" default="0.0">
How rapidly particles in an emission cycle are emitted. If greater than [code]0[/code], there will be a gap in emissions before the next cycle begins.
</member>
<member name="fixed_fps" type="int" setter="set_fixed_fps" getter="get_fixed_fps" default="0">
The particle system's frame rate is fixed to a value. For instance, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the particle system itself.
</member>
<member name="flag_align_y" type="bool" setter="set_particle_flag" getter="get_particle_flag" default="false">
Align Y axis of particle with the direction of its velocity.
</member>
<member name="flag_disable_z" type="bool" setter="set_particle_flag" getter="get_particle_flag" default="false">
If [code]true[/code], particles will not move on the z axis.
</member>
<member name="flag_rotate_y" type="bool" setter="set_particle_flag" getter="get_particle_flag" default="false">
If [code]true[/code], particles rotate around Y axis by [member angle].
</member>
<member name="flatness" type="float" setter="set_flatness" getter="get_flatness" default="0.0">
Amount of [member spread] in Y/Z plane. A value of [code]1[/code] restricts particles to X/Z plane.
</member>
<member name="fract_delta" type="bool" setter="set_fractional_delta" getter="get_fractional_delta" default="true">
If [code]true[/code], results in fractional delta calculation which has a smoother particles display effect.
</member>
<member name="gravity" type="Vector3" setter="set_gravity" getter="get_gravity" default="Vector3( 0, -9.8, 0 )">
Gravity applied to every particle.
</member>
<member name="hue_variation" type="float" setter="set_param" getter="get_param" default="0.0">
Initial hue variation applied to each particle.
</member>
<member name="hue_variation_curve" type="Curve" setter="set_param_curve" getter="get_param_curve">
Each particle's hue will vary along this [Curve].
</member>
<member name="hue_variation_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
Hue variation randomness ratio.
</member>
<member name="initial_velocity" type="float" setter="set_param" getter="get_param" default="0.0">
Initial velocity magnitude for each particle. Direction comes from [member spread] and the node's orientation.
</member>
<member name="initial_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
Initial velocity randomness ratio.
</member>
<member name="lifetime" type="float" setter="set_lifetime" getter="get_lifetime" default="1.0">
The amount of time each particle will exist (in seconds).
</member>
<member name="lifetime_randomness" type="float" setter="set_lifetime_randomness" getter="get_lifetime_randomness" default="0.0">
Particle lifetime randomness ratio.
</member>
<member name="linear_accel" type="float" setter="set_param" getter="get_param" default="0.0">
Linear acceleration applied to each particle in the direction of motion.
</member>
<member name="linear_accel_curve" type="Curve" setter="set_param_curve" getter="get_param_curve">
Each particle's linear acceleration will vary along this [Curve].
</member>
<member name="linear_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
Linear acceleration randomness ratio.
</member>
<member name="local_coords" type="bool" setter="set_use_local_coordinates" getter="get_use_local_coordinates" default="true">
If [code]true[/code], particles use the parent node's coordinate space. If [code]false[/code], they use global coordinates.
</member>
<member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh">
The [Mesh] used for each particle. If [code]null[/code], particles will be spheres.
</member>
<member name="one_shot" type="bool" setter="set_one_shot" getter="get_one_shot" default="false">
If [code]true[/code], only one emission cycle occurs. If set [code]true[/code] during a cycle, emission will stop at the cycle's end.
</member>
<member name="orbit_velocity" type="float" setter="set_param" getter="get_param">
Orbital velocity applied to each particle. Makes the particles circle around origin in the local XY plane. Specified in number of full rotations around origin per second.
This property is only available when [member flag_disable_z] is [code]true[/code].
</member>
<member name="orbit_velocity_curve" type="Curve" setter="set_param_curve" getter="get_param_curve">
Each particle's orbital velocity will vary along this [Curve].
</member>
<member name="orbit_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness">
Orbital velocity randomness ratio.
</member>
<member name="preprocess" type="float" setter="set_pre_process_time" getter="get_pre_process_time" default="0.0">
Particle system starts as if it had already run for this many seconds.
</member>
<member name="radial_accel" type="float" setter="set_param" getter="get_param" default="0.0">
Radial acceleration applied to each particle. Makes particle accelerate away from origin.
</member>
<member name="radial_accel_curve" type="Curve" setter="set_param_curve" getter="get_param_curve">
Each particle's radial acceleration will vary along this [Curve].
</member>
<member name="radial_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
Radial acceleration randomness ratio.
</member>
<member name="randomness" type="float" setter="set_randomness_ratio" getter="get_randomness_ratio" default="0.0">
Emission lifetime randomness ratio.
</member>
<member name="scale_amount" type="float" setter="set_param" getter="get_param" default="1.0">
Initial scale applied to each particle. This can be set to a negative value to flip the particle on all axes.
</member>
<member name="scale_amount_curve" type="Curve" setter="set_param_curve" getter="get_param_curve">
Each particle's scale will vary along this [Curve].
</member>
<member name="scale_amount_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
Scale randomness ratio.
</member>
<member name="speed_scale" type="float" setter="set_speed_scale" getter="get_speed_scale" default="1.0">
Particle system's running speed scaling ratio. A value of [code]0[/code] can be used to pause the particles.
</member>
<member name="spread" type="float" setter="set_spread" getter="get_spread" default="45.0">
Each particle's initial direction range from [code]+spread[/code] to [code]-spread[/code] degrees. Applied to X/Z plane and Y/Z planes.
</member>
<member name="tangential_accel" type="float" setter="set_param" getter="get_param" default="0.0">
Tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity giving the particles a swirling motion.
</member>
<member name="tangential_accel_curve" type="Curve" setter="set_param_curve" getter="get_param_curve">
Each particle's tangential acceleration will vary along this [Curve].
</member>
<member name="tangential_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
Tangential acceleration randomness ratio.
</member>
</members>
<constants>
<constant name="DRAW_ORDER_INDEX" value="0" enum="DrawOrder">
Particles are drawn in the order emitted.
</constant>
<constant name="DRAW_ORDER_LIFETIME" value="1" enum="DrawOrder">
Particles are drawn in order of remaining lifetime.
</constant>
<constant name="DRAW_ORDER_VIEW_DEPTH" value="2" enum="DrawOrder">
Particles are drawn in order of depth.
</constant>
<constant name="PARAM_INITIAL_LINEAR_VELOCITY" value="0" enum="Parameter">
Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set initial velocity properties.
</constant>
<constant name="PARAM_ANGULAR_VELOCITY" value="1" enum="Parameter">
Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set angular velocity properties.
</constant>
<constant name="PARAM_ORBIT_VELOCITY" value="2" enum="Parameter">
Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set orbital velocity properties.
</constant>
<constant name="PARAM_LINEAR_ACCEL" value="3" enum="Parameter">
Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set linear acceleration properties.
</constant>
<constant name="PARAM_RADIAL_ACCEL" value="4" enum="Parameter">
Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set radial acceleration properties.
</constant>
<constant name="PARAM_TANGENTIAL_ACCEL" value="5" enum="Parameter">
Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set tangential acceleration properties.
</constant>
<constant name="PARAM_DAMPING" value="6" enum="Parameter">
Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set damping properties.
</constant>
<constant name="PARAM_ANGLE" value="7" enum="Parameter">
Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set angle properties.
</constant>
<constant name="PARAM_SCALE" value="8" enum="Parameter">
Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set scale properties.
</constant>
<constant name="PARAM_HUE_VARIATION" value="9" enum="Parameter">
Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set hue variation properties.
</constant>
<constant name="PARAM_ANIM_SPEED" value="10" enum="Parameter">
Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set animation speed properties.
</constant>
<constant name="PARAM_ANIM_OFFSET" value="11" enum="Parameter">
Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set animation offset properties.
</constant>
<constant name="PARAM_MAX" value="12" enum="Parameter">
Represents the size of the [enum Parameter] enum.
</constant>
<constant name="FLAG_ALIGN_Y_TO_VELOCITY" value="0" enum="Flags">
Use with [method set_particle_flag] to set [member flag_align_y].
</constant>
<constant name="FLAG_ROTATE_Y" value="1" enum="Flags">
Use with [method set_particle_flag] to set [member flag_rotate_y].
</constant>
<constant name="FLAG_DISABLE_Z" value="2" enum="Flags">
Use with [method set_particle_flag] to set [member flag_disable_z].
</constant>
<constant name="FLAG_MAX" value="3" enum="Flags">
Represents the size of the [enum Flags] enum.
</constant>
<constant name="EMISSION_SHAPE_POINT" value="0" enum="EmissionShape">
All particles will be emitted from a single point.
</constant>
<constant name="EMISSION_SHAPE_SPHERE" value="1" enum="EmissionShape">
Particles will be emitted in the volume of a sphere.
</constant>
<constant name="EMISSION_SHAPE_BOX" value="2" enum="EmissionShape">
Particles will be emitted in the volume of a box.
</constant>
<constant name="EMISSION_SHAPE_POINTS" value="3" enum="EmissionShape">
Particles will be emitted at a position chosen randomly among [member emission_points]. Particle color will be modulated by [member emission_colors].
</constant>
<constant name="EMISSION_SHAPE_DIRECTED_POINTS" value="4" enum="EmissionShape">
Particles will be emitted at a position chosen randomly among [member emission_points]. Particle velocity and rotation will be set based on [member emission_normals]. Particle color will be modulated by [member emission_colors].
</constant>
<constant name="EMISSION_SHAPE_RING" value="5" enum="EmissionShape">
Particles will be emitted in a ring or cylinder.
</constant>
<constant name="EMISSION_SHAPE_MAX" value="6" enum="EmissionShape">
Represents the size of the [enum EmissionShape] enum.
</constant>
</constants>
</class>

View File

@ -1,353 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="CPUParticles2D" inherits="Node2D" version="4.2">
<brief_description>
CPU-based 2D particle emitter.
</brief_description>
<description>
CPU-based 2D particle node used to create a variety of particle systems and effects.
See also [Particles2D], which provides the same functionality with hardware acceleration, but may not run on older devices.
[b]Note:[/b] Unlike [Particles2D], the visibility rect is generated on-the-fly and doesn't need to be configured by the user.
</description>
<tutorials>
<link>$DOCS_URL/tutorials/2d/particle_systems_2d.md</link>
</tutorials>
<methods>
<method name="get_param" qualifiers="const">
<return type="float" />
<argument index="0" name="param" type="int" enum="CPUParticles2D.Parameter" />
<description>
Returns the base value of the parameter specified by [enum Parameter].
</description>
</method>
<method name="get_param_curve" qualifiers="const">
<return type="Curve" />
<argument index="0" name="param" type="int" enum="CPUParticles2D.Parameter" />
<description>
Returns the [Curve] of the parameter specified by [enum Parameter].
</description>
</method>
<method name="get_param_randomness" qualifiers="const">
<return type="float" />
<argument index="0" name="param" type="int" enum="CPUParticles2D.Parameter" />
<description>
Returns the randomness factor of the parameter specified by [enum Parameter].
</description>
</method>
<method name="get_particle_flag" qualifiers="const">
<return type="bool" />
<argument index="0" name="flag" type="int" enum="CPUParticles2D.Flags" />
<description>
Returns the enabled state of the given flag (see [enum Flags] for options).
</description>
</method>
<method name="restart">
<return type="void" />
<description>
Restarts the particle emitter.
</description>
</method>
<method name="set_param">
<return type="void" />
<argument index="0" name="param" type="int" enum="CPUParticles2D.Parameter" />
<argument index="1" name="value" type="float" />
<description>
Sets the base value of the parameter specified by [enum Parameter].
</description>
</method>
<method name="set_param_curve">
<return type="void" />
<argument index="0" name="param" type="int" enum="CPUParticles2D.Parameter" />
<argument index="1" name="curve" type="Curve" />
<description>
Sets the [Curve] of the parameter specified by [enum Parameter].
</description>
</method>
<method name="set_param_randomness">
<return type="void" />
<argument index="0" name="param" type="int" enum="CPUParticles2D.Parameter" />
<argument index="1" name="randomness" type="float" />
<description>
Sets the randomness factor of the parameter specified by [enum Parameter].
</description>
</method>
<method name="set_particle_flag">
<return type="void" />
<argument index="0" name="flag" type="int" enum="CPUParticles2D.Flags" />
<argument index="1" name="enable" type="bool" />
<description>
Enables or disables the given flag (see [enum Flags] for options).
</description>
</method>
</methods>
<members>
<member name="amount" type="int" setter="set_amount" getter="get_amount" default="8">
The number of particles emitted in one emission cycle (corresponding to the [member lifetime]).
[b]Note:[/b] Changing [member amount] will reset the particle emission, therefore removing all particles that were already emitted before changing [member amount].
</member>
<member name="angle" type="float" setter="set_param" getter="get_param" default="0.0">
Initial rotation applied to each particle, in degrees.
</member>
<member name="angle_curve" type="Curve" setter="set_param_curve" getter="get_param_curve">
Each particle's rotation will be animated along this [Curve].
</member>
<member name="angle_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
Rotation randomness ratio.
</member>
<member name="angular_velocity" type="float" setter="set_param" getter="get_param" default="0.0">
Initial angular velocity applied to each particle in [i]degrees[/i] per second. Sets the speed of rotation of the particle.
</member>
<member name="angular_velocity_curve" type="Curve" setter="set_param_curve" getter="get_param_curve">
Each particle's angular velocity will vary along this [Curve].
</member>
<member name="angular_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
Angular velocity randomness ratio.
</member>
<member name="anim_offset" type="float" setter="set_param" getter="get_param" default="0.0">
Particle animation offset.
</member>
<member name="anim_offset_curve" type="Curve" setter="set_param_curve" getter="get_param_curve">
Each particle's animation offset will vary along this [Curve].
</member>
<member name="anim_offset_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
Animation offset randomness ratio.
</member>
<member name="anim_speed" type="float" setter="set_param" getter="get_param" default="0.0">
Particle animation speed.
</member>
<member name="anim_speed_curve" type="Curve" setter="set_param_curve" getter="get_param_curve">
Each particle's animation speed will vary along this [Curve].
</member>
<member name="anim_speed_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
Animation speed randomness ratio.
</member>
<member name="color" type="Color" setter="set_color" getter="get_color" default="Color( 1, 1, 1, 1 )">
Each particle's initial color. If [member texture] is defined, it will be multiplied by this color.
</member>
<member name="color_initial_ramp" type="Gradient" setter="set_color_initial_ramp" getter="get_color_initial_ramp">
Each particle's initial color will vary along this [GradientTexture] (multiplied with [member color]).
</member>
<member name="color_ramp" type="Gradient" setter="set_color_ramp" getter="get_color_ramp">
Each particle's color will vary along this [Gradient] (multiplied with [member color]).
</member>
<member name="damping" type="float" setter="set_param" getter="get_param" default="0.0">
The rate at which particles lose velocity.
</member>
<member name="damping_curve" type="Curve" setter="set_param_curve" getter="get_param_curve">
Damping will vary along this [Curve].
</member>
<member name="damping_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
Damping randomness ratio.
</member>
<member name="direction" type="Vector2" setter="set_direction" getter="get_direction" default="Vector2( 1, 0 )">
Unit vector specifying the particles' emission direction.
</member>
<member name="draw_order" type="int" setter="set_draw_order" getter="get_draw_order" enum="CPUParticles2D.DrawOrder" default="0">
Particle draw order. Uses [enum DrawOrder] values.
</member>
<member name="emission_colors" type="PoolColorArray" setter="set_emission_colors" getter="get_emission_colors">
Sets the [Color]s to modulate particles by when using [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS].
</member>
<member name="emission_normals" type="PoolVector2Array" setter="set_emission_normals" getter="get_emission_normals">
Sets the direction the particles will be emitted in when using [constant EMISSION_SHAPE_DIRECTED_POINTS].
</member>
<member name="emission_points" type="PoolVector2Array" setter="set_emission_points" getter="get_emission_points">
Sets the initial positions to spawn particles when using [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS].
</member>
<member name="emission_rect_extents" type="Vector2" setter="set_emission_rect_extents" getter="get_emission_rect_extents">
The rectangle's extents if [member emission_shape] is set to [constant EMISSION_SHAPE_RECTANGLE].
</member>
<member name="emission_shape" type="int" setter="set_emission_shape" getter="get_emission_shape" enum="CPUParticles2D.EmissionShape" default="0">
Particles will be emitted inside this region. See [enum EmissionShape] for possible values.
</member>
<member name="emission_sphere_radius" type="float" setter="set_emission_sphere_radius" getter="get_emission_sphere_radius">
The sphere's radius if [member emission_shape] is set to [constant EMISSION_SHAPE_SPHERE].
</member>
<member name="emitting" type="bool" setter="set_emitting" getter="is_emitting" default="true">
If [code]true[/code], particles are being emitted.
</member>
<member name="explosiveness" type="float" setter="set_explosiveness_ratio" getter="get_explosiveness_ratio" default="0.0">
How rapidly particles in an emission cycle are emitted. If greater than [code]0[/code], there will be a gap in emissions before the next cycle begins.
</member>
<member name="fixed_fps" type="int" setter="set_fixed_fps" getter="get_fixed_fps" default="0">
The particle system's frame rate is fixed to a value. For instance, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the simulation of the particle system itself.
</member>
<member name="flag_align_y" type="bool" setter="set_particle_flag" getter="get_particle_flag" default="false">
Align Y axis of particle with the direction of its velocity.
</member>
<member name="fract_delta" type="bool" setter="set_fractional_delta" getter="get_fractional_delta" default="true">
If [code]true[/code], results in fractional delta calculation which has a smoother particles display effect.
</member>
<member name="gravity" type="Vector2" setter="set_gravity" getter="get_gravity" default="Vector2( 0, 98 )">
Gravity applied to every particle.
</member>
<member name="hue_variation" type="float" setter="set_param" getter="get_param" default="0.0">
Initial hue variation applied to each particle.
</member>
<member name="hue_variation_curve" type="Curve" setter="set_param_curve" getter="get_param_curve">
Each particle's hue will vary along this [Curve].
</member>
<member name="hue_variation_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
Hue variation randomness ratio.
</member>
<member name="initial_velocity" type="float" setter="set_param" getter="get_param" default="0.0">
Initial velocity magnitude for each particle. Direction comes from [member spread] and the node's orientation.
</member>
<member name="initial_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
Initial velocity randomness ratio.
</member>
<member name="lifetime" type="float" setter="set_lifetime" getter="get_lifetime" default="1.0">
The amount of time each particle will exist (in seconds).
</member>
<member name="lifetime_randomness" type="float" setter="set_lifetime_randomness" getter="get_lifetime_randomness" default="0.0">
Particle lifetime randomness ratio.
</member>
<member name="linear_accel" type="float" setter="set_param" getter="get_param" default="0.0">
Linear acceleration applied to each particle in the direction of motion.
</member>
<member name="linear_accel_curve" type="Curve" setter="set_param_curve" getter="get_param_curve">
Each particle's linear acceleration will vary along this [Curve].
</member>
<member name="linear_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
Linear acceleration randomness ratio.
</member>
<member name="local_coords" type="bool" setter="set_use_local_coordinates" getter="get_use_local_coordinates" default="true">
If [code]true[/code], particles use the parent node's coordinate space. If [code]false[/code], they use global coordinates.
</member>
<member name="normalmap" type="Texture" setter="set_normalmap" getter="get_normalmap">
Normal map to be used for the [member texture] property.
[b]Note:[/b] Godot expects the normal map to use X+, Y-, and Z+ coordinates. See [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] for a comparison of normal map coordinates expected by popular engines.
</member>
<member name="one_shot" type="bool" setter="set_one_shot" getter="get_one_shot" default="false">
If [code]true[/code], only one emission cycle occurs. If set [code]true[/code] during a cycle, emission will stop at the cycle's end.
</member>
<member name="orbit_velocity" type="float" setter="set_param" getter="get_param" default="0.0">
Orbital velocity applied to each particle. Makes the particles circle around origin. Specified in number of full rotations around origin per second.
</member>
<member name="orbit_velocity_curve" type="Curve" setter="set_param_curve" getter="get_param_curve">
Each particle's orbital velocity will vary along this [Curve].
</member>
<member name="orbit_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
Orbital velocity randomness ratio.
</member>
<member name="physics_interpolation_mode" type="int" setter="set_physics_interpolation_mode" getter="get_physics_interpolation_mode" overrides="Node" enum="Node.PhysicsInterpolationMode" default="1" />
<member name="preprocess" type="float" setter="set_pre_process_time" getter="get_pre_process_time" default="0.0">
Particle system starts as if it had already run for this many seconds.
</member>
<member name="radial_accel" type="float" setter="set_param" getter="get_param" default="0.0">
Radial acceleration applied to each particle. Makes particle accelerate away from origin.
</member>
<member name="radial_accel_curve" type="Curve" setter="set_param_curve" getter="get_param_curve">
Each particle's radial acceleration will vary along this [Curve].
</member>
<member name="radial_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
Radial acceleration randomness ratio.
</member>
<member name="randomness" type="float" setter="set_randomness_ratio" getter="get_randomness_ratio" default="0.0">
Emission lifetime randomness ratio.
</member>
<member name="scale_amount" type="float" setter="set_param" getter="get_param" default="1.0">
Initial scale applied to each particle. This can be set to a negative value to flip the particle on all axes.
</member>
<member name="scale_amount_curve" type="Curve" setter="set_param_curve" getter="get_param_curve">
Each particle's scale will vary along this [Curve].
</member>
<member name="scale_amount_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
Scale randomness ratio.
</member>
<member name="speed_scale" type="float" setter="set_speed_scale" getter="get_speed_scale" default="1.0">
Particle system's running speed scaling ratio. A value of [code]0[/code] can be used to pause the particles.
</member>
<member name="spread" type="float" setter="set_spread" getter="get_spread" default="45.0">
Each particle's initial direction range from [code]+spread[/code] to [code]-spread[/code] degrees.
</member>
<member name="tangential_accel" type="float" setter="set_param" getter="get_param" default="0.0">
Tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity giving the particles a swirling motion.
</member>
<member name="tangential_accel_curve" type="Curve" setter="set_param_curve" getter="get_param_curve">
Each particle's tangential acceleration will vary along this [Curve].
</member>
<member name="tangential_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
Tangential acceleration randomness ratio.
</member>
<member name="texture" type="Texture" setter="set_texture" getter="get_texture">
Particle texture. If [code]null[/code], particles will be squares.
</member>
</members>
<constants>
<constant name="DRAW_ORDER_INDEX" value="0" enum="DrawOrder">
Particles are drawn in the order emitted.
</constant>
<constant name="DRAW_ORDER_LIFETIME" value="1" enum="DrawOrder">
Particles are drawn in order of remaining lifetime.
</constant>
<constant name="PARAM_INITIAL_LINEAR_VELOCITY" value="0" enum="Parameter">
Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set initial velocity properties.
</constant>
<constant name="PARAM_ANGULAR_VELOCITY" value="1" enum="Parameter">
Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set angular velocity properties.
</constant>
<constant name="PARAM_ORBIT_VELOCITY" value="2" enum="Parameter">
Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set orbital velocity properties.
</constant>
<constant name="PARAM_LINEAR_ACCEL" value="3" enum="Parameter">
Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set linear acceleration properties.
</constant>
<constant name="PARAM_RADIAL_ACCEL" value="4" enum="Parameter">
Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set radial acceleration properties.
</constant>
<constant name="PARAM_TANGENTIAL_ACCEL" value="5" enum="Parameter">
Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set tangential acceleration properties.
</constant>
<constant name="PARAM_DAMPING" value="6" enum="Parameter">
Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set damping properties.
</constant>
<constant name="PARAM_ANGLE" value="7" enum="Parameter">
Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set angle properties.
</constant>
<constant name="PARAM_SCALE" value="8" enum="Parameter">
Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set scale properties.
</constant>
<constant name="PARAM_HUE_VARIATION" value="9" enum="Parameter">
Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set hue variation properties.
</constant>
<constant name="PARAM_ANIM_SPEED" value="10" enum="Parameter">
Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set animation speed properties.
</constant>
<constant name="PARAM_ANIM_OFFSET" value="11" enum="Parameter">
Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set animation offset properties.
</constant>
<constant name="PARAM_MAX" value="12" enum="Parameter">
Represents the size of the [enum Parameter] enum.
</constant>
<constant name="FLAG_ALIGN_Y_TO_VELOCITY" value="0" enum="Flags">
Use with [method set_particle_flag] to set [member flag_align_y].
</constant>
<constant name="FLAG_ROTATE_Y" value="1" enum="Flags">
Present for consistency with 3D particle nodes, not used in 2D.
</constant>
<constant name="FLAG_DISABLE_Z" value="2" enum="Flags">
Present for consistency with 3D particle nodes, not used in 2D.
</constant>
<constant name="FLAG_MAX" value="3" enum="Flags">
Represents the size of the [enum Flags] enum.
</constant>
<constant name="EMISSION_SHAPE_POINT" value="0" enum="EmissionShape">
All particles will be emitted from a single point.
</constant>
<constant name="EMISSION_SHAPE_SPHERE" value="1" enum="EmissionShape">
Particles will be emitted on the surface of a sphere flattened to two dimensions.
</constant>
<constant name="EMISSION_SHAPE_RECTANGLE" value="2" enum="EmissionShape">
Particles will be emitted in the area of a rectangle.
</constant>
<constant name="EMISSION_SHAPE_POINTS" value="3" enum="EmissionShape">
Particles will be emitted at a position chosen randomly among [member emission_points]. Particle color will be modulated by [member emission_colors].
</constant>
<constant name="EMISSION_SHAPE_DIRECTED_POINTS" value="4" enum="EmissionShape">
Particles will be emitted at a position chosen randomly among [member emission_points]. Particle velocity and rotation will be set based on [member emission_normals]. Particle color will be modulated by [member emission_colors].
</constant>
<constant name="EMISSION_SHAPE_MAX" value="5" enum="EmissionShape">
Represents the size of the [enum EmissionShape] enum.
</constant>
</constants>
</class>

View File

@ -1,44 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="CSplitContainer" inherits="SplitContainer" version="4.2">
<brief_description>
Horizontal or vertical split container.
</brief_description>
<description>
Horizontal or vertical split container depending on it's [member mode] setting. See [SplitContainer].
</description>
<tutorials>
<link title="GUI containers">$DOCS_URL/tutorials/ui/gui_containers.md</link>
</tutorials>
<methods>
</methods>
<members>
<member name="mode" type="int" setter="set_mode" getter="get_mode" enum="CSplitContainer.ContainerMode" default="0">
Sets whether this [CSplitContainer] will act as a [HSplitContainer] or a [VSplitContainer].
</member>
</members>
<constants>
<constant name="CONTAINER_MODE_HORIZONTAL" value="0" enum="ContainerMode">
This [CSplitContainer] will act as a [HSplitContainer].
</constant>
<constant name="CONTAINER_MODE_VERTICAL" value="1" enum="ContainerMode">
This [CSplitContainer] will act as a [VSplitContainer].
</constant>
</constants>
<theme_items>
<theme_item name="autohide" data_type="constant" type="int" default="1">
Boolean value. If 1 ([code]true[/code]), the grabber will hide automatically when it isn't under the cursor. If 0 ([code]false[/code]), it's always visible.
</theme_item>
<theme_item name="separation" data_type="constant" type="int" default="12">
The horizontal or vertical space between the [CSplitContainer]'s elements.
</theme_item>
<theme_item name="hgrabber" data_type="icon" type="Texture">
The icon used for the horizontal grabber drawn in the middle area.
</theme_item>
<theme_item name="vgrabber" data_type="icon" type="Texture">
The icon used for the vertical grabber drawn in the middle area.
</theme_item>
<theme_item name="bg" data_type="style" type="StyleBox">
The background drawn under this control.
</theme_item>
</theme_items>
</class>

View File

@ -1,27 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="CallbackTweener" inherits="Tweener" version="4.2">
<brief_description>
Calls the specified method after optional delay.
</brief_description>
<description>
[CallbackTweener] is used to call a method in a tweening sequence. See [method SceneTreeTween.tween_callback] for more usage information.
[b]Note:[/b] [method SceneTreeTween.tween_callback] is the only correct way to create [CallbackTweener]. Any [CallbackTweener] created manually will not function correctly.
</description>
<tutorials>
</tutorials>
<methods>
<method name="set_delay">
<return type="CallbackTweener" />
<argument index="0" name="delay" type="float" />
<description>
Makes the callback call delayed by given time in seconds. Example:
[codeblock]
var tween = get_tree().create_tween()
tween.tween_callback(queue_free).set_delay(2) #this will call queue_free() after 2 seconds
[/codeblock]
</description>
</method>
</methods>
<constants>
</constants>
</class>

View File

@ -1,213 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Camera" inherits="Spatial" version="4.2">
<brief_description>
Camera node, displays from a point of view.
</brief_description>
<description>
Camera is a special node that displays what is visible from its current location. Cameras register themselves in the nearest [Viewport] node (when ascending the tree). Only one camera can be active per viewport. If no viewport is available ascending the tree, the camera will register in the global viewport. In other words, a camera just provides 3D display capabilities to a [Viewport], and, without one, a scene registered in that [Viewport] (or higher viewports) can't be displayed.
</description>
<tutorials>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
<method name="clear_current">
<return type="void" />
<argument index="0" name="enable_next" type="bool" default="true" />
<description>
If this is the current camera, remove it from being current. If [code]enable_next[/code] is [code]true[/code], request to make the next camera current, if any.
</description>
</method>
<method name="get_camera_rid" qualifiers="const">
<return type="RID" />
<description>
Returns the camera's RID from the [RenderingServer].
</description>
</method>
<method name="get_camera_transform" qualifiers="const">
<return type="Transform" />
<description>
Returns the transform of the camera plus the vertical ([member v_offset]) and horizontal ([member h_offset]) offsets; and any other adjustments made to the position and orientation of the camera by subclassed cameras such as [ClippedCamera], [InterpolatedCamera] and [ARVRCamera].
</description>
</method>
<method name="get_cull_mask_bit" qualifiers="const">
<return type="bool" />
<argument index="0" name="layer" type="int" />
<description>
Returns [code]true[/code] if the given [code]layer[/code] in the [member cull_mask] is enabled, [code]false[/code] otherwise.
</description>
</method>
<method name="get_frustum" qualifiers="const">
<return type="Array" />
<description>
Returns the camera's frustum planes in world space units as an array of [Plane]s in the following order: near, far, left, top, right, bottom. Not to be confused with [member frustum_offset].
</description>
</method>
<method name="is_position_behind" qualifiers="const">
<return type="bool" />
<argument index="0" name="world_point" type="Vector3" />
<description>
Returns [code]true[/code] if the given position is behind the camera.
[b]Note:[/b] A position which returns [code]false[/code] may still be outside the camera's field of view.
</description>
</method>
<method name="make_current">
<return type="void" />
<description>
Makes this camera the current camera for the [Viewport] (see class description). If the camera node is outside the scene tree, it will attempt to become current once it's added.
</description>
</method>
<method name="project_local_ray_normal" qualifiers="const">
<return type="Vector3" />
<argument index="0" name="screen_point" type="Vector2" />
<description>
Returns a normal vector from the screen point location directed along the camera. Orthogonal cameras are normalized. Perspective cameras account for perspective, screen width/height, etc.
</description>
</method>
<method name="project_position" qualifiers="const">
<return type="Vector3" />
<argument index="0" name="screen_point" type="Vector2" />
<argument index="1" name="z_depth" type="float" />
<description>
Returns the 3D point in world space that maps to the given 2D coordinate in the [Viewport] rectangle on a plane that is the given [code]z_depth[/code] distance into the scene away from the camera.
</description>
</method>
<method name="project_ray_normal" qualifiers="const">
<return type="Vector3" />
<argument index="0" name="screen_point" type="Vector2" />
<description>
Returns a normal vector in world space, that is the result of projecting a point on the [Viewport] rectangle by the inverse camera projection. This is useful for casting rays in the form of (origin, normal) for object intersection or picking.
</description>
</method>
<method name="project_ray_origin" qualifiers="const">
<return type="Vector3" />
<argument index="0" name="screen_point" type="Vector2" />
<description>
Returns a 3D position in world space, that is the result of projecting a point on the [Viewport] rectangle by the inverse camera projection. This is useful for casting rays in the form of (origin, normal) for object intersection or picking.
</description>
</method>
<method name="set_cull_mask_bit">
<return type="void" />
<argument index="0" name="layer" type="int" />
<argument index="1" name="enable" type="bool" />
<description>
Enables or disables the given [code]layer[/code] in the [member cull_mask].
</description>
</method>
<method name="set_frustum">
<return type="void" />
<argument index="0" name="size" type="float" />
<argument index="1" name="offset" type="Vector2" />
<argument index="2" name="z_near" type="float" />
<argument index="3" name="z_far" type="float" />
<description>
Sets the camera projection to frustum mode (see [constant PROJECTION_FRUSTUM]), by specifying a [code]size[/code], an [code]offset[/code], and the [code]z_near[/code] and [code]z_far[/code] clip planes in world space units.
</description>
</method>
<method name="set_orthogonal">
<return type="void" />
<argument index="0" name="size" type="float" />
<argument index="1" name="z_near" type="float" />
<argument index="2" name="z_far" type="float" />
<description>
Sets the camera projection to orthogonal mode (see [constant PROJECTION_ORTHOGONAL]), by specifying a [code]size[/code], and the [code]z_near[/code] and [code]z_far[/code] clip planes in world space units. (As a hint, 2D games often use this projection, with values specified in pixels.)
</description>
</method>
<method name="set_perspective">
<return type="void" />
<argument index="0" name="fov" type="float" />
<argument index="1" name="z_near" type="float" />
<argument index="2" name="z_far" type="float" />
<description>
Sets the camera projection to perspective mode (see [constant PROJECTION_PERSPECTIVE]), by specifying a [code]fov[/code] (field of view) angle in degrees, and the [code]z_near[/code] and [code]z_far[/code] clip planes in world space units.
</description>
</method>
<method name="unproject_position" qualifiers="const">
<return type="Vector2" />
<argument index="0" name="world_point" type="Vector3" />
<description>
Returns the 2D coordinate in the [Viewport] rectangle that maps to the given 3D point in world space.
[b]Note:[/b] When using this to position GUI elements over a 3D viewport, use [method is_position_behind] to prevent them from appearing if the 3D point is behind the camera:
[codeblock]
# This code block is part of a script that inherits from Spatial.
# `control` is a reference to a node inheriting from Control.
control.visible = not get_viewport().get_camera().is_position_behind(global_transform.origin)
control.rect_position = get_viewport().get_camera().unproject_position(global_transform.origin)
[/codeblock]
</description>
</method>
</methods>
<members>
<member name="cull_mask" type="int" setter="set_cull_mask" getter="get_cull_mask" default="1048575">
The culling mask that describes which 3D render layers are rendered by this camera.
</member>
<member name="current" type="bool" setter="set_current" getter="is_current" default="false">
If [code]true[/code], the ancestor [Viewport] is currently using this camera.
If multiple cameras are in the scene, one will always be made current. For example, if two [Camera] nodes are present in the scene and only one is current, setting one camera's [member current] to [code]false[/code] will cause the other camera to be made current.
</member>
<member name="doppler_tracking" type="int" setter="set_doppler_tracking" getter="get_doppler_tracking" enum="Camera.DopplerTracking" default="0">
If not [constant DOPPLER_TRACKING_DISABLED], this camera will simulate the [url=https://en.wikipedia.org/wiki/Doppler_effect]Doppler effect[/url] for objects changed in particular [code]_process[/code] methods. The Doppler effect is only simulated for [AudioStreamPlayer3D] nodes that have [member AudioStreamPlayer3D.doppler_tracking] set to a value other than [constant AudioStreamPlayer3D.DOPPLER_TRACKING_DISABLED].
[b]Note:[/b] To toggle the Doppler effect preview in the editor, use the Perspective menu in the top-left corner of the 3D viewport and toggle [b]Enable Doppler[/b].
</member>
<member name="environment" type="Environment3D" setter="set_environment" getter="get_environment">
The [Environment3D] to use for this camera.
</member>
<member name="far" type="float" setter="set_zfar" getter="get_zfar" default="100.0">
The distance to the far culling boundary for this camera relative to its local Z axis.
</member>
<member name="fov" type="float" setter="set_fov" getter="get_fov" default="70.0">
The camera's field of view angle (in degrees). Only applicable in perspective mode. Since [member keep_aspect] locks one axis, [code]fov[/code] sets the other axis' field of view angle.
For reference, the default vertical field of view value ([code]70.0[/code]) is equivalent to a horizontal FOV of:
- ~86.07 degrees in a 4:3 viewport
- ~96.50 degrees in a 16:10 viewport
- ~102.45 degrees in a 16:9 viewport
- ~117.06 degrees in a 21:9 viewport
</member>
<member name="frustum_offset" type="Vector2" setter="set_frustum_offset" getter="get_frustum_offset" default="Vector2( 0, 0 )">
The camera's frustum offset. This can be changed from the default to create "tilted frustum" effects such as [url=https://zdoom.org/wiki/Y-shearing]Y-shearing[/url].
</member>
<member name="h_offset" type="float" setter="set_h_offset" getter="get_h_offset" default="0.0">
The horizontal (X) offset of the camera viewport.
</member>
<member name="keep_aspect" type="int" setter="set_keep_aspect_mode" getter="get_keep_aspect_mode" enum="Camera.KeepAspect" default="1">
The axis to lock during [member fov]/[member size] adjustments. Can be either [constant KEEP_WIDTH] or [constant KEEP_HEIGHT].
</member>
<member name="near" type="float" setter="set_znear" getter="get_znear" default="0.05">
The distance to the near culling boundary for this camera relative to its local Z axis.
</member>
<member name="projection" type="int" setter="set_projection" getter="get_projection" enum="Camera.ProjectionMode" default="0">
The camera's projection mode. In [constant PROJECTION_PERSPECTIVE] mode, objects' Z distance from the camera's local space scales their perceived size.
</member>
<member name="size" type="float" setter="set_size" getter="get_size" default="1.0">
The camera's size in meters measured as the diameter of the width or height, depending on [member keep_aspect]. Only applicable in orthogonal and frustum modes.
</member>
<member name="v_offset" type="float" setter="set_v_offset" getter="get_v_offset" default="0.0">
The vertical (Y) offset of the camera viewport.
</member>
</members>
<constants>
<constant name="PROJECTION_PERSPECTIVE" value="0" enum="ProjectionMode">
Perspective projection. Objects on the screen becomes smaller when they are far away.
</constant>
<constant name="PROJECTION_ORTHOGONAL" value="1" enum="ProjectionMode">
Orthogonal projection, also known as orthographic projection. Objects remain the same size on the screen no matter how far away they are.
</constant>
<constant name="PROJECTION_FRUSTUM" value="2" enum="ProjectionMode">
Frustum projection. This mode allows adjusting [member frustum_offset] to create "tilted frustum" effects.
</constant>
<constant name="KEEP_WIDTH" value="0" enum="KeepAspect">
Preserves the horizontal aspect ratio; also known as Vert- scaling. This is usually the best option for projects running in portrait mode, as taller aspect ratios will benefit from a wider vertical FOV.
</constant>
<constant name="KEEP_HEIGHT" value="1" enum="KeepAspect">
Preserves the vertical aspect ratio; also known as Hor+ scaling. This is usually the best option for projects running in landscape mode, as wider aspect ratios will automatically benefit from a wider horizontal FOV.
</constant>
<constant name="DOPPLER_TRACKING_DISABLED" value="0" enum="DopplerTracking">
Disables [url=https://en.wikipedia.org/wiki/Doppler_effect]Doppler effect[/url] simulation (default).
</constant>
<constant name="DOPPLER_TRACKING_IDLE_STEP" value="1" enum="DopplerTracking">
Simulate [url=https://en.wikipedia.org/wiki/Doppler_effect]Doppler effect[/url] by tracking positions of objects that are changed in [code]_process[/code]. Changes in the relative velocity of this camera compared to those objects affect how audio is perceived (changing the audio's [member AudioStreamPlayer3D.pitch_scale]).
</constant>
<constant name="DOPPLER_TRACKING_PHYSICS_STEP" value="2" enum="DopplerTracking">
Simulate [url=https://en.wikipedia.org/wiki/Doppler_effect]Doppler effect[/url] by tracking positions of objects that are changed in [code]_physics_process[/code]. Changes in the relative velocity of this camera compared to those objects affect how audio is perceived (changing the audio's [member AudioStreamPlayer3D.pitch_scale]).
</constant>
</constants>
</class>

View File

@ -1,189 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Camera2D" inherits="Node2D" version="4.2">
<brief_description>
Camera node for 2D scenes.
</brief_description>
<description>
Camera node for 2D scenes. It forces the screen (current layer) to scroll following this node. This makes it easier (and faster) to program scrollable scenes than manually changing the position of [CanvasItem]-based nodes.
This node is intended to be a simple helper to get things going quickly, but more functionality may be desired to change how the camera works. To make your own custom camera node, inherit it from [Node2D] and change the transform of the canvas by setting [member Viewport.canvas_transform] in [Viewport] (you can obtain the current [Viewport] by using [method Node.get_viewport]).
Note that the [Camera2D] node's [code]position[/code] doesn't represent the actual position of the screen, which may differ due to applied smoothing or limits. You can use [method get_camera_screen_center] to get the real position.
</description>
<tutorials>
<link title="2D Platformer Demo">https://godotengine.org/asset-library/asset/120</link>
<link title="2D Isometric Demo">https://godotengine.org/asset-library/asset/112</link>
<link title="2D HDR Demo">https://godotengine.org/asset-library/asset/110</link>
</tutorials>
<methods>
<method name="align">
<return type="void" />
<description>
Aligns the camera to the tracked node.
</description>
</method>
<method name="force_update_scroll">
<return type="void" />
<description>
Forces the camera to update scroll immediately.
</description>
</method>
<method name="get_camera_position" qualifiers="const">
<return type="Vector2" />
<description>
Returns the camera's [code]position[/code] (the tracked point the camera attempts to follow), relative to the origin.
[b]Note:[/b] The returned value is not the same as [member Node2D.position] or [member Node2D.global_position], as it is affected by the [code]drag[/code] properties.
</description>
</method>
<method name="get_camera_screen_center" qualifiers="const">
<return type="Vector2" />
<description>
Returns the location of the [Camera2D]'s screen-center, relative to the origin.
[b]Note:[/b] The real [code]position[/code] of the camera may be different, see [method get_camera_position].
</description>
</method>
<method name="get_drag_margin" qualifiers="const">
<return type="float" />
<argument index="0" name="margin" type="int" enum="Margin" />
<description>
Returns the specified margin. See also [member drag_margin_bottom], [member drag_margin_top], [member drag_margin_left], and [member drag_margin_right].
</description>
</method>
<method name="get_limit" qualifiers="const">
<return type="int" />
<argument index="0" name="margin" type="int" enum="Margin" />
<description>
Returns the specified camera limit. See also [member limit_bottom], [member limit_top], [member limit_left], and [member limit_right].
</description>
</method>
<method name="is_current" qualifiers="const">
<return type="bool" />
<description>
Returns [code]true[/code] if this [Camera2D] is the active camera (see [method Viewport.get_camera_2d]).
</description>
</method>
<method name="make_current">
<return type="void" />
<description>
Forces this [Camera2D] to become the current active one. [member enabled] must be [code]true[/code].
</description>
</method>
<method name="reset_smoothing">
<return type="void" />
<description>
Sets the camera's position immediately to its current smoothing destination.
This method has no effect if [member smoothing_enabled] is [code]false[/code].
</description>
</method>
<method name="set_drag_margin">
<return type="void" />
<argument index="0" name="margin" type="int" enum="Margin" />
<argument index="1" name="drag_margin" type="float" />
<description>
Sets the specified margin. See also [member drag_margin_bottom], [member drag_margin_top], [member drag_margin_left], and [member drag_margin_right].
</description>
</method>
<method name="set_limit">
<return type="void" />
<argument index="0" name="margin" type="int" enum="Margin" />
<argument index="1" name="limit" type="int" />
<description>
Sets the specified camera limit. See also [member limit_bottom], [member limit_top], [member limit_left], and [member limit_right].
</description>
</method>
</methods>
<members>
<member name="anchor_mode" type="int" setter="set_anchor_mode" getter="get_anchor_mode" enum="Camera2D.AnchorMode" default="1">
The Camera2D's anchor point. See [enum AnchorMode] constants.
</member>
<member name="custom_viewport" type="Node" setter="set_custom_viewport" getter="get_custom_viewport">
The custom [Viewport] node attached to the [Camera2D]. If [code]null[/code] or not a [Viewport], uses the default viewport instead.
</member>
<member name="drag_margin_bottom" type="float" setter="set_drag_margin" getter="get_drag_margin" default="0.2">
Bottom margin needed to drag the camera. A value of [code]1[/code] makes the camera move only when reaching the edge of the screen.
</member>
<member name="drag_margin_h_enabled" type="bool" setter="set_h_drag_enabled" getter="is_h_drag_enabled" default="false">
If [code]true[/code], the camera only moves when reaching the horizontal drag margins. If [code]false[/code], the camera moves horizontally regardless of margins.
</member>
<member name="drag_margin_left" type="float" setter="set_drag_margin" getter="get_drag_margin" default="0.2">
Left margin needed to drag the camera. A value of [code]1[/code] makes the camera move only when reaching the edge of the screen.
</member>
<member name="drag_margin_right" type="float" setter="set_drag_margin" getter="get_drag_margin" default="0.2">
Right margin needed to drag the camera. A value of [code]1[/code] makes the camera move only when reaching the edge of the screen.
</member>
<member name="drag_margin_top" type="float" setter="set_drag_margin" getter="get_drag_margin" default="0.2">
Top margin needed to drag the camera. A value of [code]1[/code] makes the camera move only when reaching the edge of the screen.
</member>
<member name="drag_margin_v_enabled" type="bool" setter="set_v_drag_enabled" getter="is_v_drag_enabled" default="false">
If [code]true[/code], the camera only moves when reaching the vertical drag margins. If [code]false[/code], the camera moves vertically regardless of margins.
</member>
<member name="editor_draw_drag_margin" type="bool" setter="set_margin_drawing_enabled" getter="is_margin_drawing_enabled" default="false">
If [code]true[/code], draws the camera's drag margin rectangle in the editor.
</member>
<member name="editor_draw_limits" type="bool" setter="set_limit_drawing_enabled" getter="is_limit_drawing_enabled" default="false">
If [code]true[/code], draws the camera's limits rectangle in the editor.
</member>
<member name="editor_draw_screen" type="bool" setter="set_screen_drawing_enabled" getter="is_screen_drawing_enabled" default="true">
If [code]true[/code], draws the camera's screen rectangle in the editor.
</member>
<member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" default="true">
Controls whether the camera can be active or not. If [code]true[/code], the [Camera2D] will become the main camera when it enters the scene tree and there is no active camera currently (see [method Viewport.get_camera_2d]).
When the camera is currently active and [member enabled] is set to [code]false[/code], the next enabled [Camera2D] in the scene tree will become active.
</member>
<member name="limit_bottom" type="int" setter="set_limit" getter="get_limit" default="10000000">
Bottom scroll limit in pixels. The camera stops moving when reaching this value.
</member>
<member name="limit_left" type="int" setter="set_limit" getter="get_limit" default="-10000000">
Left scroll limit in pixels. The camera stops moving when reaching this value.
</member>
<member name="limit_right" type="int" setter="set_limit" getter="get_limit" default="10000000">
Right scroll limit in pixels. The camera stops moving when reaching this value.
</member>
<member name="limit_smoothed" type="bool" setter="set_limit_smoothing_enabled" getter="is_limit_smoothing_enabled" default="false">
If [code]true[/code], the camera smoothly stops when reaches its limits.
This property has no effect if [member smoothing_enabled] is [code]false[/code].
[b]Note:[/b] To immediately update the camera's position to be within limits without smoothing, even with this setting enabled, invoke [method reset_smoothing].
</member>
<member name="limit_top" type="int" setter="set_limit" getter="get_limit" default="-10000000">
Top scroll limit in pixels. The camera stops moving when reaching this value.
</member>
<member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2( 0, 0 )">
The camera's offset, useful for looking around or camera shake animations.
</member>
<member name="offset_h" type="float" setter="set_h_offset" getter="get_h_offset" default="0.0">
The horizontal offset of the camera, relative to the drag margins.
[b]Note:[/b] Offset H is used only to force offset relative to margins. It's not updated in any way if drag margins are enabled and can be used to set initial offset.
</member>
<member name="offset_v" type="float" setter="set_v_offset" getter="get_v_offset" default="0.0">
The vertical offset of the camera, relative to the drag margins.
[b]Note:[/b] Used the same as [member offset_h].
</member>
<member name="process_mode" type="int" setter="set_process_mode" getter="get_process_mode" enum="Camera2D.Camera2DProcessMode" default="1">
The camera's process callback. See [enum Camera2DProcessMode].
</member>
<member name="rotating" type="bool" setter="set_rotating" getter="is_rotating" default="false">
If [code]true[/code], the camera view rotates with the target.
</member>
<member name="smoothing_enabled" type="bool" setter="set_enable_follow_smoothing" getter="is_follow_smoothing_enabled" default="false">
If [code]true[/code], the camera smoothly moves towards the target at [member smoothing_speed].
</member>
<member name="smoothing_speed" type="float" setter="set_follow_smoothing" getter="get_follow_smoothing" default="5.0">
Speed in pixels per second of the camera's smoothing effect when [member smoothing_enabled] is [code]true[/code].
</member>
<member name="zoom" type="Vector2" setter="set_zoom" getter="get_zoom" default="Vector2( 1, 1 )">
The camera's zoom relative to the viewport. Values larger than [code]Vector2(1, 1)[/code] zoom out and smaller values zoom in. For an example, use [code]Vector2(0.5, 0.5)[/code] for a 2× zoom-in, and [code]Vector2(4, 4)[/code] for a 4× zoom-out.
</member>
</members>
<constants>
<constant name="ANCHOR_MODE_FIXED_TOP_LEFT" value="0" enum="AnchorMode">
The camera's position is fixed so that the top-left corner is always at the origin.
</constant>
<constant name="ANCHOR_MODE_DRAG_CENTER" value="1" enum="AnchorMode">
The camera's position takes into account vertical/horizontal offsets and the screen size.
</constant>
<constant name="CAMERA2D_PROCESS_PHYSICS" value="0" enum="Camera2DProcessMode">
The camera updates with the [code]_physics_process[/code] callback.
</constant>
<constant name="CAMERA2D_PROCESS_IDLE" value="1" enum="Camera2DProcessMode">
The camera updates with the [code]_process[/code] callback.
</constant>
</constants>
</class>

View File

@ -1,504 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="CanvasItem" inherits="Node" version="4.2">
<brief_description>
Base class of anything 2D.
</brief_description>
<description>
Base class of anything 2D. Canvas items are laid out in a tree; children inherit and extend their parent's transform. [CanvasItem] is extended by [Control] for anything GUI-related, and by [Node2D] for anything related to the 2D engine.
Any [CanvasItem] can draw. For this, [method update] is called by the engine, then [constant NOTIFICATION_DRAW] will be received on idle time to request redraw. Because of this, canvas items don't need to be redrawn on every frame, improving the performance significantly. Several functions for drawing on the [CanvasItem] are provided (see [code]draw_*[/code] functions). However, they can only be used inside [method _draw], its corresponding [method Object._notification] or methods connected to the [signal draw] signal.
Canvas items are drawn in tree order. By default, children are on top of their parents so a root [CanvasItem] will be drawn behind everything. This behavior can be changed on a per-item basis.
A [CanvasItem] can also be hidden, which will also hide its children. It provides many ways to change parameters such as modulation (for itself and its children) and self modulation (only for itself), as well as its blend mode.
Ultimately, a transform notification can be requested, which will notify the node that its global position changed in case the parent tree changed.
[b]Note:[/b] Unless otherwise specified, all methods that have angle parameters must have angles specified as [i]radians[/i]. To convert degrees to radians, use [method @GDScript.deg2rad].
</description>
<tutorials>
<link title="Viewport and canvas transforms">$DOCS_URL/tutorials/2d/2d_transforms.md</link>
<link title="Custom drawing in 2D">$DOCS_URL/tutorials/2d/custom_drawing_in_2d.md</link>
<link title="Audio Spectrum Demo">https://godotengine.org/asset-library/asset/528</link>
</tutorials>
<methods>
<method name="_draw" qualifiers="virtual">
<return type="void" />
<description>
Called when [CanvasItem] has been requested to redraw (when [method update] is called, either manually or by the engine).
Corresponds to the [constant NOTIFICATION_DRAW] notification in [method Object._notification].
</description>
</method>
<method name="draw_arc">
<return type="void" />
<argument index="0" name="center" type="Vector2" />
<argument index="1" name="radius" type="float" />
<argument index="2" name="start_angle" type="float" />
<argument index="3" name="end_angle" type="float" />
<argument index="4" name="point_count" type="int" />
<argument index="5" name="color" type="Color" />
<argument index="6" name="width" type="float" default="1.0" />
<argument index="7" name="antialiased" type="bool" default="false" />
<description>
Draws a unfilled arc between the given angles. The larger the value of [code]point_count[/code], the smoother the curve. See also [method draw_circle].
[b]Note:[/b] Line drawing is not accelerated by batching if [code]antialiased[/code] is [code]true[/code].
[b]Note:[/b] Due to how it works, built-in antialiasing will not look correct for translucent lines and may not work on certain platforms. As a workaround, install the [url=https://github.com/godot-extended-libraries/godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an AntialiasedRegularPolygon2D node. That node relies on a texture with custom mipmaps to perform antialiasing. 2D batching is also still supported with those antialiased lines.
</description>
</method>
<method name="draw_char">
<return type="float" />
<argument index="0" name="font" type="Font" />
<argument index="1" name="position" type="Vector2" />
<argument index="2" name="char" type="String" />
<argument index="3" name="next" type="String" />
<argument index="4" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )" />
<description>
Draws a string character using a custom font. Returns the advance, depending on the character width and kerning with an optional next character.
</description>
</method>
<method name="draw_circle">
<return type="void" />
<argument index="0" name="position" type="Vector2" />
<argument index="1" name="radius" type="float" />
<argument index="2" name="color" type="Color" />
<description>
Draws a colored, filled circle. See also [method draw_arc], [method draw_polyline] and [method draw_polygon].
[b]Note:[/b] Built-in antialiasing is not provided for [method draw_circle]. As a workaround, install the [url=https://github.com/godot-extended-libraries/godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an AntialiasedRegularPolygon2D node. That node relies on a texture with custom mipmaps to perform antialiasing.
</description>
</method>
<method name="draw_colored_polygon">
<return type="void" />
<argument index="0" name="points" type="PoolVector2Array" />
<argument index="1" name="color" type="Color" />
<argument index="2" name="uvs" type="PoolVector2Array" default="PoolVector2Array( )" />
<argument index="3" name="texture" type="Texture" default="null" />
<argument index="4" name="normal_map" type="Texture" default="null" />
<argument index="5" name="antialiased" type="bool" default="false" />
<description>
Draws a colored polygon of any amount of points, convex or concave. Unlike [method draw_polygon], a single color must be specified for the whole polygon.
[b]Note:[/b] Due to how it works, built-in antialiasing will not look correct for translucent polygons and may not work on certain platforms. As a workaround, install the [url=https://github.com/godot-extended-libraries/godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps to perform antialiasing.
</description>
</method>
<method name="draw_line">
<return type="void" />
<argument index="0" name="from" type="Vector2" />
<argument index="1" name="to" type="Vector2" />
<argument index="2" name="color" type="Color" />
<argument index="3" name="width" type="float" default="1.0" />
<argument index="4" name="antialiased" type="bool" default="false" />
<description>
Draws a line from a 2D point to another, with a given color and width. It can be optionally antialiased. See also [method draw_multiline] and [method draw_polyline].
[b]Note:[/b] Line drawing is not accelerated by batching if [code]antialiased[/code] is [code]true[/code].
[b]Note:[/b] Due to how it works, built-in antialiasing will not look correct for translucent lines and may not work on certain platforms. As a workaround, install the [url=https://github.com/godot-extended-libraries/godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D node. That node relies on a texture with custom mipmaps to perform antialiasing. 2D batching is also still supported with those antialiased lines.
</description>
</method>
<method name="draw_mesh">
<return type="void" />
<argument index="0" name="mesh" type="Mesh" />
<argument index="1" name="texture" type="Texture" />
<argument index="2" name="normal_map" type="Texture" default="null" />
<argument index="3" name="transform" type="Transform2D" default="Transform2D( 1, 0, 0, 1, 0, 0 )" />
<argument index="4" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )" />
<description>
Draws a [Mesh] in 2D, using the provided texture. See [MeshInstance2D] for related documentation.
</description>
</method>
<method name="draw_multiline">
<return type="void" />
<argument index="0" name="points" type="PoolVector2Array" />
<argument index="1" name="color" type="Color" />
<argument index="2" name="width" type="float" default="1.0" />
<argument index="3" name="antialiased" type="bool" default="false" />
<description>
Draws multiple disconnected lines with a uniform [code]color[/code]. When drawing large amounts of lines, this is faster than using individual [method draw_line] calls. To draw interconnected lines, use [method draw_polyline] instead.
[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently not implemented and have no effect. As a workaround, install the [url=https://github.com/godot-extended-libraries/godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D node. That node relies on a texture with custom mipmaps to perform antialiasing. 2D batching is also still supported with those antialiased lines.
</description>
</method>
<method name="draw_multiline_colors">
<return type="void" />
<argument index="0" name="points" type="PoolVector2Array" />
<argument index="1" name="colors" type="PoolColorArray" />
<argument index="2" name="width" type="float" default="1.0" />
<argument index="3" name="antialiased" type="bool" default="false" />
<description>
Draws multiple disconnected lines with a uniform [code]width[/code] and segment-by-segment coloring. Colors assigned to line segments match by index between [code]points[/code] and [code]colors[/code]. When drawing large amounts of lines, this is faster than using individual [method draw_line] calls. To draw interconnected lines, use [method draw_polyline_colors] instead.
[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are currently not implemented and have no effect. As a workaround, install the [url=https://github.com/godot-extended-libraries/godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D node. That node relies on a texture with custom mipmaps to perform antialiasing. 2D batching is also still supported with those antialiased lines.
</description>
</method>
<method name="draw_multimesh">
<return type="void" />
<argument index="0" name="multimesh" type="MultiMesh" />
<argument index="1" name="texture" type="Texture" />
<argument index="2" name="normal_map" type="Texture" default="null" />
<description>
Draws a [MultiMesh] in 2D with the provided texture. See [MultiMeshInstance2D] for related documentation.
</description>
</method>
<method name="draw_polygon">
<return type="void" />
<argument index="0" name="points" type="PoolVector2Array" />
<argument index="1" name="colors" type="PoolColorArray" />
<argument index="2" name="uvs" type="PoolVector2Array" default="PoolVector2Array( )" />
<argument index="3" name="texture" type="Texture" default="null" />
<argument index="4" name="normal_map" type="Texture" default="null" />
<argument index="5" name="antialiased" type="bool" default="false" />
<description>
Draws a solid polygon of any amount of points, convex or concave. Unlike [method draw_colored_polygon], each point's color can be changed individually. See also [method draw_polyline] and [method draw_polyline_colors].
[b]Note:[/b] Due to how it works, built-in antialiasing will not look correct for translucent polygons and may not work on certain platforms. As a workaround, install the [url=https://github.com/godot-extended-libraries/godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps to perform antialiasing.
</description>
</method>
<method name="draw_polyline">
<return type="void" />
<argument index="0" name="points" type="PoolVector2Array" />
<argument index="1" name="color" type="Color" />
<argument index="2" name="width" type="float" default="1.0" />
<argument index="3" name="antialiased" type="bool" default="false" />
<description>
Draws interconnected line segments with a uniform [code]color[/code] and [code]width[/code] and optional antialiasing. When drawing large amounts of lines, this is faster than using individual [method draw_line] calls. To draw disconnected lines, use [method draw_multiline] instead. See also [method draw_polygon].
[b]Note:[/b] Due to how it works, built-in antialiasing will not look correct for translucent polygons and may not work on certain platforms. As a workaround, install the [url=https://github.com/godot-extended-libraries/godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps to perform antialiasing.
</description>
</method>
<method name="draw_polyline_colors">
<return type="void" />
<argument index="0" name="points" type="PoolVector2Array" />
<argument index="1" name="colors" type="PoolColorArray" />
<argument index="2" name="width" type="float" default="1.0" />
<argument index="3" name="antialiased" type="bool" default="false" />
<description>
Draws interconnected line segments with a uniform [code]width[/code] and segment-by-segment coloring, and optional antialiasing. Colors assigned to line segments match by index between [code]points[/code] and [code]colors[/code]. When drawing large amounts of lines, this is faster than using individual [method draw_line] calls. To draw disconnected lines, use [method draw_multiline_colors] instead. See also [method draw_polygon].
[b]Note:[/b] Due to how it works, built-in antialiasing will not look correct for translucent polygons and may not work on certain platforms. As a workaround, install the [url=https://github.com/godot-extended-libraries/godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps to perform antialiasing.
</description>
</method>
<method name="draw_primitive">
<return type="void" />
<argument index="0" name="points" type="PoolVector2Array" />
<argument index="1" name="colors" type="PoolColorArray" />
<argument index="2" name="uvs" type="PoolVector2Array" />
<argument index="3" name="texture" type="Texture" default="null" />
<argument index="4" name="width" type="float" default="1.0" />
<argument index="5" name="normal_map" type="Texture" default="null" />
<description>
Draws a custom primitive. 1 point for a point, 2 points for a line, 3 points for a triangle, and 4 points for a quad. If 0 points or more than 4 points are specified, nothing will be drawn and an error message will be printed. See also [method draw_line], [method draw_polyline], [method draw_polygon], and [method draw_rect].
</description>
</method>
<method name="draw_rect">
<return type="void" />
<argument index="0" name="rect" type="Rect2" />
<argument index="1" name="color" type="Color" />
<argument index="2" name="filled" type="bool" default="true" />
<argument index="3" name="width" type="float" default="1.0" />
<argument index="4" name="antialiased" type="bool" default="false" />
<description>
Draws a rectangle. If [code]filled[/code] is [code]true[/code], the rectangle will be filled with the [code]color[/code] specified. If [code]filled[/code] is [code]false[/code], the rectangle will be drawn as a stroke with the [code]color[/code] and [code]width[/code] specified. If [code]antialiased[/code] is [code]true[/code], the lines will attempt to perform antialiasing using OpenGL line smoothing.
[b]Note:[/b] [code]width[/code] and [code]antialiased[/code] are only effective if [code]filled[/code] is [code]false[/code].
[b]Note:[/b] Due to how it works, built-in antialiasing will not look correct for translucent polygons and may not work on certain platforms. As a workaround, install the [url=https://github.com/godot-extended-libraries/godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps to perform antialiasing.
</description>
</method>
<method name="draw_set_transform">
<return type="void" />
<argument index="0" name="position" type="Vector2" />
<argument index="1" name="rotation" type="float" />
<argument index="2" name="scale" type="Vector2" />
<description>
Sets a custom transform for drawing via components. Anything drawn afterwards will be transformed by this.
</description>
</method>
<method name="draw_set_transform_matrix">
<return type="void" />
<argument index="0" name="xform" type="Transform2D" />
<description>
Sets a custom transform for drawing via matrix. Anything drawn afterwards will be transformed by this.
</description>
</method>
<method name="draw_string">
<return type="void" />
<argument index="0" name="font" type="Font" />
<argument index="1" name="position" type="Vector2" />
<argument index="2" name="text" type="String" />
<argument index="3" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )" />
<argument index="4" name="clip_w" type="int" default="-1" />
<description>
Draws [code]text[/code] using the specified [code]font[/code] at the [code]position[/code] (bottom-left corner using the baseline of the font). The text will have its color multiplied by [code]modulate[/code]. If [code]clip_w[/code] is greater than or equal to 0, the text will be clipped if it exceeds the specified width.
[b]Example using the default project font:[/b]
[codeblock]
# If using this method in a script that redraws constantly, move the
# `default_font` declaration to a member variable assigned in `_ready()`
# so the Control is only created once.
var default_font = Control.new().get_theme_font("font")
draw_string(default_font, Vector2(64, 64), "Hello world")
[/codeblock]
See also [method Font.draw].
</description>
</method>
<method name="draw_style_box">
<return type="void" />
<argument index="0" name="style_box" type="StyleBox" />
<argument index="1" name="rect" type="Rect2" />
<description>
Draws a styled rectangle.
</description>
</method>
<method name="draw_texture">
<return type="void" />
<argument index="0" name="texture" type="Texture" />
<argument index="1" name="position" type="Vector2" />
<argument index="2" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )" />
<argument index="3" name="normal_map" type="Texture" default="null" />
<description>
Draws a texture at a given position.
</description>
</method>
<method name="draw_texture_rect">
<return type="void" />
<argument index="0" name="texture" type="Texture" />
<argument index="1" name="rect" type="Rect2" />
<argument index="2" name="tile" type="bool" />
<argument index="3" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )" />
<argument index="4" name="transpose" type="bool" default="false" />
<argument index="5" name="normal_map" type="Texture" default="null" />
<description>
Draws a textured rectangle at a given position, optionally modulated by a color. If [code]transpose[/code] is [code]true[/code], the texture will have its X and Y coordinates swapped.
</description>
</method>
<method name="draw_texture_rect_region">
<return type="void" />
<argument index="0" name="texture" type="Texture" />
<argument index="1" name="rect" type="Rect2" />
<argument index="2" name="src_rect" type="Rect2" />
<argument index="3" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )" />
<argument index="4" name="transpose" type="bool" default="false" />
<argument index="5" name="normal_map" type="Texture" default="null" />
<argument index="6" name="clip_uv" type="bool" default="true" />
<description>
Draws a textured rectangle region at a given position, optionally modulated by a color. If [code]transpose[/code] is [code]true[/code], the texture will have its X and Y coordinates swapped.
</description>
</method>
<method name="force_update_transform">
<return type="void" />
<description>
Forces the transform to update. Transform changes in physics are not instant for performance reasons. Transforms are accumulated and then set. Use this if you need an up-to-date transform when doing physics operations.
</description>
</method>
<method name="get_canvas" qualifiers="const">
<return type="RID" />
<description>
Returns the [RID] of the [World2D] canvas where this item is in.
</description>
</method>
<method name="get_canvas_item" qualifiers="const">
<return type="RID" />
<description>
Returns the canvas item RID used by [RenderingServer] for this item.
</description>
</method>
<method name="get_canvas_transform" qualifiers="const">
<return type="Transform2D" />
<description>
Returns the transform from the coordinate system of the canvas, this item is in, to the [Viewport]s coordinate system.
</description>
</method>
<method name="get_global_mouse_position" qualifiers="const">
<return type="Vector2" />
<description>
Returns the mouse's position in the [CanvasLayer] that this [CanvasItem] is in using the coordinate system of the [CanvasLayer].
</description>
</method>
<method name="get_global_transform" qualifiers="const">
<return type="Transform2D" />
<description>
Returns the global transform matrix of this item, i.e. the combined transform up to the topmost [CanvasItem] node. The topmost item is a [CanvasItem] that either has no parent, has non-[CanvasItem] parent or it is top-level. See also [method set_as_toplevel].
</description>
</method>
<method name="get_global_transform_with_canvas" qualifiers="const">
<return type="Transform2D" />
<description>
Returns the transform from the local coordinate system of this [CanvasItem] to the [Viewport]s coordinate system.
</description>
</method>
<method name="get_local_mouse_position" qualifiers="const">
<return type="Vector2" />
<description>
Returns the mouse's position in this [CanvasItem] using the local coordinate system of this [CanvasItem].
</description>
</method>
<method name="get_transform" qualifiers="const">
<return type="Transform2D" />
<description>
Returns the transform matrix of this item.
</description>
</method>
<method name="get_viewport_rect" qualifiers="const">
<return type="Rect2" />
<description>
Returns the viewport's boundaries as a [Rect2].
</description>
</method>
<method name="get_viewport_transform" qualifiers="const">
<return type="Transform2D" />
<description>
Returns the transform from the coordinate system of the canvas, this item is in, to the [Viewport]s embedders coordinate system.
</description>
</method>
<method name="get_world_2d" qualifiers="const">
<return type="World2D" />
<description>
Returns the [World2D] where this item is in.
</description>
</method>
<method name="hide">
<return type="void" />
<description>
Hide the [CanvasItem] if it's currently visible. This is equivalent to setting [member visible] to [code]false[/code].
</description>
</method>
<method name="is_local_transform_notification_enabled" qualifiers="const">
<return type="bool" />
<description>
Returns [code]true[/code] if local transform notifications are communicated to children.
</description>
</method>
<method name="is_set_as_toplevel" qualifiers="const">
<return type="bool" />
<description>
</description>
</method>
<method name="is_transform_notification_enabled" qualifiers="const">
<return type="bool" />
<description>
Returns [code]true[/code] if global transform notifications are communicated to children.
</description>
</method>
<method name="is_visible_in_tree" qualifiers="const">
<return type="bool" />
<description>
Returns [code]true[/code] if the node is present in the [SceneTree], its [member visible] property is [code]true[/code] and all its ancestors are also visible. If any ancestor is hidden, this node will not be visible in the scene tree, and is consequently not drawn (see [method _draw]).
</description>
</method>
<method name="make_canvas_position_local" qualifiers="const">
<return type="Vector2" />
<argument index="0" name="screen_point" type="Vector2" />
<description>
Assigns [code]screen_point[/code] as this node's new local transform.
</description>
</method>
<method name="make_input_local" qualifiers="const">
<return type="InputEvent" />
<argument index="0" name="event" type="InputEvent" />
<description>
Transformations issued by [code]event[/code]'s inputs are applied in local space instead of global space.
</description>
</method>
<method name="set_as_toplevel">
<return type="void" />
<argument index="0" name="enable" type="bool" />
<description>
</description>
</method>
<method name="set_notify_local_transform">
<return type="void" />
<argument index="0" name="enable" type="bool" />
<description>
If [code]enable[/code] is [code]true[/code], this node will receive [constant NOTIFICATION_LOCAL_TRANSFORM_CHANGED] when its local transform changes.
</description>
</method>
<method name="set_notify_transform">
<return type="void" />
<argument index="0" name="enable" type="bool" />
<description>
If [code]enable[/code] is [code]true[/code], this node will receive [constant NOTIFICATION_TRANSFORM_CHANGED] when its global transform changes.
</description>
</method>
<method name="show">
<return type="void" />
<description>
Show the [CanvasItem] if it's currently hidden. This is equivalent to setting [member visible] to [code]true[/code]. For controls that inherit [Popup], the correct way to make them visible is to call one of the multiple [code]popup*()[/code] functions instead.
</description>
</method>
<method name="update">
<return type="void" />
<description>
Queues the [CanvasItem] to redraw. During idle time, if [CanvasItem] is visible, [constant NOTIFICATION_DRAW] is sent and [method _draw] is called. This only occurs [b]once[/b] per frame, even if this method has been called multiple times.
</description>
</method>
</methods>
<members>
<member name="light_mask" type="int" setter="set_light_mask" getter="get_light_mask" default="1">
The rendering layers in which this [CanvasItem] responds to [Light2D] nodes.
</member>
<member name="material" type="Material" setter="set_material" getter="get_material">
The material applied to textures on this [CanvasItem].
</member>
<member name="modulate" type="Color" setter="set_modulate" getter="get_modulate" default="Color( 1, 1, 1, 1 )">
The color applied to textures on this [CanvasItem].
</member>
<member name="self_modulate" type="Color" setter="set_self_modulate" getter="get_self_modulate" default="Color( 1, 1, 1, 1 )">
The color applied to textures on this [CanvasItem]. This is not inherited by children [CanvasItem]s.
</member>
<member name="show_behind_parent" type="bool" setter="set_draw_behind_parent" getter="is_draw_behind_parent_enabled" default="false">
If [code]true[/code], the object draws behind its parent.
</member>
<member name="use_parent_material" type="bool" setter="set_use_parent_material" getter="get_use_parent_material" default="false">
If [code]true[/code], the parent [CanvasItem]'s [member material] property is used as this one's material.
</member>
<member name="visible" type="bool" setter="set_visible" getter="is_visible" default="true">
If [code]true[/code], this [CanvasItem] is drawn. The node is only visible if all of its ancestors are visible as well (in other words, [method is_visible_in_tree] must return [code]true[/code]).
[b]Note:[/b] For controls that inherit [Popup], the correct way to make them visible is to call one of the multiple [code]popup*()[/code] functions instead.
</member>
</members>
<signals>
<signal name="draw">
<description>
Emitted when the [CanvasItem] must redraw, [i]after[/i] the related [constant NOTIFICATION_DRAW] notification, and [i]before[/i] [method _draw] is called.
[b]Note:[/b] Deferred connections do not allow drawing through the [code]draw_*[/code] methods.
</description>
</signal>
<signal name="hide">
<description>
Emitted when becoming hidden.
</description>
</signal>
<signal name="item_rect_changed">
<description>
Emitted when the item's [Rect2] boundaries (position or size) have changed, or when an action is taking place that may have impacted these boundaries (e.g. changing [member Sprite.texture]).
</description>
</signal>
<signal name="visibility_changed">
<description>
Emitted when the visibility (hidden/visible) changes.
</description>
</signal>
</signals>
<constants>
<constant name="BLEND_MODE_MIX" value="0" enum="BlendMode">
Mix blending mode. Colors are assumed to be independent of the alpha (opacity) value.
</constant>
<constant name="BLEND_MODE_ADD" value="1" enum="BlendMode">
Additive blending mode.
</constant>
<constant name="BLEND_MODE_SUB" value="2" enum="BlendMode">
Subtractive blending mode.
</constant>
<constant name="BLEND_MODE_MUL" value="3" enum="BlendMode">
Multiplicative blending mode.
</constant>
<constant name="BLEND_MODE_PREMULT_ALPHA" value="4" enum="BlendMode">
Mix blending mode. Colors are assumed to be premultiplied by the alpha (opacity) value.
</constant>
<constant name="BLEND_MODE_DISABLED" value="5" enum="BlendMode">
Disables blending mode. Colors including alpha are written as-is. Only applicable for render targets with a transparent background. No lighting will be applied.
</constant>
<constant name="NOTIFICATION_TRANSFORM_CHANGED" value="2000">
The [CanvasItem]'s global transform has changed. This notification is only received if enabled by [method set_notify_transform].
</constant>
<constant name="NOTIFICATION_LOCAL_TRANSFORM_CHANGED" value="35">
The [CanvasItem]'s local transform has changed. This notification is only received if enabled by [method set_notify_local_transform].
</constant>
<constant name="NOTIFICATION_DRAW" value="30">
The [CanvasItem] is requested to draw (see [method _draw]).
</constant>
<constant name="NOTIFICATION_VISIBILITY_CHANGED" value="31">
The [CanvasItem]'s visibility has changed.
</constant>
<constant name="NOTIFICATION_ENTER_CANVAS" value="32">
The [CanvasItem] has entered the canvas.
</constant>
<constant name="NOTIFICATION_EXIT_CANVAS" value="33">
The [CanvasItem] has exited the canvas.
</constant>
</constants>
</class>

View File

@ -1,63 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="CanvasItemMaterial" inherits="Material" version="4.2">
<brief_description>
A material for [CanvasItem]s.
</brief_description>
<description>
[CanvasItemMaterial]s provide a means of modifying the textures associated with a CanvasItem. They specialize in describing blend and lighting behaviors for textures. Use a [ShaderMaterial] to more fully customize a material's interactions with a [CanvasItem].
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
<member name="blend_mode" type="int" setter="set_blend_mode" getter="get_blend_mode" enum="CanvasItemMaterial.BlendMode" default="0">
The manner in which a material's rendering is applied to underlying textures.
</member>
<member name="light_mode" type="int" setter="set_light_mode" getter="get_light_mode" enum="CanvasItemMaterial.LightMode" default="0">
The manner in which material reacts to lighting.
</member>
<member name="particles_anim_h_frames" type="int" setter="set_particles_anim_h_frames" getter="get_particles_anim_h_frames">
The number of columns in the spritesheet assigned as [Texture] for a [Particles2D] or [CPUParticles2D].
[b]Note:[/b] This property is only used and visible in the editor if [member particles_animation] is [code]true[/code].
</member>
<member name="particles_anim_loop" type="bool" setter="set_particles_anim_loop" getter="get_particles_anim_loop">
If [code]true[/code], the particles animation will loop.
[b]Note:[/b] This property is only used and visible in the editor if [member particles_animation] is [code]true[/code].
</member>
<member name="particles_anim_v_frames" type="int" setter="set_particles_anim_v_frames" getter="get_particles_anim_v_frames">
The number of rows in the spritesheet assigned as [Texture] for a [Particles2D] or [CPUParticles2D].
[b]Note:[/b] This property is only used and visible in the editor if [member particles_animation] is [code]true[/code].
</member>
<member name="particles_animation" type="bool" setter="set_particles_animation" getter="get_particles_animation" default="false">
If [code]true[/code], enable spritesheet-based animation features when assigned to [Particles2D] and [CPUParticles2D] nodes. The [member ParticlesMaterial.anim_speed] or [member CPUParticles2D.anim_speed] should also be set to a positive value for the animation to play.
This property (and other [code]particles_anim_*[/code] properties that depend on it) has no effect on other types of nodes.
</member>
</members>
<constants>
<constant name="BLEND_MODE_MIX" value="0" enum="BlendMode">
Mix blending mode. Colors are assumed to be independent of the alpha (opacity) value.
</constant>
<constant name="BLEND_MODE_ADD" value="1" enum="BlendMode">
Additive blending mode.
</constant>
<constant name="BLEND_MODE_SUB" value="2" enum="BlendMode">
Subtractive blending mode.
</constant>
<constant name="BLEND_MODE_MUL" value="3" enum="BlendMode">
Multiplicative blending mode.
</constant>
<constant name="BLEND_MODE_PREMULT_ALPHA" value="4" enum="BlendMode">
Mix blending mode. Colors are assumed to be premultiplied by the alpha (opacity) value.
</constant>
<constant name="LIGHT_MODE_NORMAL" value="0" enum="LightMode">
Render the material using both light and non-light sensitive material properties.
</constant>
<constant name="LIGHT_MODE_UNSHADED" value="1" enum="LightMode">
Render the material as if there were no light.
</constant>
<constant name="LIGHT_MODE_LIGHT_ONLY" value="2" enum="LightMode">
Render the material as if there were only light.
</constant>
</constants>
</class>

Some files were not shown because too many files have changed in this diff Show More