[DOCS] Sync classref with current source
This commit is contained in:
parent
bd3b958a25
commit
eb63f7b071
|
@ -265,6 +265,11 @@
|
|||
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>
|
||||
Shuffle the array such that the items will have a random order.
|
||||
</description>
|
||||
</method>
|
||||
<method name="size">
|
||||
<return type="int">
|
||||
</return>
|
||||
|
@ -296,11 +301,6 @@
|
|||
[/codeblock]
|
||||
</description>
|
||||
</method>
|
||||
<method name="shuffle">
|
||||
<description>
|
||||
Shuffle the array such that the items will have a random order.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<constants>
|
||||
</constants>
|
||||
|
|
|
@ -25,8 +25,10 @@
|
|||
</return>
|
||||
<argument index="0" name="image" type="Image">
|
||||
</argument>
|
||||
<argument index="1" name="threshold" type="float" default="0.1">
|
||||
</argument>
|
||||
<description>
|
||||
Creates a bitmap that matches the given image dimensions, every element of the bitmap is set to false if the alpha value of the image at that position is 0, and true in other case.
|
||||
Creates a bitmap that matches the given image dimensions, every element of the bitmap is set to false if the alpha value of the image at that position is equal to [code]threshold[/code] or less, and true in other case.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_bit" qualifiers="const">
|
||||
|
|
|
@ -90,6 +90,18 @@
|
|||
Draws a line from a 2D point to another, with a given color and width. It can be optionally antialiased.
|
||||
</description>
|
||||
</method>
|
||||
<method name="draw_mesh">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="mesh" type="Mesh">
|
||||
</argument>
|
||||
<argument index="1" name="texture" type="Texture">
|
||||
</argument>
|
||||
<argument index="2" name="normal_map" type="Texture" default="null">
|
||||
</argument>
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="draw_multiline">
|
||||
<return type="void">
|
||||
</return>
|
||||
|
@ -120,6 +132,18 @@
|
|||
Draws multiple, parallel lines with a uniform [code]width[/code], segment-by-segment coloring, and optional antialiasing. Colors assigned to line segments match by index between [code]points[/code] and [code]colors[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="draw_multimesh">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="mesh" type="Mesh">
|
||||
</argument>
|
||||
<argument index="1" name="texture" type="Texture">
|
||||
</argument>
|
||||
<argument index="2" name="normal_map" type="Texture" default="null">
|
||||
</argument>
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="draw_polygon">
|
||||
<return type="void">
|
||||
</return>
|
||||
|
|
|
@ -117,6 +117,24 @@
|
|||
[/codeblock]
|
||||
</description>
|
||||
</method>
|
||||
<method name="from_hsv">
|
||||
<return type="Color">
|
||||
</return>
|
||||
<argument index="0" name="h" type="float">
|
||||
</argument>
|
||||
<argument index="1" name="s" type="float">
|
||||
</argument>
|
||||
<argument index="2" name="v" type="float">
|
||||
</argument>
|
||||
<argument index="3" name="a" type="float" default="1">
|
||||
</argument>
|
||||
<description>
|
||||
Constructs a color from an HSV profile. [code]h[/code] is a value between 0 and 360. [code]s[/code] and [code]v[/code] are values between 0 and 1.
|
||||
[codeblock]
|
||||
var c = Color.from_hsv(210, 0.5, 0.79, 0.8) # equivalent to HSV(210, 50, 79, 0.8) or Color8(100, 151, 201, 0.8)
|
||||
[/codeblock]
|
||||
</description>
|
||||
</method>
|
||||
<method name="gray">
|
||||
<return type="float">
|
||||
</return>
|
||||
|
|
|
@ -12,6 +12,17 @@
|
|||
<demos>
|
||||
</demos>
|
||||
<methods>
|
||||
<method name="add_autoload_singleton">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="name" type="String">
|
||||
</argument>
|
||||
<argument index="1" name="path" type="String">
|
||||
</argument>
|
||||
<description>
|
||||
Add a script at [code]path[/code] to the Autoload list as [code]name[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="add_control_to_bottom_panel">
|
||||
<return type="ToolButton">
|
||||
</return>
|
||||
|
@ -265,6 +276,15 @@
|
|||
Queue save the project's editor layout.
|
||||
</description>
|
||||
</method>
|
||||
<method name="remove_autoload_singleton">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="name" type="String">
|
||||
</argument>
|
||||
<description>
|
||||
Remove an Autoload [code]name[/code] from the list.
|
||||
</description>
|
||||
</method>
|
||||
<method name="remove_control_from_bottom_panel">
|
||||
<return type="void">
|
||||
</return>
|
||||
|
|
|
@ -63,6 +63,8 @@
|
|||
</return>
|
||||
<argument index="0" name="rel_vec" type="Vector3">
|
||||
</argument>
|
||||
<argument index="1" name="infinite_inertia" type="bool" default="true">
|
||||
</argument>
|
||||
<description>
|
||||
Moves the body along the vector [code]rel_vec[/code]. The body will stop if it collides. Returns a [KinematicCollision], which contains information about the collision.
|
||||
</description>
|
||||
|
@ -74,11 +76,13 @@
|
|||
</argument>
|
||||
<argument index="1" name="floor_normal" type="Vector3" default="Vector3( 0, 0, 0 )">
|
||||
</argument>
|
||||
<argument index="2" name="slope_stop_min_velocity" type="float" default="0.05">
|
||||
<argument index="2" name="infinite_inertia" type="bool" default="true">
|
||||
</argument>
|
||||
<argument index="3" name="max_slides" type="int" default="4">
|
||||
<argument index="3" name="slope_stop_min_velocity" type="float" default="0.05">
|
||||
</argument>
|
||||
<argument index="4" name="floor_max_angle" type="float" default="0.785398">
|
||||
<argument index="4" name="max_slides" type="int" default="4">
|
||||
</argument>
|
||||
<argument index="5" name="floor_max_angle" type="float" default="0.785398">
|
||||
</argument>
|
||||
<description>
|
||||
Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [code]KinematicBody[/code] or [RigidBody], it will also be affected by the motion of the other body. You can use this to make moving or rotating platforms, or to make nodes push other nodes.
|
||||
|
@ -97,6 +101,8 @@
|
|||
</argument>
|
||||
<argument index="1" name="rel_vec" type="Vector3">
|
||||
</argument>
|
||||
<argument index="2" name="infinite_inertia" type="bool">
|
||||
</argument>
|
||||
<description>
|
||||
Checks for collisions without moving the body. Virtually sets the node's position, scale and rotation to that of the given [Transform], then tries to move the body along the vector [code]rel_vec[/code]. Returns [code]true[/code] if a collision would occur.
|
||||
</description>
|
||||
|
|
|
@ -62,6 +62,8 @@
|
|||
</return>
|
||||
<argument index="0" name="rel_vec" type="Vector2">
|
||||
</argument>
|
||||
<argument index="1" name="infinite_inertia" type="bool" default="true">
|
||||
</argument>
|
||||
<description>
|
||||
Moves the body along the vector [code]rel_vec[/code]. The body will stop if it collides. Returns a [KinematicCollision2D], which contains information about the collision.
|
||||
</description>
|
||||
|
@ -73,11 +75,13 @@
|
|||
</argument>
|
||||
<argument index="1" name="floor_normal" type="Vector2" default="Vector2( 0, 0 )">
|
||||
</argument>
|
||||
<argument index="2" name="slope_stop_min_velocity" type="float" default="5">
|
||||
<argument index="2" name="infinite_inertia" type="bool" default="true">
|
||||
</argument>
|
||||
<argument index="3" name="max_bounces" type="int" default="4">
|
||||
<argument index="3" name="slope_stop_min_velocity" type="float" default="5">
|
||||
</argument>
|
||||
<argument index="4" name="floor_max_angle" type="float" default="0.785398">
|
||||
<argument index="4" name="max_bounces" type="int" default="4">
|
||||
</argument>
|
||||
<argument index="5" name="floor_max_angle" type="float" default="0.785398">
|
||||
</argument>
|
||||
<description>
|
||||
Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [code]KinematicBody2D[/code] or [RigidBody2D], it will also be affected by the motion of the other body. You can use this to make moving or rotating platforms, or to make nodes push other nodes.
|
||||
|
@ -96,6 +100,8 @@
|
|||
</argument>
|
||||
<argument index="1" name="rel_vec" type="Vector2">
|
||||
</argument>
|
||||
<argument index="2" name="infinite_inertia" type="bool">
|
||||
</argument>
|
||||
<description>
|
||||
Checks for collisions without moving the body. Virtually sets the node's position, scale and rotation to that of the given [Transform2D], then tries to move the body along the vector [code]rel_vec[/code]. Returns [code]true[/code] if a collision would occur.
|
||||
</description>
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="MeshInstance2D" inherits="Node2D" category="Core" version="3.1-dev">
|
||||
<brief_description>
|
||||
</brief_description>
|
||||
<description>
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
<demos>
|
||||
</demos>
|
||||
<methods>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh">
|
||||
</member>
|
||||
<member name="normal_map" type="Texture" setter="set_normal_map" getter="get_normal_map">
|
||||
</member>
|
||||
<member name="texture" type="Texture" setter="set_texture" getter="get_texture">
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
|
@ -713,9 +713,11 @@
|
|||
</argument>
|
||||
<argument index="2" name="motion" type="Vector2">
|
||||
</argument>
|
||||
<argument index="3" name="margin" type="float" default="0.08">
|
||||
<argument index="3" name="infinite_inertia" type="bool">
|
||||
</argument>
|
||||
<argument index="4" name="result" type="Physics2DTestMotionResult" default="null">
|
||||
<argument index="4" name="margin" type="float" default="0.08">
|
||||
</argument>
|
||||
<argument index="5" name="result" type="Physics2DTestMotionResult" default="null">
|
||||
</argument>
|
||||
<description>
|
||||
Returns whether a body can move from a given point in a given direction. Apart from the boolean return value, a [Physics2DTestMotionResult] can be passed to return additional information in.
|
||||
|
|
|
@ -9,6 +9,14 @@
|
|||
<demos>
|
||||
</demos>
|
||||
<methods>
|
||||
<method name="add_central_force">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="force" type="Vector3">
|
||||
</argument>
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="add_force">
|
||||
<return type="void">
|
||||
</return>
|
||||
|
@ -19,6 +27,14 @@
|
|||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="add_torque">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="torque" type="Vector3">
|
||||
</argument>
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="apply_impulse">
|
||||
<return type="void">
|
||||
</return>
|
||||
|
|
|
@ -16,6 +16,9 @@
|
|||
<member name="length" type="float" setter="set_length" getter="get_length">
|
||||
The ray's length.
|
||||
</member>
|
||||
<member name="slips_on_slope" type="bool" setter="set_slips_on_slope" getter="get_slips_on_slope">
|
||||
If [code]true[/code] allow the shape to return the correct normal. Default value: [code]false[/code].
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
</constants>
|
||||
|
|
|
@ -16,6 +16,9 @@
|
|||
<member name="length" type="float" setter="set_length" getter="get_length">
|
||||
The ray's length.
|
||||
</member>
|
||||
<member name="slips_on_slope" type="bool" setter="set_slips_on_slope" getter="get_slips_on_slope">
|
||||
If [code]true[/code] allow the shape to return the correct normal. Default value: [code]false[/code].
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
</constants>
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
<method name="apply_torque_impulse">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="1" name="impulse" type="Vector3">
|
||||
<argument index="0" name="impulse" type="Vector3">
|
||||
</argument>
|
||||
<description>
|
||||
Apply a torque impulse (which will be affected by the body mass and shape). This will rotate the body around the passed in vector.
|
||||
|
|
|
@ -66,9 +66,11 @@
|
|||
</return>
|
||||
<argument index="0" name="motion" type="Vector2">
|
||||
</argument>
|
||||
<argument index="1" name="margin" type="float" default="0.08">
|
||||
<argument index="1" name="infinite_inertia" type="bool" default="true">
|
||||
</argument>
|
||||
<argument index="2" name="result" type="Physics2DTestMotionResult" default="null">
|
||||
<argument index="2" name="margin" type="float" default="0.08">
|
||||
</argument>
|
||||
<argument index="3" name="result" type="Physics2DTestMotionResult" default="null">
|
||||
</argument>
|
||||
<description>
|
||||
Returns [code]true[/code] if a collision would result from moving in the given vector. [code]margin[/code] increases the size of the shapes involved in the collision detection, and [code]result[/code] is an object of type [Physics2DTestMotionResult], which contains additional information about the collision (should there be one).
|
||||
|
|
|
@ -11,6 +11,13 @@
|
|||
<demos>
|
||||
</demos>
|
||||
<methods>
|
||||
<method name="get_rect" qualifiers="const">
|
||||
<return type="Rect2">
|
||||
</return>
|
||||
<description>
|
||||
Returns a Rect2 representing the Sprite's boundary relative to its local coordinates.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="centered" type="bool" setter="set_centered" getter="is_centered">
|
||||
|
|
|
@ -175,7 +175,9 @@
|
|||
</argument>
|
||||
<argument index="1" name="mesh" type="RID">
|
||||
</argument>
|
||||
<argument index="2" name="skeleton" type="RID">
|
||||
<argument index="2" name="texture" type="RID">
|
||||
</argument>
|
||||
<argument index="3" name="normal_map" type="RID">
|
||||
</argument>
|
||||
<description>
|
||||
Adds a [Mesh] to the [CanvasItem]'s draw commands. Only affects its aabb at the moment.
|
||||
|
@ -188,7 +190,9 @@
|
|||
</argument>
|
||||
<argument index="1" name="mesh" type="RID">
|
||||
</argument>
|
||||
<argument index="2" name="skeleton" type="RID">
|
||||
<argument index="2" name="texture" type="RID">
|
||||
</argument>
|
||||
<argument index="3" name="normal_map" type="RID">
|
||||
</argument>
|
||||
<description>
|
||||
Adds a [MultiMesh] to the [CanvasItem]'s draw commands. Only affects its aabb at the moment.
|
||||
|
|
|
@ -1828,8 +1828,8 @@ void VisualServer::_bind_methods() {
|
|||
ClassDB::bind_method(D_METHOD("canvas_item_add_primitive", "item", "points", "colors", "uvs", "texture", "width", "normal_map"), &VisualServer::canvas_item_add_primitive, DEFVAL(1.0), DEFVAL(RID()));
|
||||
ClassDB::bind_method(D_METHOD("canvas_item_add_polygon", "item", "points", "colors", "uvs", "texture", "normal_map", "antialiased"), &VisualServer::canvas_item_add_polygon, DEFVAL(Vector<Point2>()), DEFVAL(RID()), DEFVAL(RID()), DEFVAL(false));
|
||||
ClassDB::bind_method(D_METHOD("canvas_item_add_triangle_array", "item", "indices", "points", "colors", "uvs", "texture", "count", "normal_map"), &VisualServer::canvas_item_add_triangle_array, DEFVAL(Vector<Point2>()), DEFVAL(RID()), DEFVAL(-1), DEFVAL(RID()));
|
||||
ClassDB::bind_method(D_METHOD("canvas_item_add_mesh", "item", "mesh", "skeleton"), &VisualServer::canvas_item_add_mesh, DEFVAL(RID()));
|
||||
ClassDB::bind_method(D_METHOD("canvas_item_add_multimesh", "item", "mesh", "skeleton"), &VisualServer::canvas_item_add_multimesh, DEFVAL(RID()));
|
||||
ClassDB::bind_method(D_METHOD("canvas_item_add_mesh", "item", "mesh", "texture", "normal_map"), &VisualServer::canvas_item_add_mesh, DEFVAL(RID()));
|
||||
ClassDB::bind_method(D_METHOD("canvas_item_add_multimesh", "item", "mesh", "texture", "normal_map"), &VisualServer::canvas_item_add_multimesh, DEFVAL(RID()));
|
||||
ClassDB::bind_method(D_METHOD("canvas_item_add_particles", "item", "particles", "texture", "normal_map", "h_frames", "v_frames"), &VisualServer::canvas_item_add_particles);
|
||||
ClassDB::bind_method(D_METHOD("canvas_item_add_set_transform", "item", "transform"), &VisualServer::canvas_item_add_set_transform);
|
||||
ClassDB::bind_method(D_METHOD("canvas_item_add_clip_ignore", "item", "ignore"), &VisualServer::canvas_item_add_clip_ignore);
|
||||
|
|
Loading…
Reference in New Issue